summaryrefslogtreecommitdiff
path: root/modules/tag
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2011-03-27 11:25:27 -0700
committerBharat Mediratta <bharat@menalto.com>2011-03-27 11:25:27 -0700
commit65825c572a0db24036c855de01714c613a979550 (patch)
tree5b47f305074f4f7c065d8726dc3581bcddb1b5a0 /modules/tag
parentc791ae96d5bb28f39b26a0e556e10e636f97436c (diff)
parent12e81d081d412a052860f04902b28da4a460c3fa (diff)
Merge branch 'master' of github.com:gallery/gallery3
Diffstat (limited to 'modules/tag')
-rw-r--r--modules/tag/controllers/tag.php4
-rw-r--r--modules/tag/models/tag.php2
2 files changed, 3 insertions, 3 deletions
diff --git a/modules/tag/controllers/tag.php b/modules/tag/controllers/tag.php
index 7aa038c6..8f885dea 100644
--- a/modules/tag/controllers/tag.php
+++ b/modules/tag/controllers/tag.php
@@ -19,8 +19,8 @@
*/
class Tag_Controller extends Controller {
public function __call($function, $args) {
- $tag_name = $function;
- $tag = ORM::factory("tag")->where("name", "=", $tag_name)->find();
+ $tag_id = $function;
+ $tag = ORM::factory("tag")->where("id", "=", $tag_id)->find();
$page_size = module::get_var("gallery", "page_size", 9);
$page = (int) Input::instance()->get("page", "1");
$children_count = $tag->items_count();
diff --git a/modules/tag/models/tag.php b/modules/tag/models/tag.php
index 53ccc856..479a7da0 100644
--- a/modules/tag/models/tag.php
+++ b/modules/tag/models/tag.php
@@ -132,7 +132,7 @@ class Tag_Model_Core extends ORM {
* @param string $query the query string (eg "page=3")
*/
public function url($query=null) {
- $url = url::site("tag/{$this->name}");
+ $url = url::site("tag/{$this->id}/{$this->name}");
if ($query) {
$url .= "?$query";
}