XPressME Integration Kit

Trac

Changeset 505 for trunk


Ignore:
Timestamp:
Jan 25, 2010, 9:42:03 AM (15 years ago)
Author:
toemon
Message:

ImpressCMS 1.2 でFatal error: Call to a member function getByModule()が発生するバグ修正 Fixes #280

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/xpressme_integration_kit/class/check_blocks_class.php

    r439 r505  
    344344function &_get_block_object_bymodule_id( $mid, $asobject=true ) 
    345345{ 
    346         $objs =& xoopsBlock::getByModule( $mid, $asobject ); 
     346        if ( defined('ICMS_VERSION_BUILD') && ICMS_VERSION_BUILD > 27  ) { /* ImpressCMS 1.2+ */ 
     347                $block_handler =& xoops_gethandler ('block'); 
     348                $objs =& $block_handler->getByModule( $mid, $asobject ); 
     349        } else { /* legacy support */ 
     350                $objs =& XoopsBlock::getByModule( $mid, $asobject ) ; /* from class/xoopsblock.php */ 
     351        } 
    347352        return $objs; 
    348353} 
Note: See TracChangeset for help on using the changeset viewer.