Plugin Directory

Changeset 2446040


Ignore:
Timestamp:
12/26/2020 12:49:22 AM (5 years ago)
Author:
myros
Message:

1.0.4.2

  • UPDATE: Display number of purged records
Location:
remote-cache-purger/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • remote-cache-purger/trunk/changelog.txt

    r2446015 r2446040  
    1 <<<<<<< .mine
    21## CHANGELOG
     2
     3= 1.0.4.1 - 2020/12 =
     4  * UPDATE: Display number of purged files
    35
    46= 1.0.4 - 2020/12 =
     
    2830
    2931  * Init
    30 ||||||| .r0
    31 =======
    32 ## CHANGELOG
    33 
    34 
    35 = 1.0.3 - 2020/12 =
    36 
    37   * ADDED: truncate admin notice
    38   * ADDED: additional domains
    39   * ADDED: enable/disable purge
    40   * ADDED: Response Count Header
    41   * UPDATE: Only if Response Count Header is set, number of purged items will be shown
    42   * FIX: Add query to url
    43 
    44 = 1.0.2 - 2020/12 =
    45 
    46   * Debug
    47 
    48 = 1.0.1 - 2020/12 =
    49 
    50   * Cleaning Up
    51   * Added Ajax requests
    52   * Added logging to Wordpress error log
    53 
    54 = 1.0.0 - 2020/12 =
    55 
    56   * Init
    57 >>>>>>> .r2446011
  • remote-cache-purger/trunk/includes/queue.php

    r2446015 r2446040  
    149149    else {
    150150      foreach($this->responses as $key => $response) {
     151        $headerPresent = $response['headers'][$this->plugin->optResponseCountHeader];
     152        $isCleared = isset($headerPresent) && $headerPresent > 0;
     153
     154        if($isCleared) {
     155          $this->plugin->noticeMessage .= '<strong>';
     156        }
     157
    151158        $this->plugin->noticeMessage .= $requests[$key]['method'];
    152159       
    153         if(isset($response['headers'][$this->plugin->optResponseCountHeader] )) {
    154           $this->plugin->noticeMessage .= '(' . $response['headers']['x-purged-count'] . ')';
     160        if(isset($headerPresent)) {
     161          $this->plugin->noticeMessage .= '(' . $response['headers'][$this->plugin->optResponseCountHeader] . ')';
    155162        }
    156163
    157164        $this->plugin->noticeMessage .= ' | ' . $response['HTTP_CODE'] . ' | ' .  $response['url'];
    158165
     166        if($isCleared) {
     167          $this->plugin->noticeMessage .= '</strong>';
     168        }
     169
    159170        $this->plugin->noticeMessage .= '<br/>';
     171
    160172      }
    161173    }
  • remote-cache-purger/trunk/remote-cache-purger.php

    r2446015 r2446040  
    55     * Author: Myros
    66     * Author URI: https://www.myros.net/
    7      * Version: 1.0.4
     7     * Version: 1.0.4.1
    88     
    99     * License: http://www.apache.org/licenses/LICENSE-2.0
     
    138138      }
    139139
    140     //   $this->currentTab = isset($_GET['tab']) ? $_GET['tab'] : 'settings';
    141140      $this->write_log('Main', 'Init', 'End');
    142141    }
     
    154153        $this->optPurgePath = get_option($this->prefix . 'purge_path');
    155154        $this->optPurgeOnSave = get_option($this->prefix . 'purge_on_save');
    156         $this->optPurgedCountHeader = get_option($this->prefix . 'purged_count_header');
     155        $this->optResponseCountHeader = get_option($this->prefix . 'response_count_header');
    157156        $this->optTruncateNotice = get_option($this->prefix . 'truncate_notice');
    158157
Note: See TracChangeset for help on using the changeset viewer.