summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d031673)
raw | patch | inline | side by side (parent: d031673)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 11 Apr 2006 04:09:03 +0000 (04:09 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 11 Apr 2006 04:09:03 +0000 (04:09 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3018 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/gofax/blocklists/class_blocklistManagement.inc | patch | blob | history |
diff --git a/plugins/gofax/blocklists/class_blocklistManagement.inc b/plugins/gofax/blocklists/class_blocklistManagement.inc
index 0730ce6cd3a944e392e83c04fae4c7f3b92ea163..3b42150ad3e50b0b45f390d80e435b453ee54915 100644 (file)
$this->dn= "";
$this->config= $config;
+ if(!isset($_SESSION['CurrentMainBase'])){
+ $_SESSION['CurrentMainBase'] = $this->base;
+ }else{
+ $this->base = $_SESSION['CurrentMainBase'];
+ }
+
/* Get global filter config */
if (!is_global("blockfilter")){
$ui= get_userinfo();
$blockfilter= array("sendlists" => "checked",
"receivelists" => "checked",
"entry" => "*",
- "depselect" => $this->base,
"regex" => "*");
register_global("blockfilter", $blockfilter);
}else{
$blockfilter = $_SESSION["blockfilter"];
- $this->base = $blockfilter['depselect'];
}
$ui= get_userinfo();
if(isset($_GET['act'])&&($_GET['act']=="dep_open")){
$s_action="open";
$s_entry = base64_decode($_GET['dep_id']);
- $blockfilter['depselect']= "".$this->config->departments[trim($s_entry)];
+ $_SESSION['CurrentMainBase']= $this->config->departments[trim($s_entry)];
$this->reload();
}
if (isset($_POST['edit_cancel']) || isset($_POST['delete_blocklist_cancel']) ||
isset($_POST['delete_blocklist_confirm']) || isset($_POST['delete_lock'])){
+ if(!isset($_POST['delete_blocklist_confirm'])){
+ $this->clear_fields();
+ }
del_lock ($this->dn);
- $this->clear_fields();
unset($_SESSION['objectinfo']);
}
$s_entry = preg_replace("/_.$/","",$s_entry);
/* Department changed? */
- if(isset($_POST['depselect']) && $_POST['depselect']){
- $blockfilter['depselect']= $_POST['depselect'];
+ if(isset($_POST['CurrentMainBase']) && $_POST['CurrentMainBase']){
+ $_SESSION['CurrentMainBase'] = $_POST['CurrentMainBase'];
$this->reload();
}
/* Homebutton is posted */
if($s_action=="home"){
- $blockfilter['depselect']=(preg_replace("/^[^,]+,/","",$this->ui->dn));
- $blockfilter['depselect']=(preg_replace("/^[^,]+,/","",$blockfilter['depselect']));
+ $_SESSION['CurrentMainBase'] =preg_replace("/^[^,]+,/","",$this->ui->dn);
+ $_SESSION['CurrentMainBase'] =preg_replace("/^[^,]+,/","",$_SESSION['CurrentMainBase']);
$this->reload();
}
if($s_action=="root"){
- $blockfilter['depselect']=($this->config->current['BASE']);
+ $_SESSION['CurrentMainBase'] =$this->config->current['BASE'];
$this->reload();
}
/* If Backbutton is Posted */
if($s_action=="back"){
- $base_back = preg_replace("/^[^,]+,/","",$blockfilter['depselect']);
+ $base_back = preg_replace("/^[^,]+,/","", $_SESSION['CurrentMainBase']);
$base_back = convert_department_dn($base_back);
if(isset($this->config->departments[trim($base_back)])){
- $blockfilter['depselect']= $this->config->departments[trim($base_back)];
+ $_SESSION['CurrentMainBase'] = $this->config->departments[trim($base_back)];
}else{
- $blockfilter['depselect']= $this->config->departments["/"];
+ $_SESSION['CurrentMainBase'] = $this->config->departments["/"];
}
$this->reload();
}
$blockfilter[$type]= $_POST[$type];
}
}
- if (isset($_POST['depselect'])){
+ if (isset($_POST['CurrentMainBase'])){
foreach( array("sendlists", "receivelists") as $type){
if (isset($_POST[$type])) {
$options= "";
foreach ($this->config->idepartments as $key => $value){
- if ($blockfilter['depselect'] == $key){
+ if ($_SESSION['CurrentMainBase'] == $key){
$options.= "<option selected value='$key'>$value</option>";
} else {
$options.= "<option value='$key'>$value</option>";
" <input class='center' type='image' src='images/list_reload.png' align='middle' title='"._("Reload list")."' name='submit_department' alt='"._("Submit")."'> ".
" <img class='center' src='images/list_seperator.png' align='middle' alt='' height='16' width='1'> ".
" <input class='center' type='image' align='middle' src='images/list_new_blocklist.png' title='"._("Create new blocklist")."' alt='"._("New Blocklist")."' name='user_new'> ".
- " <img class='center' src='images/list_seperator.png' align='middle' alt='' height='16' width='1'> "._("Base")." <select name='depselect' onChange='mainform.submit()' class='center'>$options</select>".
+ " <img class='center' src='images/list_seperator.png' align='middle' alt='' height='16' width='1'> "._("Base")." <select name='CurrentMainBase' onChange='mainform.submit()' class='center'>$options</select>".
" <input class='center' type='image' src='images/list_submit.png' align='middle' title='"._("Submit department")."' name='submit_department' alt='"._("Submit")."'> ".
"</div>";
$smarty->assign("infoimage", get_template_path('images/info.png'));
$smarty->assign("launchimage", get_template_path('images/launch.png'));
$smarty->assign("apply", apply_filter());
- foreach( array("depselect", "entry", "regex", "sendlists", "receivelists") as $type){
+ foreach( array( "entry", "regex", "sendlists", "receivelists") as $type){
$smarty->assign("$type", $blockfilter[$type]);
}
$smarty->assign("deplist", $this->config->idepartments);
$smarty->assign("alphabet", generate_alphabet());
$smarty->assign("hint", print_sizelimit_warning());
-
+ $smarty->assign("CurrentMainBase",$_SESSION['CurrentMainBase']);
return($smarty->fetch(get_template_path('headpage.tpl', TRUE)));
}
$this->dn= "";
$this->description= "";
$this->cn= "";
- $this->base= $_SESSION['blockfilter']['depselect'];
+ $this->base= $_SESSION['CurrentMainBase'];
$this->goFaxBlocklist= array();
}
$blockfilter= get_global('blockfilter');
/* Set base for all searches */
- $base= $blockfilter['depselect'];
+ $base= $_SESSION['CurrentMainBase'];
$filter= "";
/* Regex filter? */
{
$ldap= $this->config->get_ldap_link();
$ldap->rmDir($this->dn);
+ $this->clear_fields();
$this->handle_post_events("remove");
}