XPressME Integration Kit

Trac

Changeset 301


Ignore:
Timestamp:
Jun 19, 2009, 10:55:26 PM (15 years ago)
Author:
toemon
Message:

ブロックチェック時のオプション数エラーバグ修正 fixes #162
最近の投稿、最近の投稿内容、最近のコメント、人気投稿、ウィジェットなどのブロックはオプション数チェック対象から外す

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/Ver2.0/xpressme_integration_kit/class/check_blocks_class.php

    r151 r301  
    217217                $option_arr_1 = explode( '|', $info['options'] ); 
    218218                $option_arr_2 = explode( '|', $block_obj->getVar('options', 'n') ); 
    219  
    220                 if ( count($option_arr_1) != count($option_arr_2) ) 
    221                 { 
    222                         $this->_err( $name.': options count unmatch' ); 
     219                 
     220                $excludes_block = array('widget_block.php','popular_posts_block.php','recent_comments_block.php','recent_posts_content_block.php','recent_posts_list_block.php'); 
     221                 
     222                if (in_array($info['file'],$excludes_block)){ 
     223                        if ( count($option_arr_1) > count($option_arr_2) ) 
     224                        { 
     225                                $this->_err( $name.': options count unmatch' ); 
     226                        } 
     227 
     228                } else { 
     229                        if ( count($option_arr_1) != count($option_arr_2) ) 
     230                        { 
     231                                $this->_err( $name.': options count unmatch' ); 
     232                        } 
    223233                } 
    224234        } 
Note: See TracChangeset for help on using the changeset viewer.