]> source.dussan.org Git - nextcloud-server.git/commitdiff
Do not add ICssManager to OCP
authorRoeland Jago Douma <roeland@famdouma.nl>
Tue, 22 Nov 2016 11:08:53 +0000 (12:08 +0100)
committerRoeland Jago Douma <roeland@famdouma.nl>
Fri, 6 Jan 2017 08:42:13 +0000 (09:42 +0100)
We can add it later if needed

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
core/Application.php
core/Controller/CssController.php
lib/private/CssManager.php
lib/private/Server.php
lib/public/ICssManager.php [deleted file]

index 545b5fe420b6d873aa0c8a17b2248c15e89cf11a..ec93c50b445c35cc661ba94e7f6ae4650628e5fd 100644 (file)
@@ -31,6 +31,7 @@
 namespace OC\Core;
 
 use OC\AppFramework\Utility\SimpleContainer;
+use OC\CssManager;
 use OC\Security\IdentityProof\Manager;
 use OCP\AppFramework\App;
 use OCP\Files\IAppData;
@@ -57,5 +58,8 @@ class Application extends App {
                                \OC::$server->getCrypto()
                        );
                });
+               $container->registerService(CssManager::class, function () {
+                       return new CssManager(\OC::$server->getAppDataDir('css'));
+               });
        }
 }
index a8d182418d4b1af2655f975c83b5bb46afdbc1a0..eb5e8d55b26c92671d2a65e64be5fab043f9ed75 100644 (file)
 namespace OC\Core\Controller;
 
 use OC\AppFramework\Utility\TimeFactory;
+use OC\CssManager;
 use OCP\AppFramework\Controller;
 use OCP\AppFramework\Http;
 use OCP\AppFramework\Http\NotFoundResponse;
 use OCP\AppFramework\Http\FileDisplayResponse;
-use OCP\ICssManager;
+use OCP\Files\NotFoundException;
 use OCP\IRequest;
 
 
 class CssController extends Controller {
 
-       /** @var ICssManager */
+       /** @var CssManager */
        protected $cssManager;
 
        /** @var TimeFactory */
@@ -43,10 +44,10 @@ class CssController extends Controller {
        /**
         * @param string $appName
         * @param IRequest $request
-        * @param ICssManager $cssManager
+        * @param CssManager $cssManager
         * @param TimeFactory $timeFactory
         */
-       public function __construct($appName, IRequest $request, ICssManager $cssManager, TimeFactory $timeFactory) {
+       public function __construct($appName, IRequest $request, CssManager $cssManager, TimeFactory $timeFactory) {
                parent::__construct($appName, $request);
 
                $this->cssManager = $cssManager;
index ba5ce0dd2bfff8dfdc28ec077e82eb87655f9dea..e0f710b8d7cc393f6055de931cf1b5d390478fd2 100644 (file)
@@ -24,14 +24,13 @@ namespace OC;
 use OCP\Files\IAppData;
 use OCP\Files\NotFoundException;
 use OCP\Files\SimpleFS\ISimpleFile;
-use OCP\ICssManager;
 
 /**
  * This class implements methods to access SCSS cached files
  * @since 11.0.0
  */
 
-class CssManager implements ICssManager {
+class CssManager {
 
        /** @var IAppData */
        private $appData;
index b3449f14c357e229b74ea7a83f69be1592cd0dca..cc295dccd17c2a2167a149ad6918a8972ba48d8c 100644 (file)
@@ -417,11 +417,6 @@ class Server extends ServerContainer implements IServerContainer {
                                $c->getConfig()
                        );
                });
-               $this->registerService(CssManager::class, function (Server $c) {
-                       return new CssManager(
-                               $c->getAppDataDir('css')
-                       );
-               });
                $this->registerService('Logger', function (Server $c) {
                        $logClass = $c->query('AllConfig')->getSystemValue('log_type', 'file');
                        // TODO: Drop backwards compatibility for config in the future
@@ -912,15 +907,6 @@ class Server extends ServerContainer implements IServerContainer {
                return $this->query('AvatarManager');
        }
 
-       /**
-        * Returns the css manager
-        *
-        * @return \OCP\ICssManager
-        */
-       public function getCssManager() {
-               return $this->query(CssManager::class);
-       }
-
        /**
         * Returns the root folder of ownCloud's data directory
         *
diff --git a/lib/public/ICssManager.php b/lib/public/ICssManager.php
deleted file mode 100644 (file)
index 3880150..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-<?php
-/**
- * @copyright Copyright (c) 2016, John Molakvoæ (skjnldsv@protonmail.com)
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-namespace OCP;
-
-use OCP\Files\NotFoundException;
-use OCP\Files\SimpleFS\ISimpleFile;
-
-/**
- * This class provides scss functionality
- * @since 11.0.0
- */
-
-interface ICssManager {
-       
-       /**
-        * Get the css file and return ISimpleFile
-        *
-        * @param string $fileName css filename with extension
-        * @param string $appName css app name
-        * @return ISimpleFile
-        * @throws NotFoundException
-        */
-       public function getCss($fileName, $appName);
-}