add the possibility to add an preupdate.php

This commit is contained in:
Georg Ehrke 2012-10-26 13:10:56 +02:00
parent c7d64811d6
commit 1888ac0d41
1 changed files with 4 additions and 0 deletions

View File

@ -685,6 +685,10 @@ class OC_App{
* @param string $appid
*/
public static function updateApp($appid) {
if(file_exists(self::getAppPath($appid).'/appinfo/preupdate.php')) {
self::loadApp($appid);
include self::getAppPath($appid).'/appinfo/preupdate.php';
}
if(file_exists(self::getAppPath($appid).'/appinfo/database.xml')) {
OC_DB::updateDbFromStructure(self::getAppPath($appid).'/appinfo/database.xml');
}