summaryrefslogtreecommitdiff
path: root/modules/gallery/models
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-09-08 17:01:59 -0700
committerBharat Mediratta <bharat@menalto.com>2009-09-08 17:01:59 -0700
commitcf0c8b63196cb856dd8de0759f6cbb74243d41f1 (patch)
tree5cc78385c81bfd7a836d650ca9e22b0e3e8d3a29 /modules/gallery/models
parent2aad580f53dbc06bb170c710467b47a5a532c6c8 (diff)
Minor tweaks to the url refactor.
Diffstat (limited to 'modules/gallery/models')
-rw-r--r--modules/gallery/models/item.php16
1 files changed, 8 insertions, 8 deletions
diff --git a/modules/gallery/models/item.php b/modules/gallery/models/item.php
index 6e9debea..d2223270 100644
--- a/modules/gallery/models/item.php
+++ b/modules/gallery/models/item.php
@@ -163,14 +163,14 @@ class Item_Model extends ORM_MPTT {
}
/**
- * album: url::site("albums/2")
- * photo: url::site("photos/3")
+ * Return the server-relative url to this item, eg:
+ * /gallery3/index.php/BobsWedding?page=2
+ * /gallery3/index.php/BobsWedding/Eating-Cake.jpg
*
* @param string $query the query string (eg "show=3")
*/
public function url($query=null) {
- $relative_url = $this->relative_url();
- $url = url::site($relative_url);
+ $url = url::site($this->relative_url());
if ($query) {
$url .= "?$query";
}
@@ -178,14 +178,14 @@ class Item_Model extends ORM_MPTT {
}
/**
- * album: url::abs_site("albums/2")
- * photo: url::abs_site("photos/3")
+ * Return the full url to this item, eg:
+ * http://example.com/gallery3/index.php/BobsWedding?page=2
+ * http://example.com/gallery3/index.php/BobsWedding/Eating-Cake.jpg
*
* @param string $query the query string (eg "show=3")
*/
public function abs_url($query=null) {
- $relative_url = $this->relative_url();
- $url = url::abs_site($relative_url);
+ $url = url::abs_site($this->relative_url());
if ($query) {
$url .= "?$query";
}