--- boost.module Sat Jun 20 18:26:11 2009 +++ boost.module Mon Jun 22 03:54:41 2009 @@ -128,9 +128,9 @@ * Place boost image into pages footer. */ function boost_footer() { - Global $base_url; + Global $base_path, $user; $filename = 'boost_stats.php'; - if (!( strpos($_SERVER['SCRIPT_FILENAME'], 'index.php') === FALSE + if ( strpos($_SERVER['SCRIPT_FILENAME'], 'index.php') === FALSE || variable_get('site_offline', 0) || $_SERVER['REQUEST_METHOD'] != 'GET' || $_SERVER['SERVER_SOFTWARE'] === 'PHP CLI' @@ -139,25 +139,29 @@ || !boost_is_cacheable($GLOBALS['_boost_path']) || !empty($user->uid) || !file_exists($filename) - )) { - if (arg(0) == 'node' && is_numeric(arg(1)) && arg(2) == '' && variable_get('statistics_count_content_views', 0)) { - $nid = arg(1); - } - if ((variable_get('statistics_enable_access_log', 0)) && (module_invoke('throttle', 'status') == 0)) { - $title = drupal_urlencode(strip_tags(drupal_get_title())); - $q = $_GET['q']; - } + ) { + return; + } - if (isset($nid) & !isset($title)) { - return ''; - } - elseif (isset($nid) & isset($title)) { - return ''; - } - elseif (!isset($nid) & isset($title)) { - return ''; - } + if (arg(0) == 'node' && is_numeric(arg(1)) && arg(2) == '' && variable_get('statistics_count_content_views', 0)) { + $nid = arg(1); } + if ((variable_get('statistics_enable_access_log', 0)) && (module_invoke('throttle', 'status') == 0)) { + $title = drupal_urlencode(strip_tags(drupal_get_title())); + $q = $_GET['q']; + } + + $start = '
'; + if (isset($nid) & !isset($title)) { + return $start . '?nid=' . $nid . $end; + } + elseif (isset($nid) & isset($title)) { + return $start . '?nid=' . $nid . '&q=' . $q . '&title=' . $title . $end; + } + elseif (!isset($nid) & isset($title)) { + return $start . '?q=' . $q . '&title=' . $title . $end; + } } /**