Remove some more references
authorChuck Hagenbuch <chuck@horde.org>
Mon, 23 Aug 2010 02:18:55 +0000 (22:18 -0400)
committerChuck Hagenbuch <chuck@horde.org>
Mon, 23 Aug 2010 02:18:55 +0000 (22:18 -0400)
trean/browse.php
trean/lib/Bookmarks.php
trean/lib/Trean.php

index e325b32..0cd1494 100644 (file)
@@ -18,12 +18,11 @@ require_once TREAN_BASE . '/lib/Views/BookmarkList.php';
 /* Get bookmarks to display. */
 $folderId = Horde_Util::getFormData('f');
 
-/* Default to the current user's default folder or if we are a guest, try to
- * get a list of folders we have Horde_Perms::READ for.
- */
+/* Default to the current user's default folder or if we are a guest, try to get
+ * a list of folders we have Horde_Perms::READ for. */
 if (empty($folderId) && $registry->getAuth()) {
     $folderId = $trean_shares->getId($registry->getAuth());
-    $folder = &$trean_shares->getFolder($folderId);
+    $folder = $trean_shares->getFolder($folderId);
     if ($folder instanceof PEAR_Error) {
         /* Can't redirect back to browse since that would set up a loop. */
         throw new Horde_Exception($folder);
@@ -35,7 +34,7 @@ if (empty($folderId) && $registry->getAuth()) {
         $folder = array_pop(array_values($folders));
     }
 } else {
-    $folder = &$trean_shares->getFolder($folderId);
+    $folder = $trean_shares->getFolder($folderId);
     if ($folder instanceof PEAR_Error) {
         /* Can't redirect back to browse since that would set up a loop. */
         throw new Horde_Exception($folder);
index d835b37..9c74b2a 100644 (file)
@@ -17,8 +17,8 @@ require_once 'Horde/DataTree.php';
  * @author  Ben Chavet <ben@horde.org>
  * @package Trean
  */
-class Trean_Bookmarks {
-
+class Trean_Bookmarks
+{
     /**
      * Pointer to a DataTree instance to manage/store shares
      *
@@ -76,7 +76,7 @@ class Trean_Bookmarks {
         }
 
         $driver = $conf['datatree']['driver'];
-        $this->_datatree = &DataTree::singleton(
+        $this->_datatree = DataTree::singleton(
             $driver,
             array_merge(Horde::getDriverConfig('datatree', $driver), array('group' => 'horde.shares.trean'))
         );
@@ -216,7 +216,7 @@ class Trean_Bookmarks {
      *
      * @return array  The requested shares.
      */
-    function &getShares($cids)
+    function getShares($cids)
     {
         $all_shares = array();
         $missing_ids = array();
@@ -311,7 +311,7 @@ class Trean_Bookmarks {
      *
      * @return array  The shares the user has access to.
      */
-    function &getFolders($userid, $perm = Horde_Perms::SHOW, $parent = null, $allLevels = true)
+    function getFolders($userid, $perm = Horde_Perms::SHOW, $parent = null, $allLevels = true)
     {
         $folderIds = $this->listFolders($userid, $perm, $parent, $allLevels);
         if (!count($folderIds) || is_a($folderIds, 'PEAR_Error')) {
@@ -344,7 +344,7 @@ class Trean_Bookmarks {
      *
      * @return DataTreeObject_Folder  A new folder object.
      */
-    function &newFolder($name, $properties = null)
+    function newFolder($name, $properties = null)
     {
         if (empty($name)) {
             $error = PEAR::raiseError(_("Folder names must be non-empty"));
@@ -367,7 +367,7 @@ class Trean_Bookmarks {
      *
      * @return DataTreeObject_Folder The requested folder.
      */
-    function &getFolder($cid)
+    function getFolder($cid)
     {
         if (isset($this->_shareMap[$cid])) {
             $share = $this->_cache[$this->_shareMap[$cid]];
index a77b4f0..49c3241 100644 (file)
@@ -23,7 +23,7 @@ class Trean
             if (trim($name) == '') {
                 $name = Horde_Auth::removeHook($GLOBALS['registry']->getAuth());
             }
-            $folder = &$GLOBALS['trean_shares']->newFolder($GLOBALS['registry']->getAuth(), array('name' => sprintf(_("%s's Bookmarks"), $name)));
+            $folder = $GLOBALS['trean_shares']->newFolder($GLOBALS['registry']->getAuth(), array('name' => sprintf(_("%s's Bookmarks"), $name)));
             $result = $GLOBALS['trean_shares']->addFolder($folder);
             if ($result instanceof PEAR_Error) {
                 throw new Horde_Exception($result);
@@ -45,7 +45,7 @@ class Trean
      *
      * @return array  A list of folders.
      */
-    function &listFolders($perm = Horde_Perms::SHOW, $parent = null, $allLevels = true)
+    function listFolders($perm = Horde_Perms::SHOW, $parent = null, $allLevels = true)
     {
         return $GLOBALS['trean_shares']->getFolders($GLOBALS['registry']->getAuth(), $perm, $parent, $allLevels);
     }