Хранилища Subversion ant

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

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

/branches/ant/0.9.x/lib/core.php
1112,6 → 1112,34
}
 
/**
* Вывод списка типов репозиториев
*
* @author Alexander Wolf
* @category Core
*
* @param integer $reptype
* @param string $name
* @return string
*/
public function showRepType($reptype = 0, $name = "") {
$sRT = $this->secure->checkInt($reptype);
$sNM = $this->secure->checkStr($name,1);
$query = "SELECT * FORM ".$this->prefix."rtype";
$rq =& $this->db->query($query);
$show = "<select name='".$sNM."' id='".$sNM."'>\n";
while ($rq->fetchInto($element)) {
if ($element["rtype_id"]==$sRT) {
$show .= "<option value='".$this->secure->checkInt($element["rtype_id"])."' selected>".$this->secure->checkStr($element["rtype"],1)."</option>\n";
} else {
$show .= "<option value='".$this->secure->checkInt($element["rtype_id"])."'>".$this->secure->checkStr($element["rtype"],1)."</option>\n";
}
}
$show .= "</select>";
 
return $show;
}
 
/**
* Форма создания/редактирвоания репозиториев
*
* @author Alexander Wolf
1134,8 → 1162,8
}
if ($sRepID != 0) {
// Режим редактирования
$query = "SELECT r.repname,r.repinfo,r.repkey,rt.rtype,p.proto,h.rhost,f.rfolder,v.*,d.distname,dt.type FROM ".$this->prefix."repository r ";
$query .= "JOIN ".$this->prefix."rtype rt ON r.rtype_id=rt.rtype_id ";
$query = "SELECT r.rtype_id,r.repname,r.repinfo,r.repkey,p.proto,h.rhost,f.rfolder,v.*,d.distname,dt.type FROM ".$this->prefix."repository r ";
//$query .= "JOIN ".$this->prefix."rtype rt ON r.rtype_id=rt.rtype_id ";
$query .= "JOIN ".$this->prefix."protos p ON r.proto_id=p.proto_id ";
$query .= "JOIN ".$this->prefix."rephost h ON r.rhost_id=h.rhost_id ";
$query .= "JOIN ".$this->prefix."repfolder f ON r.rfolder_id=f.rfolder_id ";
1155,6 → 1183,7
$show .= "<div class='inputbox'><label for='rproto'>Протокол доступа:</label> <input type='text' name='rproto' value='".$this->secure->checkStr($element["proto"],1)."'></div>\n";
$show .= "<div class='inputbox'><label for='rhost'>Хост репозитория:</label> <input type='text' name='rhost' value='".$this->secure->checkStr($element["rhost"],1)."'></div>\n";
$show .= "<div class='inputbox'><label for='rfolder'>Корневая папка:</label> <input type='text' name='rfolder' value='".$this->secure->checkStr($element["rfolder"],1)."'></div>\n";
$show .= "<div class='inputbox'><label for='rtype'>Тип репозитория:</label> ".$this->showRepType($this->secure->checkInt($element["rtype_id"]), "rtype")."</div>\n";
$show .= "<div class='inputbox'><input type='submit' value=' Отправить данные '></div></fieldset>\n";
 
return $show;