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:
parent
2ae58ee6c0
commit
a33f580db1
|
@ -1,9 +1,4 @@
|
||||||
<?php
|
<?php
|
||||||
$l=OC_L10N::get('admin_dependencies_chk');
|
$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');
|
OCP\App::registerAdmin('admin_dependencies_chk','settings');
|
||||||
|
|
|
@ -10,8 +10,6 @@
|
||||||
OC::$CLASSPATH['OC_Bookmarks_Bookmarks'] = 'apps/bookmarks/lib/bookmarks.php';
|
OC::$CLASSPATH['OC_Bookmarks_Bookmarks'] = 'apps/bookmarks/lib/bookmarks.php';
|
||||||
OC::$CLASSPATH['OC_Search_Provider_Bookmarks'] = 'apps/bookmarks/lib/search.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');
|
$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')));
|
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')));
|
||||||
|
|
||||||
|
|
|
@ -11,10 +11,6 @@ OCP\Util::connectHook('OC_User', 'post_deleteUser', 'OC_Calendar_Hooks', 'delete
|
||||||
OCP\Util::addscript('calendar','loader');
|
OCP\Util::addscript('calendar','loader');
|
||||||
OCP\Util::addscript("3rdparty", "chosen/chosen.jquery.min");
|
OCP\Util::addscript("3rdparty", "chosen/chosen.jquery.min");
|
||||||
OCP\Util::addStyle("3rdparty", "chosen/chosen");
|
OCP\Util::addStyle("3rdparty", "chosen/chosen");
|
||||||
OCP\App::register( array(
|
|
||||||
'order' => 10,
|
|
||||||
'id' => 'calendar',
|
|
||||||
'name' => 'Calendar' ));
|
|
||||||
OCP\App::addNavigationEntry( array(
|
OCP\App::addNavigationEntry( array(
|
||||||
'id' => 'calendar_index',
|
'id' => 'calendar_index',
|
||||||
'order' => 10,
|
'order' => 10,
|
||||||
|
|
|
@ -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', 'getEvents', 'OC_Contacts_Hooks', 'getBirthdayEvents');
|
||||||
OCP\Util::connectHook('OC_Calendar', 'getSources', 'OC_Contacts_Hooks', 'getCalenderSources');
|
OCP\Util::connectHook('OC_Calendar', 'getSources', 'OC_Contacts_Hooks', 'getCalenderSources');
|
||||||
|
|
||||||
OCP\App::register( array(
|
|
||||||
'order' => 10,
|
|
||||||
'id' => 'contacts',
|
|
||||||
'name' => 'Contacts' ));
|
|
||||||
|
|
||||||
OCP\App::addNavigationEntry( array(
|
OCP\App::addNavigationEntry( array(
|
||||||
'id' => 'contacts_index',
|
'id' => 'contacts_index',
|
||||||
'order' => 10,
|
'order' => 10,
|
||||||
|
|
|
@ -26,8 +26,6 @@ OCP\Util::addStyle( 'external', 'style');
|
||||||
|
|
||||||
OCP\App::registerAdmin('external', 'settings');
|
OCP\App::registerAdmin('external', 'settings');
|
||||||
|
|
||||||
OCP\App::register(array('order' => 70, 'id' => 'external', 'name' => 'External'));
|
|
||||||
|
|
||||||
$sites = OC_External::getSites();
|
$sites = OC_External::getSites();
|
||||||
for ($i = 0; $i < sizeof($sites); $i++) {
|
for ($i = 0; $i < sizeof($sites); $i++) {
|
||||||
OCP\App::addNavigationEntry(
|
OCP\App::addNavigationEntry(
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
$l=OC_L10N::get('files');
|
$l=OC_L10N::get('files');
|
||||||
|
|
||||||
OCP\App::register( array( "order" => 2, "id" => "files", "name" => "Files" ));
|
|
||||||
OCP\App::registerAdmin('files','admin');
|
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") ));
|
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") ));
|
||||||
|
|
|
@ -2,14 +2,8 @@
|
||||||
|
|
||||||
require_once('apps/files_versions/versions.php');
|
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\App::registerAdmin('files_versions', 'settings');
|
||||||
OCP\Util::addscript('files_versions', 'versions');
|
OCP\Util::addscript('files_versions', 'versions');
|
||||||
|
|
||||||
// Listen to write signals
|
// 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");
|
||||||
|
|
|
@ -29,11 +29,6 @@ OC::$CLASSPATH['OC_Gallery_Hooks_Handlers'] = 'apps/gallery/lib/hooks_handlers.p
|
||||||
|
|
||||||
$l = OC_L10N::get('gallery');
|
$l = OC_L10N::get('gallery');
|
||||||
|
|
||||||
OCP\App::register(array(
|
|
||||||
'order' => 20,
|
|
||||||
'id' => 'gallery',
|
|
||||||
'name' => 'Pictures'));
|
|
||||||
|
|
||||||
OCP\App::addNavigationEntry( array(
|
OCP\App::addNavigationEntry( array(
|
||||||
'id' => 'gallery_index',
|
'id' => 'gallery_index',
|
||||||
'order' => 20,
|
'order' => 20,
|
||||||
|
|
|
@ -29,8 +29,6 @@ require_once('apps/media/lib_scanner.php');
|
||||||
OCP\Util::addscript('media','loader');
|
OCP\Util::addscript('media','loader');
|
||||||
OCP\App::registerPersonal('media','settings');
|
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')));
|
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');
|
OC_Search::registerProvider('OC_MediaSearchProvider');
|
||||||
|
|
|
@ -1,6 +1,2 @@
|
||||||
<?php
|
<?php
|
||||||
OCP\App::register( array(
|
|
||||||
'order' => 10,
|
|
||||||
'id' => 'remoteStorage',
|
|
||||||
'name' => 'remoteStorage compatibility' ));
|
|
||||||
OCP\App::registerPersonal('remoteStorage','settings');
|
OCP\App::registerPersonal('remoteStorage','settings');
|
||||||
|
|
|
@ -3,11 +3,6 @@ $l=new OC_L10N('tasks');
|
||||||
OC::$CLASSPATH['OC_Calendar_Calendar'] = 'apps/calendar/lib/calendar.php';
|
OC::$CLASSPATH['OC_Calendar_Calendar'] = 'apps/calendar/lib/calendar.php';
|
||||||
OC::$CLASSPATH['OC_Task_App'] = 'apps/tasks/lib/app.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(
|
OCP\App::addNavigationEntry( array(
|
||||||
'id' => 'tasks_index',
|
'id' => 'tasks_index',
|
||||||
'order' => 11,
|
'order' => 11,
|
||||||
|
|
|
@ -1,7 +1,3 @@
|
||||||
<?php
|
<?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_host-meta', '/apps/user_webfinger/host-meta.php');
|
||||||
OCP\CONFIG::setAppValue('core', 'public_webfinger', '/apps/user_webfinger/webfinger.php');
|
OCP\CONFIG::setAppValue('core', 'public_webfinger', '/apps/user_webfinger/webfinger.php');
|
||||||
|
|
40
lib/app.php
40
lib/app.php
|
@ -28,7 +28,6 @@
|
||||||
*/
|
*/
|
||||||
class OC_App{
|
class OC_App{
|
||||||
static private $init = false;
|
static private $init = false;
|
||||||
static private $apps = array();
|
|
||||||
static private $activeapp = '';
|
static private $activeapp = '';
|
||||||
static private $navigation = array();
|
static private $navigation = array();
|
||||||
static private $settingsForms = array();
|
static private $settingsForms = array();
|
||||||
|
@ -54,14 +53,7 @@ class OC_App{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Our very own core apps are hardcoded
|
// Load the enabled apps here
|
||||||
foreach( array( 'settings') as $app ){
|
|
||||||
if(is_null($types)){
|
|
||||||
require( $app.'/appinfo/app.php' );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// The rest comes here
|
|
||||||
$apps = self::getEnabledApps();
|
$apps = self::getEnabledApps();
|
||||||
// prevent app.php from printing output
|
// prevent app.php from printing output
|
||||||
ob_start();
|
ob_start();
|
||||||
|
@ -216,36 +208,6 @@ class OC_App{
|
||||||
OC_Appconfig::setValue( $app, 'enabled', 'no' );
|
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
|
* @brief adds an entry to the navigation
|
||||||
* @param $data array containing the data
|
* @param $data array containing the data
|
||||||
|
|
|
@ -52,7 +52,6 @@ class App {
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public static function register( $data ){
|
public static function register( $data ){
|
||||||
return \OC_App::register( $data );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
OC_App::register( array( 'order' => 2, "id" => 'search', 'name' => 'Search' ));
|
|
||||||
|
|
||||||
?>
|
|
|
@ -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" ));
|
|
||||||
|
|
||||||
?>
|
|
Loading…
Reference in New Issue