Code

Changed macroManagement-posts.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 7 Dec 2006 04:31:58 +0000 (04:31 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 7 Dec 2006 04:31:58 +0000 (04:31 +0000)
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
plugins/gofon/macro/class_gofonMacroManagement.inc

index bf85a22b75557cf04a51704c6e0bbb171ea89fd3..8396b603ee807937cd1d8e3262e381dd75d0f49b 100755 (executable)
@@ -108,7 +108,7 @@ class divListMacro extends MultiSelectWindow
     }
     if(preg_match("/c/",$acls)){
       $listhead .=  " <input class='center' type='image' align='middle' src='images/list_new_macro.png' 
-        title='"._("Create new phone macro")."' alt='"._("New")."' name='user_new'>&nbsp;";
+        title='"._("Create new phone macro")."' alt='"._("New")."' name='goFonMacro_new'>&nbsp;";
       $listhead .= " <img class='center' src='images/list_seperator.png' align='middle' alt='' height='16' width='1'>&nbsp;";
     }
     $listhead .= _("Base")."&nbsp;<select name='CurrentMainBase' onChange='mainform.submit()' class='center'>$options</select>".
@@ -128,11 +128,6 @@ class divListMacro extends MultiSelectWindow
   function setEntries($list)
   {
   
-    $action     = "<input class='center' type='image' src='images/edit.png' alt='"._("edit")."'     
-                    name='user_edit_%KEY%' title='"._("Edit macro")."'>";
-    $action    .= "<input class='center' type='image' src='images/edittrash.png' alt='"._("delete")."'   
-                    name='user_del_%KEY%' title='"._("Delete macro")."'>";
-  
     $empty      = "<img class='center' src='images/nothing.png' style='width:16px;height:16px;' alt=''>";
     $macroimg   = "<img class='center' src='images/list_macro.png' alt='"._("Macro")."' title='%s'>";
     $visible    = "<img class='center' src='images/true.png' alt='"._("yes")."' title='"._("visible")."'>";
@@ -157,7 +152,7 @@ class divListMacro extends MultiSelectWindow
       }
 
       $action.= "<input class='center' type='image' src='images/edit.png' alt='"._("edit")."'     
-        name='user_edit_%KEY%' title='"._("Edit macro")."'>";
+        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.= "<input class='center' type='image' src='images/edittrash.png' alt='"._("delete")."'   
-          name='user_del_%KEY%' title='"._("Delete macro")."'>";
+          name='goFonMacro_del_%KEY%' title='"._("Delete macro")."'>";
       }
 
       $display= $val["displayName"][0]."&nbsp;(".$val["cn"][0].")";
index a21074b109d17a957746e7aad469306cdaf249ba..f15fe86650a1a94ca35d03bf80817d1d1dfcf9fe 100755 (executable)
@@ -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")){