summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 64d3810)
raw | patch | inline | side by side (parent: 64d3810)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 21 Jun 2007 08:50:36 +0000 (08:50 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 21 Jun 2007 08:50:36 +0000 (08:50 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@6645 594d385d-05f5-0310-b6e9-bd551577e9d8
index 415a1cb4510089b2f235202564ccc9b6a7a61173..469f17c6d0e36f76ded3fa3b134b0985d238afaf 100644 (file)
var $FAIscript = "";
var $description = "";
var $status = "new";
-
+ var $parent = NULL;
var $FAIstate = "";
function faiHookEntry ($config, $dn= NULL,$object=false)
/* Call common method to give check the hook */
$message= plugin::check();
+ if(isset($this->parent->SubObjects[$this->cn]) && $this->cn != $this->orig_cn){
+ $message[] =_("There is already a hook with the given name.");
+ }
+
if(empty($this->FAIscript)) {
$message[]=_("Please enter a value for script.");
}
index 401dcde4a630b77786a677667dfc8bc8ec9fcaf9..537c35318581a4a114a813f821fa46af558921b0 100644 (file)
if(isset($_POST['AddSubObject'])){
$this->dialog= new $this->subClassName($this->config,"new");
$this->dialog->acl = $this->acl;
+ $this->dialog->parent = &$this;
$this->is_dialog=true;
}
diff --git a/plugins/admin/fai/class_faiScriptEntry.inc b/plugins/admin/fai/class_faiScriptEntry.inc
index 1e44dc73421c029f2f3293bf4fd45581718c0fb9..e2379f7ef659216b023b1f668fa4bf2362bfab2a 100644 (file)
var $FAIscript = "";
var $description = "";
var $status = "new";
-
+ var $parent = NULL;
var $FAIstate = "";
function faiScriptEntry ($config, $dn= NULL,$object=false)
/* Call common method to give check the hook */
$message= plugin::check();
+ if(isset($this->parent->SubObjects[$this->cn]) && $this->cn != $this->orig_cn){
+ $message[] =_("There is already a script with the given name.");
+ }
+
if(empty($this->cn)){
$message[] = _("Please enter a name.");
}
index dd614d3985f70de6b66fe643d672d432ce8ce60d..62dab484c23cbaceeb9c0a59f0f6925559a1acbe 100644 (file)
if(isset($_POST['AddSubObject'])){
$this->dialog= new $this->subClassName($this->config,"new");
$this->dialog->acl = $this->acl;
+ $this->dialog->parent = &$this;
$this->is_dialog=true;
}
diff --git a/plugins/admin/fai/class_faiTemplateEntry.inc b/plugins/admin/fai/class_faiTemplateEntry.inc
index 2c9a4dc98d9ac967bce077be806654e983e0526f..464683952a327df2668a8346cf76ea70d1458d78 100644 (file)
var $user = "root";
var $group = "root";
var $binary = false;
-
+ var $parent = NULL;
var $FAIstate = "";
function faiTemplateEntry ($config, $dn= NULL,$object=false)
/* Call common method to give check the hook */
$message= plugin::check();
+ if(isset($this->parent->SubObjects[$this->cn]) && $this->cn != $this->orig_cn){
+ $message[] =_("There is already a template with the given name.");
+ }
+
if(empty($this->FAItemplateFile)){
$message[]=_("Please specify a value for attribute 'file'.");
}
index 35a071ef5a56ad90cf20c46ab6390b1efdceace6..171ad312d99130b3a8d5beb0ca07efbd7d3adb0f 100644 (file)
/* Add new sub object */
if(isset($_POST['AddSubObject'])){
- $this->dialog= new $this->subClassName($this->config,"new");
- $this->dialog->acl = $this->acl;
+ $this->dialog = new $this->subClassName($this->config,"new");
+ $this->dialog->acl = $this->acl;
+ $this->dialog->parent = $this;
$this->is_dialog=true;
}
$var = $_POST['SubObject'][0];
$this->dialog= new $this->subClassName($this->config,$this->dn,$this->SubObjects[$var]);
$this->dialog->acl = $this->acl;
+ $this->dialog->parent = $this;
$_SESSION['objectinfo'] = $this->SubObjects[$var]['dn'];
$this->is_dialog=true;
}
diff --git a/plugins/admin/fai/class_faiVariableEntry.inc b/plugins/admin/fai/class_faiVariableEntry.inc
index e543ff23c8673509ebb3f4ff1263104d4ed0f5a2..b5814a0e8b1c47509af3262ee6c11d8decc3fa52 100644 (file)
var $FAIvariableContent = "";
var $description = "";
var $status = "new";
-
+ var $parent = NULL;
var $FAIstate = "";
function faiVariableEntry ($config, $dn= NULL,$object=false)
{
/* Call common method to give check the hook */
$message= plugin::check();
+
+ if(isset($this->parent->SubObjects[$this->cn]) && $this->cn != $this->orig_cn){
+ $message[] =_("There is already a variable with the given name.");
+ }
if(empty($this->FAIvariableContent)) {
$message[]=_("Please specify a value for the attribute 'content'.");