diff options
author | Bharat Mediratta <bharat@menalto.com> | 2009-09-08 17:01:59 -0700 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2009-09-08 17:01:59 -0700 |
commit | cf0c8b63196cb856dd8de0759f6cbb74243d41f1 (patch) | |
tree | 5cc78385c81bfd7a836d650ca9e22b0e3e8d3a29 /modules | |
parent | 2aad580f53dbc06bb170c710467b47a5a532c6c8 (diff) |
Minor tweaks to the url refactor.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/gallery/controllers/movies.php | 4 | ||||
-rw-r--r-- | modules/gallery/models/item.php | 16 |
2 files changed, 10 insertions, 10 deletions
diff --git a/modules/gallery/controllers/movies.php b/modules/gallery/controllers/movies.php index 1c266cc8..04e15315 100644 --- a/modules/gallery/controllers/movies.php +++ b/modules/gallery/controllers/movies.php @@ -105,9 +105,9 @@ class Movies_Controller extends Items_Controller { $photo->save(); module::event("item_edit_form_completed", $photo, $form); - log::success("content", "Updated photo", "<a href=\"{$photo->url()}\">view</a>"); + log::success("content", "Updated movie", "<a href=\"{$photo->url()}\">view</a>"); message::success( - t("Saved photo %photo_title", array("photo_title" => $photo->title))); + t("Saved movie %movie_title", array("movie_title" => $photo->title))); print json_encode( array("result" => "success")); 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"; } |