Changeset 10145


Ignore:
Timestamp:
04/07/11 22:53:21 (9 years ago)
Author:
Eric
Message:

r10144 merged from trunk to branch 2.20

Location:
extensions/UserAdvManager/branches/2.20
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • extensions/UserAdvManager/branches/2.20/admin/template/ghosttracker.tpl

    r9925 r10145  
    11{combine_script id='jquery' path='themes/default/js/jquery.min.js'} 
    2 {combine_script id='jquery.cluetip' require='jquery' path='themes/default/js/plugins/jquery.cluetip.packed.js'} 
     2{combine_script id='jquery.cluetip' require='jquery' path='themes/default/js/plugins/jquery.cluetip.js'} 
    33{combine_script id='jquery.tablesorter' require='jquery' path=$UAM_PATH|@cat:'admin/template/js/jquery.tablesorter.min.js'} 
    44{combine_script id='jquery.tablesorter.pager' require='jquery' path=$UAM_PATH|@cat:'admin/template/js/jquery.tablesorter.pager.js'} 
  • extensions/UserAdvManager/branches/2.20/admin/template/global.tpl

    r9925 r10145  
    11{combine_script id='jquery' path='themes/default/js/jquery.min.js'} 
    2 {combine_script id='jquery.cluetip' require='jquery' path='themes/default/js/plugins/jquery.cluetip.packed.js'} 
     2{combine_script id='jquery.cluetip' require='jquery' path='themes/default/js/plugins/jquery.cluetip.js'} 
    33 
    44{combine_css path= $UAM_PATH|@cat:'admin/template/uam.css'} 
     
    3535  if (typeof(headerId)=='string') 
    3636  {ldelim} 
    37    if ( headerId.length> 1) 
     37   if (headerId.length > 1) 
    3838       blockToggleDisplay(headerId, contentId) ; 
    3939      document.getElementById("nb_para").value =headerId ; 
  • extensions/UserAdvManager/branches/2.20/admin/template/uam.css

    r8065 r10145  
    2828} 
    2929 
    30 legend.cluetip 
    31 { 
    32   font-weight:bold; 
    33 } 
    34  
     30/* Bloc expand-collapse instructions */ 
    3531.instructionBlock 
    3632{ 
     
    4036} 
    4137 
    42 /* Bloc expand-collapse instructions */ 
    4338.instructionBlockHeaderCollapsed, .instructionBlockHeaderExpanded 
    4439{ 
  • extensions/UserAdvManager/branches/2.20/admin/template/userlist.tpl

    r9925 r10145  
    11{combine_script id='jquery' path='themes/default/js/jquery.min.js'} 
    2 {combine_script id='jquery.cluetip' require='jquery' path='themes/default/js/plugins/jquery.cluetip.packed.js'} 
     2{combine_script id='jquery.cluetip' require='jquery' path='themes/default/js/plugins/jquery.cluetip.js'} 
    33{combine_script id='jquery.tablesorter' require='jquery' path=$UAM_PATH|@cat:'admin/template/js/jquery.tablesorter.min.js'} 
    44{combine_script id='jquery.tablesorter.pager' require='jquery' path=$UAM_PATH|@cat:'admin/template/js/jquery.tablesorter.pager.js'} 
  • extensions/UserAdvManager/branches/2.20/admin/template/usermanager.tpl

    r9925 r10145  
    11{combine_script id='jquery' path='themes/default/js/jquery.min.js'} 
    2 {combine_script id='jquery.cluetip' require='jquery' path='themes/default/js/plugins/jquery.cluetip.packed.js'} 
     2{combine_script id='jquery.cluetip' require='jquery' path='themes/default/js/plugins/jquery.cluetip.js'} 
    33{combine_script id='jquery.tablesorter' require='jquery' path=$UAM_PATH|@cat:'admin/template/js/jquery.tablesorter.min.js'} 
    44{combine_script id='jquery.tablesorter.pager' require='jquery' path=$UAM_PATH|@cat:'admin/template/js/jquery.tablesorter.pager.js'} 
  • extensions/UserAdvManager/branches/2.20/changelog.txt.php

    r9909 r10145  
    234234            Bug 2203 fixed - [username] special flag is not supported in lost password email customization 
    235235 
     236-- 2.20.1 : Bug 2254 fixed - Plugin installation crashes when installing from scratch 
     237            Bug 2255 fixed - Error in jQuery path 
     238 
    236239*/ 
    237240?> 
  • extensions/UserAdvManager/branches/2.20/include/functions.inc.php

    r9909 r10145  
    22include_once (UAM_PATH.'include/constants.php'); 
    33load_language('plugin.lang', UAM_PATH); 
     4 
    45 
    56/** 
     
    2526  return $menu; 
    2627} 
     28 
    2729 
    2830/** 
     
    7880} 
    7981 
     82 
    8083/** 
    8184 * Triggered on register_user 
     
    132135} 
    133136 
     137 
    134138/** 
    135139 * Triggered on delete_user 
     
    146150  DeleteRedir($user_id); 
    147151} 
     152 
    148153 
    149154/** 
     
    208213  } 
    209214} 
     215 
    210216 
    211217/** 
     
    309315} 
    310316 
     317 
    311318/** 
    312319 * Triggered on login_success 
     
    548555} 
    549556 
     557 
    550558/** 
    551559 * Triggered on UAM_LoginTasks() 
     
    768776  return $comment_action; 
    769777} 
     778 
    770779 
    771780/** 
     
    916925  )); 
    917926 
    918 // ********************** 
    919 // Email sending debugger 
    920 // This is only to trace  
    921 // the send of emails for 
    922 // debugging              
    923 // ********************** 
    924 //$content = (isset($infos1) ? $infos1_perso.l10n_args($infos1)."\n\n" : "").(isset($infos2) ? $infos2_perso.l10n_args($infos2)."\n\n" : "").get_absolute_root_url();    
    925 //MailLog($email,$subject,$content,$language); 
    926 // ********************** 
    927  
    928927// Switching back to default language 
    929928switch_lang_back(); 
    930929} 
     930 
    931931 
    932932/** 
     
    10341034  )); 
    10351035 
    1036 // ********************** 
    1037 // Email sending debugger 
    1038 // This is only to trace  
    1039 // the send of emails for 
    1040 // debugging              
    1041 // ********************** 
    1042 //$content = ($infos1."\n\n").(isset($infos2) ? l10n_args($infos2)."\n\n" : "").get_absolute_root_url(); 
    1043 //MailLog($email,$subject,$content,$language); 
    1044 // ********************** 
    1045  
    10461036// Switching back to default language 
    10471037switch_lang_back(); 
    10481038} 
     1039 
    10491040 
    10501041/** 
     
    11071098  )); 
    11081099 
    1109 // ********************** 
    1110 // Email sending debugger 
    1111 // This is only to trace  
    1112 // the send of emails for 
    1113 // debugging              
    1114 // ********************** 
    1115 //$content = $infos1.get_absolute_root_url();   
    1116 //MailLog($email,$subject,$content,$language); 
    1117 // ********************** 
    1118  
    11191100// Switching back to default language 
    11201101switch_lang_back(); 
    11211102} 
     1103 
    11221104 
    11231105/** 
     
    11991181  )); 
    12001182 
    1201 // ********************** 
    1202 // Email sending debugger 
    1203 // This is only to trace  
    1204 // the send of emails for 
    1205 // debugging              
    1206 // ********************** 
    1207 //$content = ($custom_txt.l10n_args($infos1)."\n\n".l10n_args($infos2)."\n\n").get_absolute_root_url();    
    1208 //MailLog($email,$subject,$content,$language); 
    1209 // ********************** 
    1210  
    12111183// Switching back to default language 
    12121184switch_lang_back(); 
    12131185} 
     1186 
    12141187 
    12151188/** 
     
    12911264  )); 
    12921265 
    1293 // ********************** 
    1294 // Email sending debugger 
    1295 // This is only to trace  
    1296 // the send of emails for 
    1297 // debugging              
    1298 // ********************** 
    1299 //$email = $result['mail_address']; 
    1300 //$content = (l10n_args($infos)."\n\n".$custom_txt);    
    1301 //MailLog($email,$subject,$content,$language); 
    1302 // ********************** 
    1303  
    13041266// Switching back to default language 
    13051267switch_lang_back(); 
    13061268} 
     1269 
    13071270 
    13081271/** 
     
    13281291  } 
    13291292} 
     1293 
    13301294 
    13311295/** 
     
    14021366} 
    14031367 
     1368 
    14041369/** 
    14051370 * Function called from main.inc.php to set group to new users if manual validation is set 
     
    14481413} 
    14491414 
     1415 
    14501416/** 
    14511417 * Function called from UAM_admin.php to reset validation key 
     
    14841450} 
    14851451 
     1452 
    14861453/** 
    14871454 * Function called from functions.inc.php to reset last visit date after sending a reminder 
     
    15301497  pwg_query($query); 
    15311498} 
     1499 
    15321500 
    15331501/** 
     
    15601528  pwg_query($query); 
    15611529} 
     1530 
    15621531 
    15631532/** 
     
    17371706} 
    17381707 
     1708 
    17391709/** 
    17401710 * Function called from UAM_admin.php to force users validation by admin 
     
    18421812} 
    18431813 
     1814 
    18441815/** 
    18451816 * Function called from main.inc.php - Check if username matches forbidden caracters 
     
    18731844  } 
    18741845} 
     1846 
    18751847 
    18761848/** 
     
    19061878  } 
    19071879} 
     1880 
    19081881 
    19091882/** 
     
    20021975} 
    20031976 
     1977 
    20041978/** 
    20051979 * Function called from functions.inc.php - Get all users who haven't validate their registration in configured time 
     
    20382012        return $users; 
    20392013} 
     2014 
    20402015 
    20412016/** 
     
    21672142} 
    21682143 
     2144 
    21692145/** 
    21702146 * Function called from UAM_admin.php - to determine who is expired or not and giving a different display color 
     
    22992275} 
    23002276 
     2277 
    23012278/** 
    23022279 * Function called from maintain.inc.php - to check if database upgrade is needed 
     
    23132290} 
    23142291 
    2315 // Email sending debugger function 
    2316 function MailLog($to, $subject, $content, $language) 
    2317 { 
    2318    $fo=fopen (UAM_PATH.'admin/maillog.txt','a') ; 
    2319    fwrite($fo,"======================\n") ; 
    2320    fwrite($fo,'le ' . date('D, d M Y H:i:s') . "\r\n"); 
    2321    fwrite($fo,$to . "\n" . $subject . "\r\n") ; 
    2322    fwrite($fo, "\n" . $content . "\r\n") ; 
    2323    fwrite($fo, 'Langue : '."\n" . $language . "\r\n") ; 
    2324    fclose($fo) ; 
    2325    //return mail ($to,$subject) ; 
    2326 } 
    23272292 
    23282293/** 
     
    23792344 
    23802345 
     2346/** 
     2347 * Delete obsolete files on plugin upgrade 
     2348 * Obsolete files are listed in file obsolete.list 
     2349 * 
     2350 */ 
    23812351function clean_obsolete_files() 
    23822352{ 
     
    23972367} 
    23982368 
     2369 
    23992370/** 
    24002371 * UAM_check_profile - Thx to LucMorizur 
     
    24292400  return $v; 
    24302401} 
     2402 
     2403 
     2404/** 
     2405 * Useful for debugging - 4 vars can be set 
     2406 * Output result to log.txt file 
     2407 * 
     2408 */ 
     2409function UAMLog($var1, $var2, $var3, $var4) 
     2410{ 
     2411   $fo=fopen (UAM_PATH.'log.txt','a') ; 
     2412   fwrite($fo,"======================\n") ; 
     2413   fwrite($fo,'le ' . date('D, d M Y H:i:s') . "\r\n"); 
     2414   fwrite($fo,$var1 ."\r\n") ; 
     2415   fwrite($fo,$var2 ."\r\n") ; 
     2416   fwrite($fo,$var3 ."\r\n") ; 
     2417   fwrite($fo,$var4 ."\r\n") ; 
     2418   fclose($fo) ; 
     2419} 
    24312420?> 
  • extensions/UserAdvManager/branches/2.20/include/upgradedb.inc.php

    r9909 r10145  
    1919// |       Upgrading database from old plugin versions        | 
    2020// +----------------------------------------------------------+ 
     21 
     22 
     23/* *************************************** */ 
     24/* Update plugin version in conf table     */ 
     25/* Used everytime a new version is updated */ 
     26/* even if no database upgrade is needed   */ 
     27/* *************************************** */ 
     28function UAM_version_update() 
     29 
     30  // Get current plugin version 
     31  $plugin =  PluginInfos(UAM_PATH); 
     32  $version = $plugin['version']; 
     33   
     34  // Update plugin version  
     35  $query = ' 
     36UPDATE '.CONFIG_TABLE.' 
     37SET value="'.$version.'" 
     38WHERE param="UserAdvManager_Version" 
     39LIMIT 1 
     40;'; 
     41 
     42  pwg_query($query); 
     43} 
     44 
    2145 
    2246/* upgrade from branch 2.10 to 2.11 */ 
     
    153177} 
    154178 
     179 
    155180/* upgrade from branch 2.14 to 2.15 */ 
    156181/* ******************************** */ 
     
    202227    upgrade_2153_2154(); 
    203228} 
     229 
    204230 
    205231/* upgrade from 2.15.3 to 2.15.4 */ 
     
    263289} 
    264290 
     291 
    265292/* upgrade from 2.15.x to 2.16.0 */ 
    266293/* ***************************** */ 
     
    316343  global $conf; 
    317344 
    318   $uam_new_version = "2.20.0"; 
    319  
    320345  // Upgrading options 
    321346  $query = ' 
     
    348373        pwg_query($query); 
    349374 
    350   // Update plugin version  
    351   $query = ' 
    352 UPDATE '.CONFIG_TABLE.' 
    353 SET value="'.$uam_new_version.'" 
    354 WHERE param="UserAdvManager_Version" 
    355 LIMIT 1 
    356 ;'; 
    357  
    358   pwg_query($query); 
    359  
    360   // Create new UAM entry in plugins table  
     375  // Create new UAM entry in plugins table 
     376  $uam_new_version = "2.20.0"; 
     377 
    361378  $query = ' 
    362379INSERT INTO '.PLUGINS_TABLE.' (id, state, version) 
  • extensions/UserAdvManager/branches/2.20/main.inc.php

    r10019 r10145  
    22/* 
    33Plugin Name: UserAdvManager 
    4 Version: 2.20.0 
     4Version: 2.20.1 
    55Description: Renforcer la gestion des utilisateurs - Enforce users management 
    66Plugin URI: http://piwigo.org/ext/extension_view.php?eid=216 
  • extensions/UserAdvManager/branches/2.20/maintain.inc.php

    r9909 r10145  
    238238/* Check for upgrade from 2.16 to 2.20 */ 
    239239/* *********************************** */ 
    240         $query = ' 
    241 SELECT value 
    242   FROM '.CONFIG_TABLE.' 
    243 WHERE param = "UserAdvManager_Version" 
    244 ;'; 
    245  
    246   $data = pwg_db_fetch_assoc(pwg_query($query)); 
    247    
    248   if ($data['value'] != '2.20.0') 
     240  if (isset($conf['UserAdvManager_Version']) and $conf['UserAdvManager_Version'] != '2.16.0') 
    249241  { 
    250242    /* upgrade from branch 2.16 to 2.20 */ 
     
    253245  } 
    254246 
    255 load_conf_from_db('param like \'UserAdvManager\\_%\''); 
     247  UAM_version_update(); 
     248 
     249  load_conf_from_db('param like \'UserAdvManager\\_%\''); 
    256250} 
    257251 
Note: See TracChangeset for help on using the changeset viewer.