From: Michael J. Rubinsky Date: Thu, 18 Feb 2010 01:52:11 +0000 (-0500) Subject: remove an pitifully small amount of TODOs X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=93c95c6b48100852e4584f23f54c225ff9f5d03b;p=horde.git remove an pitifully small amount of TODOs --- diff --git a/ansel/edit_dates.php b/ansel/edit_dates.php index 36216719c..bc84c09da 100644 --- a/ansel/edit_dates.php +++ b/ansel/edit_dates.php @@ -24,9 +24,6 @@ if (!empty($gallery_id)) { Horde_Util::closeWindowJS('window.opener.location.href = window.opener.location.href; window.close();'); exit; } -} else { - // TODO - right now we should *always* have a gallery_id. If we get here - // from a results view, we may not, but that's not implemented yet. } /* Make sure we have at least one image */ diff --git a/ansel/lib/Ajax/Imple/LocationAutoCompleter.php b/ansel/lib/Ajax/Imple/LocationAutoCompleter.php index fbab220e0..2046d483d 100644 --- a/ansel/lib/Ajax/Imple/LocationAutoCompleter.php +++ b/ansel/lib/Ajax/Imple/LocationAutoCompleter.php @@ -31,7 +31,6 @@ class Ansel_Ajax_Imple_LocationAutoCompleter extends Horde_Ajax_Imple_AutoComple if ($results instanceof PEAR_Error) { Horde::logMessage($results, __FILE__, __LINE__, PEAR_LOG_ERR); } else { - // @TODO: This should be a config param? $_SESSION['ansel']['ajax_locationac'] = (count($results) > 50); } } diff --git a/ansel/lib/Faces/Base.php b/ansel/lib/Faces/Base.php index c3c8097b1..16d2083c4 100644 --- a/ansel/lib/Faces/Base.php +++ b/ansel/lib/Faces/Base.php @@ -429,22 +429,21 @@ class Ansel_Faces_Base * @param string $name Face name * * @return array Faces found - * @throws Horde_Exception + * @throws Ansel_Exception, Horde_Exception_PermissionDenied */ public function saveCustomFace($face_id, $image, $x1, $y1, $x2, $y2, $name = '') { $image = &$GLOBALS['ansel_storage']->getImage($image); $gallery = $GLOBALS['ansel_storage']->getGallery($image->gallery); if (!$gallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT)) { - //TODO: Do we throw exceptions for access denied? - throw new Horde_Exception('Access denied editing the photo.'); + throw new Horde_Exception_PermissionDenied('Access denied editing the photo.'); } if (empty($face_id)) { $new = true; $face_id = $GLOBALS['ansel_db']->nextId('ansel_faces'); if ($face_id instanceof PEAR_Error) { - throw new Horde_Exception_Prior($face_id); + throw new Ansel_Exception($face_id); } } diff --git a/ansel/lib/Gallery.php b/ansel/lib/Gallery.php index 1716a6c65..e85694f23 100644 --- a/ansel/lib/Gallery.php +++ b/ansel/lib/Gallery.php @@ -112,7 +112,7 @@ class Ansel_Gallery extends Horde_Share_Object_sql_hierarchical * * @return mixed true || PEAR_Error on failure. */ - function _save() + public function _save() { // Check for invalid characters in the slug. if (!empty($this->data['attribute_slug']) && diff --git a/ansel/lib/Storage.php b/ansel/lib/Storage.php index a260e7847..21cf63f48 100644 --- a/ansel/lib/Storage.php +++ b/ansel/lib/Storage.php @@ -911,7 +911,7 @@ class Ansel_Storage * 1 - descending * * @return array of Ansel_Gallery objects - * @throws Horde_Exception + * @throws Ansel_Exception */ public function listGalleries($perm = Horde_Perms::SHOW, $attributes = null, diff --git a/ansel/lib/Tile/DateGallery.php b/ansel/lib/Tile/DateGallery.php index 349cdffa2..4305c28c6 100644 --- a/ansel/lib/Tile/DateGallery.php +++ b/ansel/lib/Tile/DateGallery.php @@ -65,11 +65,6 @@ class Ansel_Tile_DateGallery { 'day' => date('j', $full_date->timestamp())); } - /* Get the currently displayed gallery view type */ - // @TODO: $view would only be needed if we are displaying this tile in a - // search result view as well. (Not implemented yet) - //$view = Horde_Util::getFormData('view', 'Gallery'); - /* Check permissions on the gallery and get appropriate tile image */ if ($dgallery->hasPermission(Horde_Auth::getAuth(), Horde_Perms::READ)) { if (is_null($style)) { diff --git a/ansel/lib/View/GalleryRenderer/Base.php b/ansel/lib/View/GalleryRenderer/Base.php index ff17370ad..a88bd2beb 100644 --- a/ansel/lib/View/GalleryRenderer/Base.php +++ b/ansel/lib/View/GalleryRenderer/Base.php @@ -35,7 +35,7 @@ abstract class Ansel_View_GalleryRenderer_Base /** * The current page we are viewing - * //TODO: use __get() for these type of things... + * * @var integer */ public $page = 0; diff --git a/ansel/lib/Widget/Actions.php b/ansel/lib/Widget/Actions.php index adab0f2af..8fa97f7d4 100644 --- a/ansel/lib/Widget/Actions.php +++ b/ansel/lib/Widget/Actions.php @@ -22,8 +22,7 @@ class Ansel_Widget_Actions extends Ansel_Widget_Base } /** - * TODO - * + * * @see ansel/lib/Widget/Ansel_Widget_Base#html() */ public function html() diff --git a/ansel/lib/Widget/Base.php b/ansel/lib/Widget/Base.php index 5de8f084e..902ee7d26 100644 --- a/ansel/lib/Widget/Base.php +++ b/ansel/lib/Widget/Base.php @@ -123,7 +123,6 @@ abstract class Ansel_Widget_Base * Determine if a particular view (Image, Gallery etc..) is supported * by this widget. * - * @TODO * @param string $view The view to check * * @return boolean diff --git a/ansel/lib/Widget/GalleryFaces.php b/ansel/lib/Widget/GalleryFaces.php index 89d0b9f3a..f26a0000e 100644 --- a/ansel/lib/Widget/GalleryFaces.php +++ b/ansel/lib/Widget/GalleryFaces.php @@ -13,9 +13,9 @@ class Ansel_Widget_GalleryFaces extends Ansel_Widget_Base { /** - * @TODO + * Supported views for this widget * - * @var unknown_type + * @var array */ protected $_supported_views = array('Gallery'); diff --git a/ansel/lib/Widget/Geotag.php b/ansel/lib/Widget/Geotag.php index ef2597e6f..e8d06ffaa 100644 --- a/ansel/lib/Widget/Geotag.php +++ b/ansel/lib/Widget/Geotag.php @@ -9,7 +9,7 @@ * did not receive this file, see http://www.fsf.org/copyleft/gpl.html. * * @TODO: Refactor the JS out to a seperate file, output needed values in the - * GLOBAL Ansel javascript object. + * GLOBAL Ansel javascript object. Rewrite for Horde_Map js. * * @author Michael J. Rubinsky * @package Ansel diff --git a/ansel/lib/Widget/ImageFaces.php b/ansel/lib/Widget/ImageFaces.php index b566ed971..6187f924f 100644 --- a/ansel/lib/Widget/ImageFaces.php +++ b/ansel/lib/Widget/ImageFaces.php @@ -13,9 +13,9 @@ class Ansel_Widget_ImageFaces extends Ansel_Widget_Base { /** - * @TODO + * The views this Widget may appear in * - * @var unknown_type + * @var array */ private $_supported_views = array('Image'); diff --git a/ansel/lib/Widget/OtherGalleries.php b/ansel/lib/Widget/OtherGalleries.php index da874ea5a..8ee5703a3 100644 --- a/ansel/lib/Widget/OtherGalleries.php +++ b/ansel/lib/Widget/OtherGalleries.php @@ -54,9 +54,6 @@ class Ansel_Widget_OtherGalleries extends Ansel_Widget_Base /** * Build the HTML for the other galleries widget content. * - * @TODO Allow the sort order and maybe the count of galleries returned - * to be configurable via the params array. - * * @return string The HTML */ protected function _getOtherGalleries() @@ -66,23 +63,22 @@ class Ansel_Widget_OtherGalleries extends Ansel_Widget_Base /* Set up the tree */ $tree = Horde_Tree::singleton('otherAnselGalleries_' . md5($owner), 'Javascript'); $tree->setOption(array('class' => 'anselWidgets')); - $gals = $GLOBALS['ansel_storage']->listGalleries(Horde_Perms::SHOW, $owner, - null, true, 0, 0, - 'name', 0); + + try { + $gals = $GLOBALS['ansel_storage']->listGalleries(Horde_Perms::SHOW, $owner, + null, true, 0, 0, + 'name', 0); + } catch (Ansel_Exception $e) { + Horde::logMessage($gal, __FILE__, __LINE__, PEAR_LOG_ERR); + return ''; + } $html = '
'; - //@TODO - for now, Horde_Share will still return PEAR_Error, - // this will be fixed when Ansel_Gallery is refactored. foreach($gals as $gal) { - if (is_a($gal, 'PEAR_Error')) { - Horde::logMessage($gal, __FILE__, __LINE__, PEAR_LOG_ERR); - return ''; - } - $parents = $gal->get('parents'); if (empty($parents)) { $parent = null; @@ -118,8 +114,6 @@ class Ansel_Widget_OtherGalleries extends Ansel_Widget_Base ? 'hide' : 'show') . '"> 
' . "\n"; - - return $html; } } diff --git a/ansel/rss.php b/ansel/rss.php index e1bff4257..4b81e0391 100644 --- a/ansel/rss.php +++ b/ansel/rss.php @@ -39,7 +39,6 @@ if (empty($rss)) { $author = ''; // Determine what we are requesting - // @TODO - category switch ($stream_type) { case 'all': $images = $ansel_storage->getRecentImages(); diff --git a/ansel/scripts/remote_import.php b/ansel/scripts/remote_import.php index c465cc878..4303c3c22 100755 --- a/ansel/scripts/remote_import.php +++ b/ansel/scripts/remote_import.php @@ -272,8 +272,6 @@ function processDirectory($dir, $parent = null, $gallery_id = null, $slug = null /** * Read an image from the filesystem. * - * @TODO: pass in location of magic_db? - * * @param string $file The filename of the image. * * @return array The image data of the file as an array or PEAR_Error