CS, whitespace, remove some references, add a type hint or two
authorChuck Hagenbuch <chuck@horde.org>
Sun, 22 Aug 2010 02:11:09 +0000 (22:11 -0400)
committerChuck Hagenbuch <chuck@horde.org>
Sun, 22 Aug 2010 02:11:09 +0000 (22:11 -0400)
ansel/lib/Gallery.php
ansel/lib/GalleryMode/Normal.php
ansel/lib/View/Base.php
ansel/lib/View/Gallery.php
ansel/lib/View/GalleryRenderer/Base.php
ansel/lib/View/GalleryRenderer/GalleryLightbox.php

index dda5f0d..5d278aa 100644 (file)
@@ -471,7 +471,6 @@ class Ansel_Gallery extends Horde_Share_Object_Sql_Hierarchical
         return $this->_modeHelper->getGalleryChildren($perm, $from, $to, $noauto);
     }
 
-
     /**
      * Return the count of this gallery's children
      *
index f2fe95f..6d41444 100644 (file)
@@ -11,7 +11,6 @@
  * @author Michael J. Rubinsky <mrubinsk@horde.org>
  * @package Ansel
  */
-
 class Ansel_GalleryMode_Normal extends Ansel_GalleryMode_Base
 {
     /**
@@ -309,5 +308,4 @@ class Ansel_GalleryMode_Normal extends Ansel_GalleryMode_Base
 
         return $this->_gallery->data['attribute_images'];
     }
-
 }
index 93da194..d749bae 100644 (file)
@@ -121,7 +121,7 @@ abstract class Ansel_View_Base
     }
 
     /**
-     *
+     * Todo
      *
      * @param integer $galleryId  The gallery id
      * @param string $slug        The gallery slug
@@ -217,10 +217,10 @@ abstract class Ansel_View_Base
      *
      * @param array $params  An array of parameters for this method:
      *   <pre>
-     *      images -     Array of Ansel_Images to generate JSON for [null]
-     *      full   -     Should a full URL be generated? [false]
-     *      from   -     Starting image count [0]
-     *      count  -     The number of images to include (starting at from) [0]
+     *      images     - Array of Ansel_Images to generate JSON for [null]
+     *      full       - Should a full URL be generated? [false]
+     *      from       - Starting image count [0]
+     *      count      - The number of images to include (starting at from) [0]
      *      image_view - The type of ImageGenerator to obtain the src url for. [screen]
      *      view_links - Should the JSON include links to the Image and/or Gallery View? [false]
      *      perpage    - Number of images per page [from user prefs]
@@ -232,12 +232,14 @@ abstract class Ansel_View_Base
     {
         global $conf, $prefs;
 
-        $default = array('full' => false,
-                         'from' => 0,
-                         'count' => 0,
-                         'image_view' => 'screen',
-                         'view_links' => false,
-                         'perpage' => $prefs->getValue('tilesperpage', $conf['thumbnail']['perpage']));
+        $default = array(
+            'full' => false,
+            'from' => 0,
+            'count' => 0,
+            'image_view' => 'screen',
+            'view_links' => false,
+            'perpage' => $prefs->getValue('tilesperpage', $conf['thumbnail']['perpage']),
+        );
 
         $params = array_merge($default, $params);
 
index cdba189..8bc89ae 100644 (file)
@@ -55,7 +55,6 @@ class Ansel_View_Gallery extends Ansel_View_Base
                                    true);
 
             $params = array('gallery' => $this->gallery->id, 'url' => $galleryurl);
-
             Horde::applicationUrl('disclamer.php')->add($params)->setRaw(true)->redirect();
             exit;
         }
@@ -70,12 +69,12 @@ class Ansel_View_Gallery extends Ansel_View_Base
                       'day' => isset($this->_params['day']) ? $this->_params['day'] : 0));
 
                 $galleryurl = Ansel::getUrlFor('view', array_merge(
-                                   array('gallery' => $this->gallery->id,
-                                         'slug' => empty($params['slug']) ? '' : $params['slug'],
-                                         'page' => empty($params['page']) ? 0 : $params['page'],
-                                         'view' => 'Gallery'),
-                                   $date),
-                                   true);
+                    array('gallery' => $this->gallery->id,
+                          'slug' => empty($params['slug']) ? '' : $params['slug'],
+                          'page' => empty($params['page']) ? 0 : $params['page'],
+                          'view' => 'Gallery'),
+                    $date),
+                    true);
 
             $params = array('gallery' => $this->gallery->id, 'url' => $galleryurl);
             Horde::applicationUrl('protect.php')->add($params)->setRaw(true)->redirect();
@@ -89,7 +88,7 @@ class Ansel_View_Gallery extends Ansel_View_Base
         // Since this is a gallery view, the resource is just a reference to the
         // gallery. We keep both instance variables becuase both gallery and
         // image views are assumed to have a gallery object.
-        $this->resource = &$this->gallery;
+        $this->resource = $this->gallery;
 
         /* Do we have an explicit style set? If not, use the gallery's */
         if (!empty($this->_params['style'])) {
@@ -139,5 +138,4 @@ class Ansel_View_Gallery extends Ansel_View_Base
     {
         return 'Gallery';
     }
-
 }
index 744a707..2e98d87 100644 (file)
@@ -104,10 +104,8 @@ abstract class Ansel_View_GalleryRenderer_Base
      * Constructor
      *
      * @param Ansel_View_Gallery  The view object for this renderer.
-     *
-     * @return Ansel_View_Renderer_Gallery
      */
-    public function __construct($view)
+    public function __construct(Ansel_View_Gallery $view)
     {
         $this->view = $view;
     }
index 7e19e40..79c179b 100644 (file)
@@ -145,5 +145,4 @@ class Ansel_View_GalleryRenderer_GalleryLightbox extends Ansel_View_GalleryRende
 
         return Horde::endBuffer();
     }
-
 }