]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix a php notice
authorGeorg Ehrke <dev@georgswebsite.de>
Sat, 21 Apr 2012 20:27:19 +0000 (22:27 +0200)
committerGeorg Ehrke <dev@georgswebsite.de>
Sat, 21 Apr 2012 20:27:19 +0000 (22:27 +0200)
apps/calendar/templates/part.choosecalendar.php
apps/calendar/templates/part.choosecalendar.rowfields.php

index d93a85aeca04ecc26a4c1d3e41c89da240d6d1cf..4f6680bb49778f478dd90f02eeefa6ea18f65d42 100644 (file)
@@ -7,6 +7,12 @@ for($i = 0; $i < count($option_calendars); $i++){
        echo "<tr>";
        $tmpl = new OC_Template('calendar', 'part.choosecalendar.rowfields');
        $tmpl->assign('calendar', $option_calendars[$i]);
+       if(OC_Calendar_Share::allUsersSharedwith($option_calendars[$i]['id'], OC_Calendar_Share::CALENDAR) == array()){
+               $shared = false;
+       }else{
+               $shared = true;
+       }
+       $tmpl->assign('shared', $shared);
        $tmpl->printpage();
        echo "</tr>";
 }
index 21fb3f8a097a93bb825caab7f2fefd6b2a7ff914..cf85f0dc53e643f67ecf56c3aed5ee884bcdc170 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 echo '<td width="20px"><input id="active_' . $_['calendar']['id'] . '" type="checkbox" onClick="Calendar.UI.Calendar.activation(this,' . $_['calendar']['id'] . ')"' . ($_['calendar']['active'] ? ' checked="checked"' : '') . '></td>';
 echo '<td  id="' . OC_User::getUser() . '_' . $_['calendar']['id'] . '"><label for="active_' . $_['calendar']['id'] . '">' . $_['calendar']['displayname'] . '</label></td>';
-echo '<td width="20px"><a href="#" onclick="Calendar.UI.Share.dropdown(\'' . OC_User::getUser() . '\', \'' . $_['calendar']['id'] . '\');" title="' . $l->t("Share Calendar") . '" class="action"><img  class="svg action" src="' . ((!$shared) ? '../../core/img/actions/share.svg' : '../../core/img/actions/shared.svg') . '"></a></td>';
+echo '<td width="20px"><a href="#" onclick="Calendar.UI.Share.dropdown(\'' . OC_User::getUser() . '\', \'' . $_['calendar']['id'] . '\');" title="' . $l->t("Share Calendar") . '" class="action"><img  class="svg action" src="' . ((!$_['shared']) ? '../../core/img/actions/share.svg' : '../../core/img/actions/shared.svg') . '"></a></td>';
 echo '<td width="20px"><a href="#" onclick="Calendar.UI.showCalDAVUrl(\'' . OC_User::getUser() . '\', \'' . $_['calendar']['uri'] . '\');" title="' . $l->t("CalDav Link") . '" class="action"><img  class="svg action" src="../../core/img/actions/public.svg"></a></td>';
 echo '<td width="20px"><a href="export.php?calid=' . $_['calendar']['id'] . '" title="' . $l->t('Download') . '" class="action"><img class="svg action" src="../../core/img/actions/download.svg"></a></td>';
 echo '<td width="20px"><a  href="#" title="' . $l->t('Edit') . '" class="action" onclick="Calendar.UI.Calendar.edit(this, ' . $_['calendar']['id'] . ');"><img class="svg action" src="../../core/img/actions/rename.svg"></a></td>';