summaryrefslogtreecommitdiff
path: root/modules/tag/models
diff options
context:
space:
mode:
authorAndy Staudacher <andy.st@gmail.com>2009-11-15 19:44:47 -0800
committerAndy Staudacher <andy.st@gmail.com>2009-11-15 19:44:47 -0800
commit0733dc37fda27a5ba35f9020edf3c66aa41a95a0 (patch)
tree6877946232f1b01b1c8709054c689f6658cef34f /modules/tag/models
parent218493c50be9362d4abed6900a816308fee5d978 (diff)
parent9379308f91a476f790fb8d444536719535c584e4 (diff)
Merge commit 'upstream/master'
Conflicts: modules/gallery/tests/xss_data.txt
Diffstat (limited to 'modules/tag/models')
-rw-r--r--modules/tag/models/tag.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/modules/tag/models/tag.php b/modules/tag/models/tag.php
index d9488e1c..49512daa 100644
--- a/modules/tag/models/tag.php
+++ b/modules/tag/models/tag.php
@@ -102,4 +102,18 @@ class Tag_Model extends ORM {
}
return $result;
}
+
+ /**
+ * Return the server-relative url to this item, eg:
+ * /gallery3/index.php/tags/35
+ *
+ * @param string $query the query string (eg "page=3")
+ */
+ public function url($query=null) {
+ $url = url::site("tags/$this->id");
+ if ($query) {
+ $url .= "?$query";
+ }
+ return $url;
+ }
} \ No newline at end of file