Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2012-08-06 20:49:06 +0400
committerBart Visscher <bartv@thisnet.nl>2012-08-06 20:51:41 +0400
commitfe6450002d6059260c743f48b6f40378454fa1dc (patch)
treef373d737d78dcc7cc73a76c90db7fdfe5d9f1aa2 /apps/calendar
parente6759a980b3efe07c4a4c2e2769c2becc92df67d (diff)
Change hardcoded urls to use linkTo function
Diffstat (limited to 'apps/calendar')
-rw-r--r--apps/calendar/index.php13
-rw-r--r--apps/calendar/templates/part.choosecalendar.rowfields.php2
-rw-r--r--apps/calendar/templates/part.editevent.php6
-rw-r--r--apps/calendar/templates/part.newevent.php2
4 files changed, 16 insertions, 7 deletions
diff --git a/apps/calendar/index.php b/apps/calendar/index.php
index 4b871195927..cbfe0027b7b 100644
--- a/apps/calendar/index.php
+++ b/apps/calendar/index.php
@@ -24,8 +24,17 @@ foreach($calendars as $calendar){
}
}
-$eventSources[] = array('url' => '?app=calendar&getfile=ajax/events.php?calendar_id=shared_rw', 'backgroundColor' => '#1D2D44', 'borderColor' => '#888', 'textColor' => 'white', 'editable'=>'true');
-$eventSources[] = array('url' => '?app=calendar&getfile=ajax/events.php?calendar_id=shared_r', 'backgroundColor' => '#1D2D44', 'borderColor' => '#888', 'textColor' => 'white', 'editable' => 'false');
+$events_baseURL = OCP\Util::linkTo('calendar', 'ajax/events.php');
+$eventSources[] = array('url' => $events_baseURL.'?calendar_id=shared_rw',
+ 'backgroundColor' => '#1D2D44',
+ 'borderColor' => '#888',
+ 'textColor' => 'white',
+ 'editable'=>'true');
+$eventSources[] = array('url' => $events_baseURL.'?calendar_id=shared_r',
+ 'backgroundColor' => '#1D2D44',
+ 'borderColor' => '#888',
+ 'textColor' => 'white',
+ 'editable' => 'false');
OCP\Util::emitHook('OC_Calendar', 'getSources', array('sources' => &$eventSources));
$categories = OC_Calendar_App::getCategoryOptions();
diff --git a/apps/calendar/templates/part.choosecalendar.rowfields.php b/apps/calendar/templates/part.choosecalendar.rowfields.php
index 4492ce731c9..d29113c9a61 100644
--- a/apps/calendar/templates/part.choosecalendar.rowfields.php
+++ b/apps/calendar/templates/part.choosecalendar.rowfields.php
@@ -11,7 +11,7 @@
<a href="#" onclick="Calendar.UI.showCalDAVUrl('<?php echo OCP\USER::getUser() ?>', '<?php echo rawurlencode(html_entity_decode($_['calendar']['uri'], ENT_QUOTES, 'UTF-8')) ?>');" title="<?php echo $l->t('CalDav Link') ?>" class="action"><img class="svg action" src="<?php echo OCP\Util::imagePath('core', 'actions/public.svg') ?>"></a>
</td>
<td width="20px">
- <a href="?app=calendar&amp;getfile=export.php?calid=<?php echo $_['calendar']['id'] ?>" title="<?php echo $l->t('Download') ?>" class="action"><img class="svg action" src="<?php echo OCP\Util::imagePath('core', 'actions/download.svg') ?>"></a>
+ <a href="<?php echo OCP\Util::linkTo('calendar', 'export.php') . '?calid=' . $_['calendar']['id'] ?>" title="<?php echo $l->t('Download') ?>" class="action"><img class="svg action" src="<?php echo OCP\Util::imagePath('core', 'actions/download.svg') ?>"></a>
</td>
<td width="20px">
<a href="#" onclick="Calendar.UI.Calendar.edit(this, <?php echo $_['calendar']['id'] ?>);" title="<?php echo $l->t('Edit') ?>" class="action"><img class="svg action" src="<?php echo OCP\Util::imagePath('core', 'actions/rename.svg') ?>"></a>
diff --git a/apps/calendar/templates/part.editevent.php b/apps/calendar/templates/part.editevent.php
index 102366f8f08..ea91192cc66 100644
--- a/apps/calendar/templates/part.editevent.php
+++ b/apps/calendar/templates/part.editevent.php
@@ -5,9 +5,9 @@
<?php echo $this->inc("part.eventform"); ?>
<div style="width: 100%;text-align: center;color: #FF1D1D;" id="errorbox"></div>
<span id="actions">
- <input type="button" class="submit" style="float: left;" value="<?php echo $l->t("Submit");?>" onclick="Calendar.UI.validateEventForm('?app=calendar&getfile=ajax/event/edit.php');">
- <input type="button" class="submit" style="float: left;" name="delete" value="<?php echo $l->t("Delete");?>" onclick="Calendar.UI.submitDeleteEventForm('?app=calendar&getfile=ajax/event/delete.php');">
- <input type="button" class="submit" style="float: right;" name="export" value="<?php echo $l->t("Export");?>" onclick="window.location='?app=calendar&getfile=export.php?eventid=<?php echo $_['eventid'] ?>';">
+ <input type="button" class="submit" style="float: left;" value="<?php echo $l->t("Submit");?>" onclick="Calendar.UI.validateEventForm('<?php echo OCP\Util::linkTo('calendar', 'ajax/event/edit.php') ?>');">
+ <input type="button" class="submit" style="float: left;" name="delete" value="<?php echo $l->t("Delete");?>" onclick="Calendar.UI.submitDeleteEventForm('<?php echo OCP\Util::linkTo('calendar', 'ajax/event/delete.php') ?>');">
+ <input type="button" class="submit" style="float: right;" name="export" value="<?php echo $l->t("Export");?>" onclick="window.location='<?php echo OCP\Util::linkTo('calendar', 'export.php') ?>?eventid=<?php echo $_['eventid'] ?>';">
</span>
</form>
</div>
diff --git a/apps/calendar/templates/part.newevent.php b/apps/calendar/templates/part.newevent.php
index f4bb867b180..a4f48aecbc6 100644
--- a/apps/calendar/templates/part.newevent.php
+++ b/apps/calendar/templates/part.newevent.php
@@ -3,7 +3,7 @@
<?php echo $this->inc("part.eventform"); ?>
<div style="width: 100%;text-align: center;color: #FF1D1D;" id="errorbox"></div>
<span id="actions">
- <input type="button" class="submit" style="float: left;" value="<?php echo $l->t("Submit");?>" onclick="Calendar.UI.validateEventForm('?app=calendar&getfile=ajax/event/new.php');">
+ <input type="button" class="submit" style="float: left;" value="<?php echo $l->t("Submit");?>" onclick="Calendar.UI.validateEventForm('<?php echo OCP\Util::linkTo('calendar', 'ajax/event/new.php') ?>');">
</span>
</form>
</div>