summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 33259d4)
raw | patch | inline | side by side (parent: 33259d4)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 20 Feb 2006 13:06:32 +0000 (13:06 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 20 Feb 2006 13:06:32 +0000 (13:06 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2705 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/debian/gosa.conffiles b/debian/gosa.conffiles
index e70f8de40f70599467578756e33ee8e12bb1078e..54d090bdd7b943c4fa758aee4894470b81c45ef6 100644 (file)
--- a/debian/gosa.conffiles
+++ b/debian/gosa.conffiles
/etc/gosa/gosa.conf
/etc/gosa/apache.conf
+/etc/gosa/encodings
index 5ce1d53908dc7830f93de6b7cb4eaa9efbc02de1..bfbb2a51992aef510ea373ba884a4a1ee437d913 100644 (file)
var $current_acl= "";
var $selfflag= FALSE;
- var $gosaSubtreeACL;
+ var $gosaSubtreeACL;
/* attribute list for save action */
var $attributes= array("gosaSubtreeACL");
$ldap= $this->config->get_ldap_link();
$ldap->cd($this->dn);
$this->cleanup();
-$ldap->modify ($this->attrs);
+ $ldap->modify ($this->attrs);
show_ldap_error($ldap->get_error());
}
if ($this->object == "all"){
$this->current_acl= preg_replace ( "/[,]?all[,]?/", "", $this->current_acl);
}
- $this->current_acl= preg_replace ( "/[^a-z0-9A-Z]$this->object#[^,]*[,]?/", "", $this->current_acl);
+ $this->current_acl= preg_replace ( "/(^|[^a-z0-9A-Z])$this->object#[^,]*[,]?/", "", $this->current_acl);
/* assemble new attributes */
$attrs= "";
}
/* append information */
- if ($this->current_acl != "" && $attrs != ""){
- $this->current_acl.= ",";
- }
if ($attrs != ""){
$tmp= $this->object;
$attrs= $tmp.$attrs;
}
+ if ($this->current_acl != "" && $attrs != ""){
+ $this->current_acl.= ",";
+ }
$this->current_acl.= $attrs;
if (preg_match("/all#all/", $this->current_acl)){
$this->current_acl= "all";
} else {
$this->selfflag= FALSE;
}
-
}
/* Modify class */
$ldap->cd($this->dn);
$this->cleanup();
-$ldap->modify ($this->attrs);
+ $ldap->modify ($this->attrs);
show_ldap_error($ldap->get_error());
}
diff --git a/plugins/admin/systems/class_workstationStartup.inc b/plugins/admin/systems/class_workstationStartup.inc
index afb5e9e7c60cf2693f2089fee2370e3de93e8433..29246952eca5626ea393fbc1e207f553407ae543 100644 (file)
/* attribute list for save action */
- var $attributes = array("gotoLdapServer", "gotoBootKernel", "gotoKernelParameters", "FAIclass", "FAIstatus", "gotoShare","FAIdebianMirror");
+ var $attributes = array("gotoLdapServer", "gotoBootKernel", "gotoKernelParameters", "FAIclass", "FAIstatus", "gotoShare","FAIdebianMirror", "FAIrelease");
var $objectclasses = array("GOhard", "FAIobject");
/* Share */
var $orig_dn = "";
var $ignore_account = TRUE;
var $FAIdebianMirrors = array();
+ var $FAIrelease = "";
+ var $FAIreleases = array();
function workstartup ($config, $dn= NULL)
{
* none will not be saved to ldap.
*/
$this->FAIdebianMirrors = array();
+ $this->FAIreleases = array();
+
$ldap = $this->config->get_ldap_link();
$ldap->cd($this->config->current['BASE']);
$ldap->search("(objectClass=FAIrepositoryServer)",array("FAIrepository"));
/* attach all attributes with "index => cn" to avoid multiple entries */
$ret = array();
+ $rels = array();
while($attr = $ldap->fetch()){
if(isset($attr['FAIrepository'])){
$sections = split(",",$tmp[3]);
$str = $tmp[0];
$ret[$str]=$sections;
+ if( array_key_exists( $str, $rels ) ) {
+ if( "" == $this->FAIrelease )
+ $this->FAIrelease = $tmp[2];
+ array_push( $rels[$str], $tmp[2] );
+ }
+ else $rels[$str] = array( $tmp[2] );
}
}
}
}
ksort($ret);
+ ksort($rels);
$this->FAIdebianMirrors = $ret;
+ $this->FAIreleases = $rels;
/* Get arrays */
foreach (array("gotoModules", "gotoAutoFs", "gotoFilesystem") as $val){
$tmp2 =array();
foreach($tmp as $class){
- $tmp2[$class] = $class;
+ if( ":" == $class[0] ) {
+ $this->FAIrelease = substr( $class, 1 );
+ }
+ else
+ $tmp2[$class] = $class;
}
$this->FAIclass = $tmp2;
}
function execute()
{
- /* Call parent execute */
- plugin::execute();
+ /* Call parent execute */
+ plugin::execute();
/* Do we need to flip is_account state? */
if (isset($_POST['modify_state'])){
$this->FAIclass = $tmp2;
}
-
if(preg_match("/fai_remove/i",$name)){
$value = base64_decode(preg_replace("/_.*$/i","",preg_replace("/fai_remove_/i","",$name)));
unset($this->FAIclass[$value]);
}
/* Values */
- foreach(array("gotoBootKernel", "customParameters", "gotoShare","FAIclasses","FAIclass","FAIdebianMirror") as $val){
+ foreach(array("gotoBootKernel", "customParameters", "gotoShare","FAIclasses","FAIclass","FAIdebianMirror","FAIrelease") as $val){
$smarty->assign($val, $this->$val);
$smarty->assign($val."ACL", chkacl($this->acl, $val));
}
$i ++ ;
$div->AddEntry(array(
- array("string"=>$class),
- array("string"=>preg_replace("/\%s/",base64_encode($class),$str),"attach"=>"style='width:50px;border-right:none;'")
- ));
+ array("string"=>$class),
+ array("string"=>preg_replace("/\%s/",base64_encode($class),$str),"attach"=>"style='width:50px;border-right:none;'")
+ ));
}
$smarty->assign("FAIScriptlist",$div->DrawList());
$smarty->assign("FAIdebianMirrors",$this->getFAIdebianMirrors());
+ $smarty->assign("FAIreleases",$this->getFAIreleases());
+ $smarty->assign("FAIrelease",$this->FAIrelease);
$smarty->assign("FAIclasses",$this->selectFriendlyClasses());
$smarty->assign("FAIclassesKeys",array_flip($this->selectFriendlyClasses()));
$smarty->assign("FAIclassKeys",$this->FAIclass);
return($ret);
}
+ function getFAIreleases()
+ {
+ $ret = array();
+ if(is_array($this->FAIreleases)) {
+ foreach($this->FAIreleases as $mirr=>$releases){
+ if( $this->FAIdebianMirror == $mirr ) {
+ foreach ($releases as $release)
+ $ret[$release] = $release;
+ return($ret);
+ }
+ }
+ }
+ return($ret);
+ }
+
/* Save data to object */
function save_object()
{
}
plugin::save();
+
+ unset( $this->attrs['FAIrelease'] );
$str = "";
foreach($this->FAIclass as $class){
$str .= $class." ";
}
+ $str .= ":" . $this->FAIrelease;
$this->attrs['FAIclass']= "";
$this->attrs['FAIclass']= trim($str);
diff --git a/plugins/admin/systems/workstationStartup.tpl b/plugins/admin/systems/workstationStartup.tpl
index 6556a926ff261b3dfb8c64601fa77324c97ef85e..3f2ebecb5696acd8e677cb8508133798381896d6 100644 (file)
</td>
<td style="vertical-align:top;">
- <h2><img class="center" alt="" align="middle" src="images/fai_profile.png"> {t}FAI server{/t}</h2>
+ <table><tr>
+ <td>
+ <h2><img class="center" alt="" align="middle" src="images/fai_profile.png"> {t}FAI server{/t}</h2></td>
+ <td>
+ <h2><img class="center" alt="" align="middle" src="images/fai_profile.png"> {t}Release{/t}</h2></td>
+ </tr><tr>
+ <td>
<!--<select name="FAIdebianMirror" {$FAIdebianMirrorACL} onchange="document.mainform.submit();">-->
- <select name="FAIdebianMirror" {$FAIdebianMirrorACL}>
+ <select name="FAIdebianMirror" {$FAIdebianMirrorACL} onchange='document.mainform.submit()'>
{html_options options=$FAIdebianMirrors output=$FAIdebianMirrors selected=$FAIdebianMirror}
<option disabled> </option>
</select>
<!--<input type="submit" value="{t}set{/t}" name="refresh">-->
+ </td><td>
+ <select name="FAIrelease" >
+ {html_options options=$FAIreleases output=$FAIreleases selected=$FAIrelease}
+ </select>
+ </td>
+ </tr></table>
<h2><img class="center" alt="" align="middle" src="images/fai_profile.png"> {t}Assigned FAI classes{/t}</h2>
{$FAIScriptlist}