XPressME Integration Kit

Trac


Ignore:
Timestamp:
Apr 3, 2009, 6:57:18 PM (15 years ago)
Author:
toemon
Message:

ブロックテーブルのチェックコード追加 #21
XOOPSモジュール管理メニューに「ブロック権限」と「ブロックチェック」メニューを追加

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/onupdate.php

    r128 r151  
    136136                $msgs[] = "$group_role table of XPressME was made."; 
    137137        } 
    138          
     138        if ( xpress_block_check($mydirname)) { 
     139                $msgs[] = '<span style="color:#ff0000;">Block Check OK</span>'; 
     140        } else { 
     141                $msgs[] = "Block Check NG.  You need Repar Block on This Mobule 'Block Check' Menu"; 
     142        } 
     143 
    139144        // make templates 
    140145        include_once XOOPS_ROOT_PATH . '/modules/' . $mydirname . '/include/xpress_templates_make.php' ; 
    141146        $t_mess = xpress_templates_make($mid,$mydirname); 
     147         
    142148        $msgs = array_merge($msgs,$t_mess); 
    143149         
     
    206212endif; 
    207213 
     214if( ! function_exists( 'xpress_block_check' ) ) : 
     215function xpress_block_check($mydirname){ 
     216        include_once(dirname(dirname(__FILE__)) . '/class/check_blocks_class.php'); 
     217 
     218        $xoops_block_check =& xoops_block_check::getInstance(); 
     219 
     220        if ( !$xoops_block_check->is_admin() ) 
     221        { 
     222                $cont = 'Block Check Pass'; 
     223                return cont; 
     224        } 
     225 
     226        switch ( $xoops_block_check->get_op() )  
     227        { 
     228                case "remove_block": 
     229                        $cont = $xoops_block_check->remove_block(); 
     230                        break; 
     231 
     232                default: 
     233                        $cont = $xoops_block_check->check_blocks($mydirname); 
     234                        break; 
     235        } 
     236        return $cont; 
     237} 
     238endif; 
     239 
     240 
    208241?> 
Note: See TracChangeset for help on using the changeset viewer.