/**
  * @brief loads all apps
  * @returns true/false
  *
  * This function walks through the owncloud directory and loads all apps
  * it can find. A directory contains an app if the file /appinfo/app.php
  * exists.
  */
 public static function loadApps()
 {
     // Did we allready load everything?
     if (self::$init) {
         return true;
     }
     // Our very own core apps are hardcoded
     foreach (array('files', 'settings') as $app) {
         require $app . '/appinfo/app.php';
     }
     // The rest comes here
     $apps = OC_Appconfig::getApps();
     foreach ($apps as $app) {
         if (self::isEnabled($app)) {
             if (is_file(OC::$SERVERROOT . '/apps/' . $app . '/appinfo/app.php')) {
                 require 'apps/' . $app . '/appinfo/app.php';
             }
         }
     }
     self::$init = true;
     // return
     return true;
 }