From: cajus Date: Wed, 9 Jan 2008 18:17:53 +0000 (+0000) Subject: Removed print_red from setup X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=972ee10b86c0d014353a5223a74fec0d937c38eb;p=gosa.git Removed print_red from setup git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8279 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/setup/class_setup.inc b/gosa-core/setup/class_setup.inc index c3c0e53e6..151d29fdd 100644 --- a/gosa-core/setup/class_setup.inc +++ b/gosa-core/setup/class_setup.inc @@ -73,7 +73,7 @@ class setup /* display step error msgs */ $msgs = $this->o_steps[$this->i_current]->check(); foreach($msgs as $msg){ - print_red($msg); + msg_dialog::display(_("Setup error"), $msg, ERROR_DIALOG); } $this->o_steps[$this->i_last]->set_active(FALSE); diff --git a/gosa-core/setup/class_setupStep_Feedback.inc b/gosa-core/setup/class_setupStep_Feedback.inc index fbcfb4c97..514b6e79f 100644 --- a/gosa-core/setup/class_setupStep_Feedback.inc +++ b/gosa-core/setup/class_setupStep_Feedback.inc @@ -128,7 +128,7 @@ class Step_Feedback extends setup_step $msgs = $this->check_feedback(); if(count($msgs)){ foreach($msgs as $msg){ - print_red($msg); + msg_dialog::display(_("Setup error"), $msg, ERROR_DIALOG); } }else{ $str = $this->create_serialise_data_string(); @@ -137,14 +137,14 @@ class Step_Feedback extends setup_step $ret = @fopen($feedback_url,"r"); if(!$ret){ - print_red(sprintf(_("Could not connect to feedback server (%s). There is possibly no connection to the internet."),$this->feedback_url)); + msg_dialog::display(_("Feedback error"), sprintf(_("Cannot send feedback to '%s': %s"), $this->feedback_url, $ret), ERROR_DIALOG); }else{ $ret_value=""; while($ret && !feof($ret)){ $ret_value.= fgets($ret,256); } if(!preg_match("/successful/i",$ret_value)){ - print_red(_("Error while sending your feedback. The service is possible temporary unavailable")); + msg_dialog::display(_("Feedback error"), _("Cannot send feedback: service temporarily unavailable"), ERROR_DIALOG); }else{ $additional_info = ""._("Feedback sucessfully send").""; } diff --git a/gosa-core/setup/class_setupStep_Migrate.inc b/gosa-core/setup/class_setupStep_Migrate.inc index 5dcd8e649..a979ba256 100644 --- a/gosa-core/setup/class_setupStep_Migrate.inc +++ b/gosa-core/setup/class_setupStep_Migrate.inc @@ -644,7 +644,7 @@ class Step_Migrate extends setup_step }else{ $ldap->cd($attrs['dn']); if(!$ldap->modify($new_attrs)){ - print_red(sprintf(_("Failed to migrate the department '%s' into GOsa, error message is as follows '%s'."),$attrs['dn'],$ldap->get_error())); + msg_dialog::display(_("Migration error"), sprintf(_("Cannot migrate department '%s':")."

%s",LDAP::fix($attrs['dn']),$ldap->get_error()), ERROR_DIALOG); return(false); } } @@ -776,7 +776,7 @@ class Step_Migrate extends setup_step }else{ $ldap->cd($attrs['dn']); if(!$ldap->modify($new_attrs)){ - print_red(sprintf(_("Failed to migrate the department '%s' into GOsa, error message is as follows '%s'."),$attrs['dn'],$ldap->get_error())); + msg_dialog::display(_("Migration error"), sprintf(_("Cannot migrate department '%s':")."

%s",LDAP::fix($attrs['dn']), $ldap->get_error()), ERROR_DIALOG); return(false); } } @@ -942,7 +942,7 @@ class Step_Migrate extends setup_step $ldap->cd($cv['base']); if(!$ldap->modify($attrs_new)){ - print_red(sprintf(_("Adding acls for user '%s' failed, ldap says '%s'."),$dn,$ldap->get_error())); + msg_dialog::display(_("Migration error"), sprintf(_("Cannot add ACL for user '%s':")."

%s", LDAP::fix($dn), $ldap->get_error()), ERROR_DIALOG); return(FALSE); }else{ return(TRUE); @@ -967,12 +967,12 @@ class Step_Migrate extends setup_step } if(empty($pw1) || empty($pw2) | ($pw1 != $pw2)){ - print_red(_("Specified passwords are empty or not equal.")); + msg_dialog::display(_("Password error"), _("Provided passwords do not match!"), ERROR_DIALOG); return false; } if(!is_uid($uid) || empty($uid)){ - print_red(_("Please specify a valid uid.")); + msg_dialog::display(_("Input error"), _("Specify a valid user ID!"), ERROR_DIALOG); return false; } @@ -1016,7 +1016,7 @@ class Step_Migrate extends setup_step $ldap->cat($dn,array("dn")); if($ldap->count()){ - print_red(sprintf(_("Could not add administrative user, there is already an object with the same dn '%s' in your ldap database."),$dn)); + msg_dialog::display(_("Error"), sprintf(_("Adding an administrative user failed: object '%s' already exists!"), LDAP::fix($dn)), ERROR_DIALOG); return(FALSE); } @@ -1027,7 +1027,7 @@ class Step_Migrate extends setup_step $this->create_admin(); if(!$res){ - print_red($ldap->get_error()); + msg_dialog::display(_("LDAP error"), $ldap->get_error(), ERROR_DIALOG); return(FALSE); } @@ -1053,7 +1053,7 @@ class Step_Migrate extends setup_step if(isset($_POST['move_winstation_to'])){ $destination_dep = $_POST['move_winstation_to']; }else{ - print_red(_("Couldn't move users to specified department.")); + msg_dialog::display(_("LDAP error"), _("Cannot move users to the requested department!"), ERROR_DIALOG); return(false); } @@ -1101,7 +1101,7 @@ class Step_Migrate extends setup_step if(isset($_POST['move_group_to'])){ $destination_dep = $_POST['move_group_to']; }else{ - print_red(_("Couldn't move users to specified department.")); + msg_dialog::display(_("LDAP error"), _("Cannot move users to the requested department!"), ERROR_DIALOG); return(false); } @@ -1149,7 +1149,7 @@ class Step_Migrate extends setup_step if(isset($_POST['move_user_to'])){ $destination_dep = $_POST['move_user_to']; }else{ - print_red(_("Couldn't move users to specified department.")); + msg_dialog::display(_("LDAP error"), _("Cannot move users to the requested department!"), ERROR_DIALOG); return(false); } @@ -1913,10 +1913,10 @@ class Step_Migrate extends setup_step /* Display warning if copy failed */ if(!$res){ - print_red(_("Failed to copy '%s' to '%s'. LDAP says '%s'."),$source,$destination,$ldap->get_error()); + msg_dialog::display(_("LDAP error"), sprintf(_("Copy '%s' to '%s' failed:")."

%s", LDAP::fix($source), LDAP::fix($destination), $ldap->get_error()), ERROR_DIALOG); }else{ $res = $ldap->rmDir($source); - show_ldap_error($ldap->get_error(),_("Something went wrong while copying dns.")); + show_ldap_error($ldap->get_error(),_("Problem copying DNs")); /* Object is copied, so update its references */ foreach($ogs_to_fix as $dn => $data){ diff --git a/gosa-core/setup/class_setupStep_Schema.inc b/gosa-core/setup/class_setupStep_Schema.inc index 2008128a4..ebf083a45 100644 --- a/gosa-core/setup/class_setupStep_Schema.inc +++ b/gosa-core/setup/class_setupStep_Schema.inc @@ -92,7 +92,7 @@ class Step_Schema extends setup_step $ldap = new LDAP($cfg['admin'],$cfg['password'],$cfg['connection'] ,FALSE,$cfg['tls']); $objectclasses = $ldap->get_objectclasses(); if(count($objectclasses) == 0){ - print_red(_("Can't get schema information from server. No schema check possible!")); + msg_dialog::display(_("LDAP error"), _("Cannot detect information about the installed LDAP schema!"), ERROR_DIALOG); } /* Which samba version do we use? */