aboutsummaryrefslogtreecommitdiffstats
path: root/lib/app.php
diff options
context:
space:
mode:
authorRobin Appelman <icewind1991@gmail.com>2011-07-29 19:12:55 +0200
committerRobin Appelman <icewind1991@gmail.com>2011-07-29 19:12:55 +0200
commitfe47d51598504dacdfce9b84016f8c1fd1af1755 (patch)
tree38712e1f9e7afa9d58abd5a28f60fba4d2f24f33 /lib/app.php
parentb6ad416757a78f404d757551ffa1697988bbf5b4 (diff)
downloadnextcloud-server-fe47d51598504dacdfce9b84016f8c1fd1af1755.tar.gz
nextcloud-server-fe47d51598504dacdfce9b84016f8c1fd1af1755.zip
some refactoring for subnavigation code
Diffstat (limited to 'lib/app.php')
-rw-r--r--lib/app.php20
1 files changed, 6 insertions, 14 deletions
diff --git a/lib/app.php b/lib/app.php
index 475015f6779..bccd0c665fa 100644
--- a/lib/app.php
+++ b/lib/app.php
@@ -310,20 +310,12 @@ class OC_APP{
/// Private foo
private static function addSubNavigation( $list ){
- $found = false;
- foreach( self::$subnavigation as $parent => $selection ){
- foreach( $selection as $subentry ){
- if( $subentry['id'] == self::$activeapp ){
- foreach( $list as &$naventry ){
- if( $naventry['id'] == $parent ){
- $naventry['active'] = true;
- $naventry['subnavigation'] = $selection;
- }
- else{
- $naventry['active'] = false;
- }
- } unset( $naventry );
- $found = true;
+ if(isset(self::$subnavigation[self::$activeapp])){
+ $subNav=self::$subnavigation[self::$activeapp];
+ foreach( $list as &$naventry ){
+ if( $naventry['id'] == self::$activeapp ){
+ $naventry['active'] = true;
+ $naventry['subnavigation'] = $subNav;
}
}
}