diff options
author | Frank Karlitschek <frank@owncloud.org> | 2012-05-01 18:50:31 +0200 |
---|---|---|
committer | Frank Karlitschek <frank@owncloud.org> | 2012-05-01 18:50:31 +0200 |
commit | 70cea18cce0fcdb4d8118ff2d7abccc922417a6a (patch) | |
tree | 7f8c476cb75b38fea3ed4ad555f00885f6da2670 /apps/calendar/templates | |
parent | dc7cdda5ccc7d40bf9865e1af5a7846782ec700b (diff) | |
download | nextcloud-server-70cea18cce0fcdb4d8118ff2d7abccc922417a6a.tar.gz nextcloud-server-70cea18cce0fcdb4d8118ff2d7abccc922417a6a.zip |
ported getUser
Diffstat (limited to 'apps/calendar/templates')
-rwxr-xr-x[-rw-r--r--] | apps/calendar/templates/calendar.php | 8 | ||||
-rwxr-xr-x[-rw-r--r--] | apps/calendar/templates/part.choosecalendar.php | 4 | ||||
-rwxr-xr-x[-rw-r--r--] | apps/calendar/templates/part.choosecalendar.rowfields.php | 6 | ||||
-rwxr-xr-x[-rw-r--r--] | apps/calendar/templates/part.import.php | 2 | ||||
-rwxr-xr-x[-rw-r--r--] | apps/calendar/templates/share.dropdown.php | 4 |
5 files changed, 12 insertions, 12 deletions
diff --git a/apps/calendar/templates/calendar.php b/apps/calendar/templates/calendar.php index ba9423a66f1..4a3c653d6f1 100644..100755 --- a/apps/calendar/templates/calendar.php +++ b/apps/calendar/templates/calendar.php @@ -1,13 +1,13 @@ <script type='text/javascript'> - var defaultView = '<?php echo OC_Preferences::getValue(OC_USER::getUser(), 'calendar', 'currentview', 'month') ?>'; + var defaultView = '<?php echo OC_Preferences::getValue(OCP\USER::getUser(), 'calendar', 'currentview', 'month') ?>'; var eventSources = <?php echo json_encode($_['eventSources']) ?>; var categories = <?php echo json_encode($_['categories']); ?>; var dayNames = <?php echo json_encode($l->tA(array('Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'))) ?>; var dayNamesShort = <?php echo json_encode($l->tA(array('Sun.', 'Mon.', 'Tue.', 'Wed.', 'Thu.', 'Fri.', 'Sat.'))) ?>; var monthNames = <?php echo json_encode($l->tA(array('January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'))) ?>; var monthNamesShort = <?php echo json_encode($l->tA(array('Jan.', 'Feb.', 'Mar.', 'Apr.', 'May.', 'Jun.', 'Jul.', 'Aug.', 'Sep.', 'Oct.', 'Nov.', 'Dec.'))) ?>; - var agendatime = '<?php echo ((int) OC_Preferences::getValue(OC_USER::getUser(), 'calendar', 'timeformat', '24') == 24 ? 'HH:mm' : 'hh:mm tt'); ?>{ - <?php echo ((int) OC_Preferences::getValue(OC_USER::getUser(), 'calendar', 'timeformat', '24') == 24 ? 'HH:mm' : 'hh:mm tt'); ?>}'; - var defaulttime = '<?php echo ((int) OC_Preferences::getValue(OC_USER::getUser(), 'calendar', 'timeformat', '24') == 24 ? 'HH:mm' : 'hh:mm tt'); ?>'; + var agendatime = '<?php echo ((int) OC_Preferences::getValue(OCP\USER::getUser(), 'calendar', 'timeformat', '24') == 24 ? 'HH:mm' : 'hh:mm tt'); ?>{ - <?php echo ((int) OC_Preferences::getValue(OCP\USER::getUser(), 'calendar', 'timeformat', '24') == 24 ? 'HH:mm' : 'hh:mm tt'); ?>}'; + var defaulttime = '<?php echo ((int) OC_Preferences::getValue(OCP\USER::getUser(), 'calendar', 'timeformat', '24') == 24 ? 'HH:mm' : 'hh:mm tt'); ?>'; var allDayText = '<?php echo addslashes($l->t('All day')) ?>'; var newcalendar = '<?php echo addslashes($l->t('New Calendar')) ?>'; var missing_field = '<?php echo addslashes($l->t('Missing fields')) ?>'; @@ -20,7 +20,7 @@ var missing_field_startsbeforeends = '<?php echo addslashes($l->t('The event ends before it starts')) ?>'; var missing_field_dberror = '<?php echo addslashes($l->t('There was a database fail')) ?>'; var totalurl = '<?php echo OC_Helper::linkToAbsolute('calendar', 'caldav.php'); ?>/calendars'; - var firstDay = '<?php echo (OC_Preferences::getValue(OC_USER::getUser(), 'calendar', 'firstday', 'mo') == 'mo' ? '1' : '0'); ?>'; + var firstDay = '<?php echo (OC_Preferences::getValue(OCP\USER::getUser(), 'calendar', 'firstday', 'mo') == 'mo' ? '1' : '0'); ?>'; $(document).ready(function() { <?php if(array_key_exists('showevent', $_)){ diff --git a/apps/calendar/templates/part.choosecalendar.php b/apps/calendar/templates/part.choosecalendar.php index 4f6680bb497..af3b82a48fc 100644..100755 --- a/apps/calendar/templates/part.choosecalendar.php +++ b/apps/calendar/templates/part.choosecalendar.php @@ -2,7 +2,7 @@ <p><b><?php echo $l->t('Your calendars'); ?>:</b></p> <table width="100%" style="border: 0;"> <?php -$option_calendars = OC_Calendar_Calendar::allCalendars(OC_User::getUser()); +$option_calendars = OC_Calendar_Calendar::allCalendars(OCP\USER::getUser()); for($i = 0; $i < count($option_calendars); $i++){ echo "<tr>"; $tmpl = new OC_Template('calendar', 'part.choosecalendar.rowfields'); @@ -31,7 +31,7 @@ for($i = 0; $i < count($option_calendars); $i++){ <p><b><?php echo $l->t('Shared calendars'); ?>: </b></p> <table width="100%" style="border: 0;"> <?php -$share = OC_Calendar_Share::allSharedwithuser(OC_User::getUser(), OC_Calendar_Share::CALENDAR); +$share = OC_Calendar_Share::allSharedwithuser(OCP\USER::getUser(), OC_Calendar_Share::CALENDAR); $count = count($share); for($i = 0; $i < $count; $i++){ $share[$i]['calendar'] = OC_Calendar_App::getCalendar($share[$i]['calendarid'], false, false); diff --git a/apps/calendar/templates/part.choosecalendar.rowfields.php b/apps/calendar/templates/part.choosecalendar.rowfields.php index cf85f0dc53e..8848d228054 100644..100755 --- a/apps/calendar/templates/part.choosecalendar.rowfields.php +++ b/apps/calendar/templates/part.choosecalendar.rowfields.php @@ -1,8 +1,8 @@ <?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.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 id="' . OCP\USER::getUser() . '_' . $_['calendar']['id'] . '"><label for="active_' . $_['calendar']['id'] . '">' . $_['calendar']['displayname'] . '</label></td>'; +echo '<td width="20px"><a href="#" onclick="Calendar.UI.Share.dropdown(\'' . OCP\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(\'' . OCP\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>'; echo '<td width="20px"><a href="#" onclick="Calendar.UI.Calendar.deleteCalendar(\'' . $_['calendar']['id'] . '\');" title="' . $l->t('Delete') . '" class="action"><img class="svg action" src="../../core/img/actions/delete.svg"></a></td>';
\ No newline at end of file diff --git a/apps/calendar/templates/part.import.php b/apps/calendar/templates/part.import.php index 90691a33e50..80375c3ef78 100644..100755 --- a/apps/calendar/templates/part.import.php +++ b/apps/calendar/templates/part.import.php @@ -6,7 +6,7 @@ <p style="text-align:center;"><b><?php echo $l->t('Please choose the calendar'); ?></b></p> <select style="width:100%;" id="calendar" name="calendar"> <?php -$calendar_options = OC_Calendar_Calendar::allCalendars(OC_User::getUser()); +$calendar_options = OC_Calendar_Calendar::allCalendars(OCP\USER::getUser()); $calendar_options[] = array('id'=>'newcal', 'displayname'=>$l->t('create a new calendar')); echo html_select_options($calendar_options, $calendar_options[0]['id'], array('value'=>'id', 'label'=>'displayname')); ?> diff --git a/apps/calendar/templates/share.dropdown.php b/apps/calendar/templates/share.dropdown.php index 71556a6a21c..cd44988af90 100644..100755 --- a/apps/calendar/templates/share.dropdown.php +++ b/apps/calendar/templates/share.dropdown.php @@ -21,12 +21,12 @@ foreach($sharedelements as $sharedelement){ <select id="share_user" title="<?php echo $l->t('select users');?>" data-placeholder="<?php echo $l->t('select users'); ?>"> <option value=""></option> <?php -$allocusers = OC_User::getUsers(); +$allocusers = OCP\USER::getUsers(); $allusers = array(); foreach($allocusers as $ocuser){ $allusers[$ocuser] = $ocuser; } -unset($allusers[OC_User::getUser()]); +unset($allusers[OCP\USER::getUser()]); $allusers = array_flip($allusers); echo html_select_options($allusers, array()); ?> |