Skip to content

Commit

Permalink
Fix Horde_Url usage Bug: 14033
Browse files Browse the repository at this point in the history
  • Loading branch information
mrubinsk committed Jul 2, 2015
1 parent 967bb15 commit 273a7bb
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions turba/lib/Application.php
Expand Up @@ -223,6 +223,7 @@ public function sidebar($sidebar)

$user = $GLOBALS['registry']->getAuth();
$edit = Horde::url('addressbooks/edit.php');
$url = Horde::url('');

$sidebar->containers['my'] = array(
'header' => array(
Expand All @@ -243,12 +244,11 @@ public function sidebar($sidebar)
$shares = array();
$shared = array();
foreach (Turba::listShares(false, Horde_Perms::SHOW) as $id => $abook) {
$url = Horde::url('');
$row = array(
'selected' => $id == Turba::$source,
'url' => $url->add('source', $id),
'url' => $url->copy()->add('source', $id),
'label' => $abook->get('name'),
'edit' => $edit->add('a', $abook->getName()),
'edit' => $edit->copy()->add('a', $abook->getName()),
'type' => 'radiobox',
);
if ($abook->get('owner') && $abook->get('owner') == $user) {
Expand Down Expand Up @@ -289,13 +289,12 @@ public function sidebar($sidebar)
),
);
foreach (Turba::getAddressBooks(Horde_Perms::SHOW) as $id => $abook) {
$url = Horde::url('');
if (isset($shares[$id])) {
continue;
}
$row = array(
'selected' => $id == Turba::$source,
'url' => $url->add('source', $id),
'url' => $url->copy()->add('source', $id),
'label' => $abook['title'],
'type' => 'radiobox',
);
Expand Down

0 comments on commit 273a7bb

Please sign in to comment.