Changeset 1068 in ExiteCMS for trunk/includes/theme_functions.php
- Timestamp:
- 11/06/07 00:40:02 (5 years ago)
- File:
-
- 1 edited
-
trunk/includes/theme_functions.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/includes/theme_functions.php
r1060 r1068 258 258 $td = $template->template_dir; 259 259 $template->template_dir = array_merge(array(PATH_MODULES.$tpl_parts[1].'/templates'), $template->template_dir); 260 } else { 261 // we shouldn't get here 262 } 263 264 //if this is a tools template... 265 $tpl_parts = explode(".", $panel['template']); 266 if ($tpl_parts[0] == "tools") { 267 // store the current template directories, we need to restore them later 268 $td = $template->template_dir; 269 $template->template_dir = array_merge(array(PATH_ADMIN.'tools/templates'), $template->template_dir); 260 270 } else { 261 271 // we shouldn't get here … … 400 410 function theme_cleanup() { 401 411 402 global $db_prefix, $userdata, $_db_logs, $template ;412 global $db_prefix, $userdata, $_db_logs, $template, $settings; 403 413 404 414 // clean-up tasks, will be executed by all admins and super-admins … … 416 426 // unread posts indicators: set to 30 days 417 427 $result = dbquery("DELETE FROM ".$db_prefix."posts_unread WHERE post_time < '".(time() - $day * 30)."'", false); 418 // deactivate accounts with a bad email address after 90 days 419 $result = dbquery("UPDATE ".$db_prefix."users SET user_status = 1, user_ban_reason = '', user_ban_expire = '".time()."' WHERE user_bad_email > 0 AND user_bad_email < '".(time() - $day * 90)."'"); 428 // deactivate accounts with a bad email address after 90 days (available since v7.0 rev.1060) 429 if ($settings['revision'] >= 1060) { 430 $result = dbquery("UPDATE ".$db_prefix."users SET user_status = 1, user_ban_reason = '', user_ban_expire = '".time()."' WHERE user_bad_email > 0 AND user_bad_email < '".(time() - $day * 90)."'"); 431 } 420 432 } 421 433
Note: See TracChangeset
for help on using the changeset viewer.
