From da391ee2ab45f16cdef322470b34adff8a62d49b Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 7 Dec 2006 04:31:58 +0000 Subject: [PATCH] Changed macroManagement-posts. renamed posts from ^user_ to ^goFonMacro_ . That makes more sense. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5324 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/gofon/macro/class_divListMacros.inc | 11 +++-------- .../gofon/macro/class_gofonMacroManagement.inc | 15 +++++++-------- 2 files changed, 10 insertions(+), 16 deletions(-) diff --git a/plugins/gofon/macro/class_divListMacros.inc b/plugins/gofon/macro/class_divListMacros.inc index bf85a22b7..8396b603e 100755 --- a/plugins/gofon/macro/class_divListMacros.inc +++ b/plugins/gofon/macro/class_divListMacros.inc @@ -108,7 +108,7 @@ class divListMacro extends MultiSelectWindow } if(preg_match("/c/",$acls)){ $listhead .= "  "; + title='"._("Create new phone macro")."' alt='"._("New")."' name='goFonMacro_new'> "; $listhead .= "  "; } $listhead .= _("Base")." ". @@ -128,11 +128,6 @@ class divListMacro extends MultiSelectWindow function setEntries($list) { - $action = ""; - $action .= ""; - $empty = ""; $macroimg = ""._("Macro").""; $visible = ""._("yes").""; @@ -157,7 +152,7 @@ class divListMacro extends MultiSelectWindow } $action.= ""; + name='goFonMacro_edit_%KEY%' title='"._("Edit macro")."'>"; if(preg_match("/c/",$sacl) && preg_match("/w/",$sacl)){ $action.= $this->GetSnapShotActions($val['dn']); @@ -165,7 +160,7 @@ class divListMacro extends MultiSelectWindow if(preg_match("/d/",$sacl)){ $action.= ""; + name='goFonMacro_del_%KEY%' title='"._("Delete macro")."'>"; } $display= $val["displayName"][0]." (".$val["cn"][0].")"; diff --git a/plugins/gofon/macro/class_gofonMacroManagement.inc b/plugins/gofon/macro/class_gofonMacroManagement.inc index a21074b10..f15fe8665 100755 --- a/plugins/gofon/macro/class_gofonMacroManagement.inc +++ b/plugins/gofon/macro/class_gofonMacroManagement.inc @@ -45,6 +45,8 @@ class gofonMacro extends plugin /* Call parent execute */ plugin::execute(); + $_SESSION['LOCK_VARS_TO_USE'] = array("/^goFonMacro_/","/^act$/","/^id$/"); + /***************** Variable initialisation *****************/ @@ -62,19 +64,16 @@ class gofonMacro extends plugin /* Test Posts */ foreach($_POST as $key => $val){ // Post for delete - if(preg_match("/user_del.*/",$key)){ + if(preg_match("/^goFonMacro_del/",$key)){ $s_action = "del"; - $s_entry = preg_replace("/user_".$s_action."_/i","",$key); + $s_entry = preg_replace("/^goFonMacro_del_/i","",$key); // Post for edit - }elseif(preg_match("/user_edit_.*/",$key)){ + }elseif(preg_match("/^goFonMacro_edit_/",$key)){ $s_action="edit"; - $s_entry = preg_replace("/user_".$s_action."_/i","",$key); + $s_entry = preg_replace("/^goFonMacro_edit_/i","",$key); // Post for new - }elseif(preg_match("/user_new.*/",$key)){ + }elseif(preg_match("/^goFonMacro_new/",$key)){ $s_action="new"; - }elseif(preg_match("/user_chgpw.*/i",$key)){ - $s_action="change_pw"; - $s_entry = preg_replace("/user_chgpw_/i","",$key); } } if((isset($_GET['act']))&&($_GET['act']=="edit_entry")){ -- 2.30.2