summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9f510aa)
raw | patch | inline | side by side (parent: 9f510aa)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 27 Nov 2007 13:19:16 +0000 (13:19 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 27 Nov 2007 13:19:16 +0000 (13:19 +0000) |
- Copy & Past, Snapshot still not working.
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7911 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7911 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/gofax/blocklists/class_blocklistGeneric.inc | patch | blob | history |
diff --git a/plugins/gofax/blocklists/class_blocklistGeneric.inc b/plugins/gofax/blocklists/class_blocklistGeneric.inc
index 81c5dfd2a849c9db6a6c2cf5f6bcbe900829fd73..352fa7df1d85dc0b3c666f59f8a92b3de1350b8d 100644 (file)
var $view_logged = FALSE;
var $attributes = array("cn","description");
-
+ var $orig_dn;
function __construct($config,$dn = "new")
{
/* Set default list type */
$this->type = BLOCK_LIST_SEND;
+ $this->orig_dn = $this->dn;
/* Load defined numbers */
if($dn != "new"){
public function save_object()
{
if(isset($_POST['blocklist_posted'])){
+ $tmp_cn = $this->cn;
plugin::save_object();
+ $this->cn = $tmp_cn;
/* Save base, since this is no LDAP attribute */
$tmp = $this->get_allowed_bases();
$this->base= $_POST['base'];
}
}
- foreach($this->attributes as $attr){
- if(isset($_POST[$attr]) && $this->acl_is_writeable($attr)){
+ $tmp = $this->attributes;
+ $tmp[] = "type";
+ foreach($tmp as $attr){
+ if(in_array($attr,array("cn","type")) && $this->readonly){
+ continue;
+ }elseif(isset($_POST[$attr]) && $this->acl_is_writeable($attr)){
$this->$attr = $_POST[$attr];
}
}
- if(isset($_POST['type']) && $this->acl_is_writeable("type",$this->readonly)){
-
- $this->type = $_POST['type'];
- }
}
}
{
plugin::save();
-
/* Type selection */
if ($this->type == BLOCK_LIST_SEND){
$type= "goFaxSBlocklist";
/* Create base */
$this->dn = "cn=".$this->cn.",ou=gofax,ou=systems,".$this->base;
+ /* Move object in necessary */
+ if($this->orig_dn != "new" && $this->dn != $this->orig_dn){
+ $this->move($this->orig_dn,$this->dn);
+ }
/* Write back to ldap */
$ldap= $this->config->get_ldap_link();