/* 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);
$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);
* @author Ben Chavet <ben@horde.org>
* @package Trean
*/
-class Trean_Bookmarks {
-
+class Trean_Bookmarks
+{
/**
* Pointer to a DataTree instance to manage/store shares
*
}
$driver = $conf['datatree']['driver'];
- $this->_datatree = &DataTree::singleton(
+ $this->_datatree = DataTree::singleton(
$driver,
array_merge(Horde::getDriverConfig('datatree', $driver), array('group' => 'horde.shares.trean'))
);
*
* @return array The requested shares.
*/
- function &getShares($cids)
+ function getShares($cids)
{
$all_shares = array();
$missing_ids = array();
*
* @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')) {
*
* @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"));
*
* @return DataTreeObject_Folder The requested folder.
*/
- function &getFolder($cid)
+ function getFolder($cid)
{
if (isset($this->_shareMap[$cid])) {
$share = $this->_cache[$this->_shareMap[$cid]];
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);
*
* @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);
}