summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7ab934e)
raw | patch | inline | side by side (parent: 7ab934e)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 6 Dec 2006 07:23:32 +0000 (07:23 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 6 Dec 2006 07:23:32 +0000 (07:23 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5318 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/gofon/macro/class_gofonMacro.inc | patch | blob | history |
index 981b526c2519b8ff882df253482a2d3df774b1d4..1b091cf071873134a2b101aacecff96fec74918f 100755 (executable)
foreach($_POST as $name => $value){
if(preg_match("/^chooseBase/",$name) && $once){
$once = false;
- $this->dialog = new baseSelectDialog($this->config, $this);
+ $this->dialog = new baseSelectDialog($this->config, $this,$this->get_allowed_bases());
$this->dialog->setCurrentBase($this->base);
}
}
if($this->dialog->isClosed()){
$this->dialog = false;
}elseif($this->dialog->isSelected()){
- $this->base = $this->dialog->isSelected();
+
+ /* A new base was selected, check if it is a valid one */
+ $tmp = $this->get_allowed_bases();
+ if(isset($tmp[$this->dialog->isSelected()])){
+ $this->base = $this->dialog->isSelected();
+ }
$this->dialog= false;
}else{
return($this->dialog->execute());
$smarty= get_smarty();
$smarty->assign("bases", $this->get_allowed_bases());
- /* Assign base ACL */
- $baseACL = $this->getacl("base");
- if(!$this->acl_is_moveable()) {
- $baseACL = preg_replace("/w/","",$baseACL);
- }
- $smarty->assign("baseACL", $baseACL);
-
$tmp = $this->plInfo();
foreach($tmp['plProvidedAcls'] as $name => $translation){
$smarty->assign($name."ACL",$this->getacl($name));
function save_object()
{
if (isset($_POST['gofonMacroGenericPosted'])){
- $old_cn= $this->cn;
- $old_visible = $this->goFonMacroVisible;
+ $old_cn = $this->cn;
+ $old_visible = $this->goFonMacroVisible;
+
+ /* Create a base backup and reset the
+ base directly after calling plugin::save_object();
+ Base will be set seperatly a few lines below */
+ $base_tmp = $this->base;
plugin::save_object();
+ $this->base = $base_tmp;
+
+ /* Save base, since this is no LDAP attribute */
+ $tmp = $this->get_allowed_bases();
+ if(isset($_POST['base'])){
+ if(isset($tmp[$_POST['base']])){
+ $this->base= $_POST['base'];
+ }
+ }
/* Restore old cn if we have insuficient acls to change cn ... */
if(!$this->acl_is_writeable("cn",!$this->is_new)){