Ignore:
Timestamp:
Sep 27, 2011, 9:28:27 PM (13 years ago)
Author:
Eric
Message:
  • Fix database upgrade error
  • Improve code documentation
  • Version 2.30.0 hard coded
Location:
extensions/UserAdvManager/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • extensions/UserAdvManager/trunk/include/upgradedb.inc.php

    r12239 r12247  
    522522
    523523  // Piwigo's native tables modifications for password reset function - Add pwdreset column
    524   $q = '
     524  $query = '
     525SHOW COLUMNS FROM '.USERS_TABLE.'
     526LIKE "UAM_pwdreset"
     527;';
     528 
     529  $result = pwg_query($query);
     530
     531  if(!pwg_db_fetch_row($result))
     532  {
     533    $q = '
    525534ALTER TABLE '.USERS_TABLE.'
    526535ADD UAM_pwdreset enum("true","false")
    527536;';
    528   pwg_query($q);
     537    pwg_query($q);
     538  }
    529539}
    530540?>
  • extensions/UserAdvManager/trunk/main.inc.php

    r12239 r12247  
    22/*
    33Plugin Name: UserAdvManager
    4 Version: 2.30.0RC1
     4Version: 2.30.0
    55Description: Renforcer la gestion des utilisateurs - Enforce users management
    66Plugin URI: http://piwigo.org/ext/extension_view.php?eid=216
  • extensions/UserAdvManager/trunk/maintain.inc.php

    r12239 r12247  
    1313{
    1414        global $conf;
    15        
     15
     16/* ****************************************************************** */
     17/* **************** BEGIN - Data preparation in vars **************** */
     18/* ****************************************************************** */
     19
     20  // Default global parameters for UserAdvManager conf
    1621  $default1 = array('false','false',-1,-1,-1,'false','',-1,'','','false','','false',100,'false','false',10,'Hello [username].
    1722       
     
    2429The admin of the gallery.','false','false','false','false','false','Sorry [username], your account has been deleted due to a too long time passed since your last visit at [mygallery].','Sorry [username], your account has been deprecated due to a too long time passed since your last visit at [mygallery]. Please, use the following link to revalidate your account.',-1,-1,'Thank you for registering at [mygallery]. Your account has been manually validated by _admin_. You may now log in at _link_to_site_ and make any appropriate changes to your profile. Welcome to _name_of_site_!','false','You have requested a password reset on our gallery. Please, find below your new connection settings.','false','Sorry, your account has been deleted because you have not validated your registration in requested time. Please, try registration with a valid and non blocked email account.','false','false','false',-1,-1,-1,'false');
    2530
     31  // Default specific parameters for UserAdvManager ConfirmMail conf
     32  $default2 = array('false',5,'Hello [username].
     33               
     34This is a reminder message because you registered on our gallery [mygallery] but you do not validate your registration and your validation key has expired. To still allow you to access to our gallery, your validation period has been reset. You have again 5 days to validate your registration.
     35
     36Note: After this period, your account will be permanently deleted.','false','Hello [username].
     37
     38This is a reminder message because you registered on our gallery [mygallery] but you do not validate your registration and your validation key will expire. To allow you access to our gallery, you have 2 days to confirm your registration by clicking on the link in the message you should have received when you registered.
     39
     40Note: After this period, your account will be permanently deleted.','You have confirmed that you are human and may now use [mygallery]! Welcome [username]!','Your activation key is incorrect or expired or you have already validated your account, please contact the webmaster to fix this problem.');
     41
     42  // Set current plugin version in config table
     43  $plugin =  PluginInfos(UAM_PATH);
     44  $version = $plugin['version'];
     45
     46/* **************************************************************** */
     47/* **************** END - Data preparation in vars **************** */
     48/* **************************************************************** */
     49
     50
     51/* ***************************************************************************** */
     52/* **************** BEGIN - Database actions and initialization **************** */
     53/* ***************************************************************************** */
     54
     55  // Create UserAdvManager conf if not already exists
    2656        $query = '
    2757SELECT param
     
    4070  }
    4171
    42 
    43   $default2 = array('false',5,'Hello [username].
    44                
    45 This is a reminder message because you registered on our gallery [mygallery] but you do not validate your registration and your validation key has expired. To still allow you to access to our gallery, your validation period has been reset. You have again 5 days to validate your registration.
    46 
    47 Note: After this period, your account will be permanently deleted.','false','Hello [username].
    48 
    49 This is a reminder message because you registered on our gallery [mygallery] but you do not validate your registration and your validation key will expire. To allow you access to our gallery, you have 2 days to confirm your registration by clicking on the link in the message you should have received when you registered.
    50 
    51 Note: After this period, your account will be permanently deleted.','You have confirmed that you are human and may now use [mygallery]! Welcome [username]!','Your activation key is incorrect or expired or you have already validated your account, please contact the webmaster to fix this problem.');
    52 
     72  // Create UserAdvManager_ConfirmMail conf if not already exists
    5373        $query = '
    5474SELECT param
     
    6787  }
    6888
     89  // Create UserAdvManager_Redir conf if not already exists
    6990        $query = '
    7091SELECT param
     
    83104  }
    84105
    85 // Set current plugin version in config table
    86   $plugin =  PluginInfos(UAM_PATH);
    87   $version = $plugin['version'];
    88 
     106  // Create UserAdvManager_Version conf if not already exists
    89107        $query = '
    90108SELECT param
     
    103121  }
    104122
    105 
     123  // Create USER_CONFIRM_MAIL_TABLE
    106124        $q = "
    107125CREATE TABLE IF NOT EXISTS ".USER_CONFIRM_MAIL_TABLE." (
     
    117135  pwg_query($q);
    118136
     137  // Create USER_LASTVISIT_TABLE
    119138        $q = "
    120139CREATE TABLE IF NOT EXISTS ".USER_LASTVISIT_TABLE." (
     
    127146  pwg_query($q);
    128147
    129   // Piwigo's native tables modifications for password reset function - Add pwdreset column
     148  // Piwigo's native tables modifications for password reset function - Add pwdreset column if not already exists
    130149  $query = '
    131150SHOW COLUMNS FROM '.USERS_TABLE.'
     
    143162    pwg_query($q);
    144163  }
     164
     165/* *************************************************************************** */
     166/* **************** END - Database actions and initialization **************** */
     167/* *************************************************************************** */
    145168}
    146169
Note: See TracChangeset for help on using the changeset viewer.