diff --git a/gosa-plugins/mail/personal/mail/sieve/class_sieve.inc b/gosa-plugins/mail/personal/mail/sieve/class_sieve.inc
index 0aae65def1f372d3ca420331dc97c06f7dd4d758..91c826f402b0c97d611ae825fa45ba11650e8177 100644 (file)
unset($this->error_raw);
$this->line=fgets($this->fp,1024);
- $this->token = split(" ", $this->line, 2);
+ $this->token = explode(" ", $this->line, 2);
if($this->token[0] == "NO"){
/* we need to try and extract the error code from here. There are two possibilites: one, that it will take the form of:
NO ("yyyyy") "zzzzzzz" or, two, NO {yyyyy} "zzzzzzzzzzz" */
$this->x = 0;
- list($this->ltoken, $this->mtoken, $this->rtoken) = split(" ", $this->line." ", 3);
+ list($this->ltoken, $this->mtoken, $this->rtoken) = explode(" ", $this->line." ", 3);
if($this->mtoken[0] == "{"){
while($this->mtoken[$this->x] != "}" or $this->err_len < 1){
$this->err_len = substr($this->mtoken, 1, $this->x);
//response. They repsond as follows: "Cyrus timsieved v1.0.0" "SASL={PLAIN,........}"
//So, if we see IMLEMENTATION in the first line, then we are done.
- if(ereg("IMPLEMENTATION",$this->line))
+ if(strstr($this->line, "IMPLEMENTATION"))
{
//we're on the Cyrus V2 sieve server
while(sieve::status($this->line) == F_DATA){
$this->cap_type="auth";
}
- $this->modules = split(" ", $this->item[1]);
+ $this->modules = explode(" ", $this->item[1]);
if(is_array($this->modules)){
foreach($this->modules as $this->module)
$this->capabilities[$this->cap_type][$this->module]=true;
$this->modules = substr($this->item[1], strpos($this->item[1], "{"),strlen($this->item[1])-1);
//then split again at the ", " stuff.
- $this->modules = split($this->modules, ", ");
+ $this->modules = explode(", ", $this->modules);
//fill up our $this->modules property
if(is_array($this->modules)){
}
/* Loop through each allowed authentication type and see if the server allows the type */
- foreach(split(" ",$this->auth_types) as $auth_type)
+ foreach(explode(" ",$this->auth_types) as $auth_type)
{
- if ($this->capabilities["auth"][$auth_type])
+ if (isset($this->capabilities["auth"][$auth_type]))
{
/* We found an auth type that is allowed. */
$this->auth_in_use = $auth_type;
}
/* Fill error message if no auth types are present */
- if (!isset($this->capabilities["auth"])){
+ if (($this->options != "tls") && (!isset($this->capabilities["auth"]))){
$this->error=EC_UNKNOWN;
$this->error_raw = "No authentication methods found - please check your sieve setup for missing sasl modules";
return false;