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
This commit is contained in:
parent
bd7227bb93
commit
45cff7b737
|
@ -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');
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue