Changeset 12551 for extensions/UserAdvManager
- Timestamp:
- Nov 5, 2011, 3:48:21 PM (12 years ago)
- Location:
- extensions/UserAdvManager/branches/2.30
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/UserAdvManager/branches/2.30/admin/UAM_admin.php
r12276 r12551 269 269 $Backup_File = UAM_PATH.'/include/backup/UAM_dbbackup.sql'; 270 270 271 if (file_exists($Backup_File)) 272 { 273 $restore = UAM_Restore_backup_file(); 274 if(empty($restore)) 271 if (file_exists($Backup_File) and $file = file($Backup_File, FILE_IGNORE_NEW_LINES) and !empty($file)) 272 { 273 // Check backup file version 274 // ------------------------- 275 if ($file[0] == "-- ".$version." --") 275 276 { 276 array_push($page['infos'], l10n('UAM_Restoration_OK')); 277 $restore = UAM_Restore_backup_file(); 278 if(empty($restore)) 279 { 280 array_push($page['infos'], l10n('UAM_Restoration_OK')); 281 } 282 else 283 { 284 array_push($page['errors'], l10n('UAM_Restoration_NOK')); 285 } 277 286 } 278 else 279 { 280 array_push($page['errors'], l10n('UAM_Restoration_NOK')); 281 } 287 else array_push($page['errors'], l10n('UAM_Bad_version_backup')); 282 288 } 283 289 else -
extensions/UserAdvManager/branches/2.30/changelog.txt.php
r12281 r12551 261 261 -- 2.20.11 : Bug 2336 fixed - New feature : Add [Kdays] autotext flag to insert the number of days until expiration. 262 262 263 -- 2.30.0 : 264 Piwigo 2.3.0 compliant 263 ************************************************************** 264 ***** Plugin history (branch 2.30 - Piwigo 2.3 compliant)***** 265 ************************************************************** 266 -- 2.30.0 : Piwigo 2.3.0 compliant 265 267 Bug 2415 fixed - New feature : Set automatically privacy level for users who have validated or not their registration. Automated task available. 266 268 Bug 2437 fixed - New feature : Request password renewal for selected users in Piwigo's users management panel. … … 269 271 Bug 2450 fixed - New feature : Backup file restoration. 270 272 Help files remaned and relocated in the language root directory (no more "help" subdirectory) for compliance with the new online translation tool. 273 274 -- 2.30.1 : Bug 2455 fixed - Exclusion of specific users (généric and admins users) for password reset function. 275 Bug 2451 fixed - Unable to handle Sql errors but control of backup file validity have been enforced. 271 276 */ 272 277 ?> -
extensions/UserAdvManager/branches/2.30/include/functions.inc.php
r12276 r12551 399 399 // ----------------------------------------------------- 400 400 if ((isset($conf_UAM[20]) and $conf_UAM[20] == 'true')) 401 { 401 { 402 402 $query =' 403 403 SELECT user_id, status … … 426 426 $data = pwg_db_fetch_assoc(pwg_query($query)); 427 427 428 if ($data['status'] <> " admin" and $data['status'] <> "webmaster" and $data['status'] <> "generic") // Exclusion of specific accounts428 if ($data['status'] <> "webmaster" and $data['status'] <> "generic") // Exclusion of specific accounts 429 429 { 430 430 if (UAM_check_pwgreset($user['id'])) … … 2800 2800 { 2801 2801 global $conf; 2802 2802 2803 $plugin = PluginInfos(UAM_PATH); 2804 $version = $plugin['version']; 2805 2803 2806 // Initial backup folder creation and file initialisation 2804 2807 // ------------------------------------------------------ … … 2810 2813 $fp = fopen($Backup_File, 'w'); 2811 2814 2815 // Writing plugin version 2816 $insertions = "-- ".$version." --\n\n"; 2817 fwrite($fp, $insertions); 2812 2818 2813 2819 // Saving UAM specific tables -
extensions/UserAdvManager/branches/2.30/language/en_UK/help.lang.php
r12276 r12551 330 330 - Password renewed: The password has been renewed after a request.<br> 331 331 - Original Password: The original password chosen at account creation and has never been required for a renewal.<br> 332 The webmaster, administratorsand guest accounts are excluded from this function.<br>332 Webmaster, generic and guest accounts are excluded from this function.<br> 333 333 These users will be automatically redirected to their customization page at each of their connections until they changed their password and an explicit message will be displayed on this page.'; 334 334 $lang['UAM_DumpTitle'] = 'Backup and restore your configuration'; -
extensions/UserAdvManager/branches/2.30/language/en_UK/plugin.lang.php
r12278 r12551 76 76 /* Action button names */ 77 77 $lang['UAM_audit'] = 'Audit settings'; 78 $lang['UAM_submit'] = 'Save settings';79 78 // --------- End: New or revised $lang ---- from version 2.12.0 and 2.12.1 80 79 … … 400 399 $lang['UAM_Restoration_OK'] = 'Restoring your configuration completed successfully! Please reload UAM\'s administration page to view the restored settings.'; 401 400 // --------- End: New or revised $lang ---- from version 2.30.0 401 402 403 // --------- Starting below: New or revised $lang ---- from version 2.30.1 404 $lang['UAM_submit'] = 'Submit settings'; 405 $lang['UAM_Generic cannot be pwdreset'] = 'Password renewal can\'t be set for generic accounts!'; 406 $lang['UAM_Admins cannot be pwdreset'] = 'Password renewal can\'t be set for admins account!'; 407 $lang['UAM_Bad_version_backup'] = 'The version of the backup file does not match the version of the plugin! The restoration was not performed.'; 408 // --------- End: New or revised $lang ---- from version 2.30.1 402 409 ?> -
extensions/UserAdvManager/branches/2.30/language/fr_FR/help.lang.php
r12276 r12551 326 326 - Mot de passe modifié : Le mot de passe a été changé suite à une demande.<br> 327 327 - Mot de passe original : Le mot de passe est celui choisi à la création du compte et n\'a jamais fait l\'objet d\'une demande de changement.<br> 328 Le compte du webmaster, des administrateurs et de l\'invité(Guest) sont exclus de cette fonction.<br><br>328 Le compte webmaster, génériques et invités (Guest) sont exclus de cette fonction.<br><br> 329 329 Ces utilisateurs seront alors systématiquement redirigés vers leur page de personnalisation à chacune de leurs connexions tant qu\'ils n\'auront pas modifié leur mot de passe. Un message explicite sera affiché sur cette page.'; 330 330 $lang['UAM_DumpTitle'] = 'Sauvegarde et restauration de votre configuration'; -
extensions/UserAdvManager/branches/2.30/language/fr_FR/plugin.lang.php
r12278 r12551 76 76 /* Action button names */ 77 77 $lang['UAM_audit'] = 'Auditer les paramètres'; 78 $lang['UAM_submit'] = 'Sauvegarder les paramètres';79 78 // --------- End: New or revised $lang ---- from version 2.12.0 and 2.12.1 80 79 … … 397 396 $lang['UAM_Restoration_OK'] = 'La restauration de votre configuration s\'est terminée avec succès ! Veuillez recharger la page d\'administration de UAM pour voir les paramètres restaurés.'; 398 397 // --------- End: New or revised $lang ---- from version 2.30.0 398 399 400 // --------- Starting below: New or revised $lang ---- from version 2.30.1 401 $lang['UAM_submit'] = 'Enregistrer les paramètres'; 402 $lang['UAM_Generic cannot be pwdreset'] = 'Le renouvellement de mot de passe ne peut pas être demandé pour un compte générique !'; 403 $lang['UAM_Admins cannot be pwdreset'] = 'Le renouvellement de mot de passe ne peut pas être demandé pour un compte d\'administrateur !'; 404 $lang['UAM_Bad_version_backup'] = 'La version du fichier de sauvegarde ne correspond pas à la version du plugin ! La restauration n\'a pas été réalisée.'; 405 // --------- End: New or revised $lang ---- from version 2.30.1 399 406 ?> -
extensions/UserAdvManager/branches/2.30/main.inc.php
r12272 r12551 2 2 /* 3 3 Plugin Name: UserAdvManager 4 Version: 2.30. 04 Version: 2.30.1 5 5 Description: Renforcer la gestion des utilisateurs - Enforce users management 6 6 Plugin URI: http://piwigo.org/ext/extension_view.php?eid=216 … … 150 150 } 151 151 152 // Generic accounts exclusion (including Adult_Content generic users) 153 // ------------------------------------------------------------------ 154 $query =' 155 SELECT u.id 156 FROM '.USERS_TABLE.' AS u 157 INNER JOIN '.USER_INFOS_TABLE.' AS ui 158 ON u.id = ui.user_id 159 WHERE ui.status = "generic" 160 ;'; 161 162 $result = pwg_query($query); 163 164 while ($row = pwg_db_fetch_assoc($result)) 165 { 166 if (in_array($row['id'], $collection)) 167 { 168 array_push($page['errors'], l10n('UAM_Generic cannot be pwdreset')); 169 $errors = l10n('UAM_Generic cannot be pwdreset'); 170 } 171 } 172 173 // Admins accounts exclusion 174 // -------------------------- 175 $query =' 176 SELECT u.id 177 FROM '.USERS_TABLE.' AS u 178 INNER JOIN '.USER_INFOS_TABLE.' AS ui 179 ON u.id = ui.user_id 180 WHERE ui.status = "admin" 181 ;'; 182 183 $result = pwg_query($query); 184 185 while ($row = pwg_db_fetch_assoc($result)) 186 { 187 if (in_array($row['id'], $collection)) 188 { 189 array_push($page['errors'], l10n('UAM_Admins cannot be pwdreset')); 190 $errors = l10n('UAM_Admins cannot be pwdreset'); 191 } 192 } 193 194 $template->append('errors', $errors); 195 152 196 if (count($page['errors']) == 0) 153 { 197 { 154 198 if (isset($_POST['confirm_pwdreset']) and 1 == $_POST['confirm_pwdreset']) 155 199 { … … 182 226 } 183 227 } 184 } 228 } 185 229 $template->set_prefilter('user_list', 'UAM_PwdReset_Prefilter'); 186 230 }
Note: See TracChangeset
for help on using the changeset viewer.