Changeset 1068 in ExiteCMS for trunk/includes/theme_functions.php


Ignore:
Timestamp:
11/06/07 00:40:02 (5 years ago)
Author:
hverton
Message:

Added the Webmaster Toolbox admin module
Fixed XHTML errors in the opentable/openside templates
Fixed XHTML in the admin index module
Fixed a query error in the members module (didn't filter suspended account when using a letter or country filter)
Converted the GeoIP update script to a Toolbox plugin

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/includes/theme_functions.php

    r1060 r1068  
    258258                $td = $template->template_dir; 
    259259                $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); 
    260270            } else { 
    261271                // we shouldn't get here 
     
    400410function theme_cleanup() { 
    401411 
    402     global $db_prefix, $userdata, $_db_logs, $template; 
     412    global $db_prefix, $userdata, $_db_logs, $template, $settings; 
    403413 
    404414    // clean-up tasks, will be executed by all admins and super-admins 
     
    416426        // unread posts indicators: set to 30 days 
    417427        $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        } 
    420432    } 
    421433     
Note: See TracChangeset for help on using the changeset viewer.