summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 25f2d3f)
raw | patch | inline | side by side (parent: 25f2d3f)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 4 Jan 2008 16:56:55 +0000 (16:56 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 4 Jan 2008 16:56:55 +0000 (16:56 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8228 594d385d-05f5-0310-b6e9-bd551577e9d8
index 66db8d0019d3012038a4e42ee27f409dee8b78f0..859b1c0f83750febaf936123e964e838760de36b 100644 (file)
if(count($msgs)){
foreach($msgs as $msg){
trigger_error("Logging failed, reason was: ".$msg);
- print_red("Logging failed, reason was: ".$msg);
+ msg_dialog::display(_("Internal error"), sprintf(_("Logging failed: %s"), $msg), ERROR_DIALOG);
}
}else{
$msgs = array();
if(!isset($entry['action']) || !in_array($entry['action'],array("modify","create","remove","copy","snapshot","view","security","debug"))){
- $msgs[] = "Invalid option specified '".$entry['action']."'";
+ $msgs[] = sprintf(_("Invalid option '%s' specified."), $entry['action']);
}
if(!isset($entry['objecttype']) || empty($entry['objecttype'])){
- $msgs[] = "Specified objectType is empty or invalid.";
+ $msgs[] = _("Specified objectType is empty or invalid");
}
return($msgs);
if(isset($this->config->data['SERVERS']['LOGGING'])){
$servers = $this->config->data['SERVERS']['LOGGING'];
}else{
- print_red(_("You have enabled the logging into mysql databse, but there are no logging servers available."));
+ msg_dialog::display(_("Error"), _("You have enabled the logging into mysql databse, but there are no logging servers available."), ERROR_DIALOG);
return(FALSE);
}
$con = @mysql_pconnect($server_name,$server['USER'],$server['PWD']);
if(!$con){
- print_red(sprintf(_("Could not connect to logging server %s."),$server_name));
+ msg_dialog::display(_("Error"), sprintf(_("Cannot connect to logging server '%s'."),$server_name), ERROR_DIALOG);
return(FALSE);
}else{
$db = mysql_select_db($server['DB'],$con);
if(!$db){
- print_red(sprintf(_("Could not select database %s on server %s. Server says :%s"),$server['DB'],$server['SERVER'],mysql_error($con)));
+ msg_dialog::display(_("Error"), sprintf(_("Cannot select database '%s' on server '%s': %s"),$server['DB'],$server['SERVER'], mysql_error($con)), ERROR_DIALOG);
return(FALSE);
}else{
";
$res = mysql_query($query,$con);
if(!$res){
- print_red(sprintf(_("Could not query database %s on server %s. Server says :%s"),$server['DB'],$server['SERVER'],mysql_error($con)));
+ msg_dialog::display(_("Error"), sprintf(_("Cannot query database '%s' on server '%s': %s"),$server['DB'],$server['SERVER'], mysql_error($con)), ERROR_DIALOG);
return(FALSE);
}
}
index 15c44975d6581257d48ea8953aa5c2949dbed299..9e5d706d37f14aa2622d94672bf50fc09d62adf6 100644 (file)
exec($command);
} else {
$message= sprintf(_("Command '%s', specified as POSTCREATE for plugin '%s' doesn't seem to exist."), $command, get_class($this));
- print_red ($message);
+ msg_dialog::display(_("Error"), $message, ERROR_DIALOG);
}
}
}
exec($command);
} else {
$message= sprintf(_("Command '%s', specified as POSTMODIFY for plugin '%s' doesn't seem to exist."), $command, get_class($this));
- print_red ($message);
+ msg_dialog::display(_("Error"), $message, ERROR_DIALOG);
}
}
}
exec($command);
} else {
$message= sprintf(_("Command '%s', specified as POSTREMOVE for plugin '%s' doesn't seem to exist."), $command, get_class($this));
- print_red ($message);
+ msg_dialog::display(_("Error"), $message, ERROR_DIALOG);
}
}
}
/* Check if the snapshot_base is defined */
if(!isset($tmp['SNAPSHOT_BASE'])){
- print_red(sprintf(_("The snapshot functionality is enabled, but the required variable '%s' is not configured in your gosa.conf."),"SNAPSHOT_BASE"));
+ msg_dialog::display(_("Configuration error"), sprintf(_("The snapshot functionality is enabled, but the required variable '%s' is not set."),"SNAPSHOT_BASE"), ERROR_DIALOG);
return(FALSE);
}
foreach(array("SNAPSHOT_SERVER","SNAPSHOT_USER","SNAPSHOT_PASSWORD","SNAPSHOT_BASE") as $var){
if(!isset($tmp[$var])){
$missing .= $var." ";
- print_red(sprintf(_("The snapshot functionality is enabled, but the required variable(s) '%s' is not configured in your gosa.conf."),$missing));
+ msg_dialog::display(_("Configuration error"), sprintf(_("The snapshot functionality is enabled, but the required variable '%s' is not set."), $missing), ERROR_DIALOG);
return(FALSE);
}
}
$msgs = $this->snapDialog->check();
if(count($msgs)){
foreach($msgs as $msg){
- print_red($msg);
+ msg_dialog::display(_("Error"), $msg, ERROR_DIALOG);
}
}else{
$this->dn = $this->snapDialog->dn;
index 4871a710dc9c96111d7a014aa41b1ba73b6be622..1bce72412cde395a2f2e62debd017436dc7636dd 100644 (file)
/* Read information from class variable */
if (!isset($info['CLASS'])){
- print_red(_("Your gosa.conf format has changed. Please re-run setup!"));
+ msg_dialog::display(_("Configuration error"), _("The configuration format has changed. Please re-run setup!"), ERROR_DIALOG);
display_error_page();
}
$vars= get_class_vars($info['CLASS']);
index a9dfd1a7f995e5bb292b7985864ebac8984039c3..06996b18e2e89c7638ee98bc6ad8cf016ed20d3b 100644 (file)
function ppdManager($path)
{
if(is_dir($path)){
- $this->path= $path;
+ $this->path= $path;
}else{
- print_red(sprintf(_("PPD manager : The specified path '%s' doesn't exists."),$path));
+ msg_dialog::display(_("PPD manager error"), sprintf(_("The specified path '%s' does not exist."),$path), ERROR_DIALOG);
return (false);
}
}
function saveProperties($ppdFile, $properties)
{
if(!is_readable($ppdFile)){
- print_red(sprintf(_("Specified ppd file '%s' can't be opened for reading."),$ppdFile));
+ msg_dialog::display(_("PPD manager error"), sprintf(_("Specified PPD file '%s' cannot be opened for reading."),$ppdFile), ERROR_DIALOG);
}elseif(!is_writeable(preg_replace("#(^.*/).*$#","\\1",$ppdFile.".tmp"))){
- print_red(sprintf(_("The required tmp file file '%s' can't be opened for writing."),$ppdFile.".tmp"));
+ msg_dialog::display(_("PPD manager error"), sprintf(_("The temporary file '%s' cannot be opened for writing."),$ppdFile.".tmp"), ERROR_DIALOG);
}else{
foreach ($properties as $name => $section){
foreach ($section as $attribute => $value){
index ee72dd9ca0bd3f4473ae22e97d3059554349616f..7b2b6170fa0212b9197fd43fe74fec490882308b 100644 (file)
save_FAI_object($parent_obj,$objectAttrs);
if(($parent_obj != $Current_DN)){
- print_red(sprintf(_("Error, following objects should be equal '%s' and '%s'"),$parent_obj,$Current_DN));
+ msg_dialog::display(_("Error"), sprintf(_("Error, following objects should be equal '%s' and '%s'"),$parent_obj,$Current_DN), ERROR_DIALOG);
}
}
}
index 7ce7c33efc056d19ae9ff4e64543f95d6e317744..f758f9a40f42b52dfa03ac2a96a3d0f9a5610ad4 100644 (file)
if($ldap->count() == 0){
if(!$silent){
- print_red(sprintf(_("Can't find reverse zone for dns zone '%s'. Aborting parsing this zone."),$zoneName));
+ msg_dialog::display(_("Error"), sprintf(_("Cannot find reverse zone for DNS zone '%s'. Parsing zone aborted."),$zoneName), ERROR_DIALOG);
}
unset($Zones[$zoneName]);
}elseif($ldap->count()>1){
if(!$silent){
- print_red(sprintf(_("Found more than one reverse zone for dns zone '%s'. Aborting parsing this zone."),$zoneName));
+ msg_dialog::display(_("Error"), sprintf(_("Found more than one reverse zone for '%s'. Parsing zone aborted."),$zoneName), ERROR_DIALOG);
}
unset($Zones[$zoneName]);
}else{
{
$ret = "";
if(!strstr($zoneNameMix, '/')) {
- print_red(sprintf(_("Undefined zone name '%s'. Zone name must look like this 'server/zone.com'."),$zoneNameMix));
+ msg_dialog::display(_("Error"), sprintf(_("Undefined zone name '%s'!"),$zoneNameMix), ERROR_DIALOG);
return($ret);
}