Хранилища Subversion ant

Сравнить редакции

Не учитывать пробелы Редакция 537 → Редакция 538

/branches/ant/0.9.x/process.php
46,13 → 46,14
$DName = $secure->checkStr($_POST["dname"],1);
$DUA = $secure->checkStr($_POST["dua"],1);
$DType = $secure->checkInt($_POST["dtype"]);
$DLogo = 0;
if ($_FILES["distlogo"]["type"]!="") {
$DLogo = $core->uploadPicture($picture, $DUA, $_FILES);
$r = $core->updateDistribution($ID, $DName, $DType, $DUA, $DLogo);
}
 
$r = $core->updateDistribution($ID, $DName, $DType, $DUA, $DLogo);
$r = $core->updateDistribution($ID, $DName, $DType, $DUA);
if ($r["ERR"]==0) {
header("Location: ".$manager."\n\n");
} else {
/branches/ant/0.9.x/lib/core.php
365,7 → 365,7
* @param integer $distlogo
* @return array
*/
public function updateDistribution($distID, $distname, $disttype, $distua, $distlogo) {
public function updateDistribution($distID, $distname, $disttype, $distua, $distlogo = 0) {
$result = array();
$sDID = $this->secure->checkInt($distID);
$sDName = $this->secure->checkStr($distname,1);
373,7 → 373,11
$sDUAgt = $this->secure->checkStr($distua,1);
$sDLogo = $this->secure->checkInt($distlogo);
 
$query = "UPDATE ".$this->prefix."distribution SET distname='".$sDName."', distua='".$sDUAgt."', disttype='".$sDType."', distlogo='".$sDLogo."' WHERE dist_id='".$sDID."'";
if ($sDLogo!=0) {
$query = "UPDATE ".$this->prefix."distribution SET distname='".$sDName."', distua='".$sDUAgt."', disttype='".$sDType."', distlogo='".$sDLogo."' WHERE dist_id='".$sDID."'";
} else {
$query = "UPDATE ".$this->prefix."distribution SET distname='".$sDName."', distua='".$sDUAgt."', disttype='".$sDType."' WHERE dist_id='".$sDID."'";
}
$rq =& $this->db->query($query);
if (PEAR::isError($this->db)) {
$result["ERR"] = 1;