summaryrefslogtreecommitdiff
path: root/modules/gallery/views
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-09-08 13:44:52 -0700
committerBharat Mediratta <bharat@menalto.com>2009-09-08 13:44:52 -0700
commit2aad580f53dbc06bb170c710467b47a5a532c6c8 (patch)
treefc6e91313a1eb594976990b51451d376c14e880b /modules/gallery/views
parent60848480887594e61339000259e5322340518071 (diff)
Move specialized (pretty) url generation back into Item_Model so that
we're not relying on overriding url::site() to do tricks around item urls. This means that you won't get item urls by doing url::site("albums/37"), for example, but it also means that we won't get pretty urls where we don't expect them (like in the action of a <form> element). Incidentally, this will help us move over to using the slug format because if you've got a bad character in a url, the edit forms will now work on it since they'll be id based.
Diffstat (limited to 'modules/gallery/views')
-rw-r--r--modules/gallery/views/admin_block_photo_stream.html.php2
-rw-r--r--modules/gallery/views/upgrader.html.php2
2 files changed, 2 insertions, 2 deletions
diff --git a/modules/gallery/views/admin_block_photo_stream.html.php b/modules/gallery/views/admin_block_photo_stream.html.php
index 1b9d8ff5..4968c39b 100644
--- a/modules/gallery/views/admin_block_photo_stream.html.php
+++ b/modules/gallery/views/admin_block_photo_stream.html.php
@@ -2,7 +2,7 @@
<ul>
<? foreach ($photos as $photo): ?>
<li class="gItem gPhoto">
- <a href="<?= url::site("photos/$photo->id") ?>" title="<?= html::purify($photo->title)->for_html_attr() ?>">
+ <a href="<?= $photo->url() ?>" title="<?= html::purify($photo->title)->for_html_attr() ?>">
<img <?= photo::img_dimensions($photo->width, $photo->height, 72) ?>
src="<?= $photo->thumb_url() ?>" alt="<?= html::purify($photo->title)->for_html_attr() ?>" />
</a>
diff --git a/modules/gallery/views/upgrader.html.php b/modules/gallery/views/upgrader.html.php
index 04200920..5f93c2d5 100644
--- a/modules/gallery/views/upgrader.html.php
+++ b/modules/gallery/views/upgrader.html.php
@@ -18,7 +18,7 @@
<h1> <?= t("That's it!") ?> </h1>
<p>
<?= t("Your <a href=\"%url\">Gallery</a> is up to date.",
- array("url" => html::mark_clean(url::site("albums/1")))) ?>
+ array("url" => html::mark_clean(item::root()->url()))) ?>
</p>
</div>
</div>