1、修复后台部分bug
2、修复数据库备份类 3、数据库文件整理
This commit is contained in:
@@ -49,16 +49,17 @@ class Config extends Admin{
|
|||||||
return $this->fetch();
|
return $this->fetch();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function group(){
|
public function group($id = 1){
|
||||||
if (IS_POST) {
|
if (IS_POST) {
|
||||||
$config = input('post.config/a','');
|
$config = $this->request->post('config/a');
|
||||||
$model = model('Config');
|
$model = model('Config');
|
||||||
foreach ($config as $key => $value) {
|
foreach ($config as $key => $value) {
|
||||||
$model::where('name',$key)->update(array('value' => $value));
|
$model->where(array('name'=>$key))->setField('value', $value);
|
||||||
}
|
}
|
||||||
|
//清除db_config_data缓存
|
||||||
|
cache('db_config_data', null);
|
||||||
return $this->success("更新成功!");
|
return $this->success("更新成功!");
|
||||||
}else{
|
}else{
|
||||||
$id = input('get.id', 1);
|
|
||||||
$type = config('config_group_list');
|
$type = config('config_group_list');
|
||||||
$list = db("Config")->where(array('status' => 1, 'group' => $id))->field('id,name,title,extra,value,remark,type')->order('sort')->select();
|
$list = db("Config")->where(array('status' => 1, 'group' => $id))->field('id,name,title,extra,value,remark,type')->order('sort')->select();
|
||||||
if ($list) {
|
if ($list) {
|
||||||
|
|||||||
2526
data/sql.sql
2526
data/sql.sql
File diff suppressed because it is too large
Load Diff
@@ -82,11 +82,11 @@ class Database{
|
|||||||
*/
|
*/
|
||||||
public function create(){
|
public function create(){
|
||||||
$sql = "-- -----------------------------\n";
|
$sql = "-- -----------------------------\n";
|
||||||
$sql .= "-- Think MySQL Data Transfer \n";
|
$sql .= "-- SentCMS MySQL Data Transfer \n";
|
||||||
$sql .= "-- \n";
|
$sql .= "-- \n";
|
||||||
$sql .= "-- Host : " . config('DB_HOST') . "\n";
|
$sql .= "-- Host : " . config('database.hostname') . "\n";
|
||||||
$sql .= "-- Port : " . config('DB_PORT') . "\n";
|
$sql .= "-- Port : " . config('database.hostport') . "\n";
|
||||||
$sql .= "-- Database : " . config('DB_NAME') . "\n";
|
$sql .= "-- Database : " . config('database.database') . "\n";
|
||||||
$sql .= "-- \n";
|
$sql .= "-- \n";
|
||||||
$sql .= "-- Part : #{$this->file['part']}\n";
|
$sql .= "-- Part : #{$this->file['part']}\n";
|
||||||
$sql .= "-- Date : " . date("Y-m-d H:i:s") . "\n";
|
$sql .= "-- Date : " . date("Y-m-d H:i:s") . "\n";
|
||||||
@@ -129,7 +129,7 @@ class Database{
|
|||||||
$sql .= "-- Table structure for `{$table}`\n";
|
$sql .= "-- Table structure for `{$table}`\n";
|
||||||
$sql .= "-- -----------------------------\n";
|
$sql .= "-- -----------------------------\n";
|
||||||
$sql .= "DROP TABLE IF EXISTS `{$table}`;\n";
|
$sql .= "DROP TABLE IF EXISTS `{$table}`;\n";
|
||||||
$sql .= trim($result[0]['create table']) . ";\n\n";
|
$sql .= trim($result[0]['Create Table']) . ";\n\n";
|
||||||
if(false === $this->write($sql)){
|
if(false === $this->write($sql)){
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user