Changeset 598
- Timestamp:
- May 1, 2010, 12:27:08 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/extras/xpress_i18n/portuguese-br/xpressme_modules_root/language/pt-br_utf8/admin.php
r517 r598 39 39 define("_AM_XP2_USER_META_ERR","Há %d meta-chaves com o prefixo %s."); 40 40 define("_AM_XP2_USER_META_OK","Meta-dados do usuário funcionando corretamente."); 41 define("_AM_XP2_NG_BLOCK_REMOVE","Excluir bloco anormal mesa"); 42 define("_AM_XP2_BLOCK_OR","OU"); 41 43 } 42 44 ?> -
trunk/extras/xpress_i18n/template/xpressme_modules_root/language/english/admin.php
r517 r598 39 39 define("_AM_XP2_USER_META_ERR","There is a meta key named %s that the prefix is different in %d piece."); 40 40 define("_AM_XP2_USER_META_OK","The user meta key is normal."); 41 define("_AM_XP2_NG_BLOCK_REMOVE","Remove xoops abnormal block table"); 42 define("_AM_XP2_BLOCK_OR","OR"); 41 43 } 42 44 ?> -
trunk/xpressme_integration_kit/admin/block_check.php
r232 r598 74 74 switch ( $xoops_block_check->get_op() ) 75 75 { 76 case "remove_all_block": 77 echo $xoops_block_check->remove_all_block(); 78 break; 76 79 case "remove_block": 77 80 echo $xoops_block_check->remove_block(); 78 81 break; 79 80 82 default: 81 83 if ($xoops_block_check->check_blocks($mydirname)){ … … 90 92 echo _AM_XP2_BLOCK_REPAIR_HOWTO."<br />\n"; 91 93 echo '<form method="POST">'."\n"; 92 echo _AM_XP2_BLOCK_REPAIR_STEP1 .' : '."\n"; 93 echo '<input type="submit" name="mid:'.$xoops_block_check->module_id.'" value="' . _AM_XP2_BLOCK_REMOVE . ': '.$xoops_block_check->module_name.'" />'."<br />\n"; 94 echo _AM_XP2_BLOCK_REPAIR_STEP1 .' : <br />'."\n"; 94 95 echo '     '; 95 echo _AM_XP2_BLOCK_REMOVE_NOTE; 96 echo '<input type="submit" name="mid:'.$xoops_block_check->module_id.'" value="' . _AM_XP2_NG_BLOCK_REMOVE . ': '.$xoops_block_check->module_name.'" />'."<br />\n"; 97 echo '    ' . _AM_XP2_BLOCK_OR . '<br />'."\n"; 98 echo '     '; 99 echo '<input type="submit" name="amid:'.$xoops_block_check->module_id.'" value="' . _AM_XP2_BLOCK_REMOVE . ': '.$xoops_block_check->module_name.'" />'."<br />\n"; 100 echo '<br />'."\n"; 101 echo '    ' . _AM_XP2_BLOCK_REMOVE_NOTE; 96 102 echo "</form>\n"; 97 103 echo "<br />\n"; -
trunk/xpressme_integration_kit/class/check_blocks_class.php
r505 r598 68 68 foreach ( $_POST as $k => $v ) 69 69 { 70 if ( preg_match( "/^amid:/", $k ) ) 71 { 72 $op = 'remove_all_block'; 73 $mid = intval( str_replace("amid:", "", $k) ); 74 break; 75 } 70 76 if ( preg_match( "/^mid:/", $k ) ) 71 77 { … … 106 112 } 107 113 108 function remove_ block()114 function remove_all_block() 109 115 { 110 116 $text = "<h1>Remove xoops block table</h1>\n"; … … 141 147 return $text; 142 148 } 149 function remove_block() 150 { 151 $text = "<h1>Remove xoops block table</h1>\n"; 152 153 $error = false; 154 $block_objs =& $this->_get_block_object_orber_num_bymodule_id( $this->module_id); 155 $module_obj =& $this->_get_module_object_bymodule_id( $this->module_id ); 156 $infos =& $module_obj->getInfo('blocks'); 157 158 foreach ( $infos as $num => $info ) 159 { 160 $block_err = false; 161 if ( !isset( $block_objs[ $num ] ) ){ 162 $block_err = true; 163 } else { 164 $block_obj = $block_objs[ $num ]; 165 if ( isset($info['file']) && ( $info['file'] != $block_obj->getVar('func_file', 'n') ) ) $block_err = true; 166 if ( isset($info['show_func']) && ( $info['show_func'] != $block_obj->getVar('show_func', 'n') ) ) $block_err = true; 167 if ( isset($info['edit_func']) && ( $info['edit_func'] != $block_obj->getVar('edit_func', 'n') ) ) $block_err = true; 168 if ( isset($info['template']) && ( $info['template'] != $block_obj->getVar('template', 'n') ) ) $block_err = true; 169 if ( isset($info['options']) ){ 170 $option_arr_1 = explode( '|', $info['options'] ); 171 $option_arr_2 = explode( '|', $block_obj->getVar('options', 'n') ); 172 173 $excludes_block = array(); 174 175 if (in_array($info['file'],$excludes_block)){ 176 if ( count($option_arr_1) > count($option_arr_2) ) $block_err = true; 177 } else { 178 if ( count($option_arr_1) != count($option_arr_2) ) $block_err = true; 179 } 180 } 181 } 182 if ($block_err){ 183 $ret = $this->_delete_block( $block_obj ); 184 if ( !$ret ) $error = true; 185 } 186 } 187 188 if ( !$error ) { 189 $text .= '<h4 style="color:#0000ff">Success</h4>'."\n"; 190 } else { 191 $text .= '<h4 style="color:#ff0000">Failed</h4>'."\n"; 192 } 193 194 $url = $this->_build_url_module_update( $module_obj->getVar('dirname', 'n') ); 195 $text .= '<a href="'.$url.'">GO to Module Update: '.$module_obj->getVar('name', 's')."</a><br /><br />\n"; 196 // $text .= '<a href="check_blocks.php">Check xoops block table</a><br />'."\n"; 197 198 return $text; 199 } 143 200 144 201 //-------------------------------------------------------- … … 190 247 { 191 248 $this->_error_flag = false; 192 193 $name = htmlspecialchars( $info['name'] ); 249 250 $bid = $block_obj->getVar('bid', 'n'); 251 $edit_url = $this->_build_url_block_edit( $bid ); 252 $name = '<a href="' . $edit_url . '">'. htmlspecialchars( $info['name'] ). '</a>'; 253 // $name = htmlspecialchars( $info['name'] ); 194 254 195 255 if ( isset($info['file']) && ( $info['file'] != $block_obj->getVar('func_file', 'n') ) ) … … 295 355 return $url; 296 356 } 297 357 function _build_url_block_edit( $bid ) 358 { 359 $dir_name = $this->module_dirname; 360 if (file_exists(XOOPS_ROOT_PATH . '/modules/altsys/admin/index.php')){ 361 // $url = XOOPS_URL.'/modules/altsys/admin/index.php?mode=admin&lib=altsys&page=myblocksadmin&dirname=xp_trunk&op=edit&bid='.$bid; 362 $url = XOOPS_URL.'/modules/'.$dir_name.'/admin/index.php?mode=admin&lib=altsys&page=myblocksadmin&dirname='.$dir_name.'xp_trunk&op=edit&bid='.$bid; 363 } else if ( $this->_xoops_version == '2.1' ) { 364 $url = XOOPS_URL.'/modules/legacy/admin/index.php?action=BlockEdit&bid='.$bid; 365 } else { 366 $url = XOOPS_URL.'/modules/system/admin.php?fct=blocksadmin&op=mod&bid='.$bid; 367 } 368 return $url; 369 } 298 370 //-------------------------------------------------------- 299 371 // user handler -
trunk/xpressme_integration_kit/language/english/admin.php
r517 r598 39 39 define("_AM_XP2_USER_META_ERR","There is a meta key named %s that the prefix is different in %d piece."); 40 40 define("_AM_XP2_USER_META_OK","The user meta key is normal."); 41 define("_AM_XP2_NG_BLOCK_REMOVE","Remove xoops abnormal block table"); 42 define("_AM_XP2_BLOCK_OR","OR"); 41 43 } 42 44 ?> -
trunk/xpressme_integration_kit/language/ja_utf8/admin.php
r517 r598 27 27 define("_AM_XP2_BLOCK_REPAIR_HOWTO","以下の手順に従ってブロックを修正してください。"); 28 28 define("_AM_XP2_BLOCK_REPAIR_STEP1","ステップ 1"); 29 define("_AM_XP2_BLOCK_REMOVE"," ブロックを削除");29 define("_AM_XP2_BLOCK_REMOVE","全ブロックを削除"); 30 30 define("_AM_XP2_BLOCK_REMOVE_NOTE","注意: モジュールのブロックがデータベースから<b>削除</b>されます。"); 31 31 define("_AM_XP2_BLOCK_REPAIR_STEP2","ステップ 2"); … … 39 39 define("_AM_XP2_USER_META_ERR","プレフィックスの異なる %s というメタキーが %d つあります。"); 40 40 define("_AM_XP2_USER_META_OK","ユーザーメタキーは正常です"); 41 define("_AM_XP2_NG_BLOCK_REMOVE","NGブロックを削除"); 42 define("_AM_XP2_BLOCK_OR","または"); 41 43 } 42 44 ?> -
trunk/xpressme_integration_kit/language/japanese/admin.php
r517 r598 27 27 define("_AM_XP2_BLOCK_REPAIR_HOWTO","°Ê²¼¤Î¼ê½ç¤Ë½¾¤Ã¤Æ¥Ö¥í¥Ã¥¯¤ò½¤Àµ¤·¤Æ¤¯¤À¤µ¤¤¡£"); 28 28 define("_AM_XP2_BLOCK_REPAIR_STEP1","¥¹¥Æ¥Ã¥× 1"); 29 define("_AM_XP2_BLOCK_REMOVE"," ¥Ö¥í¥Ã¥¯¤òºï½ü");29 define("_AM_XP2_BLOCK_REMOVE","Á´¥Ö¥í¥Ã¥¯¤òºï½ü"); 30 30 define("_AM_XP2_BLOCK_REMOVE_NOTE","Ãí°Õ: ¥â¥¸¥å¡¼¥ë¤Î¥Ö¥í¥Ã¥¯¤¬¥Ç¡¼¥¿¥Ù¡¼¥¹¤«¤é<b>ºï½ü</b>¤µ¤ì¤Þ¤¹¡£"); 31 31 define("_AM_XP2_BLOCK_REPAIR_STEP2","¥¹¥Æ¥Ã¥× 2"); … … 39 39 define("_AM_XP2_USER_META_ERR","¥×¥ì¥Õ¥£¥Ã¥¯¥¹¤Î°Û¤Ê¤ë %s ¤È¤¤¤¦¥á¥¿¥¡¼¤¬ %d ¤Ä¤¢¤ê¤Þ¤¹¡£"); 40 40 define("_AM_XP2_USER_META_OK","¥æ¡¼¥¶¡¼¥á¥¿¥¡¼¤ÏÀµ¾ï¤Ç¤¹"); 41 define("_AM_XP2_NG_BLOCK_REMOVE","NG¥Ö¥í¥Ã¥¯¤òºï½ü"); 42 define("_AM_XP2_BLOCK_OR","¤Þ¤¿¤Ï"); 41 43 } 42 44 ?>
Note: See TracChangeset
for help on using the changeset viewer.