From: Chuck Hagenbuch Date: Mon, 23 Aug 2010 02:18:55 +0000 (-0400) Subject: Remove some more references X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=b9f7a72ad5400444c78b3a6b9f200dd31626cb66;p=horde.git Remove some more references --- diff --git a/trean/browse.php b/trean/browse.php index e325b323c..0cd1494e8 100644 --- a/trean/browse.php +++ b/trean/browse.php @@ -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); diff --git a/trean/lib/Bookmarks.php b/trean/lib/Bookmarks.php index d835b37e9..9c74b2a78 100644 --- a/trean/lib/Bookmarks.php +++ b/trean/lib/Bookmarks.php @@ -17,8 +17,8 @@ require_once 'Horde/DataTree.php'; * @author Ben Chavet * @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]]; diff --git a/trean/lib/Trean.php b/trean/lib/Trean.php index a77b4f071..49c324147 100644 --- a/trean/lib/Trean.php +++ b/trean/lib/Trean.php @@ -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); }