]> source.dussan.org Git - nextcloud-server.git/commitdiff
Remove OC_App::register function
authorBart Visscher <bartv@thisnet.nl>
Thu, 31 May 2012 11:00:58 +0000 (13:00 +0200)
committerBart Visscher <bartv@thisnet.nl>
Thu, 31 May 2012 11:01:30 +0000 (13:01 +0200)
The data supplied is never used in OwnCloud. Removed the call from all the apps, and made the public API function empty.

16 files changed:
apps/admin_dependencies_chk/appinfo/app.php
apps/bookmarks/appinfo/app.php
apps/calendar/appinfo/app.php
apps/contacts/appinfo/app.php
apps/external/appinfo/app.php
apps/files/appinfo/app.php
apps/files_versions/appinfo/app.php
apps/gallery/appinfo/app.php
apps/media/appinfo/app.php
apps/remoteStorage/appinfo/app.php
apps/tasks/appinfo/app.php
apps/user_webfinger/appinfo/app.php
lib/app.php
lib/public/app.php
search/appinfo/app.php [deleted file]
settings/appinfo/app.php [deleted file]

index 72d368a085efa3d7b252b206e80300b2071dac31..62b26342d239bf6f03007c1f03153abd7a172bb4 100644 (file)
@@ -1,9 +1,4 @@
 <?php
 $l=OC_L10N::get('admin_dependencies_chk');
 
-OCP\App::register( array( 
-  'order' => 14,
-  'id' => 'admin_dependencies_chk',
-  'name' => 'Owncloud Install Info' ));
-
 OCP\App::registerAdmin('admin_dependencies_chk','settings');
index 8a8f443891c11fb0407d11b746978ec279fab795..f4bca9df7000a6c1795a82394985e24efa71c396 100644 (file)
@@ -10,8 +10,6 @@
 OC::$CLASSPATH['OC_Bookmarks_Bookmarks'] = 'apps/bookmarks/lib/bookmarks.php';
 OC::$CLASSPATH['OC_Search_Provider_Bookmarks'] = 'apps/bookmarks/lib/search.php';
 
-OCP\App::register( array( 'order' => 70, 'id' => 'bookmark', 'name' => 'Bookmarks' ));
-
 $l = new OC_l10n('bookmarks');
 OCP\App::addNavigationEntry( array( 'id' => 'bookmarks_index', 'order' => 70, 'href' => OCP\Util::linkTo( 'bookmarks', 'index.php' ), 'icon' => OCP\Util::imagePath( 'bookmarks', 'bookmarks.png' ), 'name' => $l->t('Bookmarks')));
 
index b02fc602c6b33cf63c60380c398d5008575f0656..886c218f7c1e1ce1f185d1ef66fa6d257325d219 100644 (file)
@@ -11,10 +11,6 @@ OCP\Util::connectHook('OC_User', 'post_deleteUser', 'OC_Calendar_Hooks', 'delete
 OCP\Util::addscript('calendar','loader');
 OCP\Util::addscript("3rdparty", "chosen/chosen.jquery.min");
 OCP\Util::addStyle("3rdparty", "chosen/chosen");
-OCP\App::register( array(
-  'order' => 10,
-  'id' => 'calendar',
-  'name' => 'Calendar' ));
 OCP\App::addNavigationEntry( array(
   'id' => 'calendar_index',
   'order' => 10,
index 20d97697bf43975798281f4e362c3241f8c18a93..7a04ec7ff5e6e60eec26d86b97f2138bf66192f8 100644 (file)
@@ -9,11 +9,6 @@ OCP\Util::connectHook('OC_User', 'post_deleteUser', 'OC_Contacts_Hooks', 'delete
 OCP\Util::connectHook('OC_Calendar', 'getEvents', 'OC_Contacts_Hooks', 'getBirthdayEvents');
 OCP\Util::connectHook('OC_Calendar', 'getSources', 'OC_Contacts_Hooks', 'getCalenderSources');
 
-OCP\App::register( array(
-  'order' => 10,
-  'id' => 'contacts',
-  'name' => 'Contacts' ));
-
 OCP\App::addNavigationEntry( array(
   'id' => 'contacts_index',
   'order' => 10,
index ee5437782cdce4c7056efbb4c299228da06dcefb..1a02f3a1be8d15140ab655f541e622d40c3e1c6b 100644 (file)
@@ -26,8 +26,6 @@ OCP\Util::addStyle( 'external', 'style');
 
 OCP\App::registerAdmin('external', 'settings');
 
-OCP\App::register(array('order' => 70, 'id' => 'external', 'name' => 'External'));
-
 $sites = OC_External::getSites();
 for ($i = 0; $i < sizeof($sites); $i++) {
        OCP\App::addNavigationEntry(
index 5c0d3c8db83c3a2903a8ce5fa96005cdc114005d..db3b213ab8decc01ec530a62d3969c4773e91067 100644 (file)
@@ -1,7 +1,6 @@
 <?php
 $l=OC_L10N::get('files');
 
-OCP\App::register( array( "order" => 2, "id" => "files", "name" => "Files" ));
 OCP\App::registerAdmin('files','admin');
 
 OCP\App::addNavigationEntry( array( "id" => "files_index", "order" => 0, "href" => OCP\Util::linkTo( "files", "index.php" ), "icon" => OCP\Util::imagePath( "core", "places/home.svg" ), "name" => $l->t("Files") ));
index 457c5125353f0b0d904467d2f5e73e5ffdafa090..49f1573f7c2ae97e273cdcf81a3487d6f0b588ec 100644 (file)
@@ -2,14 +2,8 @@
 
 require_once('apps/files_versions/versions.php');
 
-// Add an entry in the app list
-OCP\App::register( array(
-  'order' => 10,
-  'id' => 'files_versions',
-  'name' => 'Versioning' ));
-
 OCP\App::registerAdmin('files_versions', 'settings');
 OCP\Util::addscript('files_versions', 'versions');
 
 // Listen to write signals
-OCP\Util::connectHook(OC_Filesystem::CLASSNAME, OC_Filesystem::signal_post_write, "OCA_Versions\Storage", "write_hook");
\ No newline at end of file
+OCP\Util::connectHook(OC_Filesystem::CLASSNAME, OC_Filesystem::signal_post_write, "OCA_Versions\Storage", "write_hook");
index 878da48698ae87ca644fe509041b507e63102eca..e1db33eb3146c36c90cd2de0f85a5d67593efad6 100644 (file)
@@ -29,11 +29,6 @@ OC::$CLASSPATH['OC_Gallery_Hooks_Handlers'] = 'apps/gallery/lib/hooks_handlers.p
 
 $l = OC_L10N::get('gallery');
 
-OCP\App::register(array(
-  'order' => 20,
-  'id' => 'gallery',
-  'name' => 'Pictures'));
-
 OCP\App::addNavigationEntry( array(
  'id' => 'gallery_index',
  'order' => 20,
index d6a09c48059c941ae1d67ae3246f31cf2dae1d63..869bc3440208f446d07d759aece82ccbbeb5145d 100644 (file)
@@ -29,8 +29,6 @@ require_once('apps/media/lib_scanner.php');
 OCP\Util::addscript('media','loader');
 OCP\App::registerPersonal('media','settings');
 
-OCP\App::register( array( 'order' => 3, 'id' => 'media', 'name' => 'Media' ));
-
 OCP\App::addNavigationEntry(array('id' => 'media_index', 'order' => 2, 'href' => OCP\Util::linkTo('media', 'index.php'), 'icon' => OCP\Util::imagePath('core', 'places/music.svg'), 'name' => $l->t('Music')));
 
 OC_Search::registerProvider('OC_MediaSearchProvider');
index 14b8a3d11dfdb3fe8660c26c0381e714e615aa88..c278fd7305616fec0fd5a1654ffcb9341b92f9a6 100644 (file)
@@ -1,6 +1,2 @@
 <?php
-OCP\App::register( array( 
-  'order' => 10,
-  'id' => 'remoteStorage',
-  'name' => 'remoteStorage compatibility' ));
 OCP\App::registerPersonal('remoteStorage','settings');
index f346e2aa4c0adea10cf958f502f121317d6c0462..e7c82d6f24709b56c428417943374ef15ed27e31 100644 (file)
@@ -3,11 +3,6 @@ $l=new OC_L10N('tasks');
 OC::$CLASSPATH['OC_Calendar_Calendar'] = 'apps/calendar/lib/calendar.php';
 OC::$CLASSPATH['OC_Task_App'] = 'apps/tasks/lib/app.php';
 
-OCP\App::register( array(
-  'order' => 11,
-  'id' => 'tasks',
-  'name' => 'Tasks' ));
-
 OCP\App::addNavigationEntry( array(
   'id' => 'tasks_index',
   'order' => 11,
index a45efd96a4623b46e9246b7dcf3c293e37a85d38..3336af66820e6460ca7a8702a1762db9b0e44bda 100644 (file)
@@ -1,7 +1,3 @@
 <?php
-OCP\App::register( array( 
-  'order' => 11,
-  'id' => 'user_webfinger',
-  'name' => 'Webfinger' ));
 OCP\CONFIG::setAppValue('core', 'public_host-meta', '/apps/user_webfinger/host-meta.php');
 OCP\CONFIG::setAppValue('core', 'public_webfinger', '/apps/user_webfinger/webfinger.php');
index 78de0fa21b6e1ecbc8efb2046bd7b2f9ff4c6972..124b76cdc3dd5db5f6ecbb106d4c97c2e0ed9f3f 100755 (executable)
@@ -28,7 +28,6 @@
  */
 class OC_App{
        static private $init = false;
-       static private $apps = array();
        static private $activeapp = '';
        static private $navigation = array();
        static private $settingsForms = array();
@@ -54,14 +53,7 @@ class OC_App{
                        return true;
                }
 
-               // Our very own core apps are hardcoded
-               foreach( array( 'settings') as $app ){
-                       if(is_null($types)){
-                               require( $app.'/appinfo/app.php' );
-                       }
-               }
-
-               // The rest comes here
+               // Load the enabled apps here
                $apps = self::getEnabledApps();
                // prevent app.php from printing output
                ob_start();
@@ -216,36 +208,6 @@ class OC_App{
                OC_Appconfig::setValue( $app, 'enabled', 'no' );
        }
 
-       /**
-        * @brief makes owncloud aware of this app
-        * @param $data array with all information
-        * @returns true/false
-        *
-        * This function registers the application. $data is an associative array.
-        * The following keys are required:
-        *   - id: id of the application, has to be unique ('addressbook')
-        *   - name: Human readable name ('Addressbook')
-        *   - version: array with Version (major, minor, bugfix) ( array(1, 0, 2))
-        *
-        * The following keys are optional:
-        *   - order: integer, that influences the position of your application in
-        *     a list of applications. Lower values come first.
-        *
-        */
-       public static function register( $data ){
-               OC_App::$apps[] = $data;
-       }
-
-       /**
-        * @brief returns information of all apps
-        * @return array with all information
-        *
-        * This function returns all data it got via register().
-        */
-       public static function get(){
-               return OC_App::$apps;
-       }
-
        /**
         * @brief adds an entry to the navigation
         * @param $data array containing the data
index 3960db6d897236644d8559ed64e74f425a4c9fef..1f84087f0768d33049f4bf1c47307aaf1187602b 100644 (file)
@@ -52,7 +52,6 @@ class App {
          *
          */
         public static function register( $data ){
-               return \OC_App::register( $data );
         }
 
 
diff --git a/search/appinfo/app.php b/search/appinfo/app.php
deleted file mode 100644 (file)
index b913416..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-<?php
-
-OC_App::register( array( 'order' => 2, "id" => 'search', 'name' => 'Search' ));
-
-?>
diff --git a/settings/appinfo/app.php b/settings/appinfo/app.php
deleted file mode 100644 (file)
index d18bcdb..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-<?php
-
-OC_App::register( array( "id" => "settings", "name" => "Settings" ));
-OC_App::register( array( "order" => 1, "id" => "admin", "name" => "Administration" ));
-OC_App::register( array( "order" => 1, "id" => "help", "name" => "Help" ));
-
-?>