diff options
author | Bharat Mediratta <bharat@menalto.com> | 2009-05-13 05:11:31 +0000 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2009-05-13 05:11:31 +0000 |
commit | 65aafe1e721c3d0e7a435af8617a74ab9480ec93 (patch) | |
tree | e579ff15a4e2d060ddede32be5f37d8f9a2b03a2 /core/helpers | |
parent | d049e406e0366adf3cd68a12f65206e54653c616 (diff) |
Exclude the root album from the "dirty images" query
Clean some HTML out of a translated string.
Diffstat (limited to 'core/helpers')
-rw-r--r-- | core/helpers/graphics.php | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/core/helpers/graphics.php b/core/helpers/graphics.php index 22a9c750..54125f92 100644 --- a/core/helpers/graphics.php +++ b/core/helpers/graphics.php @@ -242,8 +242,9 @@ class graphics_Core { static function find_dirty_images_query() { return Database::instance()->query( "SELECT `id` FROM {items} " . - "WHERE (`thumb_dirty` = 1 AND (`type` <> 'album' OR `album_cover_item_id` IS NOT NULL))" . - " OR (`resize_dirty` = 1 AND `type` = 'photo')"); + "WHERE ((`thumb_dirty` = 1 AND (`type` <> 'album' OR `album_cover_item_id` IS NOT NULL))" . + " OR (`resize_dirty` = 1 AND `type` = 'photo')) " . + " AND `id` != 1"); } /** @@ -265,10 +266,12 @@ class graphics_Core { $count = self::find_dirty_images_query()->count(); if ($count) { site_status::warning( - t2('One of your photos is out of date. <a href="%url" class="gDialogLink">Click here to fix it</a>', - '%count of your photos are out of date. <a href="%url" class="gDialogLink">Click here to fix them</a>', + t2("One of your photos is out of date. <a %attrs>Click here to fix it</a>", + "%count of your photos are out of date. <a %attrs>Click here to fix them</a>", $count, - array("url" => url::site("admin/maintenance/start/core_task::rebuild_dirty_images?csrf=__CSRF__"))), + array("attrs" => sprintf( + 'href="%s" class="gDialogLink"', + url::site("admin/maintenance/start/core_task::rebuild_dirty_images?csrf=__CSRF__")))), "graphics_dirty"); } } |