Changeset 68 for branches/1.4.5-wp2.2
- Timestamp:
- 02/11/08 14:06:02 (9 months ago)
- Location:
- branches/1.4.5-wp2.2
- Files:
-
- 2 modified
-
lib/action.php (modified) (1 diff)
-
wassup.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/1.4.5-wp2.2/lib/action.php
r64 r68 30 30 // ACTION: DELETE ON THE FLY FROM VISITOR DETAILS VIEW 31 31 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']))."'"); 33 33 // ACTION: RUN SPY VIEW 34 34 } elseif ($_GET['action'] == "spy") { -
branches/1.4.5-wp2.2/wassup.php
r65 r68 4 4 Plugin URI: http://www.wpwp.org 5 5 Description: 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 6 Version: 1.4.5-wp2.2 7 7 Author: Michele Marcucci 8 8 Author URI: http://www.michelem.org/ … … 17 17 die('Permission Denied! You are not allowed to call this page directly.'); 18 18 } 19 $version = "1.4.5 ";19 $version = "1.4.5-wp2.2"; 20 20 define('WASSUPFOLDER', dirname(plugin_basename(__FILE__)), TRUE); 21 21 require_once(dirname(__FILE__).'/lib/main.php'); … … 31 31 32 32 global $wp_version; 33 //#This works only in WP2. 3or higher34 if (version_compare($wp_version, '2. 3', '<')) {33 //#This works only in WP2.2 or higher 34 if (version_compare($wp_version, '2.2', '<')) { 35 35 add_action('admin_notices', wassup_activation_error()); 36 36 exit(1); … … 628 628 if ($_GET['deleteMARKED'] == 1) { 629 629 $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']))); 631 631 echo "<p><strong>".$rec_deleted." records deleted</strong></p>"; 632 632 } … … 1278 1278 if ($spam == 0 OR ($wassup_settings['wassup_spam'] == 1 AND $spam == 1) OR ($wassup_settings['wassup_refspam'] == 1 AND $spam == 2)) { 1279 1279 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 $spam1301 ) );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 ); 1302 1302 1303 1303 } //end if wassup_spam
