From: Bart Visscher Date: Fri, 17 Feb 2012 20:59:43 +0000 (+0100) Subject: Move storing "last updated at" time to the app config X-Git-Tag: v4.0.0beta~201^2~44 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=45cff7b7378ff351158d9d93b879dcfc156171aa;p=nextcloud-server.git Move storing "last updated at" time to the app config This way the config.php file is not changed every time you go to the personal page. Step to make it possible to have a read-only config.php most of the time --- diff --git a/lib/setup.php b/lib/setup.php index eb32e84713f..3e46a3dcc9a 100644 --- a/lib/setup.php +++ b/lib/setup.php @@ -77,8 +77,6 @@ class OC_Setup { OC_Config::setValue('datadirectory', $datadir); OC_Config::setValue('dbtype', $dbtype); OC_Config::setValue('version',implode('.',OC_Util::getVersion())); - OC_Config::setValue('installedat',microtime(true)); - OC_Config::setValue('lastupdatedat',microtime(true)); if($dbtype == 'mysql') { $dbuser = $options['dbuser']; $dbpass = $options['dbpass']; @@ -224,6 +222,9 @@ class OC_Setup { } if(count($error) == 0) { + OC_Appconfig::setValue('core', 'installedat',microtime(true)); + OC_Appconfig::setValue('core', 'lastupdatedat',microtime(true)); + //create the user and group OC_User::createUser($username, $password); OC_Group::createGroup('admin'); diff --git a/lib/updater.php b/lib/updater.php index cc4a4602539..57623797ae5 100644 --- a/lib/updater.php +++ b/lib/updater.php @@ -29,12 +29,12 @@ class OC_Updater{ * Check if a new version is available */ public static function check(){ - OC_Config::setValue('lastupdatedat',microtime(true)); + OC_Appconfig::setValue('core', 'lastupdatedat',microtime(true)); $updaterurl='http://apps.owncloud.com/updater.php'; $version=OC_Util::getVersion(); - $version['installed']=OC_Config::getValue( "installedat"); - $version['updated']=OC_Config::getValue( "lastupdatedat"); + $version['installed']=OC_Config::getValue('installedat'); + $version['updated']=OC_Appconfig::getValue('core', 'lastupdatedat', OC_Config::getValue( 'lastupdatedat')); $version['updatechannel']='stable'; $versionstring=implode('x',$version);