]> source.dussan.org Git - nextcloud-server.git/commitdiff
Move storing "last updated at" time to the app config
authorBart Visscher <bartv@thisnet.nl>
Fri, 17 Feb 2012 20:59:43 +0000 (21:59 +0100)
committerBart Visscher <bartv@thisnet.nl>
Fri, 17 Feb 2012 21:10:03 +0000 (22:10 +0100)
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

lib/setup.php
lib/updater.php

index eb32e84713f187da82f4aceeace7155c68a9da81..3e46a3dcc9a863e8cebd8f76ce23823b71f8d69c 100644 (file)
@@ -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');
index cc4a46025394ff45b7a9445e4142303c5d427898..57623797ae5c7a74cf32c1a5b207bc2b91c719d8 100644 (file)
@@ -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);