From edaa788b1c379318d56196e0bbfdbf443d58f099 Mon Sep 17 00:00:00 2001 From: rWatcher Date: Mon, 31 Aug 2009 00:55:21 -0400 Subject: [PATCH] Git Weirdness Fix. --- .../itemchecksum/controllers/itemchecksum.php | 44 +++---------------- 1 file changed, 7 insertions(+), 37 deletions(-) diff --git a/modules/itemchecksum/controllers/itemchecksum.php b/modules/itemchecksum/controllers/itemchecksum.php index 8d65e5a4..110ebb37 100644 --- a/modules/itemchecksum/controllers/itemchecksum.php +++ b/modules/itemchecksum/controllers/itemchecksum.php @@ -19,41 +19,23 @@ */ class itemchecksum_Controller extends Controller { public function albumcount($album_id) { -<<<<<<< HEAD:modules/itemchecksum/controllers/itemchecksum.php - // Display the number of non-album items (photos and videos) - // in the specified album ($album_id). - -======= ->>>>>>> gallery3-contrib/master:modules/itemchecksum/controllers/itemchecksum.php $item = ORM::factory("item") ->viewable() ->where("parent_id", $album_id) ->where("type !=", "album") ->find_all(); - + print count($item); } - + public function md5($album_id, $file_name) { -<<<<<<< HEAD:modules/itemchecksum/controllers/itemchecksum.php - // Locate an item with $file_name in the album $album_id - // and display it's md5 checksum. - -======= ->>>>>>> gallery3-contrib/master:modules/itemchecksum/controllers/itemchecksum.php $item = ORM::factory("item") ->where("parent_id", $album_id) ->where("name", $file_name) ->find_all(); - + if (count($item) > 0) { access::required("view_full", $item[0]); -<<<<<<< HEAD:modules/itemchecksum/controllers/itemchecksum.php - - // If the KeepOriginal module is active, check for/use the - // original image instead of the gallery edited version. -======= ->>>>>>> gallery3-contrib/master:modules/itemchecksum/controllers/itemchecksum.php if (module::is_active("keeporiginal")) { $original_image = VARPATH . "original/" . str_replace(VARPATH . "albums/", "", $item[0]->file_path()); if ($item[0]->is_photo() && file_exists($original_image)) { @@ -68,28 +50,16 @@ class itemchecksum_Controller extends Controller { print "0"; } } - + public function sha1($album_id, $file_name) { -<<<<<<< HEAD:modules/itemchecksum/controllers/itemchecksum.php - // Locate an item with $file_name in the album $album_id - // and display it's sha-1 checksum. - -======= - ->>>>>>> gallery3-contrib/master:modules/itemchecksum/controllers/itemchecksum.php + $item = ORM::factory("item") ->where("parent_id", $album_id) ->where("name", $file_name) ->find_all(); - + if (count($item) > 0) { access::required("view_full", $item[0]); -<<<<<<< HEAD:modules/itemchecksum/controllers/itemchecksum.php - - // If the KeepOriginal module is active, check for/use the - // original image instead of the gallery edited version. -======= ->>>>>>> gallery3-contrib/master:modules/itemchecksum/controllers/itemchecksum.php if (module::is_active("keeporiginal")) { $original_image = VARPATH . "original/" . str_replace(VARPATH . "albums/", "", $item[0]->file_path()); if ($item[0]->is_photo() && file_exists($original_image)) { @@ -104,4 +74,4 @@ class itemchecksum_Controller extends Controller { print "0"; } } -} +} \ No newline at end of file