Changeset 689566
- Timestamp:
- 03/31/2013 07:32:20 PM (13 years ago)
- Location:
- 404-error-monitor/trunk
- Files:
-
- 6 edited
-
css/admin.css (modified) (1 diff)
-
includes/Error.php (modified) (1 diff)
-
includes/errorList.php (modified) (3 diffs)
-
index.php (modified) (4 diffs)
-
js/admin.js (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
404-error-monitor/trunk/css/admin.css
r662942 r689566 45 45 46 46 .postbox .inside li { list-style: square; } 47 48 #error_monitor-export-form { 49 margin: 10px 0; 50 } -
404-error-monitor/trunk/includes/Error.php
r662942 r689566 147 147 foreach($ext_filterArray as $filter){ 148 148 if($filter != "") 149 $subQuery2 .= " AND url NOT LIKE '%".$filter." '";149 $subQuery2 .= " AND url NOT LIKE '%".$filter."%'"; 150 150 } 151 151 -
404-error-monitor/trunk/includes/errorList.php
r662942 r689566 67 67 function_exists('is_super_admin') && 68 68 is_multisite()&& 69 is_super_admin()):?> 69 is_super_admin()): 70 ?> 70 71 71 72 <div style="width:79%;" class="postbox-container"> … … 102 103 <br class="clear" /> 103 104 <h3>Error list</h3> 105 <form id="error_monitor-export-form" action="<?php bloginfo('wpurl'); ?>/wp-admin/admin-ajax.php" method="post"> 106 <input type="button" value="Export to csv" class="button-primary" id="export_btn" item-id="<?php echo $blog_id;?>" name="export_btn"> 107 </form> 104 108 <table class="widefat error_monitor-error-list" cellspacing="0"> 105 109 <thead> … … 156 160 </tbody> 157 161 </table> 162 <form id="error_monitor-export-form" action="<?php bloginfo('wpurl'); ?>/wp-admin/admin-ajax.php" method="post"> 163 <input type="button" value="Export to csv" class="button-primary" id="export_btn" item-id="<?php echo $blog_id;?>" name="export_btn"> 164 </form> 158 165 </div><?php -
404-error-monitor/trunk/index.php
r662942 r689566 20 20 * Plugin URI: http://www.php-geek.fr/plugin-wordpress-404-error-monitor.html 21 21 * Description: This plugin logs 404 (Page Not Found) errors on your WordPress site. It also logs useful informations like referrer, user address, and error hit count. It is fully compatible with a multisite configuration. 22 * Version: 1.0. 522 * Version: 1.0.6 23 23 * Author: Bruce Delorme 24 24 * Author URI: http://www.php-geek.fr … … 91 91 add_action('wp_ajax_deleteBlogErrors', array(&$this,'deleteBlogErrors') ); 92 92 add_action('wp_ajax_updatePluginSettings', array(&$this,'updatePluginSettings') ); 93 add_action('wp_ajax_exportErrorList', array(&$this,'exportErrorList') ); 93 94 $this->enqueueScript('admin.js'); 94 95 $this->enqueueStyle('admin.css'); … … 238 239 } 239 240 } 241 242 if($ext_filter != ''){ 243 $ext_filter_tmp= array(); 244 foreach(explode(',',$ext_filter) as $ext){ 245 246 if(substr($ext,0,1) !='.'){ 247 $ext = '.'.$ext; 248 } 249 $ext_filter_tmp[] = $ext; 250 } 251 $ext_filter = implode(',',$ext_filter_tmp); 252 } 253 240 254 errorMonitor_DataTools::updatePluginOption('min_hit_count',($min_hit_count != '')?$min_hit_count:null); 241 255 errorMonitor_DataTools::updatePluginOption('ext_filter',($ext_filter != '')?$ext_filter:null); … … 248 262 249 263 echo true; 264 } 265 266 function exportErrorList() 267 { 268 header('Content-type: text/csv'); 269 header('Content-disposition: attachment;filename=404-error-monitor-export.csv'); 270 271 $error = new errorMonitor_Error(); 272 273 $itemId = $_GET['item-id']; 274 275 if($itemId != 'null'){ 276 $blogId = $itemId; 277 } else { 278 $blogId = null; 279 } 280 $errorsRowset = $error->getErrorList($blogId); 281 282 $eol = "\n"; 283 echo "URL;Count;Referer;Last Error".$eol; 284 foreach($errorsRowset as $row){ 285 $domain = $error->getDomain($row); 286 if($row->referer != ""){ 287 $referer = $row->referer; 288 } else { 289 $referer = "--"; 290 } 291 echo $domain.$row->url.";".$row->count.";".$referer.";".$row->last_error.";".$eol; 292 } 293 die; 250 294 } 251 295 -
404-error-monitor/trunk/js/admin.js
r662942 r689566 118 118 return false; 119 119 }); 120 121 $("#error_monitor-export-form #export_btn").click(function(){ 122 123 var itemId = null; 124 if($(this).attr('item-id') != ''){ 125 itemId = $(this).attr('item-id'); 126 } 127 location.href = $(this).closest("form").attr('action')+"?action=exportErrorList"+"&item-id="+itemId; 128 }); 120 129 }); 121 130 -
404-error-monitor/trunk/readme.txt
r662942 r689566 5 5 Requires at least: 3.2.1 6 6 Tested up to: 3.5.1 7 Stable tag: 1.0. 57 Stable tag: 1.0.6 8 8 License: GPLv3 9 9 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 43 43 * added new fonctionnality that clean entries that are older than the configured limit. 44 44 * improved activate and deactivate methods. 45 46 = 1.0.6 = 47 * added export fonctionnality. 48 * improved extension filters.
Note: See TracChangeset
for help on using the changeset viewer.