Changeset 12271 for extensions/UserAdvManager/trunk/maintain.inc.php
- Timestamp:
- Sep 30, 2011, 1:50:32 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/UserAdvManager/trunk/maintain.inc.php
r12247 r12271 9 9 include_once (UAM_PATH.'include/functions.inc.php'); 10 10 11 load_language('plugin.lang', UAM_PATH); 12 11 13 12 14 function plugin_install() … … 18 20 /* ****************************************************************** */ 19 21 22 $defaultUAM = array(); 23 $defaultConfirmMail = array(); 24 20 25 // Default global parameters for UserAdvManager conf 21 $default1 = array('false','false',-1,-1,-1,'false','',-1,'','','false','','false',100,'false','false',10,'Hello [username]. 22 23 This is a reminder because a very long time passed since your last visit on our gallery [mygallery]. If you do not want anymore to use your access account, please let us know by replying to this email. Your account will be deleted. 24 25 On receipt of this message and no new visit within 15 days, we would be obliged to automatically delete your account. 26 27 Best regards, 28 29 The 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'); 30 26 // ------------------------------------------------- 27 $defaultUAM[0] = 'false'; // UAM_MAIL_INFO_TRUE/FALSE 28 $defaultUAM[1] = 'false'; // UAM_CONFIRM_MAIL_TRUE/FALSE 29 $defaultUAM[2] = '-1'; // UAM_No_Confirm_Group 30 $defaultUAM[3] = '-1'; // UAM_Validated_Group 31 $defaultUAM[4] = '-1'; // UAM_Validated_Status 32 $defaultUAM[5] = 'false'; // UAM_USERNAME_CHAR_TRUE 33 $defaultUAM[6] = ''; // UAM_USERNAME_CHAR_LIST 34 $defaultUAM[7] = '-1'; // UAM_No_Confirm_Status 35 $defaultUAM[8] = l10n('UAM_Default_InfoMail_Txt'); // UAM_MAILINFO_TEXT 36 $defaultUAM[9] = l10n('UAM_Default_ConfirmMail_Txt'); // UAM_CONFIRMMAIL_TEXT 37 $defaultUAM[10] = 'false'; // UAM_MAILEXCLUSION_TRUE/FALSE 38 $defaultUAM[11] = ''; // UAM_MAILEXCLUSION_LIST 39 $defaultUAM[12] = 'false'; // UAM_PASSWORDENF_TRUE/FALSE 40 $defaultUAM[13] = '100'; // UAM_PASSWORD_SCORE 41 $defaultUAM[14] = 'false'; // UAM_ADMINPASSWENF_TRUE/FALSE 42 $defaultUAM[15] = 'false'; // UAM_GHOSTRACKER_TRUE/FALSE 43 $defaultUAM[16] = '10'; // UAM_GHOSTRACKER_DAYLIMIT 44 $defaultUAM[17] = l10n('UAM_Default_GhstReminder_Txt'); // UAM_GHOSTRACKER_REMINDERTEXT 45 $defaultUAM[18] = 'false'; // UAM_ADDLASTVISIT_TRUE/FALSE 46 $defaultUAM[19] = 'false'; // UAM_ADMINCONFMAIL_TRUE/FALSE 47 $defaultUAM[20] = 'false'; // UAM_REDIRTOPROFILE_TRUE/FALSE 48 $defaultUAM[21] = 'false'; // UAM_GTAUTO_TRUE/FALSE 49 $defaultUAM[22] = 'false'; // UAM_GTAUTOMAIL_TRUE/FALSE 50 $defaultUAM[23] = l10n('UAM_Default_GhstDeletion_Txt'); // UAM_GTAUTODEL_TEXT 51 $defaultUAM[24] = l10n('UAM_Default_GhstDemotion_Txt'); // UAM_GTAUTOMAILTEXT 52 $defaultUAM[25] = '-1'; // UAM_Downgrade_Group 53 $defaultUAM[26] = '-1'; // UAM_Downgrade_Status 54 $defaultUAM[27] = l10n('UAM_Default_AdminValidation_Txt'); // UAM_ADMINVALIDATIONMAIL_TEXT 55 $defaultUAM[28] = 'false'; // UAM_CUSTOMPASSWRETR_TRUE/FALSE 56 $defaultUAM[29] = l10n('UAM_Default_PwdRequest_Txt'); // UAM_CUSTOMPASSWRETR_TEXT 57 $defaultUAM[30] = 'false'; // UAM_USRAUTO_TRUE/FALSE 58 $defaultUAM[31] = l10n('UAM_Default_ValidationTimeout_Txt');// UAM_USRAUTODEL_TEXT 59 $defaultUAM[32] = 'false'; // UAM_USRAUTOMAIL_TRUE/FALSE 60 $defaultUAM[33] = 'false'; // UAM_STUFFS_TRUE/FALSE 61 $defaultUAM[34] = 'false'; // UAM_HIDEPASSW_TRUE/FALSE 62 $defaultUAM[35] = '-1'; // UAM_NO_VALID_LEVEL 63 $defaultUAM[36] = '-1'; // UAM_VALID_LEVEL 64 $defaultUAM[37] = '-1'; // UAM_DOWNGRADE_LEVEL 65 $defaultUAM[38] = 'false'; // UAM_PWDRESET_TRUE/FALSE 66 31 67 // Default specific parameters for UserAdvManager ConfirmMail conf 32 $default2 = array('false',5,'Hello [username]. 33 34 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. 35 36 Note: After this period, your account will be permanently deleted.','false','Hello [username]. 37 38 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. 39 40 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.'); 41 68 // --------------------------------------------------------------- 69 $defaultConfirmMail[0] = 'false'; // UAM_CONFIRMMAIL_TIMEOUT_TRUE/FALSE 70 $defaultConfirmMail[1] = '5'; // UAM_CONFIRMMAIL_DELAY 71 $defaultConfirmMail[2] = l10n('UAM_Default_CfmMail_Remail_Txt1'); // UAM_CONFIRMMAIL_REMAIL_TXT1 72 $defaultConfirmMail[3] = 'false'; // UAM_CONFIRMMAIL_REMAIL_TRUE/FALSE 73 $defaultConfirmMail[4] = l10n('UAM_Default_CfmMail_Remail_Txt2'); // UAM_CONFIRMMAIL_REMAIL_TXT2 74 $defaultConfirmMail[5] = l10n('UAM_Default_CfmMail_Custom_Txt1'); // UAM_CONFIRMMAIL_CUSTOM_TXT1 75 $defaultConfirmMail[6] = l10n('UAM_Default_CfmMail_Custom_Txt2'); // UAM_CONFIRMMAIL_CUSTOM_TXT2 76 42 77 // Set current plugin version in config table 78 // ------------------------------------------ 43 79 $plugin = PluginInfos(UAM_PATH); 44 80 $version = $plugin['version']; … … 54 90 55 91 // Create UserAdvManager conf if not already exists 92 // ------------------------------------------------ 56 93 $query = ' 57 94 SELECT param … … 65 102 $q = ' 66 103 INSERT INTO '.CONFIG_TABLE.' (param, value, comment) 67 VALUES ("UserAdvManager","'.pwg_db_real_escape_string(serialize($default 1)).'","UAM parameters")104 VALUES ("UserAdvManager","'.pwg_db_real_escape_string(serialize($defaultUAM)).'","UAM parameters") 68 105 ;'; 69 106 pwg_query($q); … … 71 108 72 109 // Create UserAdvManager_ConfirmMail conf if not already exists 110 // ------------------------------------------------------------ 73 111 $query = ' 74 112 SELECT param … … 82 120 $q = ' 83 121 INSERT INTO '.CONFIG_TABLE.' (param, value, comment) 84 VALUES ("UserAdvManager_ConfirmMail","'.pwg_db_real_escape_string(serialize($default 2)).'","UAM ConfirmMail parameters")122 VALUES ("UserAdvManager_ConfirmMail","'.pwg_db_real_escape_string(serialize($defaultConfirmMail)).'","UAM ConfirmMail parameters") 85 123 ;'; 86 124 pwg_query($q); … … 88 126 89 127 // Create UserAdvManager_Redir conf if not already exists 128 // ------------------------------------------------------ 90 129 $query = ' 91 130 SELECT param … … 105 144 106 145 // Create UserAdvManager_Version conf if not already exists 146 // -------------------------------------------------------- 107 147 $query = ' 108 148 SELECT param … … 122 162 123 163 // Create USER_CONFIRM_MAIL_TABLE 164 // ------------------------------ 124 165 $q = " 125 166 CREATE TABLE IF NOT EXISTS ".USER_CONFIRM_MAIL_TABLE." ( … … 136 177 137 178 // Create USER_LASTVISIT_TABLE 179 // --------------------------- 138 180 $q = " 139 181 CREATE TABLE IF NOT EXISTS ".USER_LASTVISIT_TABLE." ( … … 147 189 148 190 // Piwigo's native tables modifications for password reset function - Add pwdreset column if not already exists 191 // ------------------------------------------------------------------------------------------------------------ 149 192 $query = ' 150 193 SHOW COLUMNS FROM '.USERS_TABLE.' … … 277 320 278 321 /* Check database upgrade since version 2.16.0 */ 322 /* ******************************************* */ 279 323 if (isset($conf['UserAdvManager_Version'])) 280 324 { … … 316 360 317 361 // Update plugin version number in #_config table and check consistency of #_plugins table 362 // --------------------------------------------------------------------------------------- 318 363 UAM_version_update(); 319 364
Note: See TracChangeset
for help on using the changeset viewer.