Changeset 4952 for extensions/NBC_UserAdvManager/trunk/include
- Timestamp:
- Feb 23, 2010, 3:18:34 PM (14 years ago)
- Location:
- extensions/NBC_UserAdvManager/trunk/include
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/NBC_UserAdvManager/trunk/include/constants.php
r4135 r4952 3 3 define('USER_CONFIRM_MAIL_TABLE', $prefixeTable.'user_confirm_mail'); 4 4 define('USER_LASTVISIT_TABLE', $prefixeTable.'user_lastvisit_check'); 5 define('UAM_OBSOLETE', 'obsolete.list'); 5 6 ?> -
extensions/NBC_UserAdvManager/trunk/include/functions_UserAdvManager.inc.php
r4927 r4952 1153 1153 return $plugin ; 1154 1154 } 1155 1156 /* Funtion called in maintain.inc.php to clean obsolete files */ 1157 function 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 1168 function 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 } 1155 1192 ?>
Note: See TracChangeset
for help on using the changeset viewer.