summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorg Ehrke <dev@georgswebsite.de>2012-05-13 15:06:02 +0200
committerGeorg Ehrke <dev@georgswebsite.de>2012-05-13 15:06:02 +0200
commit62a86748b58d37bf308f3d747389ead816c5c03c (patch)
treef1c62c9ed157739b0a4373506379ffa2fee882df
parent63a1b066bcebc998bd4a6a4c8cc56f38983b0639 (diff)
parent5ac10a9c0eecfa6fe49c314954c506972f275e24 (diff)
downloadnextcloud-server-62a86748b58d37bf308f3d747389ead816c5c03c.tar.gz
nextcloud-server-62a86748b58d37bf308f3d747389ead816c5c03c.zip
Merge branch 'master' into calendar_dropimport
-rwxr-xr-xapps/calendar/ajax/event/new.form.php1
-rwxr-xr-xapps/calendar/ajax/events.php2
-rwxr-xr-xapps/calendar/templates/part.eventform.php4
-rwxr-xr-xapps/calendar/templates/share.dropdown.php6
4 files changed, 7 insertions, 6 deletions
diff --git a/apps/calendar/ajax/event/new.form.php b/apps/calendar/ajax/event/new.form.php
index f47cb6c3e2a..91b85fff07f 100755
--- a/apps/calendar/ajax/event/new.form.php
+++ b/apps/calendar/ajax/event/new.form.php
@@ -57,6 +57,7 @@ $tmpl->assign('repeat_byweekno_options', $repeat_byweekno_options);
$tmpl->assign('repeat_bymonthday_options', $repeat_bymonthday_options);
$tmpl->assign('repeat_weekofmonth_options', $repeat_weekofmonth_options);
+$tmpl->assign('eventid', 'new');
$tmpl->assign('startdate', $start->format('d-m-Y'));
$tmpl->assign('starttime', $start->format('H:i'));
$tmpl->assign('enddate', $end->format('d-m-Y'));
diff --git a/apps/calendar/ajax/events.php b/apps/calendar/ajax/events.php
index f149e0d400e..56fa51aaff2 100755
--- a/apps/calendar/ajax/events.php
+++ b/apps/calendar/ajax/events.php
@@ -15,7 +15,7 @@ OCP\JSON::checkAppEnabled('calendar');
// Look for the calendar id
$calendar_id = OC_Calendar_App::getCalendar($_GET['calendar_id'], false, false);
if($calendar_id !== false){
- if(! is_numeric($calendar['userid']) && $calendar['userid'] != OCP\User::getUser()){
+ if(! is_numeric($calendar_id['userid']) && $calendar_id['userid'] != OCP\User::getUser()){
OCP\JSON::error();
exit;
}
diff --git a/apps/calendar/templates/part.eventform.php b/apps/calendar/templates/part.eventform.php
index b3bbf7a375b..2d86ce4d318 100755
--- a/apps/calendar/templates/part.eventform.php
+++ b/apps/calendar/templates/part.eventform.php
@@ -9,7 +9,7 @@ echo 'Calendar.UI.Share.idtype = "event";' . "\n" . 'Calendar.UI.Share.currentid
<li><a href="#tabs-2"><?php echo $l->t('Repeating'); ?></a></li>
<!--<li><a href="#tabs-3"><?php echo $l->t('Alarm'); ?></a></li>
<li><a href="#tabs-4"><?php echo $l->t('Attendees'); ?></a></li>-->
- <?php if($_['access'] == 'owner') { ?>
+ <?php if($_['access'] == 'owner' && $_['eventid'] != 'new') { ?>
<li><a href="#tabs-5"><?php echo $l->t('Share'); ?></a></li>
<?php } ?>
</ul>
@@ -246,6 +246,6 @@ echo 'Calendar.UI.Share.idtype = "event";' . "\n" . 'Calendar.UI.Share.currentid
<div id="tabs-4">//Attendees</div>-->
<?php if($_['access'] == 'owner') { ?>
<div id="tabs-5">
- <?php echo $this->inc('share.dropdown'); ?>
+ <?php if($_['eventid'] != 'new'){ echo $this->inc('share.dropdown'); } ?>
</div>
<?php } ?>
diff --git a/apps/calendar/templates/share.dropdown.php b/apps/calendar/templates/share.dropdown.php
index 356a8d4fab1..20d4c19bc19 100755
--- a/apps/calendar/templates/share.dropdown.php
+++ b/apps/calendar/templates/share.dropdown.php
@@ -72,6 +72,6 @@ echo OCP\html_select_options($allgroups, array());
<?php endforeach; ?>
</ul>
<div id="public">
- <input type="checkbox" id="publish" <?php echo ($public['share'])?'checked="checked"':'' ?>><label for="publish"><?php echo $l->t('make public'); ?></label><br>
- <input type="text" id="public_token" value="<?php echo OCP\Util::linkToAbsolute('', 'public.php').'?service=calendar&t=' . $public['share'] ?>" onmouseover="$('#public_token').select();" style="<?php echo (!$public['share'])?'display:none':'' ?>">
-</div>
+ <input type="checkbox" id="publish" <?php echo (array_key_exists('share', $public))?'checked="checked"':'' ?>><label for="publish"><?php echo $l->t('make public'); ?></label><br>
+ <input type="text" id="public_token" value="<?php if(array_key_exists('share', $public)){echo OCP\Util::linkToAbsolute('', 'public.php').'?service=calendar&t=' . $public['share']; } ?>" onmouseover="$('#public_token').select();" style="<?php echo (!array_key_exists('share', $public))?'display:none':'' ?>">
+</div> \ No newline at end of file