From 65aafe1e721c3d0e7a435af8617a74ab9480ec93 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Wed, 13 May 2009 05:11:31 +0000 Subject: Exclude the root album from the "dirty images" query Clean some HTML out of a translated string. --- core/helpers/graphics.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'core/helpers/graphics.php') 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. Click here to fix it', - '%count of your photos are out of date. Click here to fix them', + t2("One of your photos is out of date. Click here to fix it", + "%count of your photos are out of date. Click here to fix them", $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"); } } -- cgit v1.2.3