Plugin Directory

Changeset 180205


Ignore:
Timestamp:
12/06/2009 06:19:56 PM (16 years ago)
Author:
tomheng
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • ecall/tags/1.12.7/class.php

    r180190 r180205  
    8181        if($this->sys_cfg['key']==$key){
    8282           //echo"访问合法";
     83         
    8384           $this->cat=get_all_category_ids();
    8485           if(array_value_exists($cid,$this->cat)&& !array_value_exists($cid,$this->sys_cfg['ban_cat'])||$cid==0){
    85            //cid合法
     86           
    8687               //echo "cid合法";
    8788               if($rows >$this->sys_cfg['max_rows']) $rows=$this->sys_cfg['max_rows'];
    8889               $rank=$this->sys_cfg['rank'];
    89                if($this->sys_cfg['cache_time']>0){
     90               if(intval($this->sys_cfg['cache_time'])>0){
    9091                    //是否超过系统最大配置数目
    9192                   
     
    122123    }
    123124    private function get_html($cid='',$rank='date',$rows=8){
     125         
    124126          if($cid>=0){
    125127            if($cid==0&&$this->sys_cfg['ban_cat']){
     
    127129                    if(!array_value_exists($v,$this->sys_cfg['ban_cat'])) $carray[]=$v;
    128130                 }
    129                $cid=join($carray,","); 
     131               $cid=join($carray,",");
     132               if(!$cid) {
     133                 //echo $cid.'helo';
     134                    $this->error("博主可能关闭了插件,或者禁止了调用功能。");
     135                    exit;   
     136               }   
    130137            }
    131             if(!$cid) {
    132                $this->call_error.="博主可能关闭了插件,或者禁止了调用功能。";
    133                exit;   
    134             }
     138           
    135139            $posts = get_posts("&category=".$cid."&numberposts=".$rows."&orderby=".$rank);
    136140           
     
    167171            $this->error();
    168172        }
     173       
    169174      echo "document.write('".addslashes(preg_replace('[\r\n]','',$html))."');\r\n";
    170175     
Note: See TracChangeset for help on using the changeset viewer.