Plugin Directory

Changeset 615069


Ignore:
Timestamp:
10/20/2012 11:37:52 PM (13 years ago)
Author:
Bilbud
Message:

fixed referer issue: referer is not saved if is a wp admin page.

Location:
404-error-monitor/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • 404-error-monitor/trunk/includes/Error.php

    r601098 r615069  
    5959    public function add($url)
    6060    {
    61         //@todo devrai trouver le main domaine et ajouter une seule erreur pour test.com/dsds et test.fr/dsdsd
    6261        global $wpdb;
    6362        $url = str_replace(get_bloginfo('url'),'',$url);
     
    7473        } else {
    7574            $referer = wp_get_referer();
    76             if($referer!=''){
     75            if($referer!='' && strpos($referer, get_bloginfo('url').'/wp-admin') === false){
    7776                return $wpdb->query("UPDATE ".errorMonitor_DataTools::getTableName()." SET count=count+1, last_error = '".date("Y-m-d H:i:s")."', referer='".$referer."' WHERE url = '$url'");
    7877            } else {
  • 404-error-monitor/trunk/includes/errorList.php

    r615051 r615069  
    138138                ?>
    139139                <tr class="error_monitor-error-row" id="<?php echo $row->blog_id;?>">
    140                     <td><a target="_blank" href="http://<?php echo $domain.$row->url;?>"><?php echo $row->url;?></a></td>
     140                    <td><a target="_blank" href="<?php echo (substr($row->url, 0,  strlen('http://')) === 'http://')?$row->url:'http://'.$domain.$row->url;?>"><?php echo $row->url;?></a></td>
    141141                    <td><?php echo $row->count;?></td>
    142142                    <td>
  • 404-error-monitor/trunk/index.php

    r615051 r615069  
    2020 *     Plugin URI: http://www.php-geek.fr/plugin-wordpress-404-error-monitor.html
    2121 *     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.2
     22 *     Version: 1.0.3
    2323 *     Author: Bruce Delorme
    2424 *     Author URI: http://www.php-geek.fr
  • 404-error-monitor/trunk/readme.txt

    r601098 r615069  
    55Requires at least: 3.2.1
    66Tested up to: 3.4.2
    7 Stable tag: 1.0.2
     7Stable tag: 1.0.3
    88License: GPLv3
    99License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    3333= 1.0.2 =
    3434* for network install only: fixed mininum hit count setting problem.
     35
     36= 1.0.3 =
     37* fixed referer issue: referer is not saved if is a wp admin page.
Note: See TracChangeset for help on using the changeset viewer.