]> source.dussan.org Git - nextcloud-server.git/commitdiff
removing log(), getTemplate(), getLocalFilePath(), getUrlContent(), getFileInfo()
authorThomas Müller <thomas.mueller@tmit.eu>
Mon, 7 Oct 2013 09:41:28 +0000 (11:41 +0200)
committerThomas Müller <thomas.mueller@tmit.eu>
Mon, 7 Oct 2013 09:41:28 +0000 (11:41 +0200)
lib/private/appframework/core/api.php
lib/public/appframework/iapi.php

index 299f3254e25cc700066633fdb90fc5a27794165d..e7269373bb01dc7bbe321018d556ed0fafec371c 100644 (file)
@@ -109,44 +109,6 @@ class API implements IApi{
        }
 
 
-       /**
-        * Writes a function into the error log
-        * @param string $msg the error message to be logged
-        * @param int $level the error level
-        */
-       public function log($msg, $level=null){
-               switch($level){
-                       case 'debug':
-                               $level = \OCP\Util::DEBUG;
-                               break;
-                       case 'info':
-                               $level = \OCP\Util::INFO;
-                               break;
-                       case 'warn':
-                               $level = \OCP\Util::WARN;
-                               break;
-                       case 'fatal':
-                               $level = \OCP\Util::FATAL;
-                               break;
-                       default:
-                               $level = \OCP\Util::ERROR;
-                               break;
-               }
-               \OCP\Util::writeLog($this->appName, $msg, $level);
-       }
-
-
-       /**
-        * turns an owncloud path into a path on the filesystem
-        * @param string path the path to the file on the oc filesystem
-        * @return string the filepath in the filesystem
-        */
-       public function getLocalFilePath($path){
-               # TODO: use public api
-               return \OC_Filesystem::getLocalFile($path);
-       }
-
-
        /**
         * used to return and open a new eventsource
         * @return \OC_EventSource a new open EventSource class
@@ -192,15 +154,6 @@ class API implements IApi{
                }
        }
 
-       /**
-        * Gets the content of an URL by using CURL or a fallback if it is not
-        * installed
-        * @param string $url the url that should be fetched
-        * @return string the content of the webpage
-        */
-       public function getUrlContent($url) {
-               return \OC_Util::getUrlContent($url);
-       }
 
        /**
         * Register a backgroundjob task
@@ -212,25 +165,6 @@ class API implements IApi{
                \OCP\Backgroundjob::addRegularTask($className, $methodName);
        }
 
-       /**
-        * Returns a template
-        * @param string $templateName the name of the template
-        * @param string $renderAs how it should be rendered
-        * @param string $appName the name of the app
-        * @return \OCP\Template a new template
-        */
-       public function getTemplate($templateName, $renderAs='user', $appName=null){
-               if($appName === null){
-                       $appName = $this->appName;
-               }
-
-               if($renderAs === 'blank'){
-                       return new \OCP\Template($appName, $templateName);
-               } else {
-                       return new \OCP\Template($appName, $templateName, $renderAs);
-               }
-       }
-
 
        /**
         * Tells ownCloud to include a template in the admin overview
@@ -247,19 +181,4 @@ class API implements IApi{
        }
 
 
-       /**
-        * get the filesystem info
-        *
-        * @param string $path
-        * @return array with the following keys:
-        * - size
-        * - mtime
-        * - mimetype
-        * - encrypted
-        * - versioned
-        */
-       public function getFileInfo($path) {
-               return \OC\Files\Filesystem::getFileInfo($path);
-       }
-
 }
index c8722af6240e8d2ad892506e004c820a00038133..3bde4c9d4e77cc836cc62f3b2ba3596964fa066f 100644 (file)
@@ -75,24 +75,4 @@ interface IApi {
         */
        public function isAppEnabled($appName);
 
-
-       /**
-        * Writes a function into the error log
-        * @param string $msg the error message to be logged
-        * @param int $level the error level
-        *
-        * FIXME: add logger instance to ServerContainer
-        */
-       function log($msg, $level = null);
-
-
-       /**
-        * Returns a template
-        * @param string $templateName the name of the template
-        * @param string $renderAs how it should be rendered
-        * @param string $appName the name of the app
-        * @return \OCP\Template a new template
-        */
-       function getTemplate($templateName, $renderAs='user', $appName=null);
-
 }