index 58b26e7663f4159e4fd49fd2350da308bcde0766..2ee9f873de7001fedb1e3852cd3d82533e282cd2 100644 (file)
var $goFonAreaCode= "";
var $goFonCountryCode= "";
var $ignore_account= TRUE;
var $goFonAreaCode= "";
var $goFonCountryCode= "";
var $ignore_account= TRUE;
+ var $goGlpiAdmin="";
+ var $goGlpiDatabase = "";
+ var $goGlpiPassword ="";
+
/* attribute list for save action */
var $attributes= array("goImapName", "goImapConnect", "goImapAdmin", "goImapPassword",
/* attribute list for save action */
var $attributes= array("goImapName", "goImapConnect", "goImapAdmin", "goImapPassword",
{
$message= array();
{
$message= array();
+ if(in_array("goGlpiServer",$this->objectclasses)){
+ foreach(array("goGlpiAdmin","goGlpiDatabase") as $attr){
+ if(empty($this->$attr)){
+ $message[]= sprintf(_("The attribute '%s' is empty or contains invalid characters."), $attr);
+ }
+ }
+ }
+
/* All fields are marked as *must* */
if (in_array("goImapServer", $this->objectclasses)){
foreach (array("goImapAdmin", "goImapName") as $attr){
/* All fields are marked as *must* */
if (in_array("goImapServer", $this->objectclasses)){
foreach (array("goImapAdmin", "goImapName") as $attr){
}
}
}
}
+
/* Check connect string */
if (!preg_match('/^\{[^:]+:[0-9]+.*\}$/', $this->goImapConnect)){
$message[]= sprintf(_("The imap connect string needs to be in the form '%s'."),
/* Check connect string */
if (!preg_match('/^\{[^:]+:[0-9]+.*\}$/', $this->goImapConnect)){
$message[]= sprintf(_("The imap connect string needs to be in the form '%s'."),