Хранилища Subversion ant

Редакция

Редакция 313 | Редакция 315 | К новейшей редакции | Весь файл | Не учитывать пробелы | Содержимое файла | Авторство | Последнее изменение | Открыть журнал | RSS

Редакция 313 Редакция 314
Строка 16... Строка 16...
16
    protected $db       = NULL;
16
    protected $db       = NULL;
17
    protected $prefix   = NULL;
17
    protected $prefix   = NULL;
18
    protected $secure   = NULL;    
18
    protected $secure   = NULL;    
19
19
20
20
21
    function __constructor($database,$prefix,$secure) {
21
    function __construct($database, $prefix, $secure) {
22
        $this->db       = $database;
22
        $this->db       = $database;
23
        $this->prefix   = $prefix;
23
        $this->prefix   = $prefix;
24
        $this->secure   = $secure;        
24
        $this->secure   = $secure;        
25
    }
25
    }
26
26
27
    function getSetting($attr) {
27
    function getOption($attr) {
28
        $db = $this->db;
-
 
29
        $result = array();
28
        $result = array();
30
        $query = "SELECT optvalue FROM ".$this->prefix."settings WHERE opt='".$attr."'";
29
        $query = "SELECT optvalue FROM ".$this->prefix."settings WHERE opt='".$this->secure->checkInt($attr)."'";
31
        $rq =& $db->query($query);
30
        $rq =& $this->db->query($query);
32
        if ($rq->numRows()!=0) {
31
        if ($rq->numRows()!=0) {
33
            $rq->fetchInto($element);
32
            $rq->fetchInto($element);
34
            $result["ERR"] = 0;
33
            $result["ERR"] = 0;
35
            $result["OptValue"] = $element["optvalue"];
34
            $result["OptValue"] = $element["optvalue"];
36
        } else {
35
        } else {