Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMichael Gapczynski <GapczynskiM@gmail.com>2012-01-02 01:58:51 +0400
committerRobin Appelman <icewind1991@gmail.com>2012-01-08 05:12:52 +0400
commit010bfa11e363928f4c3a6d8518cbab0e79e28149 (patch)
tree51e16097b7a7736050748f5dae456b28555fdd83 /lib
parentfea68e08b4f0aa52ebd051e4428ff5abd8284f5c (diff)
Fix updateApp() and add extra check to updateApps()
Diffstat (limited to 'lib')
-rw-r--r--lib/app.php16
1 files changed, 9 insertions, 7 deletions
diff --git a/lib/app.php b/lib/app.php
index 6b35cdffec9..13c4cef32b4 100644
--- a/lib/app.php
+++ b/lib/app.php
@@ -381,9 +381,11 @@ class OC_App{
foreach( $apps as $app ){
$installedVersion=OC_Appconfig::getValue($app,'installed_version');
$appInfo=OC_App::getAppInfo($app);
- $currentVersion=$appInfo['version'];
- if (version_compare($currentVersion, $installedVersion, '>')) {
- OC_App::updateApp($app);
+ if (isset($appInfo['version'])) {
+ $currentVersion=$appInfo['version'];
+ if (version_compare($currentVersion, $installedVersion, '>')) {
+ OC_App::updateApp($app);
+ }
}
}
}
@@ -393,11 +395,11 @@ class OC_App{
* @param string appid
*/
public static function updateApp($appid){
- if(file_exists(OC::$SERVERROOT.'/apps/'.$file.'/appinfo/database.xml')){
- OC_DB::updateDbFromStructure(OC::$SERVERROOT.'/apps/'.$file.'/appinfo/database.xml');
+ if(file_exists(OC::$SERVERROOT.'/apps/'.$appid.'/appinfo/database.xml')){
+ OC_DB::updateDbFromStructure(OC::$SERVERROOT.'/apps/'.$appid.'/appinfo/database.xml');
}
- if(file_exists(OC::$SERVERROOT.'/apps/'.$file.'/appinfo/update.php')){
- include OC::$SERVERROOT.'/apps/'.$file.'/appinfo/update.php';
+ if(file_exists(OC::$SERVERROOT.'/apps/'.$appid.'/appinfo/update.php')){
+ include OC::$SERVERROOT.'/apps/'.$appid.'/appinfo/update.php';
}
}
}