Changeset 10115

Show
Ignore:
Timestamp:
04/06/11 19:14:37 (2 years ago)
Author:
LucMorizur
Message:

Code cleaning

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • extensions/LCAS/trunk/include/admin_search.inc.php

    r10087 r10115  
    3333  $users = array(); 
    3434  $users_t1 = array(); 
    35   $users_t2 = array(); 
    3635 
    3736  // filter 
     
    143142  } 
    144143   
    145   $users_t2 = $users; 
    146  
    147   // $users_t2 is now all usernames matching all filters but the username 
     144  // $users is now all usernames matching all filters but the username 
    148145  // filter 
    149146  // Username filter applied now: convert all found usernames with current 
    150147  // LCAS rule, and compare to LCAS-converted filter on username 
    151   foreach ($users_t2 as &$user) 
    152    $user['username'] = LCAS_change_case($user['username'], $conf_LCAS[0]); 
    153    
    154   // Now can the username filter be applied 
    155   $i = 0; 
    156   foreach ($users_t2 as $user) { 
    157     if (preg_match($filter['username'], $user['username'])) 
    158      $users_t1[] = $users[$i]; 
    159     $i++; 
    160   } 
     148  foreach ($users as $user) if (preg_match( 
     149   $filter['username'], LCAS_change_case($user['username'], $conf_LCAS[0]) 
     150   )) $users_t1[] = $user; 
    161151   
    162152  return $users_t1; 
     
    236226} 
    237227 
     228 
     229$template->append('footer_elements', '<p>lskskjsleektjtj1</p>'); 
     230$template->append('footer_elements', '<p>str_from_var2($visible_user_list)&nbsp;(1): '.str_from_var2($visible_user_list).'</p>');   
     231  
     232 
     233 
    238234// Reset TPL variables 
    239235$template->smarty->_tpl_vars['users'] = array(); 
     
    244240// plugin_columns/plugin_actions for each user in the list 
    245241$visible_user_list = trigger_event('loc_visible_user_list', $visible_user_list); 
     242 
     243$template->append('footer_elements', '<p>str_from_var2($visible_user_list)&nbsp;(2): '.str_from_var2($visible_user_list).'</p>');   
     244 
    246245 
    247246foreach ($visible_user_list as $local_user) 
     
    298297} 
    299298 
     299$template->append('footer_elements', '<p>str_from_var2($template->smarty->_tpl_vars[users]&nbsp; : '.str_from_var2($template->smarty->_tpl_vars['users']).'</p>');   
     300 
     301 
     302$template->append('footer_elements', '<p>lskskjsleektjtj2</p><p>lskskjsleektjtj2</p><p>lskskjsleektjtj2</p><p>lskskjsleektjtj2</p>');   
     303 
     304 
    300305// +-----------------------------------------------------------------------+ 
    301306// |                           html code display                           |