Remove OC_App::register function

The data supplied is never used in OwnCloud. Removed the call from all the apps, and made the public API function empty.
This commit is contained in:
Bart Visscher 2012-05-31 13:00:58 +02:00
parent 2ae58ee6c0
commit a33f580db1
16 changed files with 2 additions and 98 deletions

View 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');

View 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')));

View 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,

View 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,

View 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(

View 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") ));

View 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");
OCP\Util::connectHook(OC_Filesystem::CLASSNAME, OC_Filesystem::signal_post_write, "OCA_Versions\Storage", "write_hook");

View 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,

View 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');

View file

@ -1,6 +1,2 @@
<?php
OCP\App::register( array(
'order' => 10,
'id' => 'remoteStorage',
'name' => 'remoteStorage compatibility' ));
OCP\App::registerPersonal('remoteStorage','settings');

View 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,

View 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');

View file

@ -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

View file

@ -52,7 +52,6 @@ class App {
*
*/
public static function register( $data ){
return \OC_App::register( $data );
}

View file

@ -1,5 +0,0 @@
<?php
OC_App::register( array( 'order' => 2, "id" => 'search', 'name' => 'Search' ));
?>

View file

@ -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" ));
?>