summaryrefslogtreecommitdiffstats
path: root/lib/base.php
diff options
context:
space:
mode:
authorRobin Appelman <icewind1991@gmail.com>2011-11-13 16:16:21 +0100
committerRobin Appelman <icewind1991@gmail.com>2012-01-08 01:57:53 +0100
commitecf6f2ca2f74abbfdc72788c502ef5a015dc890a (patch)
treea2df9523dc6b1c1c115a6b5cdcb9d5300d2ca4ce /lib/base.php
parent9a4e37483b9c6d7c6e287a9c95a408fc0249e8f9 (diff)
downloadnextcloud-server-ecf6f2ca2f74abbfdc72788c502ef5a015dc890a.tar.gz
nextcloud-server-ecf6f2ca2f74abbfdc72788c502ef5a015dc890a.zip
automatically upgrade the main database on version number increase (doesnt work with sqlite for now)
Diffstat (limited to 'lib/base.php')
-rw-r--r--lib/base.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/base.php b/lib/base.php
index 0954e3615bd..803c0118e20 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -152,6 +152,12 @@ class OC{
}
}
+ $installedVersion=OC_Config::getValue('version','0.0.0');
+ $currentVersion=implode('.',OC_Util::getVersion());
+ if (version_compare($currentVersion, $installedVersion, '>')) {
+ OC_DB::updateDbFromStructure('../db_structure.xml');
+ }
+
ini_set('session.cookie_httponly','1;');
session_start();
@@ -230,8 +236,6 @@ if( !isset( $RUNTIME_NOAPPS )){
$RUNTIME_NOAPPS = false;
}
-OC::init();
-
if(!function_exists('get_temp_dir')) {
function get_temp_dir() {
if( $temp=ini_get('upload_tmp_dir') ) return $temp;
@@ -247,6 +251,8 @@ if(!function_exists('get_temp_dir')) {
}
}
+OC::init();
+
require_once('fakedirstream.php');