Plugin Directory

Changeset 1684582


Ignore:
Timestamp:
06/24/2017 01:28:23 AM (9 years ago)
Author:
hitoy
Message:

bug fixed

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

Legend:

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

    r1266323 r1684582  
    1212                <div><label><?php _e('Trash a Comment','super_static_cache');?></label><input type="checkbox" name="update_cache_action[]" value="comment_approved_to_trash" <?php theselected('update_cache_action','comment_approved_to_trash');?>></div>
    1313                <div><label><?php _e('Mark a Comment as spam','super_static_cache');?></label><input type="checkbox" name="update_cache_action[]" value="comment_approved_to_spam" <?php theselected('update_cache_action','comment_approved_to_spam');?>></div><br/>
    14                 <input type="submit" class="button-primary" value="<?php _e('Save','super_static_cache')?>">
     14                <input type="submit" name="update_cache_action_submit" class="button-primary" value="<?php _e('Save','super_static_cache')?>">
    1515            </div>
    1616        </form>
    1717    </div>
    18 
    1918    <div class="postbox">
    2019        <h3 class="hndle"><?php _e('Purge Cache','super_static_cache');?></h3>
  • super-static-cache/trunk/readme.txt

    r1673993 r1684582  
    55Requires at least: 3.0.1
    66Tested up to: 4.8
    7 Stable tag: 3.3.4
     7Stable tag: 3.3.5
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    2727
    2828== Upgrade Notice ==
     29= 3.3.4 =
     30* cache build action bug fixed
     31* purge cache bug fixed
     32
    2933= 3.3.4 =
    3034* Support Cache File Compress, save 50% disk space at least
  • super-static-cache/trunk/super-static-cache-admin.php

    r1659188 r1684582  
    239239        update_option('super_static_cache_mode',$super_static_cache_mode);
    240240
    241         $super_static_cache_excet_arr=$_POST['super_static_cache_excet'];
     241        $super_static_cache_excet_arr=isset($_POST['super_static_cache_excet'])?$_POST['super_static_cache_excet']:array();
    242242        $super_static_cache_excet = implode(',',$super_static_cache_excet_arr);
    243243        update_option('super_static_cache_excet',$super_static_cache_excet);
     
    260260    }
    261261
    262     if(!empty($_POST['update_cache_action'])){
    263         $update_cache_action_arr=$_POST['update_cache_action'];
     262    if(!empty($_POST['update_cache_action_submit'])){
     263        $update_cache_action_arr=isset($_POST['update_cache_action'])?$_POST['update_cache_action']:array();
    264264        $update_cache_action=implode(',',$update_cache_action_arr);
    265265        update_option('update_cache_action',$update_cache_action);
  • super-static-cache/trunk/super-static-cache.php

    r1663079 r1684582  
    44Plugin URI: https://www.hitoy.org/super-static-cache-for-wordperss.html
    55Description: Super Static Cache is an efficient WordPress caching engine which provides three cache mode. It can reduce the pressure of the database significantly that makes your website faster than ever.
    6 Version: 3.3.4
     6Version: 3.3.5
    77Author: Hito
    88Author URI: https://www.hitoy.org/
     
    7575    $abspath=str_replace("//","/",str_replace("\\","/",realpath(ABSPATH))."/");
    7676    if(substr($uri,0,strlen($abspath)) != $abspath) return false;
    77     if($uri == $abspath) $uri=$uri."/index.html";
     77
     78    /////Direct:首页缓存处理
     79    if($uri == $abspath){
     80        unlink($uri."/index.html");
     81        unlink($uri."/index.html.gz");
     82        return;
     83    }
    7884
    7985    //文件目录不存在
     
    133139//访问远程url的函数
    134140//用来自动建立缓存
    135 function curl($url){
     141function ssc_curl($url){
    136142    if(function_exists("curl_init")){
    137143        $ch = curl_init();
     
    418424            $uri=str_replace("//","/",$this->wppath.$uri);
    419425        }
    420        
    421        if($this->iscompress) $uri .=".gz";
    422 
     426       //如果系统开启压缩功能,并且URI不是目录,则URI为压缩缓存文件
     427       if($this->iscompress && !is_dir($uri)) $uri .=".gz";
    423428        delete_uri($uri);
    424429        if(file_exists($uri)){
     
    442447        $url=get_permalink($id);
    443448        $this->delete_cache($url);
    444         curl($url);
     449        ssc_curl($url);
    445450
    446451        //更新和文章页有关联的其它页面
     
    448453        foreach($list as $u){
    449454            $this->delete_cache($u);
    450             curl($u);
     455            ssc_curl($u);
    451456        }
    452457    }
Note: See TracChangeset for help on using the changeset viewer.