summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f72a4f2)
raw | patch | inline | side by side (parent: f72a4f2)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 14 Mar 2008 12:55:07 +0000 (12:55 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 14 Mar 2008 12:55:07 +0000 (12:55 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9839 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/gofon/gofon/conference/class_divListConferences.inc | patch | blob | history | |
gosa-plugins/gofon/gofon/conference/class_phoneConferenceGeneric.inc | patch | blob | history |
diff --git a/gosa-plugins/gofon/gofon/conference/class_divListConferences.inc b/gosa-plugins/gofon/gofon/conference/class_divListConferences.inc
index 0ab875386ec6fc0417004ede867f7822cd7554db..f565dea08c3a6de17a2e91b05fb8ac0d1c1fa1e1 100644 (file)
/* set Page header */
$this->AddHeader(array("string"=> $chk, "attach"=>"style='width:20px;'"));
$this->AddHeader(array("string" => " ", "attach" => "style='text-align:center;width:20px;'"));
- $this->AddHeader(array("string" =>_("Name - Number"), "attach" => "style=''"));
+ $this->AddHeader(array("string" =>_("Name")." - "._("Number"), "attach" => "style=''"));
$this->AddHeader(array("string" => _("Owner"), "attach" => "style='width:200px;'"));
$this->AddHeader(array("string" => _("PIN"), "attach" => "style='width:50px;'"));
$this->AddHeader(array("string" =>_("Actions"), "attach" => "style='width:".$action_col_size."px;border-right:0px;text-align:right;'"));
}
$num_objs = count($list);
- $num_obj_str = _("Number of listed conferences");
- $num_dep_str = _("Number of listed departments");
+ $num_obj_str = sprintf(_("Number of listed %s"),_("conferences"));
+ $num_dep_str = sprintf(_("Number of listed %s"),_("departments"));
$str = "<img class='center' src='images/select_conference.png'
title='".$num_obj_str."' alt='".$num_obj_str."'> ".$num_objs." ";
diff --git a/gosa-plugins/gofon/gofon/conference/class_phoneConferenceGeneric.inc b/gosa-plugins/gofon/gofon/conference/class_phoneConferenceGeneric.inc
index 03ed72b46b1b04df85d65920f9606472ec8ff200..8293716776b5c9ee074ec9294403e20917b09a19 100644 (file)
{
/* Check if mysql extension is available */
if(!is_callable("mysql_pconnect")){
- return(sprintf(_("Missing %s PHP extension!"), "mysql"));
+ return(msgPool::missingext("php-mysql"));
}
/********************
$r_current = @mysql_pconnect($cfg_Current['SERVER'],$cfg_Current['LOGIN'],$cfg_Current['PASSWORD']);
if(!$r_current){
new log("debug","gofonconference/".get_class($this),"",array(),@mysql_error($r_current));
-
- return(sprintf(_("Cannot connect to %s database on server '%s'!"), "GOfon", $cfg_Current['SERVER']));
+ return(msgPool::dbconnect("GOfon",@mysql_error($r_current), $cfg_Current['SERVER']));
}
$db_current = @mysql_select_db($cfg_Current['DB'],$r_current);
if(!$db_current){
new log("debug","gofonconference/".get_class($this),"",array(),@mysql_error($r_current));
mysql_close($r_current);
- return(sprintf(_("Cannot select %s database on server '%s'!"), "GOfon", $cfg_Current['SERVER']));
+ return(msgPool::dbselect("GOfon",@mysql_error($r_current), $cfg_Current['DB']));
}
/********************
$r_init = @mysql_pconnect($cfg_Init['SERVER'],$cfg_Init['LOGIN'],$cfg_Init['PASSWORD']);
if(!$r_init){
new log("debug","gofonconference/".get_class($this),"",array(),@mysql_error($r_init));
- return(sprintf(_("Cannot connect to %s database on server '%s'!"), "GOfon", $cfg_Init['SERVER']));
+ return(msgPool::dbconnect("GOfon",@mysql_error($r_current), $cfg_Init['SERVER']));
}
$db_init = @mysql_select_db($cfg_Init['DB'],$r_init);
if(!$db_init){
new log("debug","gofonconference/".get_class($this),"",array(),@mysql_error($r_init));
mysql_close($r_init);
- return(sprintf(_("Cannot select %s database on server '%s'!"), "GOfon", $cfg_Init['SERVER']));
+ return(msgPool::dbselect("GOfon",@mysql_error($r_current), $cfg_Init['DB']));
}
}
}
}
if((empty($this->goFonPIN))&&($this->goFonConferenceOption_P=="P")&&($this->goFonConferenceOption_D=="D")){
- $message[]= _("PIN is not set!");
+ $message[]= msgPool::required(_("PIN"));
}
if(empty($this->cn)){
- $message[] =_("Name is not set!");
+ $message[] = msgPool::required(_("Name"));
}
if(!is_numeric($this->telephoneNumber)){
- $message[] =_("Number is not valid!");
+ $message[] = msgPool::invalid(_("Number"),$this->telephoneNumber,"/[0-9]/");
}
if(!((is_numeric($this->goFonConferenceOptionLifetime))||(empty($this->goFonConferenceOptionLifetime)))){
- $message[] =_("Lifetime is not valid!");
+ $message[] = msgPool::invalid(_("Lifetime"),$this->goFonConferenceOptionLifetime,"/[0-9]/");
}
/* Check if add could be successful */
$ldap->cd(get_ou('conferenceou').$this->base);
$ldap->search("(&(objectClass=goFonConference)(cn=".$this->cn."))",array("cn"));
if($ldap->count()){
- $message[] =_("Name is already in use!");
+ $message[] = msgPool::duplicated(_("Name"));
}
}
return $message;
{
/* Check if there is at least on server configuration */
if(!count($this->goFonHomeServers)){
- return( _("There is currently no asterisk server defined!"));
+ return(msgPool::noserver(_("GOfon")));
}
/********************
@DEBUG (DEBUG_MYSQL, __LINE__, __FUNCTION__, __FILE__,$query, "Database query");
if(!$res){
new log("debug","gofonconference/".get_class($this),"",array(),@mysql_error($res_cur));
- return(sprintf(_("Cannot query %s database on server '%s'!"), "GOfon", $cfg_Current['SERVER']));
+ return(msgPool::dbquery("GOfon", @mysql_error($res_cur),$cfg_Current['SERVER']));
}
if($save && mysql_affected_rows($res_cur)) {
$SQL = "DELETE FROM ".$cfg_Current['EXT_TABLE']."
@DEBUG (DEBUG_MYSQL, __LINE__, __FUNCTION__, __FILE__,$SQL, "Database query");
if(!$res){
new log("debug","gofonconference/".get_class($this),"",array(),@mysql_error($res_cur));
- return(sprintf(_("Cannot query %s database on server '%s'!"), "GOfon", $cfg_Current['SERVER']));
+ return(msgPool::dbquery("GOfon", @mysql_error($res_cur),$cfg_Current['SERVER']));
}
}
}
@DEBUG (DEBUG_MYSQL, __LINE__, __FUNCTION__, __FILE__,$query, "Database query");
if(!$res){
new log("debug","gofonconference/".get_class($this),"",array(),@mysql_error($r_init));
- return(sprintf(_("Cannot query %s database on server '%s'!"), "GOfon", $cfg_Init['SERVER']));
+ return(msgPool::dbquery("GOfon", @mysql_error($res_cur),$cfg_Init['SERVER']));
}
/* There are entries using this cn and/or phone number */
@DEBUG (DEBUG_MYSQL, __LINE__, __FUNCTION__, __FILE__,$SQL, "Database query");
if(!$res){
new log("debug","gofonconference/".get_class($this),"",array(),@mysql_error($r_init));
- return(sprintf(_("Cannot query %s database on server '%s'!"), "GOfon", $cfg_Init['SERVER']));
+ return(msgPool::dbquery("GOfon", @mysql_error($res_cur),$cfg_Init['SERVER']));
}
}//ENDE old num availiable ...