Changeset 4952


Ignore:
Timestamp:
Feb 23, 2010, 3:18:34 PM (11 years ago)
Author:
Eric
Message:

[NBC_UserAdvManager] Pre-2.13.4

  • Add of obsolete files management
  • Deletion of obsolete file in trunk
  • changelog.txt.php updated
Location:
extensions/NBC_UserAdvManager/trunk
Files:
1 added
1 deleted
6 edited

Legend:

Unmodified
Added
Removed
  • extensions/NBC_UserAdvManager/trunk/admin/global.tpl

    r4951 r4952  
    2828  <div id="config1_header" class="instructionBlockHeaderCollapsed" onclick="nbc_blockToggleDisplay('config1_header', 'Config1')">
    2929    <span class="cluetip" title="{'UAM_restricTitle'|translate}|{'UAM_restricTitle_d'|translate}">{'UserAdvManager_Title1'|@translate}</span>
    30     <!--
    31 <script type="text/javascript">var nu_para = 1</script>
    32 -->
    3330  </div>
    3431
     
    8986  <div id="config2_header" class="instructionBlockHeaderCollapsed" onclick="nbc_blockToggleDisplay('config2_header', 'Config2')">
    9087    <span class="cluetip" title="{'UAM_confirmTitle'|translate}|{'UAM_confirmTitle_d'|translate}">{'UserAdvManager_Title2'|@translate}</span>
    91     <!--
    92 <script type="text/javascript">var nu_para = 2</script>
    93 -->
    9488  </div>
    9589 
     
    227221  <div id="config3_header" class="instructionBlockHeaderCollapsed" onclick="nbc_blockToggleDisplay('config3_header', 'Config3')">
    228222    <span class="cluetip" title="{'UAM_miscTitle'|translate}|{'UAM_miscTitle_d'|translate}">{'UserAdvManager_Title3'|@translate}</span>
    229     <!--
    230 <script type="text/javascript">var nu_para = 3</script>
    231 -->
    232223  </div>
    233224 
  • extensions/NBC_UserAdvManager/trunk/changelog.txt.php

    r4550 r4952  
    122122            Italian language improvement (thx to Rio)
    123123
     124-- 2.13.4 : Add of obsolete files management
     125            Bug 1303 and 1387 fixed - Due to a bug in Piwigo's 2.0.8 switch_lang() function, the email contents using Extended Description tags wasn't taking user's language in account. A frist fix is now set for the current 2.0.8 Piwigo's version and another one is ready to work for the next Piwigo's release.
     126            Bug 1444 fixed
     127            Bug 1445 fixed - The plugin's administration panel have been all reviewed and improved with text simplification and display enhancement.
    124128*/
    125129?>
  • extensions/NBC_UserAdvManager/trunk/include/constants.php

    r4135 r4952  
    33define('USER_CONFIRM_MAIL_TABLE', $prefixeTable.'user_confirm_mail');
    44define('USER_LASTVISIT_TABLE', $prefixeTable.'user_lastvisit_check');
     5define('UAM_OBSOLETE', 'obsolete.list');
    56?>
  • extensions/NBC_UserAdvManager/trunk/include/functions_UserAdvManager.inc.php

    r4927 r4952  
    11531153  return $plugin ;
    11541154}
     1155
     1156/* Funtion called in maintain.inc.php to clean obsolete files */
     1157function clean_obsolete_files($obsolete_file_list)
     1158{
     1159  if (!file_exists(NBC_UAM_PATH.$obsolete_file_list))
     1160  {
     1161    return TRUE;
     1162  }
     1163  $obsolete = file(NBC_UAM_PATH.$obsolete_file_list);
     1164  array_push($obsolete, $obsolete_file_list);
     1165  return clean_obsolete_list($obsolete);
     1166}
     1167
     1168function clean_obsolete_list($file_list = array(), &$errors = array())
     1169{
     1170  if (!function_exists('unlink'))
     1171  {
     1172      // No unlink available...
     1173      array_push($errors, l10n('uam_no_unlink'));
     1174      return FALSE;
     1175  }
     1176  $success = TRUE;
     1177  foreach ($file_list as $file)
     1178  {
     1179    $file = NBC_UAM_PATH . $file;
     1180    if (file_exists($file))
     1181    {
     1182      // Remove obsolete file
     1183      $success &= unlink($file);
     1184    }
     1185  }
     1186  if (!$success)
     1187  {
     1188      array_push($errors, l10n('uam_unlink_errors'));
     1189  }
     1190  return $success;
     1191}
    11551192?>
  • extensions/NBC_UserAdvManager/trunk/language/fr_FR/plugin.lang.php

    r4950 r4952  
    125125
    126126// --------- Starting below: New or revised $lang ---- from version 2.13.4
     127$lang['uam_no_unlink'] = 'La fonction \'unlink\' n\'est pas disponible';
     128$lang['uam_unlink_errors'] = 'Des erreurs ont eu lieu lors de la suppression de fichiers';
    127129/* Global Configuration Tab */
    128130$lang['Title_Tab'] = 'UserAdvManager - Version : ';
  • extensions/NBC_UserAdvManager/trunk/maintain.inc.php

    r4927 r4952  
    6565{
    6666          global $conf;
     67   
     68/* Cleaning obsolete files */
     69    update_files($plugin_id);
    6770       
    6871/* Check for upgrade from 2.10 to 2.11 */
     
    233236  }
    234237}
     238
     239function update_files($plugin_id)
     240{
     241  $clean = clean_obsolete_files(UAM_OBSOLETE);
     242}
    235243?>
Note: See TracChangeset for help on using the changeset viewer.