Changeset 8217


Ignore:
Timestamp:
Dec 21, 2010, 9:12:13 PM (10 years ago)
Author:
Eric
Message:

Code cleanup : Remove commented code, add functions comments

File:
1 edited

Legend:

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

    r8207 r8217  
    55
    66
    7 /*
     7/**
    88 * Splits a multi-byte string in a array of each of its characters.
    99 * Many thanks to adjwilli in
     
    2525
    2626
    27 
    28 /*
     27/**
    2928 * Changes the characters of the given string as stated by values of
    3029 * $conf['insensitive_case_logon'] and $LCAS_lang['char_replacement_set'].
     
    727726}
    728727
     728
    729729/* Function called from LCAS_admin.php and main.inc.php to get the plugin version and name */
    730730function LCAS_PluginInfos($dir)
     
    772772}
    773773
     774
    774775// Tri les doublons
    775776function CompareTransformedUser($a, $b)
     
    777778        return strcmp($a['transformed'], $b['transformed']);
    778779}
     780
    779781
    780782// Fonctionnel mais optimisable
     
    806808}
    807809
    808 /* Get all users to display the number of days since their last visit */
     810
     811/**
     812 * Retreive duplicate users according of case and or accent sensitivity
     813 *
     814 * @param : $rule for LCAS_change_case())
     815 *
     816 * @return : List of duplicate $username
     817 *
     818 */
    809819function LCAS_get_user_list($rule)
    810820{
     
    833843}
    834844
     845
     846// Cleaning obsolete files at plugin upgrade
    835847function LCAS_clean_obsolete_files()
    836848{
     
    850862  }
    851863}
     864
    852865
    853866/**
     
    869882
    870883  if (isset($username))
    871   { /*
    872     $query = "
    873 SELECT ".$conf['user_fields']['username']."
    874 FROM ".USERS_TABLE."
    875 WHERE LOWER(".$conf['user_fields']['username'].") = '".strtolower($username)."'
    876 LIMIT 1;";
    877 
    878     list($username) = pwg_db_fetch_row(pwg_query($query)); */
    879    
     884  {   
    880885    $LCAS_users = array();
     886   
    881887    $q = pwg_query("
    882888      SELECT ".$conf['user_fields']['username']." AS username
     
    894900   
    895901    $username = ($user_found === false) ? $username : $user_found;
    896 
    897  
    898    $fo=fopen (LCAS_PATH."admin/debuglog.txt","a") ;
    899    fwrite($fo,"======================LG\r\n") ;
    900    fwrite($fo,"u_d1 : ".$u_d1. "\r\n") ;
    901    fwrite($fo,"u_d2 : ".$u_d2. "\r\n") ;
    902    fwrite($fo,str_from_var3($LCAS_users). "\r\n") ;
    903    fwrite($fo,"user_found : ".$user_found. "\r\n") ;
    904    fwrite($fo,"username : ".$username. "\r\n") ;
    905    fwrite($fo,"rule : ".$rule. "\r\n") ;
    906    fclose($fo) ;
    907902
    908903    return isset($username) ? $username : '';
     
    933928}
    934929
     930
    935931// DebugLog function
    936932function DebugLog($var1, $var2, $var3, $var4, $var5)
Note: See TracChangeset for help on using the changeset viewer.