- Timestamp:
- May 1, 2009, 2:21:05 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/index.php
r199 r200 30 30 //include_once 'cp_functions.php'; 31 31 32 function admin_check_user_meta_prefix($is_report = false){ 33 global $xoopsModule; 34 $xoopsDB =& Database::getInstance(); 35 36 $mydirname = basename(dirname(dirname(__FILE__))); 37 $my_dirpath = dirname(dirname(__FILE__)); 38 $wp_prefix_only = $mydirname; 39 if ($wp_prefix_only == 'wordpress') $wp_prefix_only ='wp'; 40 $db_prefix = $xoopsDB->prefix($wp_prefix_only); 41 42 $usermeta_tbl = $db_prefix . '_usermeta'; 43 $meta_key_pattern = '_' . $wp_prefix_only . '_'; 44 45 $sql = "SELECT count(umeta_id) as data_count ,meta_key FROM $usermeta_tbl GROUP BY meta_key HAVING meta_key LIKE '%" . $meta_key_pattern ."%'" ; 46 $res = $xoopsDB->query($sql, 0, 0); 47 48 if ($res === false){ 49 $check_str = _AM_XP2_USER_META_NONE . "<br />\n"; 50 } else { 51 $error =false; 52 $check_str = ''; 53 while($row = $xoopsDB->fetchArray($res)){ 54 $data_count = $row['data_count']; 55 $meta_key = $row['meta_key']; 56 if ( !preg_match('/^'.$db_prefix. '_.*/',$meta_key , $maches)){ 57 $check_str .= sprintf(_AM_XP2_USER_META_ERR , $meta_key,$data_count) ."<br /> \n"; 58 $error = true; 59 } 60 } 61 if (!$error) 62 $check_str = _AM_XP2_USER_META_OK ; 63 } 64 if ($is_report) { 65 echo "******** " . _AM_XP2_USER_META_KEY . "********" . "<br />\n"; 66 echo $check_str . "<br />\n<br />\n"; 67 } else { 68 echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _AM_XP2_USER_META_KEY . "</legend>"; 69 echo "<div style='padding: 8px;'>"; 70 echo $check_str; 71 echo "</div>"; 72 echo "</fieldset>"; 73 } 74 75 } 32 76 33 77 function get_xpress_plugin_data( $plugin_file, $markup = true, $translate = true ) { … … 565 609 xpress_active_plugin_list($report); 566 610 xpress_block_state($report); 611 admin_check_user_meta_prefix($report); 567 612 xpress_state($report); 568 613 echo '<form method="POST">'."\n"; -
trunk/language/english/admin.php
r199 r200 33 33 define("_AM_XP2_BLOCK_ADMIN_SETTING","The arrangement setting of the block and the access authority of the block are set again. "); 34 34 define("_AM_XP2_BLOCK_TO_SETTING","to blocks/permissions"); 35 36 35 define("_AM_XP2_USER_META_KEY","User meta information"); 36 define("_AM_XP2_USER_META_NONE","There is no meta key necessary for the user level."); 37 define("_AM_XP2_USER_META_ERR","There is a meta key named %s that the prefix is different in %d piece."); 38 define("_AM_XP2_USER_META_OK","The user meta key is normal."); 37 39 } 38 40 ?> -
trunk/language/ja_utf8/admin.php
r199 r200 33 33 define("_AM_XP2_BLOCK_ADMIN_SETTING","ブロックの配置とアクセス権限を再設定します。"); 34 34 define("_AM_XP2_BLOCK_TO_SETTING","ブロック権限の設定へ"); 35 36 35 define("_AM_XP2_USER_META_KEY","ユーザーメタ情報"); 36 define("_AM_XP2_USER_META_NONE","ユーザーレベルに必要なメタキーがありません"); 37 define("_AM_XP2_USER_META_ERR","プレフィックスの異なる %s というメタキーが %d つあります。"); 38 define("_AM_XP2_USER_META_OK","ユーザーメタキーは正常です"); 37 39 } 38 40 ?> -
trunk/xoops_version.php
r199 r200 40 40 41 41 // status 42 $modversion['codename'] = " Bata3(r199)";42 $modversion['codename'] = "RC1(r200)"; 43 43 44 44 // onInstall, onUpdate, onUninstall
Note: See TracChangeset
for help on using the changeset viewer.