summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 15020c0)
raw | patch | inline | side by side (parent: 15020c0)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 28 Feb 2008 10:26:23 +0000 (10:26 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 28 Feb 2008 10:26:23 +0000 (10:26 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9182 594d385d-05f5-0310-b6e9-bd551577e9d8
36 files changed:
diff --git a/gosa-plugins/dfs/addons/godfs/class_dfsgeneric.inc b/gosa-plugins/dfs/addons/godfs/class_dfsgeneric.inc
index 78156392ae3c9d3f8a42c15a75234b2f9223785c..eb3bd4cecff57ffbd48be2175617038e4036b207 100644 (file)
<?php
class dfsgeneric extends plugin {
- /* CLI vars */
- var $cli_summary = "Manage terminal base objects";
- var $cli_description = "Some longer text\nfor help";
- var $cli_parameters = array("eins" => "Eins ist toll", "zwei" => "Zwei ist noch besser");
/* Needed values and lists */
var $base = "";
diff --git a/gosa-plugins/dhcp/admin/systems/services/dhcp/class_dhcpAdvanced.inc b/gosa-plugins/dhcp/admin/systems/services/dhcp/class_dhcpAdvanced.inc
index 43f5831528a88f96b3a9ca1905cf4a2238d3e4bc..3e2be402e59b267d1b835b84ddd2e9b9e703689a 100644 (file)
if (isset($_POST['delete_statement']) && isset($_POST['dhcpstatements'])){
$key= preg_replace('/([a-z0-9-]+)\s(.*)$/', '\\1', get_post('dhcpstatements'));
if (in_array($key, $this->autoStatements)){
- print_red(_("Can't delete automatic statements. Please use the fields above."));
+ msg_dialog::display(_("Error"), _("Cannot delete automatic statements!"), ERROR_DIALOG);
} else {
unset($this->statements[$key]);
}
if (isset($_POST['delete_option']) && isset($_POST['dhcpoptions'])){
$key= preg_replace('/([a-z0-9-]+)\s(.*)$/', '\\1', get_post('dhcpoptions'));
if (in_array($key, $this->autoOptions)){
- print_red(_("Can't delete automatic options. Please use the fields above."));
+ msg_dialog::display(_("Error"), _("Cannot delete automatic statements!"), ERROR_DIALOG);
} else {
unset($this->options[$key]);
}
diff --git a/gosa-plugins/dhcp/admin/systems/services/dhcp/class_dhcpNetwork.inc b/gosa-plugins/dhcp/admin/systems/services/dhcp/class_dhcpNetwork.inc
index 146b0e21b26cb15d0727bfc4a1106ecc8dd70176..47cd4875069bb40ade41b796a59ce315e288357c 100644 (file)
/* Check for iteraction */
if (isset($_POST['add_dns']) && $_POST['addserver'] != ""){
if (!preg_match('/^[0-9a-z.-]+$/', get_post('addserver'))){
- print_red(_("The name of the DNS server your're going to add is not valid!"));
+ msg_dialog::display(_("Error"), sprintf(_("'%s' is not a valid DNS server name!"), htmlentities(get_post('addserver'))), ERROR_DIALOG);
} else {
$servers= array();
if (isset($this->options['domain-name-servers'])){
diff --git a/gosa-plugins/dhcp/admin/systems/services/dhcp/class_servDHCP.inc b/gosa-plugins/dhcp/admin/systems/services/dhcp/class_servDHCP.inc
index e9f28da6e9aad62b5de325b4abe124d4aa315777..6fa4628cac0dfd3285a264af0b8367824adb5bf7 100644 (file)
$this->dialog = FALSE;
$id = $this->take_over_id;
$smarty->assign("dns_take_over",TRUE);
- $warning = sprintf(_("You are going to migrate the DHCP setup from server '%s'."),
+ $warning = sprintf(_("You have requested a migration of the DHCP setup from server '%s' to the current one."),
$this->dhcp_server_list['ENTRIES'][$id]['cn'][0]);
- $warning.= " "._("The migration will be started when you save this system. To cancel this action, use the cancel button below.");
+ $warning.= " "._("The migration will be started when you save this system.");
if($this->display_warning){
- print_red($warning);
+ msg_dialog::display(_("Warning"), $warning, WARNING_DIALOG);
$this->display_warning = FALSE;
}
return($smarty->fetch(get_template_path('servdhcp.tpl', TRUE, dirname(__FILE__))));
}
}
} else {
- print_red(_("You're not allowed to remove DHCP sections!"));
+ msg_dialog::display(_("Permission error"), _("You have no permission to remove DHCP sections!"), ERROR_DIALOG);
}
$this->dialog= FALSE;
}
/* That should not happen... */
if ($type == ""){
- print_red(_("DHCP configuration set is unknown. Please contact your system administrator."));
+ msg_dialog::display(_("Error"), _("The DHCP configuration set is unkown. Please contact your system administrator."), ERROR_DIALOG);
}
return ($type);
diff --git a/gosa-plugins/dns/admin/systems/services/dns/class_servDNS.inc b/gosa-plugins/dns/admin/systems/services/dns/class_servDNS.inc
index dfddd446a55efec3b2212ebeb5673bdc38b6da58..cddac417daa60a9da858f754a8dbca3ba66563ec 100644 (file)
class servdns extends goService
{
- /* CLI vars */
- var $cli_summary= "Manage server basic objects";
- var $cli_description= "Some longer text\nfor help";
- var $cli_parameters= array("eins" => "Eins ist toll", "zwei" => "Zwei ist noch besser");
-
/* attribute list for save action */
var $ignore_account = FALSE;
var $attributes = array();
*/
if(count($this->dialog->check())){
foreach($this->dialog->check() as $msgs){
- print_red($msgs);
+ msg_dialog::display(_("Error"), $msgs, ERROR_DIALOG);
}
}else{
/* add new/edited zone
if(count($used)> 2) {
$str .=" ... ";
}
- print_red(sprintf(_("Can't delete the selected zone, because it is still in use by these entry/entries '%s'"),trim($str)));
+ msg_dialog::display(_("Error"), sprintf(_("Cannot delete the selected zone. It is still in use by '%s'"), trim($str)), ERROR_DIALOG);
return(false);
}else{
unset($this->Zones[$id]);
diff --git a/gosa-plugins/dns/admin/systems/services/dns/class_servDNSeditZone.inc b/gosa-plugins/dns/admin/systems/services/dns/class_servDNSeditZone.inc
index bb7053e70eb6438b6f12a14d1e0c0256bd9bb751..8b90877f9706eb10bb199b89d91f698a59b0a3e8 100644 (file)
class servdnseditZone extends plugin
{
- /* CLI vars */
- var $cli_summary= "Manage server basic objects";
- var $cli_description= "Some longer text\nfor help";
- var $cli_parameters= array("eins" => "Eins ist toll", "zwei" => "Zwei ist noch besser");
-
/* attribute list for save action */
var $ignore_account= TRUE;
var $attributes = array("zoneName","ReverseZone","dNSClass",
if(count($this->dialog->check())){
$msgs = $this->dialog->check();
foreach($msgs as $msg){
- print_red($msg);
+ msg_dialog::display(_("Error"), $msg , ERROR_DIALOG);
}
}else{
$this->zoneEditor = clone $this->dialog;
}
if(empty($this->zoneName)){
- $message[] =sprintf(_("Please choose a valid zone name."));
+ $message[] =sprintf(_("The zone name is not valid!"));
}
if(empty($this->ReverseZone)){
- $message[] =sprintf(_("Please choose a valid reverse zone name."));
+ $message[] =sprintf(_("The reverse zone is not valid!"));
}
if($this->zoneName != strtolower($this->zoneName)){
- $message[] = _("Only lowercase strings are allowed as zone name.");
+ $message[] = _("Only lowercase characters are allowed in zone names!");
}
if(!is_numeric($this->sOAserial)){
- $message[] = _("Please specify a numeric value for serial number.");
+ $message[] = sprintf(_("'%s' is not numeric!"), _("Serial"));
}
if(!is_numeric($this->sOArefresh)){
- $message[] = _("Please specify a numeric value for refresh.");
+ $message[] = sprintf(_("'%s' is not numeric!"), _("Refresh"));
}
if(!is_numeric($this->sOAttl)){
- $message[] = _("Please specify a numeric value for ttl.");
+ $message[] = sprintf(_("'%s' is not numeric!"), _("TTL"));
}
if(!is_numeric($this->sOAexpire)){
- $message[] = _("Please specify a numeric value for expire.");
+ $message[] = sprintf(_("'%s' is not numeric!"), _("Expire"));
}
if(!is_numeric($this->sOAretry)){
- $message[] = _("Please specify a numeric value for retry.");
+ $message[] = sprintf(_("'%s' is not numeric!"), _("Retry"));
}
foreach($this->Records as $name => $values){
/* only lower-case is allowed in record entries ... */
if($values['value'] != strtolower($values['value'])){
- $message[] = sprintf(_("Only lowercase is allowed, please check your '%ss'."),$values['type']);
+ $message[] = sprintf(_("Only lowercase records are allowed for '%s'!"),$values['type']);
}
}
/* Check for valid&complete IP address */
if(!tests::is_ip($addr)){
- $message[] = _("The given network address is not a valid, please specify a valid IP address.");
+ $message[] = _("Network address is not valid!");
}
/* Check if given address matches selected network class */
switch($this->NetworkClass){
case 'A': {
if(!preg_match("/^[0-9]*\.0\.0\.0$/",$addr)){
- $message[] = sprintf(_("The specified network address is not matching with the specified zone class, try it this way x.0.0.0"));
+ $message[] = sprintf(_("The specified network address and the network class (%s/%s) do not match!"), $this->NetworkClass, "255.0.0.0");
}
}
break;
case 'B': {
if(!preg_match("/^[0-9]*\.[0-9]*\.0\.0$/",$addr)){
- $message[] = sprintf(_("The specified network address is not matching with the specified zone class, try it this way x.x.0.0"));
+ $message[] = sprintf(_("The specified network address and the network class (%s/%s) do not match!"), $this->NetworkClass, "255.255.0.0");
}
}
break;
case 'C': {
if(!preg_match("/^[0-9]*\.[0-9]*\.[0-9]*\.0$/",$addr)){
- $message[] = sprintf(_("The specified network address is not matching with the specified zone class, try it this way x.x.x.0"));
+ $message[] = sprintf(_("The specified network address and the network class (%s/%s) do not match!"), $this->NetworkClass, "255.255.255.0");
}
}
break;
- default : $message[] =sprintf(_("The given network class '%s' is not valid."),$this->NetworkClass);
+ default : $message[] =sprintf(_("The network class '%s' is not valid!"),$this->NetworkClass);
}
return ($message);
diff --git a/gosa-plugins/dns/admin/systems/services/dns/class_servDNSeditZoneEntries.inc b/gosa-plugins/dns/admin/systems/services/dns/class_servDNSeditZoneEntries.inc
index 21f761db921a33d9604a959edbb094a54a232366..922e7af25eaed13c18a329971e7089363ad27d1d 100644 (file)
class servDNSeditZoneEntries extends plugin
{
- /* CLI vars */
- var $cli_summary= "Manage server basic objects";
- var $cli_description= "Some longer text\nfor help";
- var $cli_parameters= array("eins" => "Eins ist toll", "zwei" => "Zwei ist noch besser");
-
/* attribute list for save action */
var $ignore_account = TRUE;
var $attributes = array();
var $disableDialog = false; // Dialog will be disabled, if this zone is new
+
function servDNSeditZoneEntries (&$config,$dn, &$zoneObject)
{
plugin::plugin ($config, $dn);
if((isset($this->Devices[$Name])) && ($Name != $value)){
if(isset($this->Devices[$value])){
- print_red(sprintf(_("Can't rename '%s' to '%s' there is already an entry with the same name in our zone editing dialog."),$Name,$value));
+ msg_dialog::display(_("Error"), sprintf(_("Cannot rename '%s' to '%s'. Name is already in use!"), $Name, $value), ERROR_DIALOG);
}else{
$this->Devices[$value] = $this->Devices[$Name];
unset($this->Devices[$Name]);
/* Checking entry name
*/
if(!preg_match("/^[a-z0-9_\.-]+$/i", $DevName) || (empty($DevName))){
- $message[] = sprintf(_("Entry name '%s' contains invalid characters."), $DevName);
+ $message[] = _("Entry name contains invalid characters.");
}
/* Renaming check for existing devices
$ldap->cd($this->config->current['BASE']);
$ldap->search("(relativeDomainName=".$DevName.")",array("relativeDomainName"));
if($ldap->count()){
- $message[] = sprintf(_("Can not rename '%s' to '%s',the destination name already exists."),$device['OrigCn'],$DevName);
+ $message[] = sprintf(_("Cannot rename '%s' to '%s'. Entry is already in use."),$device['OrigCn'],$DevName);
}
}elseif(!isset($device['OrigCn'])){
$ldap->cd($this->config->current['BASE']);
$ldap->search("(relativeDomainName=".$DevName.")",array("relativeDomainName"));
if($ldap->count()){
- $message[] = sprintf(_("Can not create '%s',the destination name already exists."),$DevName);
+ $message[] = sprintf(_("Cannot create '%s'. Entry is already in use."),$DevName);
}
}
if(!isset($names[$DevName])){
$names[$DevName] = "";
}else{
- $message[] = sprintf(_("The name '%s' is used more than once."),$DevName);
+ $message[] = sprintf(_("Entry '%s' is used more than once."),$DevName);
}
/* Names should be written in lowercase
if(!isset($tmp[$Rec['type']])){
$tmp[$Rec['type']] = "";
}else{
- $message[] = sprintf(_("The record type '%s' is a unique type and can't be defined twice."),$Rec['type']);
+ $message[] = sprintf(_("%s records cannot be used more than once."),$Rec['type']);
}
}
/* Check for empty / duplicate entries in record array
*/
if(empty($Rec['value'])){
- $message[] = sprintf(_("There is an empty '%s' for host '%s'."),$Rec['type'],$DevName);
+ $message[] = sprintf(_("Please fix the empty %s record for entry '%s'."),$Rec['type'],$DevName);
}
/* Check for duplicate record entries
if(!isset($tmp[$Rec['type']][$Rec['value']])){
$tmp[$Rec['type']][$Rec['value']] = "";
}else{
- $message[] = sprintf(_("There is a duplicate entry in '%s' for '%s'."),$Rec['type'],$DevName);
+ $message[] = sprintf(_("Please fix the duplicate %s record for entry '%s'."),$Rec['type'],$DevName);
}
}
}
return ($message);
}
+
function save()
{
if($this->disableDialog) return;
diff --git a/gosa-plugins/fai/admin/fai/class_askClassName.inc b/gosa-plugins/fai/admin/fai/class_askClassName.inc
index c7e38adb5a3585321fe3a5ba6feef8e5a0b7ceb9..2a40c6366ebc0f34617af05b34840b91999e087c 100644 (file)
class askClassName extends plugin
{
- /* CLI vars */
- var $cli_summary = "Manage server basic objects";
- var $cli_description = "Some longer text\nfor help";
- var $cli_parameters = array("eins" => "Eins ist toll", "zwei" => "Zwei ist noch besser");
-
/* attribute list for save action */
var $ignore_account = TRUE;
var $attributes = array();
diff --git a/gosa-plugins/fai/admin/fai/class_faiHook.inc b/gosa-plugins/fai/admin/fai/class_faiHook.inc
index 6067bfb9b6d8887065fda469684f0d94c3c0e1cc..069cf0d57ee5c01622456d7a32d86a77d655d839 100644 (file)
class faiHook extends plugin
{
- /* CLI vars */
- var $cli_summary = "Manage server basic objects";
- var $cli_description = "Some longer text\nfor help";
- var $cli_parameters = array("eins" => "Eins ist toll", "zwei" => "Zwei ist noch besser");
-
/* attribute list for save action */
var $ignore_account = TRUE;
/* print errors */
if(count($msgs)>0){
foreach($msgs as $msg){
- print_red($msg);
+ msg_dialog::display(_("Error"), $msg, ERROR_DIALOG);
}
}else{
/* Check if this object is freezed, in this case hide the delete icon */
if($this->FAIstate == "freeze"){
- $act .= "<input type='image' src='images/edit.png' name='editscript_%s' title='"._("edit")."' alt='"._("edit")."'>";
+ $act .= "<input type='image' src='images/edit.png' name='editscript_%s' title='"._("Edit")."' alt='"._("Edit")."'>";
}else{
- $act .= "<input type='image' src='images/edit.png' name='editscript_%s' title='"._("edit")."' alt='"._("edit")."'>";
+ $act .= "<input type='image' src='images/edit.png' name='editscript_%s' title='"._("Edit")."' alt='"._("Edit")."'>";
if(preg_match("/d/",$acl)){
- $act .="<input type='image' src='images/edittrash.png' name='deletescript_%s' title='"._("delete")."' alt='"._("delete")."'>";
+ $act .="<input type='image' src='images/edittrash.png' name='deletescript_%s' title='"._("Delete")."' alt='"._("Delete")."'>";
}
}
diff --git a/gosa-plugins/fai/admin/fai/class_faiHookEntry.inc b/gosa-plugins/fai/admin/fai/class_faiHookEntry.inc
index 282dbcf90c835378c9cdc72f7b6e8c98f40f081b..668e12cf7407ec7ee446f340971abb479021cf9e 100644 (file)
class faiHookEntry extends plugin
{
- /* CLI vars */
- var $cli_summary= "Manage server basic objects";
- var $cli_description= "Some longer text\nfor help";
- var $cli_parameters= array("eins" => "Eins ist toll", "zwei" => "Zwei ist noch besser");
/* attribute list for save action */
var $ignore_account= TRUE;
function execute()
{
- /* Call parent execute */
- plugin::execute();
+ /* Call parent execute */
+ plugin::execute();
/* Fill templating stuff */
$smarty = get_smarty();
if(isset($_POST['ImportUpload'])){
if(($_FILES['ImportFile']['error']!=0)){
- print_red(_("Please select a valid file."));
+ msg_dialog::display(_("Error"), _("Upload failed!"), ERROR_DIALOG);
}else
if(($_FILES['ImportFile']['size']==0)){
- print_red(_("Selected file is empty."));
+ msg_dialog::display(_("Error"), _("Uploaded file is empty!"), ERROR_DIALOG);
}else{
$str = utf8_encode(file_get_contents($_FILES['ImportFile']['tmp_name']));
$this->FAIscript = $str;
$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.");
+ $message[] =_("Name is already in use!");
}
if(empty($this->FAIscript)) {
- $message[]=_("Please enter a value for script.");
+ $message[]=_("Please enter a script!");
}
if(empty($this->cn)){
- $message[] = _("Please enter a name.");
+ $message[] = _("Name is empty!");
}
return ($message);
diff --git a/gosa-plugins/fai/admin/fai/class_faiManagement.inc b/gosa-plugins/fai/admin/fai/class_faiManagement.inc
index 64b10d5b88e33ff09745e55f8654a48d2908b322..bd68129ad39129867d807657eba2dd00a426c0e9 100644 (file)
var $plHeadline = "FAI";
var $plDescription = "Fully Automatic Installation - management";
- /* CLI vars */
- var $cli_summary = "Handling of FAI entries";
- var $cli_description = "This plugin represents a management tool\n
- which allows us to manage all needed attributes for fully automatic installations (FAI)";
- var $cli_parameters = array("eins" => "Eins ist toll", "zwei" => "Zwei ist noch besser");
-
/* Headpage attributes */
var $lock_type = ""; // should be branch/freeze
var $lock_name = "";
return($smarty->fetch(get_template_path('remove.tpl', TRUE)));
} else {
- /* Obviously the user isn't allowed to delete. Show message and
- clean session. */
- print_red (_("You are not allowed to delete this component!"));
+ /* Obviously the user isn't allowed to delete. Show message and clean session. */
+ msg_dialog::display(_("Permission error"), _("You have no permission to delete this entry!"), ERROR_DIALOG);
}
}
/* Normally this shouldn't be reached, send some extra
logs to notify the administrator */
- print_red (_("You are not allowed to delete this component!"));
+ msg_dialog::display(_("Permission error"), _("You have no permission to delete this entry!"), ERROR_DIALOG);
new log("security","fai/".get_class($this),$dn,array(),"Tried to trick deletion.");
}
/* Normally this shouldn't be reached, send some extra
logs to notify the administrator */
- print_red (_("You are not allowed to delete this component!"));
+ msg_dialog::display(_("Permission error"), _("You have no permission to delete this entry!"), ERROR_DIALOG);
new log("security","fai/".get_class($this),$dn,array(),"Tried to trick deletion.");
}
}else{
- print_red(sprintf(_("Object could not be deleted '%s', object does not exist."),$this->dn));
+ msg_dialog::display(_("Error"), sprintf(_("Cannot delete '%s': object does not exist!"), $this->dn) , ERROR_DIALOG);
}
/* Remove lock file after successfull deletion */
del_lock ($this->dn);
$smarty->assign("info", sprintf(_("You're about to delete a fai branch / freeze '%s'."), $this->DivListFai->selectedBranch));
return($smarty->fetch(get_template_path('remove_branch.tpl',TRUE)));
} else {
- print_red (_("You are not allowed to delete this release!"));
+ msg_dialog::display(_("Permission error"), _("You have no permission to delete this release!"), ERROR_DIALOG);
}
}
}
/* Check used characters */
if(preg_match("/[^0-9a-z \ö\ä\ü\.-_:,]/i",$name)){
if($type == "branch"){
- print_red(_("Specified branch name is invalid."));
+ msg_dialog::display(_("Error"), _("Branch name is not valid!"), ERROR_DIALOG);
}else{
- print_red(_("Specified freeze name is invalid."));
+ msg_dialog::display(_("Error"), _("Freeze name is not valid!"), ERROR_DIALOG);
}
$is_ok = false;
}
/* Check if this name is already in use */
if(!$this->CheckNewBranchName($_POST['BranchName'],$this->DivListFai->selectedBranch)){
- print_red(_("This name is already in use."));
+ msg_dialog::display(_("Error"), _("Name is already in use!"), ERROR_DIALOG);
$is_ok = false;
}
if(isset($_GET['PerformBranch'])){
if(!$this->acl_is_createable()){
- print_red(_("You are not allowed to create a new branch."));
+ msg_dialog::display(_("Permission error"), _("You have no permission to create a new branch!"), ERROR_DIALOG);
}else{
/* Create it know */
if("" != $this->config->search("faiManagement", "POSTCREATE",array('menu','tabs'))){
if(($s_action == "branch_branch")||($this->dispNewBranch)){
if(!$this->acl_is_createable()){
- print_red(_("You are not allowed to create a new branch."));
+ msg_dialog::display(_("Permission error"), _("You have no permission to create a new branch!"), ERROR_DIALOG);
}else{
$this->dispNewBranch=true;
$smarty->assign("iframe",false);
if("" != $this->config->search("faiManagement", "POSTCREATE",array('menu','tabs'))){
if(($s_action == "freeze_branch")||($this->dispNewFreeze)){
if(!$this->acl_is_createable()){
- print_red(_("You are not allowed to create a new branch."));
+ msg_dialog::display(_("Permission error"), _("You have no permission to create a new branch!"), ERROR_DIALOG);
}else{
$this->dispNewFreeze = true;
$smarty->assign("iframe",false);
"new_variable" => "FAIvariable",
"new_template" => "FAItemplate",
"new_package" => "FAIpackageList");
+ $types_i18n = array( "new_partition" => _("partition table"),
+ "new_script" => _("script"),
+ "new_hook" => _("hook"),
+ "new_variable" => _("variable"),
+ "new_template" => _("template"),
+ "new_package" => _("package list"));
if(isset($types[$s_action])){
$acl = $this->ui->get_permissions($this->DivListFai->selectedBase,"fai/".$type_acl_mapping[$types[$s_action]]);
if(preg_match("/c/",$acl)){
$this->dialog = new askClassName($this->config,$this->dn,$this->ui,$types[$s_action]);
}else{
- print_red(sprintf(_("You are not allowed to create a new '%s' object."),$types[$s_action]));
+ msg_dialog::display(_("Permission error"), sprintf(_("You have no permission to create a new %s!"), $types_i18n[$s_action]), ERROR_DIALOG);
}
}
$this->is_dialog = false;
}else{
- print_red(sprintf(_("You are not allowed to create a new '%s' object."),"FAIprofile"));
+ msg_dialog::display(_("Permission error"), sprintf(_("You have no permission to create a new %s!"), _("profile")), ERROR_DIALOG);
}
}
$this->dialog->save_object();
if(count($this->dialog->check())!=0){
foreach($this->dialog->check() as $msg){
- print_red($msg);
+ msg_dialog::display(_("Error"), $msg, ERROR_DIALOG);
}
}elseif(isset($this->dialog->objectClass)){
$this->dn = "new" ;
$msgs= $this->dialog->check();
if(count($msgs)!=0){
foreach($msgs as $msg){
- print_red($msg);
+ msg_dialog::display(_("Error"), $msg, ERROR_DIALOG);
}
}else{
$this->dialog->save();
diff --git a/gosa-plugins/fai/admin/fai/class_faiPackage.inc b/gosa-plugins/fai/admin/fai/class_faiPackage.inc
index c1b4b3f613744b08a09c9ba54b85b9665f442fba..9ae6b8e7cc4383d028072e2b7e4f5cb56fe979e5 100644 (file)
class faiPackage extends plugin
{
- /* CLI vars */
- var $cli_summary = "Manage server basic objects";
- var $cli_description = "Some longer text\nfor help";
- var $cli_parameters = array("eins" => "Eins ist toll", "zwei" => "Zwei ist noch besser");
-
/* attribute list for save action */
var $ignore_account = TRUE;
$this->dialog->save_object();
if(count($this->dialog->check())){
foreach($this->dialog->check() as $msgs){
- print_red($msgs);
+ msg_dialog::display(_("Error"), $msgs, ERROR_DIALOG);
}
}else{
$use = $this->dialog->save();
$message= plugin::check();
if(count($this->usedPackages)==0){
- $message[]=_("Please select a least one Package.");
+ $message[]=_("Please select a least one package!");
}
if((empty($this->FAIdebianRelease))||(empty($this->FAIdebianSection))){
- $message[]=_("Please choose a valid combination for your repository setup.");
+ $message[]=_("Please choose a valid release/section combination for your repository setup!");
}
return ($message);
$strID= CONFIG_DIR."/fai/".$this->FAIdebianRelease."/".$sec;
if(!is_file($strID)){
- print_red(sprintf(_("Package file '%s' does not exist."),$strID));
+ msg_dialog::display(_("Error"), sprintf(_("Package file '%s' does not exist!"), $strID), ERROR_DIALOG);
unset($this->buffer);
return(array());
}
diff --git a/gosa-plugins/fai/admin/fai/class_faiPackageConfiguration.inc b/gosa-plugins/fai/admin/fai/class_faiPackageConfiguration.inc
index 18f3e2b6c737c515bfe55c0a76ae975a3c525ee4..0a371a8e86fb7ab452e56b676faff004cb829d9d 100644 (file)
class faiPackageConfiguration extends plugin
{
- /* CLI vars */
- var $cli_summary = "Manage server basic objects";
- var $cli_description = "Some longer text\nfor help";
- var $cli_parameters = array("eins" => "Eins ist toll", "zwei" => "Zwei ist noch besser");
-
/* attribute list for save action */
var $ignore_account = TRUE;
var $attributes = array();
diff --git a/gosa-plugins/fai/admin/fai/class_faiPackageEntry.inc b/gosa-plugins/fai/admin/fai/class_faiPackageEntry.inc
index 3670a3af0f7252d11073f8e6fa4bfc40f7f83c0e..c72eea51e0c45d43bbaead91ea8ad63c031d50cc 100644 (file)
class faiPackageEntry extends plugin
{
- /* CLI vars */
- var $cli_summary= "Manage server basic objects";
- var $cli_description= "Some longer text\nfor help";
- var $cli_parameters= array("eins" => "Eins ist toll", "zwei" => "Zwei ist noch besser");
-
/* attribute list for save action */
var $ignore_account= TRUE;
var $attributes = array();
function execute()
{
- /* Call parent execute */
- plugin::execute();
+ /* Call parent execute */
+ plugin::execute();
/* Fill templating stuff */
$smarty = get_smarty();
@@ -125,7 +120,7 @@ $CHKS = "<input type='hidden' value='chkchange' name='chkchange'><table summary=
$cnt = 0;
foreach($pkgs as $pkg){
if($cnt > 200) {
- print_red(sprintf(_("Your specified search string '%s' returned too many results. Only the first 200 entries are shown, to keep the memory usage low."),$this->searchStrPKG));
+ msg_dialog::display(_("Error"), _("Search returned too many reults - showing the first 200 matches, only!"), ERROR_DIALOG);
break;
}
if((preg_match("/^".$search_str."/i",$pkg[0]))||
diff --git a/gosa-plugins/fai/admin/fai/class_faiPartitionTable.inc b/gosa-plugins/fai/admin/fai/class_faiPartitionTable.inc
index d463f2a222555860700990970538121feca0e694..21a4dab5fb7bdb81b933dc569175077af3884383 100644 (file)
class faiPartitionTable extends plugin
{
- /* CLI vars */
- var $cli_summary= "Manage server basic objects";
- var $cli_description= "Some longer text\nfor help";
- var $cli_parameters= array("eins" => "Eins ist toll", "zwei" => "Zwei ist noch besser");
-
/* attribute list for save action */
var $ignore_account = TRUE;
var $attributes = array("cn","description");
$this->dialog->save_object();
if(count($this->dialog->check())){
foreach($this->dialog->check() as $msg){
- print_red($msg);
+ msg_dialog::display(_("Error"), $msg, ERROR_DIALOG);
}
}else{
$disk = $this->dialog->save();
diff --git a/gosa-plugins/fai/admin/fai/class_faiPartitionTableEntry.inc b/gosa-plugins/fai/admin/fai/class_faiPartitionTableEntry.inc
index d72ec5149f0efcbcc0698ad76d2e50802f288307..a49dad40e076d6efe9783d5d3ad716953d313943 100644 (file)
class faiPartitionTableEntry extends plugin
{
- /* CLI vars */
- var $cli_summary= "Manage server basic objects";
- var $cli_description= "Some longer text\nfor help";
- var $cli_parameters= array("eins" => "Eins ist toll", "zwei" => "Zwei ist noch besser");
-
/* attribute list for save action */
var $ignore_account= TRUE;
var $attributes = array("DISKcn","DISKdescription");
diff --git a/gosa-plugins/fai/admin/fai/class_faiProfile.inc b/gosa-plugins/fai/admin/fai/class_faiProfile.inc
index 3eaa08b5e2f12ad61595284fab5c8a08c2e840a1..5383da68a83264bb63acdfaa8028125cec8796fa 100644 (file)
class faiProfile extends plugin
{
- /* CLI vars */
- var $cli_summary = "Manage server basic objects";
- var $cli_description = "Some longer text\nfor help";
- var $cli_parameters = array("eins" => "Eins ist toll", "zwei" => "Zwei ist noch besser");
-
/* attribute list for save action */
var $ignore_account = TRUE;
$this->dialog->save_object();
$msgs= $this->dialog->check();
if(count($msgs)){
- print_red($msgs);
+ msg_dialog::display(_("Error"), $msgs, ERROR_DIALOG);
}else{
$ret = $this->dialog->save();
foreach($ret as $class){
$message= plugin::check();
if(count($this->FAIclasses) == 0){
- $message[]=_("Please assign at least one class to this profile.");
+ $message[]=_("No class specified for this profile!");
}
if(empty($this->cn)){
- $message[]=_("Please enter a valid name.");
+ $message[]=_("'Name' is not valid!");
}
$ldap = $this->config->get_ldap_link();
}
if($ldap->count() || isset($this->FAIAllclasses[$this->cn])){
- $message[]=_("There is already a FAI object with this class name defined.");
+ $message[]=_("Name is already in use!");
}
return ($message);
diff --git a/gosa-plugins/fai/admin/fai/class_faiProfileEntry.inc b/gosa-plugins/fai/admin/fai/class_faiProfileEntry.inc
index 8963973e3247f425b9f306e7d5f58a933dbe7ffb..1f811af8b485e98e95c8fe5d43893719d96bf091 100644 (file)
class faiProfileEntry extends plugin
{
- /* CLI vars */
- var $cli_summary= "Manage server basic objects";
- var $cli_description= "Some longer text\nfor help";
- var $cli_parameters= array("eins" => "Eins ist toll", "zwei" => "Zwei ist noch besser");
-
/* attribute list for save action */
var $ignore_account= TRUE;
var $attributes = array();
diff --git a/gosa-plugins/fai/admin/fai/class_faiScript.inc b/gosa-plugins/fai/admin/fai/class_faiScript.inc
index 87592976cbb1f4d5212bd86a45a44b165b872604..c117220a6c7adc27824f12aafe05ebbb0eac55eb 100644 (file)
class faiScript extends plugin
{
- /* CLI vars */
- var $cli_summary = "Manage server basic objects";
- var $cli_description = "Some longer text\nfor help";
- var $cli_parameters = array("eins" => "Eins ist toll", "zwei" => "Zwei ist noch besser");
-
/* attribute list for save action */
var $ignore_account = TRUE;
$msgs = $this->dialog->check();
if(count($msgs)>0){
foreach($msgs as $msg){
- print_red($msg);
+ msg_dialog::display(_("Error"), $msg, ERROR_DIALOG);
}
}else{
diff --git a/gosa-plugins/fai/admin/fai/class_faiScriptEntry.inc b/gosa-plugins/fai/admin/fai/class_faiScriptEntry.inc
index ab3b589f1276da25447b4ca69a020dffc4950612..143d6f506b79cd87588ba77187ff6bc9023e37f1 100644 (file)
class faiScriptEntry extends plugin
{
- /* CLI vars */
- var $cli_summary= "Manage server basic objects";
- var $cli_description= "Some longer text\nfor help";
- var $cli_parameters= array("eins" => "Eins ist toll", "zwei" => "Zwei ist noch besser");
-
/* attribute list for save action */
var $ignore_account= TRUE;
var $attributes = array("cn","description","FAIpriority","FAIscript");
function execute()
{
- /* Call parent execute */
- plugin::execute();
+ /* Call parent execute */
+ plugin::execute();
/* Fill templating stuff */
$smarty = get_smarty();
if(isset($_POST['ImportUpload']) && $this->acl_is_writeable("FAIscript")){
if(($_FILES['ImportFile']['error']!=0)){
- print_red(_("Please select a valid file."));
+ msg_dialog::display(_("Error"), _("Upload failed!"), ERROR_DIALOG);
}else
if(($_FILES['ImportFile']['size']==0)){
- print_red(_("Selected file is empty."));
+ msg_dialog::display(_("Error"), _("Uploaded file is empty!"), ERROR_DIALOG);
}else{
$str = utf8_encode(addslashes(file_get_contents($_FILES['ImportFile']['tmp_name'])));
$this->FAIscript = $str;
$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.");
+ $message[] =_("Name is already in use!");
}
if(empty($this->cn)){
- $message[] = _("Please enter a name.");
+ $message[] = _("Name is empty!");
}
if(empty($this->FAIscript)){
- $message[]=_("Please enter a script.");
+ $message[]=_("Please enter a script!");
}
return ($message);
diff --git a/gosa-plugins/fai/admin/fai/class_faiSummaryTab.inc b/gosa-plugins/fai/admin/fai/class_faiSummaryTab.inc
index f2bdd51f1ac847cc62357b5bc8f0bf2f1df6dc6b..f9b4e40ebfbe6b033e1d45acf1420255e9e5e8a5 100644 (file)
}elseif(isset($this->parent->by_object['servgeneric'])){
$this->base = $this->parent->by_object['servgeneric']->base;
}else{
- print_red(_("Unknown type of FAI source information. This is not a profile, workstation nor a ogroup."));
+ msg_dialog::display(_("Error"), _("Unkonwn FAI information source!"), ERROR_DIALOG);
}
/* Append workstation class && LAST */
diff --git a/gosa-plugins/fai/admin/fai/class_faiTemplate.inc b/gosa-plugins/fai/admin/fai/class_faiTemplate.inc
index 863ee2b3e877252db0be0d0c9543cebdacf9d167..9c1dd0c98a1e6a55e54e8d203a3f40c0dc3f1833 100644 (file)
class faiTemplate extends plugin
{
- /* CLI vars */
- var $cli_summary = "Manage server basic objects";
- var $cli_description = "Some longer text\nfor help";
- var $cli_parameters = array("eins" => "Eins ist toll", "zwei" => "Zwei ist noch besser");
-
/* attribute list for save action */
var $ignore_account = TRUE;
$msgs = $this->dialog->check();
if(count($msgs)>0){
foreach($msgs as $msg){
- print_red($msg);
+ msg_dialog::display(_("Error"), $msg, ERROR_DIALOG);
}
}else{
/* Get return object */
diff --git a/gosa-plugins/fai/admin/fai/class_faiTemplateEntry.inc b/gosa-plugins/fai/admin/fai/class_faiTemplateEntry.inc
index 869cb1f0bce4a231f9600c9227ff3c48d51e4e0b..d7066e18137bb4dbfeb9a19e14697ab3c7adfc12 100644 (file)
class faiTemplateEntry extends plugin
{
- /* CLI vars */
- var $cli_summary= "Manage server basic objects";
- var $cli_description= "Some longer text\nfor help";
- var $cli_parameters= array("eins" => "Eins ist toll", "zwei" => "Zwei ist noch besser");
-
/* attribute list for save action */
var $ignore_account= TRUE;
var $attributes = array("cn","description","FAItemplateFile","FAItemplatePath","FAImode","user","group","binary","FAIowner");
diff --git a/gosa-plugins/fai/admin/fai/class_faiVariable.inc b/gosa-plugins/fai/admin/fai/class_faiVariable.inc
index aea362f0582d4e9776785b49b0057abc8d545245..ddd1b1b47d79eac64f41a2b3eb7a7a27752eac08 100644 (file)
class faiVariable extends plugin
{
- /* CLI vars */
- var $cli_summary = "Manage server basic objects";
- var $cli_description = "Some longer text\nfor help";
- var $cli_parameters = array("eins" => "Eins ist toll", "zwei" => "Zwei ist noch besser");
-
/* attribute list for save action */
var $ignore_account = TRUE;
$msgs = $this->dialog->check();
if(count($msgs)>0){
foreach($msgs as $msg){
- print_red($msg);
+ msg_dialog::display(_("Error"), $msg, ERROR_DIALOG);
}
}else{
$obj = $this->dialog->save();
diff --git a/gosa-plugins/fai/admin/fai/class_faiVariableEntry.inc b/gosa-plugins/fai/admin/fai/class_faiVariableEntry.inc
index 5fc6ef01e3cf977400b5d8f7739fc4ac4908dc9f..21d7bc0f03b9475dfa7993dc73b5bf2746a9222d 100644 (file)
class faiVariableEntry extends plugin
{
- /* CLI vars */
- var $cli_summary= "Manage server basic objects";
- var $cli_description= "Some longer text\nfor help";
- var $cli_parameters= array("eins" => "Eins ist toll", "zwei" => "Zwei ist noch besser");
-
/* attribute list for save action */
var $ignore_account= TRUE;
var $attributes = array("cn","description","FAIvariableContent");
index ed61e1fc86f57fa4c61ade5665d07d8863313fae..bf4709073631d29eb91e816d0716096663fead5e 100644 (file)
$cnt1 = count(split(",",$this->dn));
$cnt2 = count(split(",",$new_dn));
if((strstr($new_dn,$this->dn))&&($cnt1<$cnt2)){
- print_red(_("Try to move tree failed. Destination tree is subtree of source tree."));
+ msg_dialog::display(_("Error"), _("Moving the tree failed. Destination tree is subtree of source tree."), ERROR_DIALOG);
}else{
// $baseobject->recursive_move($this->dn, $new_dn);
}
diff --git a/gosa-plugins/fai/admin/fai/tabsPackage.inc b/gosa-plugins/fai/admin/fai/tabsPackage.inc
index e678a835edbf51c32f42b99419654c111818f0a5..94dca4e2001ff51633b077804d06ff91e1ba1cab 100644 (file)
$cnt1 = count(split(",",$this->dn));
$cnt2 = count(split(",",$new_dn));
if((strstr($new_dn,$this->dn))&&($cnt1<$cnt2)){
- print_red(_("Try to move tree failed. Destination tree is subtree of source tree."));
+ msg_dialog::display(_("Error"), _("Moving the tree failed. Destination tree is subtree of source tree."), ERROR_DIALOG);
}else{
// $baseobject->recursive_move($this->dn, $new_dn);
}
diff --git a/gosa-plugins/fai/admin/fai/tabsPartition.inc b/gosa-plugins/fai/admin/fai/tabsPartition.inc
index 308d50b8acbded0e6e6ee736376f6de31b89fdac..9d409e6c73090f429d6641a3ff07b1c348fdd03b 100644 (file)
$cnt1 = count(split(",",$this->dn));
$cnt2 = count(split(",",$new_dn));
if((strstr($new_dn,$this->dn))&&($cnt1<$cnt2)){
- print_red(_("Try to move tree failed. Destination tree is subtree of source tree."));
+ msg_dialog::display(_("Error"), _("Moving the tree failed. Destination tree is subtree of source tree."), ERROR_DIALOG);
}else{
// $baseobject->recursive_move($this->dn, $new_dn);
}
diff --git a/gosa-plugins/fai/admin/fai/tabsProfile.inc b/gosa-plugins/fai/admin/fai/tabsProfile.inc
index ccac199c21a5effca63903e4e9e9edafb50cf40f..f67b22c0cf7c8aa6a231a0e998428e6640714ba3 100644 (file)
$cnt1 = count(split(",",$this->dn));
$cnt2 = count(split(",",$new_dn));
if((strstr($new_dn,$this->dn))&&($cnt1<$cnt2)){
- print_red(_("Try to move tree failed. Destination tree is subtree of source tree."));
+ msg_dialog::display(_("Error"), _("Moving the tree failed. Destination tree is subtree of source tree."), ERROR_DIALOG);
}else{
// $baseobject->recursive_move($this->dn, $new_dn);
}
index 094fbb40502c2b52995d12e6f327923f8f6d27b7..eb283a2c64092b8eb47dea6e026efa5798732247 100644 (file)
$cnt1 = count(split(",",$this->dn));
$cnt2 = count(split(",",$new_dn));
if((strstr($new_dn,$this->dn))&&($cnt1<$cnt2)){
- print_red(_("Try to move tree failed. Destination tree is subtree of source tree."));
+ msg_dialog::display(_("Error"), _("Moving the tree failed. Destination tree is subtree of source tree."), ERROR_DIALOG);
}else{
// $baseobject->recursive_move($this->dn, $new_dn);
}
diff --git a/gosa-plugins/fai/admin/fai/tabsTemplate.inc b/gosa-plugins/fai/admin/fai/tabsTemplate.inc
index 5f7f8ab4c4edf9c338ee097de43dc5bd18291f8d..8b1af36e39ab540a766b223941e7646bb00d91ee 100644 (file)
$cnt1 = count(split(",",$this->dn));
$cnt2 = count(split(",",$new_dn));
if((strstr($new_dn,$this->dn))&&($cnt1<$cnt2)){
- print_red(_("Try to move tree failed. Destination tree is subtree of source tree."));
+ msg_dialog::display(_("Error"), _("Moving the tree failed. Destination tree is subtree of source tree."), ERROR_DIALOG);
}else{
// $baseobject->recursive_move($this->dn, $new_dn);
}
diff --git a/gosa-plugins/fai/admin/fai/tabsVariable.inc b/gosa-plugins/fai/admin/fai/tabsVariable.inc
index 11694b1d1a4fd167d958581705ea7055b4524577..c0476577e8abcaa0f357125ba4855f8e6b46d2e2 100644 (file)
$cnt1 = count(split(",",$this->dn));
$cnt2 = count(split(",",$new_dn));
if((strstr($new_dn,$this->dn))&&($cnt1<$cnt2)){
- print_red(_("Try to move tree failed. Destination tree is subtree of source tree."));
+ msg_dialog::display(_("Error"), _("Moving the tree failed. Destination tree is subtree of source tree."), ERROR_DIALOG);
}else{
// $baseobject->recursive_move($this->dn, $new_dn);
}
diff --git a/gosa-plugins/gofax/gofax/blocklists/class_blocklistGeneric.inc b/gosa-plugins/gofax/gofax/blocklists/class_blocklistGeneric.inc
index a6dab5936b691482150028ed75936fceb4c387e9..7545ee2732b65bb1126cb365f6f34b71d39fc753 100644 (file)
if (tests::is_phone_nr($_POST['number']) || preg_match ("/^[\/0-9 ()\^\.\$+*-]+$/",$_POST['number'])){
$this->addNumber ($_POST['number']);
} else {
- print_red (_("Please specify a valid phone number."));
+ msg_dialog::display(_("Error"), _("Phone number is not valid!"), ERROR_DIALOG);
}
}
/* check syntax: must cn */
if ($this->cn == ""){
- $message[]= _("Required field 'Name' is not set.");
+ $message[]= _("Name is empty!");
} else {
if (!tests::is_uid($this->cn)){
- $message[]= _("Required field 'Name' contains invalid characters");
+ $message[]= _("Name contains invalid characters!");
}
if ($this->dn == 'new'){
$ldap= $this->config->get_ldap_link();
$ldap->cd (get_ou('blocklistou').$this->config->current["BASE"]);
$ldap->search ("(&(|(objectClass=goFaxSBlock)(objectClass=goFaxRBlock))(cn=".$this->cn."))", array("cn"));
if ($ldap->count() != 0){
- $message[]= _("Specified name is already used.");
+ $message[]= _("Name is already in use!");
}
}
}
diff --git a/gosa-plugins/gofax/gofax/blocklists/class_blocklistManagement.inc b/gosa-plugins/gofax/gofax/blocklists/class_blocklistManagement.inc
index 8c68cc421d4009eade7820eb09042bc1e95a6aa2..e1499259c59e607db9ea7b5af1f398f65cb4d08c 100644 (file)
$this->dialog->delete();
$this->dialog = NULL;
} else {
- print_red (sprintf(_("You are not allowed to delete the blocklist '%s'!"),$dn));
+ msg_dialog::display(_("Permission error"), sprintf(_("You have not permission to delete '%s'!"), $dn), ERROR_DIALOG);
}
/* Remove lock file after successfull deletion */
del_lock ($dn);
$this->dialog = NULL;
del_lock ($this->dn);
} else {
- print_red (_("You have no permission to remove this blocklist."));
+ msg_dialog::display(_("Permission error"), _("You have not permission to delete this entry!"), ERROR_DIALOG);
}
}
diff --git a/gosa-plugins/gofax/gofax/faxaccount/class_gofaxAccount.inc b/gosa-plugins/gofax/gofax/faxaccount/class_gofaxAccount.inc
index 63f22cee6057f5290813c78acabf700fe59a1154..67a15aab0b3f1dc1d57c2c8c2690cfde01c960af 100644 (file)
var $plHeadline= "FAX";
var $plDescription= "This does something";
- /* CLI vars */
- var $cli_summary= "Manage users fax account";
- var $cli_description= "Some longer text\nfor help";
- var $cli_parameters= array("eins" => "Eins ist toll", "zwei" => "Zwei ist noch besser");
-
-
/* Department list shown in the divSelectList*/
var $departments;
/* Add number to blocklist (dialog) */
if (isset($_POST['add_blocklist_number']) && $_POST['block_number'] != ""){
if (!tests::is_phone_nr($_POST['block_number'])){
- print_red (_("You're trying to add an invalid phone number."));
+ msg_dialog::display(_("Error"), _("Phone number is not valid!"), ERROR_DIALOG);
} else {
array_push($this->current_blocklist, $_POST['block_number']);
$this->current_blocklist= array_unique($this->current_blocklist);
/* must: facsimileTelephoneNumber */
if ($this->facsimileTelephoneNumber == ""){
- $message[]= _("The required field 'Fax' is not set.");
+ $message[]= _("Fax is empty!");
}
if (!tests::is_phone_nr($this->facsimileTelephoneNumber)){
- $message[]= _("Please enter a valid telephone number in the 'Fax' field.");
+ $message[]= _("Fax number is not valid!");
}
/* IF mail is specified (which is only the case if there's no mail account
if (@isset($this->parent->by_object['mailAccount']) &&
$this->goFaxDeliveryMode & 32){
if ($this->mail == ""){
- $message[]= _("Mail delivery is checked, but no address has been specified.");
+ $message[]= _("Mail delivery is requested without target address!");
} elseif (!tests::is_email($this->mail)){
- $message[]= _("The mail address you've entered is invalid.");
+ $message[]= _("Mail address is invalid!");
}
}
// IE Fix, IE lets you choose disabled option, stupid browser ...
if((empty($this->goFaxPrinter))&&($this->goFaxDeliveryMode & 64)){
- $message[]= _("Deliver fax to printer, is only possible if valid printer is given. Please correct your choice.");
+ $message[]= _("Printing is requested without a target printer!");
}
return ($message);
diff --git a/gosa-plugins/gofax/gofax/faxreports/class_faxreport.inc b/gosa-plugins/gofax/gofax/faxreports/class_faxreport.inc
index 1292b1abad401384511c12135944f2fa659a1a89..f02aef2adf8d17becd895a68d7e8d4da4fa5eccb 100644 (file)
/* Some checks */
if(!isset($this->config->data['SERVERS']['FAX'])){
- print_red(_("No fax extension defined in your server configuration, no reports can be shown!"));
+ msg_dialog::display(_("Error"), _("No fax server found!"), ERROR_DIALOG);
return($smarty->fetch(get_template_path('contents.tpl', TRUE)));
}elseif(!is_callable("mysql_connect")){
- print_red(_("There is no mysql extension available, please check your php setup."));
+ msg_dialog::display(_("Configuration error"), sprintf(_("Missing %s PHP extension!"), "mysql"), WARNING_DIALOG);
return($smarty->fetch(get_template_path('contents.tpl', TRUE)));
}else{
/* Connecting, selecting database */
$cfg = $this->config->data['SERVERS']['FAX'];
$link = @mysql_pconnect($cfg['SERVER'], $cfg['LOGIN'], $cfg['PASSWORD']);
if ($link === FALSE){
- print_red(_("Can't connect to fax database, no reports can be shown!"));
+ msg_dialog::display(_("Error"), sprintf(_("Cannot connect to %s database!"), "GOfax"), ERROR_DIALOG);
return($smarty->fetch(get_template_path('contents.tpl', TRUE)));
}
if (! @mysql_select_db("gofax")){
- print_red(_("Can't select fax database for report generation!"));
+ msg_dialog::display(_("Error"), sprintf(_("Cannot select %s database!"), "GOfax"), ERROR_DIALOG);
return($smarty->fetch(get_template_path('contents.tpl', TRUE)));
}
if (! mysql_query("SELECT * FROM faxlog;")){
- print_red(_("Can't query fax table 'faxlog' for report generation!"));
+ msg_dialog::display(_("Error"), sprintf(_("Cannot query %s database!"), "GOfax"), ERROR_DIALOG);
return($smarty->fetch(get_template_path('contents.tpl', TRUE)));
}
}
/* Check if everything went ok*/
$result = @mysql_query($query);
if ($result === false){
- print_red(_("Query for fax database failed!"));
+ msg_dialog::display(_("Error"), sprintf(_("Cannot query %s database!"), "GOfax"), ERROR_DIALOG);
@DEBUG (DEBUG_MYSQL, __LINE__, __FUNCTION__, __FILE__,$query, "Database query failed");
return($smarty->fetch(get_template_path('contents.tpl', TRUE)));
}
mysql_close($link);
if (!preg_match ("/'".$line["uid"]."'/", $this->userfilter)){
- print_red (_("You have no permission to retrieve informations about this fax id!"));
+ msg_dialog::display(_("Permission error"), _("You have no permission to view this fax id!"), ERROR_DIALOG);
return($smarty->fetch(get_template_path('contents.tpl', TRUE)));
}
$dn = $fax_uids[$uid];
$acls = $this->ui->get_permissions($dn,"faxreport/faxreport");
if(!preg_match("/r/",$acls)){
- print_red (_("You have no permission to retrieve informations about this fax id!"));
+ msg_dialog::display(_("Permission error"), _("You have no permission to view this fax id!"), ERROR_DIALOG);
return($smarty->fetch(get_template_path('contents.tpl', TRUE)));
}
"queuing_time >= $start ORDER BY ".$this->fields[$this->sort]." $desc;";
if(!is_callable("mysql_connect")){
- print_red("There is no mysql extension configured in your php setup.");
+ msg_dialog::display(_("Configuration error"), sprintf(_("Missing %s PHP extension!"), "mysql"), WARNING_DIALOG);
return($smarty->fetch(get_template_path('contents.tpl', TRUE)));
}
@DEBUG (DEBUG_MYSQL, __LINE__, __FUNCTION__, __FILE__,$query, "Database query");
$result = @mysql_query($query);
if ($result === false){
- print_red(_("Query for fax database failed!"));
+ msg_dialog::display(_("Error"), sprintf(_("Cannot query %s database!"), "GOfax"), ERROR_DIALOG);
return($smarty->fetch(get_template_path('contents.tpl', TRUE)));
}