diff options
author | Jakob Sack <kde@jakobsack.de> | 2011-03-03 23:08:11 +0100 |
---|---|---|
committer | Jakob Sack <kde@jakobsack.de> | 2011-03-03 23:08:11 +0100 |
commit | f7f957abb92e5ce359d7eafa136406822fee0a51 (patch) | |
tree | 3e101065ee9f29335ffbc8ab48253237eb6c441d /lib | |
parent | ae5dc3efdffef75c48e5ef7cac6b40cd5720442b (diff) | |
download | nextcloud-server-f7f957abb92e5ce359d7eafa136406822fee0a51.tar.gz nextcloud-server-f7f957abb92e5ce359d7eafa136406822fee0a51.zip |
Base for a more flexible navigation
Diffstat (limited to 'lib')
-rw-r--r-- | lib/app.php | 12 | ||||
-rw-r--r-- | lib/base.php | 10 |
2 files changed, 12 insertions, 10 deletions
diff --git a/lib/app.php b/lib/app.php index 181af8a4faf..0bef7381262 100644 --- a/lib/app.php +++ b/lib/app.php @@ -6,13 +6,15 @@ class OC_APP{ /** * */ - public static function init(){ + public static function loadApps(){ + global $SERVERROOT; + // Get all appinfo $dir = opendir( $SERVERROOT ); while( false !== ( $filename = readdir( $dir ))){ if( substr( $filename, 0, 1 ) != '.' ){ - if( file_exists( "$SERVERROOT/$filename/appinfo.php" )){ - oc_require( "$filename/appinfo.php" ); + if( file_exists( "$SERVERROOT/$filename/appinfo/app.php" )){ + oc_require( "$filename/appinfo/app.php" ); } } } @@ -32,8 +34,8 @@ class OC_APP{ /** * */ - public static function list(){ - return OC_APP::$apps[]; + public static function getApps(){ + return OC_APP::$apps; } } diff --git a/lib/base.php b/lib/base.php index c7f0fea6820..09e0a1e299a 100644 --- a/lib/base.php +++ b/lib/base.php @@ -77,6 +77,7 @@ if(isset($CONFIG_HTTPFORCESSL) and $CONFIG_HTTPFORCESSL){ } // load core libs +oc_require_once('helper.php'); oc_require_once('app.php'); oc_require_once('files.php'); oc_require_once('filesystem.php'); @@ -89,7 +90,6 @@ oc_require_once('ocs.php'); oc_require_once('connect.php'); oc_require_once('remotestorage.php'); oc_require_once('plugin.php'); -oc_require_once('helper.php'); OC_PLUGIN::loadPlugins( "" ); @@ -104,15 +104,15 @@ if( !$RUNTIME_NOSETUPFS ){ } // Add the stuff we need always -OC_UTIL::addPersonalMenuEntry( array( "file" => "index.php?logout=1", "name" => "Logout" )); +OC_UTIL::addPersonalMenuEntry( array( "order" => 1000, "href" => OC_HELPER::linkTo( "", "index.php?logout=1" ), "name" => "Logout" )); OC_UTIL::addScript( "jquery-1.5.min" ); OC_UTIL::addScript( "jquery-ui-1.8.10.custom.min" ); OC_UTIL::addScript( "js" ); OC_UTIL::addStyle( "jquery-ui-1.8.10.custom" ); OC_UTIL::addStyle( "styles" ); -// Require all appinfo.php -OC_APP::init(); +// Load Apps +OC_APP::loadApps(); // check if the server is correctly configured for ownCloud OC_UTIL::checkserver(); @@ -239,7 +239,7 @@ class OC_UTIL { * * @param array $entry */ - public static function addAdminPage( $entry){ + public static function addAdminPage( $entry ){ OC_UTIL::$adminpages[] = $entry; } |