summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a834553)
raw | patch | inline | side by side (parent: a834553)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 29 Jan 2010 16:54:29 +0000 (16:54 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 29 Jan 2010 16:54:29 +0000 (16:54 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15465 594d385d-05f5-0310-b6e9-bd551577e9d8
index fa9ad7ddb2397d87611d9300233d6f75ce025153..81951f440061b17588d81381e0cd5cffdf114db1 100644 (file)
// Analyze for base changes if needed
$this->action= null;
$last_base= $this->base;
- if(isset($_REQUEST['PID']) && $_REQUEST['PID'] == $this->pid) {
- if (isset($_REQUEST['REBASE'])) {
- $new_base= base64_decode($_REQUEST['REBASE']);
+ if(isset($_REQUEST['BPID']) && $_REQUEST['BPID'] == $this->pid) {
+ if (isset($_POST['bs_rebase_'.$this->pid]) && !empty($_POST['bs_rebase_'.$this->pid])) {
+ $new_base= base64_decode($_POST['bs_rebase_'.$this->pid]);
if (isset($this->pathMapping[$new_base])) {
$this->base= $new_base;
$this->action= 'rebase';
return true;
}
- $link= "href='?plug=".$_GET['plug']."&PID=".$this->pid."&REBASE=".base64_encode($config->current['BASE'])."'";
+ $link= "onclick=\"\$('bs_rebase_".$this->pid."').value='".base64_encode($config->current['BASE'])."'; $('submit_tree_base_".$this->pid."').click();\"";
$this->tree= "<input type='text' size='35' name='bs_input_".$this->pid."' id='bs_input_".$this->pid."' onkeydown=\"\$('bs_".$this->pid."').hide()\" onfocus=\"\$('bs_".$this->pid."').hide()\" onmouseover=\"Element.clonePosition(\$('bs_".$this->pid."'), 'bs_input_".$this->pid."', {setHeight: false, setWidth: false, offsetTop:(Element.getHeight('bs_input_".$this->pid."'))});\$('bs_".$this->pid."').show();\" onmouseout=\"rtimer= Element.hide.delay(0.25, 'bs_".$this->pid."')\" value=\"".preg_replace('/"/', '"',$this->pathMapping[$this->base])."\">";
$this->tree.= "</li>\n";
}
$selected= $this->base == $base?" class='treeListSelected'":"";
- $link= "href='?plug=".$_GET['plug']."&PID=".$this->pid."&REBASE=".base64_encode($base)."'";
+ $link= "onclick=\"\$('bs_rebase_".$this->pid."').value='".base64_encode($base)."';$('submit_tree_base_".$this->pid."').click();\"";
$this->tree.= "<li><a$selected $link>".str_replace(' ', ' ', ldap::fix(preg_replace('/^[a-z0-9]+=([^,]+),.*$/i', '$1', $base)))."</a>";
$last_indent= $indent;
if ($this->submitButton) {
$this->tree.= " <input class='center' type='image' src='images/lists/submit.png' align='middle' title='"._("Submit")."' name='submit_base_".$this->pid."' id='submit_base_".$this->pid."' alt='"._("Submit")."'>";
}
+ $this->tree.= "<input type='submit' style='display:none' name='submit_tree_base_".$this->pid."' id='submit_tree_base_".$this->pid."'>";
+ $this->tree.= "<input type='hidden' name='bs_rebase_".$this->pid."' id='bs_rebase_".$this->pid."'>";
+ $this->tree.= "<input type='hidden' name='BPID' id='BPID' value='".$this->pid."'>";
return true;
}
function getAction()
{
- // Do not do anything if this is not our PID, or there's even no PID available...
- if(!isset($_REQUEST['PID']) || $_REQUEST['PID'] != $this->pid) {
+ // Do not do anything if this is not our BPID, or there's even no BPID available...
+ if(!isset($_REQUEST['BPID']) || $_REQUEST['BPID'] != $this->pid) {
return;
}
diff --git a/gosa-core/plugins/admin/departments/class_department.inc b/gosa-core/plugins/admin/departments/class_department.inc
index 35baf3a11508e0652302066d204e29e350cd43fa..685564bf5afea0703a7572e5ca4f4342ef6835b7 100644 (file)
/* Save data to object */
function save_object()
{
- /* Refresh base */
- if ($this->acl_is_moveable($this->base)){
- if (!$this->baseSelector->update()) {
- msg_dialog::display(_("Error"), msgPool::permMove(), ERROR_DIALOG);
- }
- if ($this->base != $this->baseSelector->getBase()) {
- $this->base= $this->baseSelector->getBase();
- $this->is_modified= TRUE;
- }
- }
-
if (isset($_POST['dep_generic_posted'])){
$nA = $this->namingAttr;
plugin::save_object();
$this->base = $base_tmp;
+ /* Refresh base */
+ if ($this->acl_is_moveable($this->base)){
+ if (!$this->baseSelector->update()) {
+ msg_dialog::display(_("Error"), msgPool::permMove(), ERROR_DIALOG);
+ }
+ if ($this->base != $this->baseSelector->getBase()) {
+ $this->base= $this->baseSelector->getBase();
+ $this->is_modified= TRUE;
+ }
+ }
+
+
/* Save tagging flag */
if ($this->acl_is_writeable("gosaUnitTag")){
if (isset($_POST['is_administrational_unit'])){
diff --git a/gosa-core/plugins/admin/groups/class_group.inc b/gosa-core/plugins/admin/groups/class_group.inc
index 456eb4c25761d517864518b9ba2d4e90a09bf89a..d63a6965b82575e11f2bde1df12a5e949dd88e89 100644 (file)
/* Save data to object */
function save_object()
{
- /* Refresh base */
- if ($this->acl_is_moveable($this->base)){
- if (!$this->baseSelector->update()) {
- msg_dialog::display(_("Error"), msgPool::permMove(), ERROR_DIALOG);
- }
- if ($this->base != $this->baseSelector->getBase()) {
- $this->base= $this->baseSelector->getBase();
- $this->is_modified= TRUE;
- }
- }
-
/* Save additional values for possible next step */
if (isset($_POST['groupedit'])){
plugin::save_object();
$this->base = $base_tmp;
+ /* Refresh base */
+ if ($this->acl_is_moveable($this->base)){
+ if (!$this->baseSelector->update()) {
+ msg_dialog::display(_("Error"), msgPool::permMove(), ERROR_DIALOG);
+ }
+ if ($this->base != $this->baseSelector->getBase()) {
+ $this->base= $this->baseSelector->getBase();
+ $this->is_modified= TRUE;
+ }
+ }
+
$this->force_gid= 0;
/* Only reset sambagroup flag if we are able to write this flag */
diff --git a/gosa-core/plugins/admin/ogroups/class_ogroup.inc b/gosa-core/plugins/admin/ogroups/class_ogroup.inc
index 5c51363c5701aa5c4d97fe80e5319ea3b654dd83..e98bc65c2b0c5175976ef1c6592dc51bb61f229a 100644 (file)
/* Save data to object */
function save_object()
{
- /* Refresh base */
- if ($this->acl_is_moveable($this->base)){
- if (!$this->baseSelector->update()) {
- msg_dialog::display(_("Error"), msgPool::permMove(), ERROR_DIALOG);
- }
- if ($this->base != $this->baseSelector->getBase()) {
- $this->base= $this->baseSelector->getBase();
- $this->is_modified= TRUE;
- }
- }
-
/* Save additional values for possible next step */
if (isset($_POST['ogroupedit'])){
$base_tmp = $this->base;
plugin::save_object();
$this->base = $base_tmp;
+
+ /* Refresh base */
+ if ($this->acl_is_moveable($this->base)){
+ if (!$this->baseSelector->update()) {
+ msg_dialog::display(_("Error"), msgPool::permMove(), ERROR_DIALOG);
+ }
+ if ($this->base != $this->baseSelector->getBase()) {
+ $this->base= $this->baseSelector->getBase();
+ $this->is_modified= TRUE;
+ }
+ }
+
}
}
diff --git a/gosa-core/plugins/personal/generic/class_user.inc b/gosa-core/plugins/personal/generic/class_user.inc
index aec8e0340cdc7b589af5e77ec36fcb0286edee2e..4ceb1dc2ae4992d05b1fdfdd0560959aba6080a7 100644 (file)
/* Save data to object */
function save_object()
{
- /* Refresh base */
- if ($this->acl_is_moveable($this->base)){
- if (!$this->baseSelector->update()) {
- msg_dialog::display(_("Error"), msgPool::permMove(), ERROR_DIALOG);
- }
- if ($this->base != $this->baseSelector->getBase()) {
- $this->base= $this->baseSelector->getBase();
- $this->is_modified= TRUE;
- }
- }
-
if(isset($_POST['generic']) || isset($_POST['multiple_user_posted'])){
/* Make a backup of the current selected base */
/* Parents save function */
plugin::save_object ();
+ /* Refresh base */
+ if ($this->acl_is_moveable($this->base)){
+ if (!$this->baseSelector->update()) {
+ msg_dialog::display(_("Error"), msgPool::permMove(), ERROR_DIALOG);
+ }
+ if ($this->base != $this->baseSelector->getBase()) {
+ $this->base= $this->baseSelector->getBase();
+ $this->is_modified= TRUE;
+ }
+ }
+
/* Sync lists */
$this->gosaLoginRestrictionWidget->save_object();
if ($this->gosaLoginRestrictionWidget->isModified()) {