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
</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>
</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>
<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>
<?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>
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");
<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>
// Handle WebDAV
if($_SERVER['REQUEST_METHOD']=='PROPFIND'){
- header('location: '.OC_Helper::linkToAbsolute('remote.php','webdav/'));
+ header('location: '.OC_Helper::linkToRemote('webdav'));
exit();
}
return $urlLinkTo;
}
+ /**
+ * @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
}
+ /**
+ * @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
<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>