index 45ca89db01546d63ebe7750bf5dc6e6aa29e1e38..485e561cfe34d6f660fd4a42754102674a230935 100644 (file)
function execute()
{
+ /* Call parent execute */
+ plugin::execute();
+
/* Fill templating stuff */
$smarty = get_smarty();
$display = "";
/* Post handling for Section, Release and Mirror Setup */
if(isset($_POST['SetRepository'])){
- if((isset($_POST['FAIdebianReleaseS']))&&(!empty($_POST['FAIdebianReleaseS']))){
- $this->FAIdebianRelease = $_POST['FAIdebianReleaseS'];
- }
- if((isset($_POST['FAIdebianMirrorS']))&&(!empty($_POST['FAIdebianMirrorS']))){
- $this->FAIdebianMirror = $_POST['FAIdebianMirrorS'];
- }
-
foreach($this->sections as $sec => $val){
if(isset($_POST[$sec])){
$this->sections[$sec]=true;
}elseif(empty($this->FAIdebianSection)){
$disableRelease = $disableMirror = $disableContinue = true;
}elseif(empty($this->FAIdebianMirror)){
- $disableRelease = $disableSection = $disableContinue = true;
+ $disableRelease = $disableSection = true;
}else{
$disableRelease = $disableSection = true;
}
/* check servers matching release and section settings */
$availableServer = array();
foreach($this->mirrors as $mir){
+
+ /* Check if release and section match */
if($mir['release'] == $this->FAIdebianRelease){
$pass = true;
+
foreach($this->FAIdebianSection as $sec){
+
+ /* If a mirror match, attach */
if($sec != $mir['section']){
$pass = false;
}
+
+ /* Save all matching */
if($pass){
$availableServer[$mir['mirror']]=$mir['mirror'];
}
$smarty->assign("SectionACL"," disabled ");
}
+
+ $smarty->assign("DisSection",!empty($this->FAIdebianSection));
+ $smarty->assign("DisRelease",!empty($this->FAIdebianRelease));
+
$smarty->assign("mirrors" ,$availableServer);
$smarty->assign("mirror" ,$this->FAIdebianMirror);
$smarty->assign("releases",$this->releases);
/* Save data to object */
function save_object()
{
+ if(isset($_POST['SetRepository'])){
+ /* Post handling for Section, Release and Mirror Setup */
+ if((isset($_POST['FAIdebianReleaseS']))&&(!empty($_POST['FAIdebianReleaseS']))){
+ $this->FAIdebianRelease = $_POST['FAIdebianReleaseS'];
+ }
+ if((isset($_POST['FAIdebianMirrorS']))&&(!empty($_POST['FAIdebianMirrorS']))){
+ $this->FAIdebianMirror = $_POST['FAIdebianMirrorS'];
+ }
+ }
}
/* Check supplied data */