summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f8ecc43)
raw | patch | inline | side by side (parent: f8ecc43)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Sun, 14 May 2006 16:08:13 +0000 (16:08 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Sun, 14 May 2006 16:08:13 +0000 (16:08 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3322 594d385d-05f5-0310-b6e9-bd551577e9d8
25 files changed:
index 77b0a6736580ea10f65ccecae1c7773c1db64d92..12a409d67a46e02012e3bbb59f2542d67be6b5b0 100644 (file)
--- a/TODO
+++ b/TODO
* evaluate what effects a ldap->cat(..., $this->attributes)
will have to other plugins in class_plugin.inc
* Changing LDAP-Servers -> start tab! Actions?
-* finish show_ldap_error() extension
+* Redo print_red(). Just show the first error, redesign it.
+* Base-chooser geht nicht mehr
Target for 2.5:
diff --git a/include/functions.inc b/include/functions.inc
index 4c410396501cd158c425bcaf6c02d0c4b5d77c8f..571f5edc6f259bac812bd02fbb30c3f00e6ac5e9 100644 (file)
--- a/include/functions.inc
+++ b/include/functions.inc
}
+#Test
+if (!preg_match('/[.!?]$/', $string)){
+ $string.= ".";
+}
+$_SESSION['errors'].= "<div style='background-color:white;padding:5px;border:2px solid #706060;width:60%'>".
+"<table style='width:100%' summary='' border=0><tr><td style='vertical-align:top;padding:10px'><img alt='' src='".get_template_path('images/warning.png')."'></td>".
+"<td style='width:100%'><h1>"._("An error occured while checking the formular input")."</h1>".
+"<b>$string</b> "._("Please check your input and fix the contents of the highlighted field. Pess 'OK' to close this message box.")."</td>".
+"</tr><tr><td colspan='2' align='center'><br><input id='edit_ok' type='submit' name='error_ok' style='width:80px' value='"._("OK")."'></td></tr></table></div>";
+
} else {
echo "Error: $string\n";
}
diff --git a/plugins/admin/ogroups/class_mailogroup.inc b/plugins/admin/ogroups/class_mailogroup.inc
index f3eacafb0791b3de8e704a6d9134847b36c1e16c..9dc1cf71cfe6c0b6cef8da67af7802b35b635172 100644 (file)
/* Save data to LDAP */
$ldap->cd($this->dn);
$this->cleanup();
-$ldap->modify ($this->attrs);
+ $ldap->modify ($this->attrs);
- show_ldap_error($ldap->get_error());
+ show_ldap_error($ldap->get_error(), _("Saving mail objectgroup settings failed"));
/* Optionally execute a command after we're done */
if ($this->initially_was_account == $this->is_account){
$this->attributes, "Save");
$ldap->cd($this->dn);
$this->cleanup();
-$ldap->modify ($this->attrs);
+ $ldap->modify ($this->attrs);
- show_ldap_error($ldap->get_error());
+ show_ldap_error($ldap->get_error(), _("Removing mail objectgroup settings failed"));
}
index 6e6004fbaf51f6a240371e37d87fed4e99615d53..461002c82cd79a89235f773d4072ecc51575f282 100644 (file)
$this->handle_post_events($mode);
$ret= 0;
- if (show_ldap_error($ldap->get_error())){
+ if (show_ldap_error($ldap->get_error(), _("Saving object group failed"))){
$ret= 1;
}
$ldap= $this->config->get_ldap_link();
$ldap->rmdir($this->dn);
- show_ldap_error($ldap->get_error());
+ show_ldap_error($ldap->get_error(), _("Removing object group failed"));
/* Trigger remove signal */
$this->handle_post_events("remove");
diff --git a/plugins/admin/ogroups/class_phonequeue.inc b/plugins/admin/ogroups/class_phonequeue.inc
index 27c4e21a953ab68ac51b9d8ad08b9f1f05632135..827d2ad8a2309a5423a05e64214c9f073d56072e 100644 (file)
/* Save data to LDAP */
$ldap->cd($this->dn);
$this->cleanup();
-$ldap->modify ($this->attrs);
+ $ldap->modify ($this->attrs);
-
- show_ldap_error($ldap->get_error());
+ show_ldap_error($ldap->get_error(), _("Saving phone queue failed"));
/* Optionally execute a command after we're done */
if ($this->initially_was_account == $this->is_account){
$this->attributes, "Save");
$ldap->cd($this->dn);
$this->cleanup();
-$ldap->modify ($this->attrs);
+ $ldap->modify ($this->attrs);
- show_ldap_error($ldap->get_error());
+ show_ldap_error($ldap->get_error(), _("Removing phone queue failed"));
}
diff --git a/plugins/admin/systems/class_componentGeneric.inc b/plugins/admin/systems/class_componentGeneric.inc
index fbd5412c3d0762e4bb1209072f40e00312ac2438..ff0aa7d81d8ea2ddaf0f84dec9b2d6ac07354d21 100644 (file)
$ldap= $this->config->get_ldap_link();
$this->netConfigDNS->remove_from_parent();
$ldap->rmdir($this->dn);
- show_ldap_error($ldap->get_error());
+ show_ldap_error($ldap->get_error(), _("Removing generic component failed"));
$this->handle_post_events("remove");
/* Delete references to object groups */
$this->netConfigDNS->cn = $this->cn;
$this->netConfigDNS->save($this->dn);
- show_ldap_error($ldap->get_error());
+ show_ldap_error($ldap->get_error(), _("Saving generic component failed"));
/* Optionally execute a command after we're done */
$this->postcreate();
diff --git a/plugins/admin/systems/class_phoneGeneric.inc b/plugins/admin/systems/class_phoneGeneric.inc
index 6186d366bc9a23b348351d62d7280a643efb3351..9e602ba28c8f28e32715e8e3fb4dcea599401307 100644 (file)
$this->netConfigDNS->remove_from_parent();
$ldap->rmdir($this->dn);
- show_ldap_error($ldap->get_error());
+ show_ldap_error($ldap->get_error(), _("Removing phone failed"));
$this->handle_post_events("remove");
/* Delete references to object groups */
}
$this->netConfigDNS->cn = $this->cn;
$this->netConfigDNS->save($this->dn);
+ show_ldap_error($ldap->get_error(), _("Saving phone failed"));
- show_ldap_error($ldap->get_error());
/* Optionally execute a command after we're done */
$this->postcreate();
}
diff --git a/plugins/admin/systems/class_printGeneric.inc b/plugins/admin/systems/class_printGeneric.inc
index 42029540741ca03cbe7e3533ef9e3fdd3b505684..678c6d8347b76c3ce167fb35c214b7e6f92675bd 100644 (file)
/* Remove account & dns extension */
$this->netConfigDNS->remove_from_parent();
$ldap->rmdir($this->dn);
- show_ldap_error($ldap->get_error());
+ show_ldap_error($ldap->get_error(), _("Removing printer failed"));
$this->handle_post_events("remove");
/* Delete references to object groups */
$this->handle_post_events("modify");
}
- show_ldap_error($ldap->get_error());
+ show_ldap_error($ldap->get_error(), _("Saving printer failed"));
$this->netConfigDNS->cn = $this->cn;
$this->netConfigDNS->dn = $this->dn;
index 6ceef64e6183bab861fc96c669c12524ccc2bff4..6d4e25bc79449849a299a29c62723b6bebefe22c 100644 (file)
$ldap= $this->config->get_ldap_link();
$ldap->cd($this->dn);
$this->cleanup();
-$ldap->modify ($this->attrs);
+ $ldap->modify ($this->attrs);
- show_ldap_error($ldap->get_error());
+ show_ldap_error($ldap->get_error(), _("Saving server db settings failed"));
/* Optionally execute a command after we're done */
if ($this->initially_was_account == $this->is_account){
index f2864d790c5eefa317cd4d84e10dc84313185b0d..9bc83feefef694fd3c61785f44908bce96815539 100644 (file)
$ldap->cd($attr['dn']);
$ldap->rmDir($attr['dn']);
}
- show_ldap_error($ldap->get_error());
+ show_ldap_error($ldap->get_error(), _("Removing DNS service failed"));
}
foreach($tmp['zoneUpdates'] as $dn => $attrs){
$ldap->cd($dn);
$ldap->modify($attrs);
- show_ldap_error("Zone:".$ldap->get_error());
+ show_ldap_error("Zone:".$ldap->get_error(), _("Updating DNS service failed"));
}
}
foreach($tmp['del'] as $dn => $del){
$ldap->cd($dn);
$ldap->rmdir_recursive($dn);
- show_ldap_error("Zone:".$ldap->get_error());
+ show_ldap_error($ldap->get_error(), _("Removing DNS entries failed"));
}
/* move follwoing entries
$ldap->cd($dn);
$ldap->add($attrs);
}
+ show_ldap_error($ldap->get_error(), _("Saving DNS entries failed"));
}
}
}
diff --git a/plugins/admin/systems/class_servGeneric.inc b/plugins/admin/systems/class_servGeneric.inc
index a969b4440bdbd61e73daa70b1b4c498536c65525..7679c72e2d9683167f0bae3117d0ae0006d55a45 100644 (file)
$this->netConfigDNS->remove_from_parent();
$ldap= $this->config->get_ldap_link();
$ldap->rmdir($this->dn);
- show_ldap_error($ldap->get_error());
+ show_ldap_error($ldap->get_error(), _("Removing server failed"));
/* Delete references to object groups */
$ldap->cd ($this->config->current['BASE']);
$ldap->cd($this->dn);
$this->cleanup();
-$ldap->modify ($this->attrs);
+ $ldap->modify ($this->attrs);
$mode= "modify";
}
$this->netConfigDNS->cn = $this->cn;
$this->netConfigDNS->save($this->dn);
- show_ldap_error($ldap->get_error());
+ show_ldap_error($ldap->get_error(), _("Saving server failed"));
/* Optionally execute a command after we're done */
$this->handle_post_events($mode);
index d8359c056f296763ad46f2b36351614e45cdaf54..c124abfaa44f9cf5c14cccb43242569068540f5c 100644 (file)
/* Remove complete entry */
$ldap->rmdir ($this->dn);
- show_ldap_error($ldap->get_error());
+ show_ldap_error($ldap->get_error(), _("Removing kolab host entry failed"));
} else {
$attrs= array('kolabHost' => $hosts);
$ldap->cd($this->dn);
$this->cleanup();
-$ldap->modify ($attrs);
+ $ldap->modify ($attrs);
- show_ldap_error($ldap->get_error());
+ show_ldap_error($ldap->get_error(), _("Removing server from kolab object failed"));
}
/* Optionally execute a command after we're done */
$ldap->cd($this->dn);
$this->cleanup();;
$ldap->$mode($this->attrs);
- show_ldap_error($ldap->get_error());
+ show_ldap_error($ldap->get_error(), _("Saving server to kolab object failed"));
/* Optionally execute a command after we're done */
if ($this->initially_was_account == $this->is_account) {
diff --git a/plugins/admin/systems/class_servService.inc b/plugins/admin/systems/class_servService.inc
index 4c18c49e2952122ad3393d32982ff1af5ac1a320..2c9f9381e69b60425fc4b0ffd0f32928c1957888 100644 (file)
$this->cleanup();
$ldap->modify ($this->attrs);
- show_ldap_error($ldap->get_error());
+ show_ldap_error($ldap->get_error(), _("Saving server service object failed"));
/* Optionally execute a command after we're done */
if ($this->initially_was_account == $this->is_account){
if (count($attrs) == 0) {
$ldap->cd($mountsdn);
$ldap->add($mounts);
- show_ldap_error($ldap->get_error());
+ show_ldap_error($ldap->get_error(), _("Creating mount container failed"));
gosa_log("Mount container '$mountsdn' has been created");
}
if (count($attrs) != 0) {
$ldap->rmdir($mountdn);
- show_ldap_error($ldap->get_error());
+ show_ldap_error($ldap->get_error(), _("Removing mount container failed"));
gosa_log("Mount object '".$mountdn."' has been removed");
}
}
$mountdn = "cn=".$mount["cn"].","."$mountsdn";
$ldap->cd($mountdn);
$ldap->add($mount);
- show_ldap_error($ldap->get_error());
+ show_ldap_error($ldap->get_error(), _("Saving mount container failed"));
gosa_log("Mount object '".$mountdn."' has been added");
}
}
index d282fe08a0aab6e92258bd20643e4e252ca97b9a..9c2ef6fc8fa6083641ce6096109ea2a4b0d726ea 100644 (file)
while($attr = $ldap->fetch()){
$ldap->cd($attr['dn']);
$ldap->rmDir($attr['dn']);
+ show_ldap_error("Record:".$ldap->get_error(), _("Removing terminal from DNS object failed"));
}
*/
}
/* Display errors
*/
if($ldap->get_error() != "Success"){
- show_ldap_error("Record:".$ldap->get_error());
+ show_ldap_error("Record:".$ldap->get_error(), _("Saving terminal to DNS object failed"));
}
}
}
diff --git a/plugins/admin/systems/class_terminalGeneric.inc b/plugins/admin/systems/class_terminalGeneric.inc
index ae91f5f28d947c19aa93ac9224631a8e9a62f66b..3e16aabb1e611ca76cf78ae7800c29758a2d0f36 100644 (file)
if($ldap->count()){
$this->netConfigDNS->remove_from_parent();
$ldap->rmDir($this->dn);
- show_ldap_error($ldap->get_error());
+ show_ldap_error($ldap->get_error(), _("Removing terminal failed"));
/* Optionally execute a command after we're done */
$this->handle_post_events("remove", array("macAddress" => $this->netConfigDNS->macAddress));
}
$ldap->cd($this->dn);
$this->cleanup();
-$ldap->modify ($this->attrs);
+ $ldap->modify ($this->attrs);
$this->handle_post_events("modify");
}
$this->netConfigDNS->cn = $this->cn;
$this->netConfigDNS->save($this->dn);
- show_ldap_error($ldap->get_error());
+ show_ldap_error($ldap->get_error(), _("Saving terminal failed"));
/* Optionally execute a command after we're done */
$this->postcreate();
diff --git a/plugins/admin/systems/class_terminalService.inc b/plugins/admin/systems/class_terminalService.inc
index fe580b76e5632f58bb4a5e14cde52882df6fa0dd..e1c3d6f9b8ff43e02f86d847c4cd03b0be22ed7c 100644 (file)
$ldap= $this->config->get_ldap_link();
$ldap->cd($this->dn);
$this->cleanup();
-$ldap->modify ($this->attrs);
+ $ldap->modify ($this->attrs);
- show_ldap_error($ldap->get_error());
+ show_ldap_error($ldap->get_error(), _("Saving terminal service information failed"));
$this->handle_post_events("modify");
}
diff --git a/plugins/admin/systems/class_terminalStartup.inc b/plugins/admin/systems/class_terminalStartup.inc
index bb173ae29b01369a540489c7e037b37c0230b7a0..589f89a7832aa69f718edcf7f2c78f34c08e3f85 100644 (file)
$ldap= $this->config->get_ldap_link();
$ldap->cd($this->dn);
$this->cleanup();
-$ldap->modify ($this->attrs);
+ $ldap->modify ($this->attrs);
- show_ldap_error($ldap->get_error());
+ show_ldap_error($ldap->get_error(), _("Saving terminal startup settings failed"));
$this->handle_post_events("modify");
}
diff --git a/plugins/admin/systems/class_winGeneric.inc b/plugins/admin/systems/class_winGeneric.inc
index 196a8bb7abfc7e448dd23db439fa7630c484294b..ffd87eb9c02448ecf32d5be4a65bd7f2bd62ba3b 100644 (file)
$this->netConfigDNS->remove_from_parent();
$ldap= $this->config->get_ldap_link();
$ldap->rmdir($this->dn);
- show_ldap_error($ldap->get_error());
+ show_ldap_error($ldap->get_error(), _("Removing Samba workstation failed"));
$this->handle_post_events("remove");
/* Delete references to object groups */
$ldap->cd($this->dn);
$this->cleanup();
-$ldap->modify ($this->attrs);
+ $ldap->modify ($this->attrs);
$this->handle_post_events("modify");
}
$this->netConfigDNS->cn = $this->cn;
$this->netConfigDNS->save($this->dn);
- show_ldap_error($ldap->get_error());
+ show_ldap_error($ldap->get_error(), _("Saving Samba workstation failed"));
/* Optionally execute a command after we're done */
$this->postcreate();
diff --git a/plugins/admin/systems/class_workstationGeneric.inc b/plugins/admin/systems/class_workstationGeneric.inc
index 409316227b38153f6ac03cdc26e8b2970d1dddc1..1bb728ace0b1a5424797a3e3a3dd42612fd0c88f 100644 (file)
$this->netConfigDNS->remove_from_parent();
$ldap= $this->config->get_ldap_link();
$ldap->rmdir($this->dn);
- show_ldap_error($ldap->get_error());
+ show_ldap_error($ldap->get_error(), _("Removing workstation failed"));
/* Optionally execute a command after we're done */
$this->handle_post_events("remove", array("macAddress" => $this->netConfigDNS->macAddress));
}
$ldap->cd($this->dn);
$this->cleanup();
-$ldap->modify ($this->attrs);
+ $ldap->modify ($this->attrs);
if(!$this->didAction){
$this->handle_post_events("modify");
}
$this->netConfigDNS->cn = $this->cn;
$this->netConfigDNS->save($this->dn);
- show_ldap_error($ldap->get_error());
+ show_ldap_error($ldap->get_error(), _("Saving workstation failed"));
}
}
diff --git a/plugins/admin/systems/class_workstationService.inc b/plugins/admin/systems/class_workstationService.inc
index 41ae7b4e6640740e34daa04f3ed5cf01c49b7181..ba1cdf865aa685be457e2f4e1c128b201926d4bd 100644 (file)
$ldap= $this->config->get_ldap_link();
$ldap->cd($this->dn);
$this->cleanup();
-$ldap->modify ($this->attrs);
+ $ldap->modify ($this->attrs);
- show_ldap_error($ldap->get_error());
+ show_ldap_error($ldap->get_error(), _("Saving workstation services failed"));
$this->handle_post_events("modify");
}
diff --git a/plugins/admin/systems/class_workstationStartup.inc b/plugins/admin/systems/class_workstationStartup.inc
index 1cf3899b0a97ba9c5c67a0b894cfa7fb8bcb297d..9d5d2c5de5feedeeeb87a7b395a3d569ef6c6933 100644 (file)
$this->cleanup();
$ldap->modify ($this->attrs);
- show_ldap_error($ldap->get_error());
+ show_ldap_error($ldap->get_error(), _("Saving workstation startup settings failed"));
$this->handle_post_events("modify");
}
diff --git a/plugins/gofon/conference/class_phoneConferenceGeneric.inc b/plugins/gofon/conference/class_phoneConferenceGeneric.inc
index 0cc2917090b2b4e9f780d8c528e0f83729954c42..7b5fed530ba63620e7b61fb0ebf3ff3b38fdeb0b 100644 (file)
$ldap->add($this->attrs);
$this->handle_post_events('add');
}
- show_ldap_error($ldap->get_error());
+ show_ldap_error($ldap->get_error(), _("Saving phone conference failed"));
/* Optionally execute a command after we're done */
$this->postcreate();
index 1f316f50f376e1eadac7df780c32fedb317c8a6b..9adf21534b7aa42cc564cd34ec6c714679c0b3be 100755 (executable)
}
$ldap->rmDir($this->dn);
+ show_ldap_error($ldap->get_error(), _("Removing phone macro failed"));
if(isset($this->orig_cn)){
$this->generate_mysql_entension_entries(false,true,$this->orig_cn);
}else{
$og= new ogroup($this->config, $ldap->getDN());
unset($og->member[$this->dn]);
$og->save ();
+ show_ldap_error($ldap->get_error(), _("Removing phone macro reverences failed"));
}
}
if (count($a)){
$ldap->cd($this->dn);
$this->cleanup();
-$ldap->modify ($this->attrs);
+ $ldap->modify ($this->attrs);
$this->handle_post_events("modify");
} else {
$ldap->add($this->attrs);
$this->handle_post_events("add");
}
+ show_ldap_error($ldap->get_error(), _("Saving phone macro failed"));
}
- show_ldap_error($ldap->get_error());
}
}
diff --git a/plugins/gofon/macro/class_gofonMacroParameters.inc b/plugins/gofon/macro/class_gofonMacroParameters.inc
index a167eacbc919fe9d773da07cc56cb0d0be634a7b..d9d91bef6d3148004616bd492f5dffe361a73529 100755 (executable)
if (count($a)){
$ldap->cd($this->dn);
$this->cleanup();
-$ldap->modify ($this->attrs);
+ $ldap->modify ($this->attrs);
$this->handle_post_events("modify");
} else {
$ldap->add($this->attrs);
$this->handle_post_events("add");
}
- show_ldap_error($ldap->get_error());
+ show_ldap_error($ldap->get_error(), _("Saving phone macro parameters failed"));
}
}
diff --git a/plugins/gofon/phoneaccount/class_phoneAccount.inc b/plugins/gofon/phoneaccount/class_phoneAccount.inc
index b0dd42be2daa57372b8c788a7c062e088db4706f..b38336fe90e1a65f25d0ed81968c0a774355b28e 100644 (file)
$ldap= $this->config->get_ldap_link();
$ldap->cd($this->dn);
$this->cleanup();
-$ldap->modify ($this->attrs);
+ $ldap->modify ($this->attrs);
- show_ldap_error($ldap->get_error());
+ show_ldap_error($ldap->get_error(), _("Saving phone account failed"));
/* Optionally execute a command after we're done */
}
$ldap->cd($this->dn);
$this->cleanup();
-$ldap->modify ($this->attrs);
+ $ldap->modify ($this->attrs);
- show_ldap_error($ldap->get_error());
+ show_ldap_error($ldap->get_error(), _("Removing phone account failed"));
/* Optionally execute a command after we're done */
@mysql_close($r_con);