Changeset 12394


Ignore:
Timestamp:
10/09/11 15:52:14 (8 years ago)
Author:
cljosse
Message:

[extensions] mail_supervisorcompatibility wirh 2.3

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/Mail_supervisor/main.inc.php

    r11841 r12394  
    292292$user_ip=$_SERVER["REMOTE_ADDR"]; 
    293293 
     294        $pattern ="/(((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]{1}[0-9]|[1-9])\.){1}((25[0-5]|2[0-4][0-9]|[1]{1}[0-9]{2}|[1-9]{1}[0-9]|[0-9])\.){2}((25[0-5]|2[0-4][0-9]|[1]{1}[0-9]{2}|[1-9]{1}[0-9]|[0-9]){1}))/" ;        
     295        $local=preg_match($pattern,$user_ip); 
    294296 
    295297  $file = $pwd.'/.htpasswd';     
    296298   $htmes1 =$conf['db_user'].":".$conf['db_password']."\n";  
    297299   $htmes2 =$conf['db_user'].":".crypt($conf['db_password'], 'rl')."\n";  
    298 if(preg_match("/free/i",$server))  
     300if(preg_match("/free/i",$server)||$local)  
    299301   $htmes=$htmes1; 
    300302 else 
     
    318320   $AuthUserFile='PerlSetVar AuthFile '.$racine.'/_data/Pwd' .'/.htpasswd'; 
    319321}else{ 
    320    $AuthUserFile='AuthUserFile '.realpath($pwd).'/.htpasswd'."\n".'AuthGroupFile /dev/null'; 
    321 } 
     322 if($local) 
     323    $AuthUserFile='AuthUserFile '.realpath($pwd).'\\.htpasswd'."\n".'AuthGroupFile /dev/null'; 
     324    else 
     325$AuthUserFile='AuthUserFile '.realpath($pwd).'\\.htpasswd'."\n".'AuthGroupFile /dev/null'; 
     326} 
     327 
    322328//============================================================ 
    323329$htmes=$AuthUserFile."\n". 
Note: See TracChangeset for help on using the changeset viewer.