diff options
-rwxr-xr-x | apps/calendar/templates/calendar.php | 2 | ||||
-rwxr-xr-x | apps/calendar/templates/settings.php | 2 | ||||
-rwxr-xr-x | apps/calendar/templates/share.dropdown.php | 4 | ||||
-rwxr-xr-x | apps/contacts/templates/index.php | 2 | ||||
-rwxr-xr-x | apps/contacts/templates/settings.php | 4 | ||||
-rwxr-xr-x | apps/media/lib_ampache.php | 2 | ||||
-rwxr-xr-x | apps/media/templates/settings.php | 2 | ||||
-rw-r--r-- | index.php | 2 | ||||
-rw-r--r-- | lib/helper.php | 11 | ||||
-rw-r--r-- | lib/public/util.php | 12 | ||||
-rw-r--r-- | settings/templates/personal.php | 2 |
11 files changed, 34 insertions, 11 deletions
diff --git a/apps/calendar/templates/calendar.php b/apps/calendar/templates/calendar.php index 19c9a4d8d76..832194f0fe1 100755 --- a/apps/calendar/templates/calendar.php +++ b/apps/calendar/templates/calendar.php @@ -19,7 +19,7 @@ var missing_field_totime = '<?php echo addslashes($l->t('To Time')) ?>'; 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 OCP\Util::linkToAbsolute('remote.php', 'caldav'); ?>/calendars'; + var totalurl = '<?php echo OCP\Util::linkToRemote('caldav'); ?>calendars'; var firstDay = '<?php echo (OCP\Config::getUserValue(OCP\USER::getUser(), 'calendar', 'firstday', 'mo') == 'mo' ? '1' : '0'); ?>'; $(document).ready(function() { <?php diff --git a/apps/calendar/templates/settings.php b/apps/calendar/templates/settings.php index 0d6c8735ecc..12117750ca5 100755 --- a/apps/calendar/templates/settings.php +++ b/apps/calendar/templates/settings.php @@ -47,6 +47,6 @@ </table> <?php echo $l->t('Calendar CalDAV syncing address:');?> - <code><?php echo OCP\Util::linkToAbsolute('remote.php', 'caldav/'); ?></code><br /> + <code><?php echo OCP\Util::linkToRemote('caldav'); ?></code><br /> </fieldset> </form> diff --git a/apps/calendar/templates/share.dropdown.php b/apps/calendar/templates/share.dropdown.php index 0796a880f1f..356a8d4fab1 100755 --- a/apps/calendar/templates/share.dropdown.php +++ b/apps/calendar/templates/share.dropdown.php @@ -73,5 +73,5 @@ echo OCP\html_select_options($allgroups, array()); </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'], null, true) ; ?>" onmouseover="$('#public_token').select();" style="<?php echo (!$public['share'])?'display:none':'' ?>"> -</div>
\ No newline at end of file + <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> diff --git a/apps/contacts/templates/index.php b/apps/contacts/templates/index.php index 791e3ced26c..7d212e71ba8 100755 --- a/apps/contacts/templates/index.php +++ b/apps/contacts/templates/index.php @@ -1,5 +1,5 @@ <script type='text/javascript'> - var totalurl = '<?php echo OCP\Util::linkToAbsolute('remote.php', 'carddav'); ?>/addressbooks'; + var totalurl = '<?php echo OCP\Util::linkToRemote('carddav'); ?>addressbooks'; var categories = <?php echo json_encode($_['categories']); ?>; var lang = '<?php echo OCP\Config::getUserValue(OCP\USER::getUser(), 'core', 'lang', 'en'); ?>'; </script> diff --git a/apps/contacts/templates/settings.php b/apps/contacts/templates/settings.php index ce14e52e0ce..216003b6c69 100755 --- a/apps/contacts/templates/settings.php +++ b/apps/contacts/templates/settings.php @@ -4,9 +4,9 @@ <?php echo $l->t('CardDAV syncing addresses'); ?> (<a href="http://owncloud.org/synchronisation/" target="_blank"><?php echo $l->t('more info'); ?></a>) <dl> <dt><?php echo $l->t('Primary address (Kontact et al)'); ?></dt> - <dd><code><?php echo OCP\Util::linkToAbsolute('remote.php', 'carddav/'); ?></code></dd> + <dd><code><?php echo OCP\Util::linkToRemote('carddav'); ?></code></dd> <dt><?php echo $l->t('iOS/OS X'); ?></dt> - <dd><code><?php echo OCP\Util::linkToAbsolute('remote.php', 'carddav/'); ?>principals/<?php echo OCP\USER::getUser(); ?></code>/</dd> + <dd><code><?php echo OCP\Util::linkToRemote('carddav'); ?>principals/<?php echo OCP\USER::getUser(); ?></code>/</dd> </dl> Powered by <a href="http://geonames.org/" target="_blank">geonames.org webservice</a> </fieldset> diff --git a/apps/media/lib_ampache.php b/apps/media/lib_ampache.php index 510aba3f7e7..f5c91661abe 100755 --- a/apps/media/lib_ampache.php +++ b/apps/media/lib_ampache.php @@ -207,7 +207,7 @@ class OC_MEDIA_AMPACHE{ echo("\t\t<title>$name</title>\n"); echo("\t\t<artist id='$artist'>$artistName</artist>\n"); echo("\t\t<album id='$album'>$albumName</album>\n"); - $url=OCP\Util::linkToAbsolute('remote.php', 'ampache/server/xml.server.php/')."?action=play&song=$id&auth={$_GET['auth']}"; + $url=OCP\Util::linkToRemote('ampache')."server/xml.server.php/?action=play&song=$id&auth={$_GET['auth']}"; $url=self::fixXmlString($url); echo("\t\t<url>$url</url>\n"); echo("\t\t<time>{$song['song_length']}</time>\n"); diff --git a/apps/media/templates/settings.php b/apps/media/templates/settings.php index 162b52b8d9b..a7dc0775c44 100755 --- a/apps/media/templates/settings.php +++ b/apps/media/templates/settings.php @@ -2,6 +2,6 @@ <fieldset class="personalblock"> <strong>Media</strong><br /> Ampache address: - <code><?php echo OCP\Util::linkToAbsolute('remote.php', 'ampache'); ?>/</code><br /> + <code><?php echo OCP\Util::linkToRemote('ampache'); ?></code><br /> </fieldset> </form> diff --git a/index.php b/index.php index b0b77969c57..5d5307065bd 100644 --- a/index.php +++ b/index.php @@ -44,7 +44,7 @@ if($not_installed) { // Handle WebDAV if($_SERVER['REQUEST_METHOD']=='PROPFIND'){ - header('location: '.OC_Helper::linkToAbsolute('remote.php','webdav/')); + header('location: '.OC_Helper::linkToRemote('webdav')); exit(); } diff --git a/lib/helper.php b/lib/helper.php index 757f562bfed..f5e247ca9eb 100644 --- a/lib/helper.php +++ b/lib/helper.php @@ -106,6 +106,17 @@ class OC_Helper { } /** + * @brief Creates an absolute url for remote use + * @param $service id + * @returns the url + * + * Returns a absolute url to the given service. + */ + public static function linkToRemote( $service ) { + return self::linkToAbsolute( '', 'remote.php') . '/' . $service . '/'; + } + + /** * @brief Creates path to an image * @param $app app * @param $image image name diff --git a/lib/public/util.php b/lib/public/util.php index 6a8adff0f5a..f9f3759fe5b 100644 --- a/lib/public/util.php +++ b/lib/public/util.php @@ -130,6 +130,18 @@ class Util { } + /** + * @brief Creates an absolute url for remote use + * @param $service id + * @returns the url + * + * Returns a absolute url to the given app and file. + */ + public static function linkToRemote( $service ) { + return(\OC_Helper::linkToRemote( $service )); + } + + /** * @brief Creates an url * @param $app app diff --git a/settings/templates/personal.php b/settings/templates/personal.php index 799606e6a91..014996a5b20 100644 --- a/settings/templates/personal.php +++ b/settings/templates/personal.php @@ -47,7 +47,7 @@ <p class="personalblock"> <strong>WebDAV</strong> - <code><?php echo OC_Helper::linkToAbsolute('remote.php', 'webdav/'); ?></code><br /> + <code><?php echo OC_Helper::linkToRemote('webdav'); ?></code><br /> <em><?php echo $l->t('use this address to connect to your ownCloud in your file manager');?></em> </p> |