Ignore:
Timestamp:
Nov 21, 2011 9:19:53 AM (18 months ago)
Author:
alec
Message:
  • More package.xml files
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/plugins/virtuser_file/virtuser_file.php

    r4485 r5459  
    33/** 
    44 * File based User-to-Email and Email-to-User lookup 
    5  *  
     5 * 
    66 * Add it to the plugins list in config/main.inc.php and set 
    77 * path to a virtuser table file to resolve user names and e-mail 
     
    99 * $rcmail_config['virtuser_file'] = ''; 
    1010 * 
    11  * @version 1.0 
     11 * @version @package_version@ 
    1212 * @author Aleksander Machniak 
    1313 */ 
     
    6464            for ($i=0; $i<count($r); $i++) { 
    6565                $arr = preg_split('/\s+/', trim($r[$i])); 
    66              
     66 
    6767                if (count($arr) > 0) { 
    6868                        $p['user'] = trim($arr[count($arr)-1]); 
     
    8484            $result = array(); 
    8585            $virtual = null; 
    86          
     86 
    8787            if ($this->file) 
    8888                $virtual = file($this->file); 
    89          
     89 
    9090            if (empty($virtual)) 
    9191                return $result; 
    92          
     92 
    9393            // check each line for matches 
    9494            foreach ($virtual as $line) { 
     
    9696                if (empty($line) || $line[0]=='#') 
    9797                    continue; 
    98          
     98 
    9999                if (preg_match($pattern, $line)) 
    100100                    $result[] = $line; 
    101101            } 
    102          
     102 
    103103            return $result; 
    104104    } 
Note: See TracChangeset for help on using the changeset viewer.