From 39be4dca67ea26aa7602aa8a1b6e556acb67af51 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Thomas=20M=C3=BCller?= <thomas.mueller@tmit.eu>
Date: Mon, 7 Oct 2013 11:38:23 +0200
Subject: [PATCH] removing all link/url related calls from API class

---
 lib/private/appframework/core/api.php | 63 ---------------------------
 lib/public/appframework/iapi.php      | 45 -------------------
 2 files changed, 108 deletions(-)

diff --git a/lib/private/appframework/core/api.php b/lib/private/appframework/core/api.php
index 31da0706a1..299f3254e2 100644
--- a/lib/private/appframework/core/api.php
+++ b/lib/private/appframework/core/api.php
@@ -99,69 +99,6 @@ class API implements IApi{
 	}
 
 
-	/**
-	 * Returns the URL for a route
-	 * @param string $routeName the name of the route
-	 * @param array $arguments an array with arguments which will be filled into the url
-	 * @return string the url
-	 */
-	public function linkToRoute($routeName, $arguments=array()){
-		return \OCP\Util::linkToRoute($routeName, $arguments);
-	}
-
-
-	/**
-	 * Returns an URL for an image or file
-	 * @param string $file the name of the file
-	 * @param string $appName the name of the app, defaults to the current one
-	 */
-	public function linkTo($file, $appName=null){
-		if($appName === null){
-			$appName = $this->appName;
-		}
-		return \OCP\Util::linkTo($appName, $file);
-	}
-
-
-	/**
-	 * Returns the link to an image, like link to but only with prepending img/
-	 * @param string $file the name of the file
-	 * @param string $appName the name of the app, defaults to the current one
-	 */
-	public function imagePath($file, $appName=null){
-		if($appName === null){
-			$appName = $this->appName;
-		}
-		return \OCP\Util::imagePath($appName, $file);
-	}
-
-
-	/**
-	 * Makes an URL absolute
-	 * @param string $url the url
-	 * @return string the absolute url
-	 */
-	public function getAbsoluteURL($url){
-		# TODO: use public api
-		return \OC_Helper::makeURLAbsolute($url);
-	}
-
-
-	/**
-	 * links to a file
-	 * @param string $file the name of the file
-	 * @param string $appName the name of the app, defaults to the current one
-	 * @deprecated replaced with linkToRoute()
-	 * @return string the url
-	 */
-	public function linkToAbsolute($file, $appName=null){
-		if($appName === null){
-			$appName = $this->appName;
-		}
-		return \OCP\Util::linkToAbsolute($appName, $file);
-	}
-
-
 	/**
 	 * Checks if an app is enabled
 	 * @param string $appName the name of an app
diff --git a/lib/public/appframework/iapi.php b/lib/public/appframework/iapi.php
index 818647c19f..c8722af624 100644
--- a/lib/public/appframework/iapi.php
+++ b/lib/public/appframework/iapi.php
@@ -68,51 +68,6 @@ interface IApi {
 	function add3rdPartyStyle($name);
 
 
-	/**
-	 * Returns the URL for a route
-	 * @param string $routeName the name of the route
-	 * @param array $arguments an array with arguments which will be filled into the url
-	 * @return string the url
-	 */
-	function linkToRoute($routeName, $arguments=array());
-
-
-	/**
-	 * Returns an URL for an image or file
-	 * @param string $file the name of the file
-	 * @param string $appName the name of the app, defaults to the current one
-	 */
-	function linkTo($file, $appName=null);
-
-
-	/**
-	 * Returns the link to an image, like link to but only with prepending img/
-	 * @param string $file the name of the file
-	 * @param string $appName the name of the app, defaults to the current one
-	 */
-	function imagePath($file, $appName = null);
-
-
-	/**
-	 * Makes an URL absolute
-	 * @param string $url the url
-	 * @return string the absolute url
-	 *
-	 * FIXME: function should live in Request / Response
-	 */
-	function getAbsoluteURL($url);
-
-
-	/**
-	 * links to a file
-	 * @param string $file the name of the file
-	 * @param string $appName the name of the app, defaults to the current one
-	 * @deprecated replaced with linkToRoute()
-	 * @return string the url
-	 */
-	function linkToAbsolute($file, $appName = null);
-
-
 	/**
 	 * Checks if an app is enabled
 	 * @param string $appName the name of an app
-- 
GitLab