Хранилища Subversion ant

Редакция

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

Редакция 535 Редакция 538
Строка 363... Строка 363...
363
     * @param integer $disttype
363
     * @param integer $disttype
364
     * @param string $distua
364
     * @param string $distua
365
     * @param integer $distlogo
365
     * @param integer $distlogo
366
     * @return array
366
     * @return array
367
     */
367
     */
368
    public function updateDistribution($distID, $distname, $disttype, $distua, $distlogo) {
368
    public function updateDistribution($distID, $distname, $disttype, $distua, $distlogo = 0) {
369
        $result = array();
369
        $result = array();
370
        $sDID   = $this->secure->checkInt($distID);
370
        $sDID   = $this->secure->checkInt($distID);
371
        $sDName = $this->secure->checkStr($distname,1);
371
        $sDName = $this->secure->checkStr($distname,1);
372
        $sDType = $this->secure->checkInt($disttype);
372
        $sDType = $this->secure->checkInt($disttype);
373
        $sDUAgt = $this->secure->checkStr($distua,1);
373
        $sDUAgt = $this->secure->checkStr($distua,1);
374
        $sDLogo = $this->secure->checkInt($distlogo);
374
        $sDLogo = $this->secure->checkInt($distlogo);
375
375
-
 
376
        if ($sDLogo!=0) {
376
        $query = "UPDATE ".$this->prefix."distribution SET distname='".$sDName."', distua='".$sDUAgt."', disttype='".$sDType."', distlogo='".$sDLogo."' WHERE dist_id='".$sDID."'";
377
            $query = "UPDATE ".$this->prefix."distribution SET distname='".$sDName."', distua='".$sDUAgt."', disttype='".$sDType."', distlogo='".$sDLogo."' WHERE dist_id='".$sDID."'";
-
 
378
        } else {
-
 
379
            $query = "UPDATE ".$this->prefix."distribution SET distname='".$sDName."', distua='".$sDUAgt."', disttype='".$sDType."' WHERE dist_id='".$sDID."'";
-
 
380
        }
377
        $rq =& $this->db->query($query);
381
        $rq =& $this->db->query($query);
378
        if (PEAR::isError($this->db)) {
382
        if (PEAR::isError($this->db)) {
379
            $result["ERR"] = 1;
383
            $result["ERR"] = 1;
380
            $result["ERRINFO"] = $this->db->getMessage();
384
            $result["ERRINFO"] = $this->db->getMessage();
381
        } else {            
385
        } else {