diff --git a/admin/appinfo.php b/admin/appinfo/app.php similarity index 85% rename from admin/appinfo.php rename to admin/appinfo/app.php index 0b2e4dbf85d..befe8e678f0 100644 --- a/admin/appinfo.php +++ b/admin/appinfo/app.php @@ -1,6 +1,6 @@ "admin", "name" => "Administration" )); +OC_APP::register( array( "id" => "admin", "name" => "Administration" )); if( OC_USER::ingroup( $_SESSION['username'], 'admin' )) { OC_UTIL::addNavigationEntry( array( "app" => "admin", "file" => "index.php", "name" => "Administration" )); diff --git a/admin/index.php b/admin/index.php index cfcb70d056b..96fa2007244 100644 --- a/admin/index.php +++ b/admin/index.php @@ -30,7 +30,7 @@ if( !OC_USER::isLoggedIn() || !OC_USER::ingroup( $_SESSION['username'], 'admin' $adminpages = array(); -foreach( OC_UTIL::$adminpages as $i ){ +foreach( OC_APP::list() as $i ){ // Do some more work here soon $adminpages[] = $i; } diff --git a/files/appinfo.php b/files/appinfo.php deleted file mode 100644 index 44a533cf4a0..00000000000 --- a/files/appinfo.php +++ /dev/null @@ -1,6 +0,0 @@ - "files", "name" => "Files" )); -OC_UTIL::addNavigationEntry( array( "app" => "files", "file" => "index.php", "name" => "Files" )); - -?> diff --git a/files/appinfo/app.php b/files/appinfo/app.php new file mode 100644 index 00000000000..aa0054fc43d --- /dev/null +++ b/files/appinfo/app.php @@ -0,0 +1,7 @@ + "files", "name" => "Files" )); +OC_UTIL::addNavigationEntry( array( "app" => "files", "file" => "index.php", "name" => "Files" )); +OC_UTIL::addAdminPage( array( "app" => "files", "file" => "admin.php", "name" => "Files" )); + +?> diff --git a/lib/app.php b/lib/app.php new file mode 100644 index 00000000000..181af8a4faf --- /dev/null +++ b/lib/app.php @@ -0,0 +1,40 @@ + diff --git a/lib/appconfig.php b/lib/appconfig.php index f1bccc0a250..844d4cf54e8 100644 --- a/lib/appconfig.php +++ b/lib/appconfig.php @@ -1,16 +1,5 @@ $CONFIG_BACKUPDIRECTORY)); $backup=new OC_FILEOBSERVER_BACKUP(array('storage'=>$backupStorage)); @@ -179,7 +169,7 @@ class OC_UTIL { $CONFIG_DATADIRECTORY = "$CONFIG_DATADIRECTORY_ROOT/$user/$root"; if( !is_dir( $CONFIG_DATADIRECTORY )){ - mkdir( $CONFIG_DATADIRECTORY, 0x777, true ); + mkdir( $CONFIG_DATADIRECTORY, 0x755, true ); } //set up the other storages according to the system settings @@ -253,15 +243,6 @@ class OC_UTIL { OC_UTIL::$adminpages[] = $entry; } - /** - * add application - * - * @param array $entry - */ - public static function addApplication( $entry){ - OC_UTIL::$applications[] = $entry; - } - /** * add an entry to the personal menu * diff --git a/lib/preferences.php b/lib/preferences.php new file mode 100644 index 00000000000..bd4ff55cc5c --- /dev/null +++ b/lib/preferences.php @@ -0,0 +1,35 @@ + diff --git a/log/appinfo.php b/log/appinfo/app.php similarity index 61% rename from log/appinfo.php rename to log/appinfo/app.php index e4ffa79efe1..292d59ee578 100644 --- a/log/appinfo.php +++ b/log/appinfo/app.php @@ -1,6 +1,6 @@ "log", "name" => "Log" )); +OC_APP::register( array( "id" => "log", "name" => "Log" )); OC_UTIL::addNavigationEntry( array( "app" => "log", "file" => "index.php", "name" => "Log" )); ?> diff --git a/settings/appinfo.php b/settings/appinfo/app.php similarity index 60% rename from settings/appinfo.php rename to settings/appinfo/app.php index 232aaa0f0e7..0db99441574 100644 --- a/settings/appinfo.php +++ b/settings/appinfo/app.php @@ -1,6 +1,6 @@ "settings", "name" => "Settings" )); +OC_APP::register( array( "id" => "settings", "name" => "Settings" )); OC_UTIL::addNavigationEntry( array( "app" => "settings", "file" => "index.php", "name" => "Settings" )); ?>