forked from cynial/STBlog
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsettings_mdl.php
More file actions
66 lines (56 loc) · 1.48 KB
/
Copy pathsettings_mdl.php
File metadata and controls
66 lines (56 loc) · 1.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* STBlog Blogging System
*
* 基于Codeigniter的单用户多权限开源博客系统
*
* STBlog is an open source multi-privilege blogging System built on the
* well-known PHP framework Codeigniter.
*
* @package STBLOG
* @author Saturn <huyanggang@gmail.com>
* @copyright Copyright (c) 2009 - 2010, cnsaturn.com.
* @license GNU General Public License 2.0
* @link http://code.google.com/p/stblog/
* @version 0.1.0
*/
// ------------------------------------------------------------------------
/**
* STBLOG Settings Model Class
*
* Settings
*
* @package STBLOG
* @subpackage Models
* @category Models
* @author Saturn <huyanggang@gmail.com>
* @link http://code.google.com/p/stblog/
*/
class Settings_mdl extends CI_Model {
const TBL_SETTINGS = 'settings';
/**
* 构造函数
*
* @access public
* @return void
*/
public function __construct()
{
parent::__construct();
log_message('debug', "STBLOG: Settings Model Class Initialized");
}
/**
* 更新一个配置
*
* @access public
* @return void
*/
public function update_setting_item($name, $value)
{
$this->db->where('name', $name);
$this->db->update(self::TBL_SETTINGS, array('value'=> $value));
return ($this->db->affected_rows() > 0) ? TRUE : FALSE;
}
}
/* End of file settings_mdl.php */
/* Location: ./application/models/settings_mdl.php */