summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 25ce10e)
raw | patch | inline | side by side (parent: 25ce10e)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 8 Apr 2008 11:00:03 +0000 (11:00 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 8 Apr 2008 11:00:03 +0000 (11:00 +0000) |
-Fixed copy & paste for options.
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10281 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10281 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/gosa-plugins/sudo/admin/sudo/class_divListSudo.inc b/gosa-plugins/sudo/admin/sudo/class_divListSudo.inc
index 404a5a0e26313d5764b6068edaa43ab971464521..05a00306e5ffabda1611dbb583956ba8016e41d2 100644 (file)
if(is_object($this->parent->CopyPasteHandler) && preg_match("/(c.*w|w.*c)/",$acl)){
$s.= "..|---|\n";
$s.= "..|<img src='images/editcopy.png' alt='' border='0' class='center'>".
- " "._("Copy")."|"."multiple_copy_systems|\n";
+ " "._("Copy")."|"."multiple_copy_sudo|\n";
# $s.= "..|<img src='images/editcut.png' alt='' border='0' class='center'>".
-# " "._("Cut")."|"."multiple_cut_systems|\n";
+# " "._("Cut")."|"."multiple_cut_sudo|\n";
if($this->parent->CopyPasteHandler->entries_queued()){
$img = "<img border='0' class='center' src='images/editpaste.png' alt=''>";
diff --git a/gosa-plugins/sudo/admin/sudo/class_sudoGeneric.inc b/gosa-plugins/sudo/admin/sudo/class_sudoGeneric.inc
index 6f33477d1f31e3f136358050d813a24e74998f02..1b044fa1840bf129425750237aa7de9e84cf6ae1 100644 (file)
}
/* Check name */
- if(!preg_match("/^[a-z\@]*$/i",$this->cn)){
- $message[] = msgPool::invalid(_("Name"),$this->cn,"/[a-z\@]/i");
+ if(!preg_match("/^[0-9a-z\@]*$/i",$this->cn)){
+ $message[] = msgPool::invalid(_("Name"),$this->cn,"/[0-9a-z\@]/i");
}
/* Check if this entry will cause duplicated ldap entries */
{
$vars = array("cn");
$smarty = get_smarty();
- $smarty->assign("cn" ,$this->cn);
+ $smarty->assign("cn", htmlentities($this->cn));
$str = $smarty->fetch(get_template_path("paste_generic.tpl",TRUE));
$ret = array();
$ret['string'] = $str;
diff --git a/gosa-plugins/sudo/admin/sudo/class_sudoManagement.inc b/gosa-plugins/sudo/admin/sudo/class_sudoManagement.inc
index 9f13e3ab8a1ca587c013515b0ca7c0ba268243c0..241a23ef9b1ba66683f9284159f817aa7cc522db 100644 (file)
$s_action = $_POST['menu_action'];
}
-
+ /* handle C&P from layers menu */
+ if(isset($_POST['menu_action']) && preg_match("/^multiple_copy_sudo/",$_POST['menu_action'])){
+ $s_action = "copy_multiple";
+ }
$smarty= get_smarty();
-
/********************
Copy & Paste Handling ...
********************/
diff --git a/gosa-plugins/sudo/admin/sudo/class_sudoOption.inc b/gosa-plugins/sudo/admin/sudo/class_sudoOption.inc
index e73ec41ffd258c15f047e982b30aa139e8b22977..bbd9c1880d7d57bd5817297bbf2d0c4f84e73f74 100644 (file)
function PrepareForCopyPaste($source)
{
plugin::PrepareForCopyPaste($source);
- $this->attrs['sudoOption'] = $source['sudoOption'];
- $this->load_options();
+ if(isset($source['sudoOption'])){
+ $this->attrs['sudoOption'] = $source['sudoOption'];
+ $this->load_options();
+ }
}
}
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: