blessing-skin-server/database/update_scripts/update-3.1.2-to-3.2.0.php

27 lines
695 B
PHP
Raw Normal View History

2016-12-31 23:50:37 +08:00
<?php
/**
* @Author: printempw
* @Date: 2016-12-31 23:37:34
* @Last Modified by: printempw
2017-01-02 16:23:31 +08:00
* @Last Modified time: 2017-01-02 16:22:32
2016-12-31 23:50:37 +08:00
*/
if (! Illuminate\Support\Str::startsWith(option('update_source'), 'http')) {
2016-12-31 23:50:37 +08:00
Option::set('update_source', config('options.update_source'));
}
foreach (config('options') as $key => $value) {
if ($value === 'true' || $value === 'false') {
2016-12-31 23:50:37 +08:00
$option = option($key);
if ($option === '0' || $option === '1') {
Option::set([$key => ($option === '0' ? 'false' : 'true')]);
2016-12-31 23:50:37 +08:00
}
}
}
2017-01-02 16:23:31 +08:00
Option::set('version', '3.2.0');
return [
'v3.2 新加入了插件系统,支持的插件请去程序发布帖查看',
2017-01-02 16:23:31 +08:00
];