<li class="error">
<?php p($l->t('File not found')); ?><br>
<p class="hint"><?php p($l->t('The specified document has not been found on the server.')); ?></p>
- <p class="hint"><a href="<?php p(OC_Helper::linkTo('', 'index.php')) ?>"><?php p($l->t('You can click here to return to %s.', array($theme->getName()))); ?></a></p>
+ <p class="hint"><a href="<?php p(\OC::$server->getURLGenerator()->linkTo('', 'index.php')) ?>"><?php p($l->t('You can click here to return to %s.', array($theme->getName()))); ?></a></p>
</li>
</ul>
<?php endif; ?>
*/
public static function linkToAbsolute($app, $file, $args = array()) {
return OC::$server->getURLGenerator()->getAbsoluteURL(
- self::linkTo($app, $file, $args)
+ OC::$server->getURLGenerator()->linkTo($app, $file, $args)
);
}
* Returns a url to the given service.
*/
public static function linkToRemoteBase($service) {
- return self::linkTo('', 'remote.php') . '/' . $service;
+ return OC::$server->getURLGenerator()->linkTo('', 'remote.php') . '/' . $service;
}
/**
if ($service === 'files') {
$url = OC::$server->getURLGenerator()->getAbsoluteURL('/s');
} else {
- $url = OC::$server->getURLGenerator()->getAbsoluteURL(self::linkTo('', 'public.php').'?service='.$service);
+ $url = OC::$server->getURLGenerator()->getAbsoluteURL(OC::$server->getURLGenerator()->linkTo('', 'public.php').'?service='.$service);
}
return $url . (($add_slash && $service[strlen($service) - 1] != '/') ? '/' : '');
}
$this->logger = $logger;
$baseUrl = \OC::$WEBROOT;
if(!(getenv('front_controller_active') === 'true')) {
- $baseUrl = \OC_Helper::linkTo('', 'index.php');
+ $baseUrl = \OC::$server->getURLGenerator()->linkTo('', 'index.php');
}
if (!\OC::$CLI) {
$method = $_SERVER['REQUEST_METHOD'];
* For further information have a look at OC_Helper::linkTo
*/
function link_to( $app, $file, $args = array() ) {
- return OC_Helper::linkTo( $app, $file, $args );
+ return \OC::$server->getURLGenerator()->linkTo($app, $file, $args);
}
/**
$writer->writeAsset($cssCollection);
}
- $this->append('jsfiles', OC_Helper::linkTo('assets', "$jsHash.js"));
- $this->append('cssfiles', OC_Helper::linkTo('assets', "$cssHash.css"));
+ $this->append('jsfiles', \OC::$server->getURLGenerator()->linkTo('assets', "$jsHash.js"));
+ $this->append('cssfiles', \OC::$server->getURLGenerator()->linkTo('assets', "$cssHash.css"));
}
/**
* @since 4.0.0 - parameter $args was added in 4.5.0
*/
public static function linkTo( $app, $file, $args = array() ) {
- return(\OC_Helper::linkTo( $app, $file, $args ));
+ return \OC::$server->getURLGenerator()->linkTo($app, $file, $args);
}
/**