]> source.dussan.org Git - nextcloud-server.git/commitdiff
Remove unused function and correct PHPDoc
authorLukas Reschke <lukas@owncloud.com>
Wed, 11 Feb 2015 23:11:38 +0000 (00:11 +0100)
committerLukas Reschke <lukas@owncloud.com>
Mon, 16 Feb 2015 12:46:45 +0000 (13:46 +0100)
lib/private/app.php
settings/routes.php
settings/settings.php [deleted file]

index a92ddd40e6fe0e6ba975b7c1e3873e5fceadc1da..f41cb82c36bd7236b8122b2b1b481a65d111ec71 100644 (file)
@@ -35,13 +35,11 @@ use OC\App\Platform;
  */
 class OC_App {
        static private $appVersion = [];
-       static private $settingsForms = array();
        static private $adminForms = array();
        static private $personalForms = array();
        static private $appInfo = array();
        static private $appTypes = array();
        static private $loadedApps = array();
-       static private $checkedApps = array();
        static private $altLogin = array();
 
        /**
@@ -320,6 +318,7 @@ class OC_App {
        /**
         * This function set an app as disabled in appconfig.
         * @param string $app app
+        * @throws Exception
         */
        public static function disable($app) {
                if($app === 'files') {
@@ -431,18 +430,6 @@ class OC_App {
                                "icon" => OC_Helper::imagePath("settings", "personal.svg")
                        );
 
-                       // if there are some settings forms
-                       if (!empty(self::$settingsForms)) {
-                               // settings menu
-                               $settings[] = array(
-                                       "id" => "settings",
-                                       "order" => 1000,
-                                       "href" => OC_Helper::linkToRoute("settings_settings"),
-                                       "name" => $l->t("Settings"),
-                                       "icon" => OC_Helper::imagePath("settings", "settings.svg")
-                               );
-                       }
-
                        //SubAdmins are also allowed to access user management
                        if (OC_SubAdmin::isSubAdmin(OC_User::getUser())) {
                                // admin users menu
@@ -455,7 +442,6 @@ class OC_App {
                                );
                        }
 
-
                        // if the user is an admin
                        if (OC_User::isAdminUser(OC_User::getUser())) {
                                // admin settings
@@ -696,14 +682,12 @@ class OC_App {
        }
 
        /**
-        * get the forms for either settings, admin or personal
+        * @param string $type
+        * @return array
         */
        public static function getForms($type) {
                $forms = array();
                switch ($type) {
-                       case 'settings':
-                               $source = self::$settingsForms;
-                               break;
                        case 'admin':
                                $source = self::$adminForms;
                                break;
@@ -719,13 +703,6 @@ class OC_App {
                return $forms;
        }
 
-       /**
-        * register a settings form to be shown
-        */
-       public static function registerSettings($app, $page) {
-               self::$settingsForms[] = $app . '/' . $page . '.php';
-       }
-
        /**
         * register an admin form to be shown
         *
@@ -743,10 +720,16 @@ class OC_App {
                self::$personalForms[] = $app . '/' . $page . '.php';
        }
 
-       public static function registerLogIn($entry) {
+       /**
+        * @param array $entry
+        */
+       public static function registerLogIn(array $entry) {
                self::$altLogin[] = $entry;
        }
 
+       /**
+        * @return array
+        */
        public static function getAlternativeLogIns() {
                return self::$altLogin;
        }
index 150746665d318f1b87152b024343f997c497084b..942d9b0fb283058c4b1bd4c2aba705a9007a07b5 100644 (file)
@@ -37,8 +37,6 @@ $this->create('settings_help', '/settings/help')
        ->actionInclude('settings/help.php');
 $this->create('settings_personal', '/settings/personal')
        ->actionInclude('settings/personal.php');
-$this->create('settings_settings', '/settings')
-       ->actionInclude('settings/settings.php');
 $this->create('settings_users', '/settings/users')
        ->actionInclude('settings/users.php');
 $this->create('settings_apps', '/settings/apps')
diff --git a/settings/settings.php b/settings/settings.php
deleted file mode 100644 (file)
index c08732f..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-<?php
-/**
- * Copyright (c) 2011, Robin Appelman <icewind1991@gmail.com>
- * This file is licensed under the Affero General Public License version 3 or later.
- * See the COPYING-README file.
- */
-
-OC_Util::checkLoggedIn();
-
-OC_Util::addStyle( 'settings', 'settings' );
-OC_App::setActiveNavigationEntry( 'settings' );
-
-$tmpl = new OC_Template( 'settings', 'settings', 'user');
-$forms=OC_App::getForms('settings');
-$tmpl->assign('forms', array());
-foreach($forms as $form) {
-       $tmpl->append('forms', $form);
-}
-$tmpl->printPage();