From 6c678c3f9893bc4bf47160ba57e6134996a292eb Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 27 Nov 2007 14:56:48 +0000 Subject: [PATCH] Fixed copy & paste git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7918 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../blocklists/class_blocklistGeneric.inc | 40 ++++++++++++++----- 1 file changed, 31 insertions(+), 9 deletions(-) diff --git a/plugins/gofax/blocklists/class_blocklistGeneric.inc b/plugins/gofax/blocklists/class_blocklistGeneric.inc index 4a5e013d5..19284661d 100644 --- a/plugins/gofax/blocklists/class_blocklistGeneric.inc +++ b/plugins/gofax/blocklists/class_blocklistGeneric.inc @@ -287,9 +287,6 @@ class blocklistGeneric extends plugin } - - - function getCopyDialog() { $smarty = get_smarty(); @@ -308,18 +305,43 @@ class blocklistGeneric extends plugin } } + function PrepareForCopyPaste($source) { plugin::PrepareForCopyPaste($source); - } - - - - - + /* We will not be able to rename edited blocklists */ + $this->readonly = TRUE; + /* Get blocklist type and defined numbers */ + if (in_array("goFaxSBlock",$source['objectClass'])){ + if(isset($source["goFaxSBlocklist"])){ + for ($i= 0; $i<$source["goFaxSBlocklist"]["count"]; $i++){ + $this->goFaxBlocklist[]= $source["goFaxSBlocklist"][$i]; + } + } + $this->type= BLOCK_LIST_SEND; + } elseif (in_array("goFaxRBlock",$source['objectClass'])){ + if(isset($source["goFaxRBlocklist"])){ + for ($i= 0; $i<$source["goFaxRBlocklist"]["count"]; $i++){ + $this->goFaxBlocklist[]= $source["goFaxRBlocklist"][$i]; + } + } + $this->type= BLOCK_LIST_RECEIVE; + } + /* Set base */ + if ($this->dn == "new"){ + if(isset($_SESSION['CurrentMainBase'])){ + $this->base= $_SESSION['CurrentMainBase']; + }else{ + $ui= get_userinfo(); + $this->base= dn2base($ui->dn); + } + } else { + $this->base =preg_replace ("/^[^,]+,[^,]+,[^,]+,/","",$this->dn); + } + } /* Return plugin informations for acl handling */ -- 2.30.2