Changeset 68 for branches/1.4.5-wp2.2

Show
Ignore:
Timestamp:
02/11/08 14:06:02 (9 months ago)
Author:
root
Message:

added new branch 1.4.5-wp2.2

Location:
branches/1.4.5-wp2.2
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • branches/1.4.5-wp2.2/lib/action.php

    r64 r68  
    3030        // ACTION: DELETE ON THE FLY FROM VISITOR DETAILS VIEW 
    3131        if ($_GET['action'] == "delete") { 
    32                 $wpdb->query($wpdb->prepare("DELETE FROM $table_name WHERE wassup_id='%s'", urlencode(attribute_escape($_GET['id'])))); 
     32                $wpdb->query("DELETE FROM $table_name WHERE wassup_id='".urlencode(attribute_escape($_GET['id']))."'"); 
    3333        // ACTION: RUN SPY VIEW 
    3434        } elseif ($_GET['action'] == "spy") { 
  • branches/1.4.5-wp2.2/wassup.php

    r65 r68  
    44Plugin URI: http://www.wpwp.org 
    55Description: Wordpress plugin to analyze your visitors traffic with real time stats, chart and a lot of chronological informations. It has sidebar Widget support to show current online visitors and other statistics. 
    6 Version: 1.4.5 
     6Version: 1.4.5-wp2.2 
    77Author: Michele Marcucci 
    88Author URI: http://www.michelem.org/ 
     
    1717        die('Permission Denied! You are not allowed to call this page directly.'); 
    1818} 
    19 $version = "1.4.5"; 
     19$version = "1.4.5-wp2.2"; 
    2020define('WASSUPFOLDER', dirname(plugin_basename(__FILE__)), TRUE); 
    2121require_once(dirname(__FILE__).'/lib/main.php'); 
     
    3131 
    3232global $wp_version; 
    33 //#This works only in WP2.3 or higher 
    34 if (version_compare($wp_version, '2.3', '<')) { 
     33//#This works only in WP2.2 or higher 
     34if (version_compare($wp_version, '2.2', '<')) { 
    3535        add_action('admin_notices', wassup_activation_error()); 
    3636        exit(1); 
     
    628628                if ($_GET['deleteMARKED'] == 1) { 
    629629                        $rec_deleted = $wpdb->get_var("SELECT COUNT(ip) as deleted FROM $table_name WHERE ip='".urlencode(attribute_escape($_GET['dip']))."'"); 
    630                         $wpdb->query($wpdb->prepare("DELETE FROM $table_name WHERE ip='%s'", urlencode(attribute_escape($_GET['dip'])))); 
     630                        $wpdb->query("DELETE FROM $table_name WHERE ip='%s'", urlencode(attribute_escape($_GET['dip']))); 
    631631                        echo "<p><strong>".$rec_deleted." records deleted</strong></p>"; 
    632632                } 
     
    12781278           if ($spam == 0 OR ($wassup_settings['wassup_spam'] == 1 AND $spam == 1) OR ($wassup_settings['wassup_refspam'] == 1 AND $spam == 2)) { 
    12791279 
    1280                 $insert = $wpdb->query( $wpdb->prepare("INSERT INTO $table_name (wassup_id, timestamp, ip, hostname, urlrequested, agent, referrer, search, searchpage, os, browser, language, screen_res, searchengine, spider, feed, username, comment_author, spam)  
    1281                    VALUES ( %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s )", 
    1282                    $wassup_id, 
    1283                    $timestamp, 
    1284                    attribute_escape($ipAddress), 
    1285                    attribute_escape($hostname), 
    1286                    attribute_escape($urlRequested),  
    1287                    attribute_escape($userAgent), 
    1288                    attribute_escape($referrer), 
    1289                    $search_phrase, 
    1290                    $searchpage,  
    1291                    $os,  
    1292                    $browser,  
    1293                    $language[0],  
    1294                    $screen_res,  
    1295                    $searchengine,  
    1296                    $spider,  
    1297                    $feed,  
    1298                    attribute_escape($logged_user),  
    1299                    attribute_escape($comment_user),  
    1300                    $spam 
    1301                    )); 
     1280                $insert = $wpdb->query("INSERT INTO $table_name (wassup_id, timestamp, ip, hostname, urlrequested, agent, referrer, search, searchpage, os, browser, language, screen_res, searchengine, spider, feed, username, comment_author, spam)  
     1281                   VALUES ( 
     1282                   '".$wassup_id."', 
     1283                   '".$timestamp."', 
     1284                   '".attribute_escape($ipAddress)."', 
     1285                   '".attribute_escape($hostname)."', 
     1286                   '".attribute_escape($urlRequested)."',  
     1287                   '".attribute_escape($userAgent)."', 
     1288                   '".attribute_escape($referrer)."', 
     1289                   '".$search_phrase."', 
     1290                   '".$searchpage."',  
     1291                   '".$os."',  
     1292                   '".$browser."',  
     1293                   '".$language[0]."',  
     1294                   '".$screen_res."',  
     1295                   '".$searchengine."',  
     1296                   '".$spider."',  
     1297                   '".$feed."',  
     1298                   '".attribute_escape($logged_user)."',  
     1299                   '".attribute_escape($comment_user)."', 
     1300                   '".$spam."')" 
     1301                   ); 
    13021302 
    13031303        } //end if wassup_spam