summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 14d42bb)
raw | patch | inline | side by side (parent: 14d42bb)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 13 Mar 2008 12:03:47 +0000 (12:03 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 13 Mar 2008 12:03:47 +0000 (12:03 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9736 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/gofon/admin/ogroups/gofon/class_phonequeue.inc | patch | blob | history |
diff --git a/gosa-plugins/gofon/admin/ogroups/gofon/class_phonequeue.inc b/gosa-plugins/gofon/admin/ogroups/gofon/class_phonequeue.inc
index fe9bfed3368fe13614f90e66de3637ca2c6b251c..d53fae9b2b919053f33cdc6ae587ecb80867a76c 100644 (file)
{
/* Check if mysql extension is available */
if(!is_callable("mysql_pconnect")){
- return(sprintf(_("Missing %s PHP extension!"), "mysql"));
+ return(msgPool::missingext("mysql"));
}
/********************
$r_current = @mysql_pconnect($cfg_Current['SERVER'],$cfg_Current['LOGIN'],$cfg_Current['PASSWORD']);
if(!$r_current){
new log("debug","ogroups/".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","ogroups/".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","ogroups/".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","ogroups/".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 ($this->parent !== NULL){
if ($this->is_account){
$display= $this->show_disable_header(_("Remove the phone queue from this Account"),
- _("Phone queue is enabled for this group. You can disable it by clicking below."));
+ msgPool::featuresEnabled(_("phone queue")));
} else {
$display= $this->show_enable_header(_("Create phone queue"),
- _("For this group the phone queues are disabled. You can enable them by clicking below."));
+ msgPool::featuresDisabled(_("phone queue")));
return ($display);
}
}
$message[] = _("There must be at least one server with an asterisk database to create a phone queue.");
}
if(empty($this->goFonHomeServer)){
- $message[] = _("Please select a valid goFonHomeServer.");
+ $message[] = msgPool::required(_("Home server"));
}
if($this->is_number_used()){
$message[] = $this->is_number_used();
}
if(!((is_numeric($this->goFonTimeOut))||(empty($this->goFonTimeOut)))){
- $message[] = _("Timeout must be numeric");
+ $message[] = msgPool::invalid(_("Timeout"),$this->goFonTimeOut,"/[0-9]/");
}
if(!((is_numeric($this->goFonQueueRetry))||(empty($this->goFonQueueRetry)))){
- $message[] = _("Retry must be numeric");
+ $message[] = msgPool::invalid(_("Retry"),$this->goFonQueueRetry,"/[0-9]/");
}
if(!((is_numeric($this->goFonMaxLen))||(empty($this->goFonMaxLen)))){
- $message[] = _("Max queue length must be numeric");
+ $message[] = msgPool::invalid(_("Queue length"),$this->goFonMaxLen,"/[0-9]/");
}
if(!((is_numeric($this->goFonAnnounceFrequency))||(empty($this->goFonAnnounceFrequency)))){
- $message[] = _("Announce frequency must be numeric");
+ $message[] = msgPool::invalid(_("Announce frequency"),$this->goFonAnnounceFrequency,"/[0-9]/");
}
if(count($this->telephoneNumber)==0){
- $message[] = _("There must be least one queue number defined.");
+ $message[] = msgPool::required(_("Number"));
}
/* check if add to database could be successfull */
/* Check if there is at least on server configuration */
if(!count($this->goFonHomeServers)){
- return( _("There is currently no asterisk server defined!"));
+ return(msgPool::noserver(_("asterisk")));
}
/********************
$res = @mysql_query($sql,$res_cur);
if(!$res){
new log("debug","ogroups/".get_class($this),"",array(),@mysql_error($r_current));
- return(_("Cannot remove queue entries from database!"));
+ return(msgPool::dbquery(_("GOfon"),@mysql_error($r_current))));
}
}
}
{
/* Check if there is at least on server configuration */
if(!count($this->goFonHomeServers)){
- return( _("There is currently no asterisk server defined!"));
+ return( msgPool::noserver(_("asterisk")));
}
/********************
$res = mysql_query($query,$res_cur);
if(!$res){
new log("debug","ogroups/".get_class($this),"",array(),@mysql_error($res_cur));
- return(_("Mysql query failed.")." "._("Please have a look a the gosa logfiles."));
+ return(msgPool::dbquery(_("GOfon"),@mysql_error($res_cur)));
}
}
@mysql_close($r_con);
foreach($this->telephoneNumber as $num){
if((isset($numbers[$num]))&&(($numbers[$num]['cn'][0]!= $this->attrs['cn'][0]))){
if(isset($numbers[$num]['uid'][0])){
- return sprintf(_("The specified telephonenumber '%s' is already assigned to '%s'."),$num,$numbers[$num]['uid'][0]);
+ msgPool::duplicated(_("telephone number"));
}else{
- return sprintf(_("The specified telephonenumber '%s' is already assigned to '%s'."),$num,$numbers[$num]['cn'][0]);
+ msgPool::duplicated(_("telephone number"));
}
}
}