Plugin Directory

Changeset 1234480


Ignore:
Timestamp:
08/31/2015 08:41:06 AM (11 years ago)
Author:
hitoy
Message:

delete cache bug fixed

Location:
super-static-cache/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • super-static-cache/trunk/options-advanced.php

    r1234467 r1234480  
    2828                <div><label><?php _e('Tag','super_static_cache');?></label><input type="checkbox" name="clearcache[]" value="tag"/></div>
    2929                <div><label><?php _e('All','super_static_cache');?></label><input type="checkbox" name="clearcache[]" value="all"/></div>
    30                 <div><label><?php _e('Purge Individual Posts','super_static_cache');?></label><input type="input" name="clearpostpagecache" placeholder="<?php _e('Please Enter the title or id of a post, separate with commas','super_static_cache');?>"/></div><br/>
     30                <div><label><?php _e('Purge Individual Posts','super_static_cache');?></label><input type="input" name="clearpostpagecache" title="<?php _e('Please Enter the title or id of a post, separate with commas','super_static_cache');?>"/></div><br/>
    3131                <input type="submit" class="button-primary" value="<?php _e('Purge »','super_static_cache')?>">
    3232            </div>
  • super-static-cache/trunk/super-static-cache.php

    r1234467 r1234480  
    286286    //如http://localhost/hello-wrold/
    287287    //为了支持utf-8缓存格式,对url进行urldecode处理
    288     public function delete_cache($url){
     288    public function delete_cache(string $url){
     289        $url=urldecode($url);
     290        //如果传入URL为空,则返回
    289291        if(strlen($url) == 0) return false;
    290         $url=urldecode($url);
     292        //如果传入的URL不是本域名,则也返回
     293        if(stripos($url,$this->siteurl) !== 0) return false;
     294
    291295        $uri=substr($url,strlen($this->siteurl));
    292296        if($this->cachemod == 'serverrewrite' || $this->cachemod == 'phprewrite'){
Note: See TracChangeset for help on using the changeset viewer.