summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a236ccf)
raw | patch | inline | side by side (parent: a236ccf)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 9 Jan 2008 18:17:53 +0000 (18:17 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 9 Jan 2008 18:17:53 +0000 (18:17 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8279 594d385d-05f5-0310-b6e9-bd551577e9d8
index c3c0e53e63dbe18f3608c1d78861dfedaf6210e0..151d29fdd1fa5d8eb6d1df351c957fa9c11fa1d0 100644 (file)
/* 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 fbcfb4c97bfeb4d4be04e70f0d9e5d973ab05ac6..514b6e79fdfab635d812c57d0ad69ad40f69b154 100644 (file)
$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();
$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 = "<font color='green'>"._("Feedback sucessfully send")."</font>";
}
diff --git a/gosa-core/setup/class_setupStep_Migrate.inc b/gosa-core/setup/class_setupStep_Migrate.inc
index 5dcd8e649d9ccba0c9fdf273b1e8a08f0dc6d26c..a979ba25603bd43c61fc5818198d7c5d4210a4df 100644 (file)
}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':")."<br><br><i>%s</i>",LDAP::fix($attrs['dn']),$ldap->get_error()), ERROR_DIALOG);
return(false);
}
}
}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':")."<br><br><i>%s</i>",LDAP::fix($attrs['dn']), $ldap->get_error()), ERROR_DIALOG);
return(false);
}
}
$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':")."<br><br><i>%s</i>", LDAP::fix($dn), $ldap->get_error()), ERROR_DIALOG);
return(FALSE);
}else{
return(TRUE);
}
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;
}
$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);
}
$this->create_admin();
if(!$res){
- print_red($ldap->get_error());
+ msg_dialog::display(_("LDAP error"), $ldap->get_error(), ERROR_DIALOG);
return(FALSE);
}
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);
}
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);
}
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);
}
/* 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:")."<br><br><i>%s</i>", 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 2008128a4253fb173439d7ec2ce69a83478e85ef..ebf083a4563c8243b8dc9473cbcaeb7e6c571585 100644 (file)
$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? */