Changeset 3759320
- Timestamp:
- 10/22/2026 04:55:55 AM (4 weeks ago)
- Location:
- detabess
- Files:
-
- 7 edited
- 28 copied
-
tags/2.0.1 (copied) (copied from detabess/trunk )
-
tags/2.0.1/css/detabess.css (copied) (copied from detabess/trunk/css/detabess.css )
-
tags/2.0.1/css/detabess_admin.css (copied) (copied from detabess/trunk/css/detabess_admin.css )
-
tags/2.0.1/detabess-ajax.php (copied) (copied from detabess/trunk/detabess-ajax.php )
-
tags/2.0.1/detabess-core.php (copied) (copied from detabess/trunk/detabess-core.php ) (6 diffs)
-
tags/2.0.1/detabess-functions.php (copied) (copied from detabess/trunk/detabess-functions.php )
-
tags/2.0.1/detabess-info.php (copied) (copied from detabess/trunk/detabess-info.php ) (1 diff)
-
tags/2.0.1/detabess-item.php (copied) (copied from detabess/trunk/detabess-item.php )
-
tags/2.0.1/detabess-lang.php (copied) (copied from detabess/trunk/detabess-lang.php )
-
tags/2.0.1/detabess-list.php (copied) (copied from detabess/trunk/detabess-list.php )
-
tags/2.0.1/detabess-reg.php (copied) (copied from detabess/trunk/detabess-reg.php ) (2 diffs)
-
tags/2.0.1/detabess-table.php (copied) (copied from detabess/trunk/detabess-table.php ) (1 diff)
-
tags/2.0.1/detabess-widget.php (copied) (copied from detabess/trunk/detabess-widget.php )
-
tags/2.0.1/detabess.php (copied) (copied from detabess/trunk/detabess.php ) (4 diffs)
-
tags/2.0.1/images/info/lang/de_DE/006.png (copied) (copied from detabess/trunk/images/info/lang/de_DE/006.png )
-
tags/2.0.1/images/info/lang/en_US/006.png (copied) (copied from detabess/trunk/images/info/lang/en_US/006.png )
-
tags/2.0.1/images/info/lang/ja/006.png (copied) (copied from detabess/trunk/images/info/lang/ja/006.png )
-
tags/2.0.1/images/info/lang/ko_KR/006.png (copied) (copied from detabess/trunk/images/info/lang/ko_KR/006.png )
-
tags/2.0.1/images/info/lang/zh_CN (copied) (copied from detabess/trunk/images/info/lang/zh_CN )
-
tags/2.0.1/js/detabess-datepicker.js (copied) (copied from detabess/trunk/js/detabess-datepicker.js )
-
tags/2.0.1/js/detabess.js (copied) (copied from detabess/trunk/js/detabess.js ) (3 diffs)
-
tags/2.0.1/js/detabess_admin.js (copied) (copied from detabess/trunk/js/detabess_admin.js )
-
tags/2.0.1/languages/detabess-de_DE.po (copied) (copied from detabess/trunk/languages/detabess-de_DE.po )
-
tags/2.0.1/languages/detabess-ja.mo (copied) (copied from detabess/trunk/languages/detabess-ja.mo )
-
tags/2.0.1/languages/detabess-ja.po (copied) (copied from detabess/trunk/languages/detabess-ja.po )
-
tags/2.0.1/languages/detabess-ko_KR.po (copied) (copied from detabess/trunk/languages/detabess-ko_KR.po )
-
tags/2.0.1/languages/detabess-zh_CN.po (copied) (copied from detabess/trunk/languages/detabess-zh_CN.po )
-
tags/2.0.1/readme.txt (copied) (copied from detabess/trunk/readme.txt ) (3 diffs)
-
trunk/detabess-core.php (modified) (6 diffs)
-
trunk/detabess-info.php (modified) (1 diff)
-
trunk/detabess-reg.php (modified) (2 diffs)
-
trunk/detabess-table.php (modified) (1 diff)
-
trunk/detabess.php (modified) (4 diffs)
-
trunk/js/detabess.js (modified) (3 diffs)
-
trunk/readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
detabess/tags/2.0.1/detabess-core.php
r3753085 r3759320 51 51 return; 52 52 } 53 if ( ! $query instanceof WP_Query || ! $query->is_main_query() || ! $query->is_search() ) { 53 if ( ! $query instanceof WP_Query || ! $query->is_main_query() ) { 54 return; 55 } 56 57 $cdb = $this->request_cdb( $query ); 58 if ( $cdb <= 0 ) { 54 59 return; 55 60 } … … 67 72 68 73 $param = $this->post_param_array(); 69 70 // 通常の検索の場合 71 if ( ! isset( $_GET['cdb'] ) || ! is_numeric( $_GET['cdb'] ) ) { 72 return; 73 } 74 75 $cdb = 0; 76 77 if ( isset( $_GET['cdb'] ) ) { 78 $cdb = sanitize_key( $_GET['cdb'] ); 79 80 if ( ! is_numeric( $cdb ) ) { 81 return; 82 } 83 } else { 84 return; 85 } 86 87 // 検索ページではない場合 88 if ( ! $query->is_search() ) { 89 return; 90 } 91 92 // 管理画面,メインクエリに干渉しないために必須 93 if ( is_admin() || ! $query->is_main_query() ) { 94 return; 95 } 96 97 $target_postID = ( is_array( $param ) && count( $param ) > 0 ) ? $this->target_list( $cdb, $param , $lang ) : dtbs_all_postid_list( $cdb , $lang ); 74 if ( ! is_array( $param ) ) { 75 $param = array(); 76 } 77 78 // s に検索条件そのものを入れると、WordPress のキーワード検索で件数が 0 になる 79 $query->set( 's', '' ); 80 81 $target_postID = ( count( $param ) > 0 ) ? $this->target_list( $cdb, $param , $lang ) : dtbs_all_postid_list( $cdb , $lang ); 98 82 99 83 if ( count( $target_postID ) > 0 ) { … … 112 96 113 97 /** 114 * 入力されてきたパラメータの分解 115 * 116 * @param string $source URLパラメータを指定 117 * @return array 118 */ 98 * リクエストからデタベス ID を取り出す 99 * 100 * @param WP_Query|null $query メインクエリ 101 * @return int 102 */ 103 public function request_cdb( $query = null ) { 104 if ( isset( $_GET['cdb'] ) && is_numeric( $_GET['cdb'] ) ) { 105 return absint( $_GET['cdb'] ); 106 } 107 if ( $query instanceof WP_Query && is_numeric( $query->get( 'cdb' ) ) ) { 108 return absint( $query->get( 'cdb' ) ); 109 } 110 if ( function_exists( 'get_query_var' ) ) { 111 $query_cdb = get_query_var( 'cdb' ); 112 if ( is_numeric( $query_cdb ) && $query_cdb > 0 ) { 113 return absint( $query_cdb ); 114 } 115 } 116 return 0; 117 } 118 119 /** 120 * ci1_3 や ci6_28_29 を項目 ID => 値 に分解する 121 * 122 * @param array $res_param 既存の条件 123 * @param string $text URL またはクエリ文字列 124 */ 125 protected function append_directory_params( &$res_param, $text ) { 126 if ( ! is_string( $text ) || '' === $text ) { 127 return; 128 } 129 if ( ! preg_match_all( '/(?:^|[,\/&?])ci([0-9]+)_([0-9]+(?:_[0-9]+)*)/', $text, $matches, PREG_SET_ORDER ) ) { 130 return; 131 } 132 foreach ( $matches as $val ) { 133 $id = (string) absint( $val[1] ); 134 if ( isset( $res_param[ $id ] ) && '' !== (string) $res_param[ $id ] ) { 135 continue; 136 } 137 $res_param[ $id ] = str_replace( '_', ',', $val[2] ); 138 } 139 } 140 119 141 public function post_param_array( $source = '' ) { 120 if ( empty( $_GET['cdb'] ) && empty( $source ) ) {142 if ( empty( $_GET['cdb'] ) && empty( $source ) && $this->request_cdb() <= 0 ) { 121 143 return; 122 144 } … … 124 146 $res_param = array(); 125 147 126 $key = ! empty( $source ) ? $source : $_SERVER['QUERY_STRING'];148 $key = ! empty( $source ) ? $source : ( isset( $_SERVER['QUERY_STRING'] ) ? $_SERVER['QUERY_STRING'] : '' ); 127 149 128 150 preg_match_all( '/ci([0-9]{1,})=([,0-9]{1,})?/us', $key, $param, PREG_SET_ORDER ); … … 140 162 } 141 163 } 164 } 165 166 $this->append_directory_params( $res_param, $key ); 167 if ( empty( $source ) && isset( $_SERVER['REQUEST_URI'] ) ) { 168 $this->append_directory_params( $res_param, wp_unslash( $_SERVER['REQUEST_URI'] ) ); 142 169 } 143 170 … … 526 553 $list .= '<span' . $class_id_param . ">\n"; 527 554 if ( ! isset( $child_tree_list[ $cdi_id ] ) ) { 528 $list .= '<label><input type="radio" name="ci' . esc_attr( $cdi_id ) . '" value="0" checked="checked"><span><i></i>' . esc_html( __( ' For all', DTBS_SCNAME ) ) . '</span></label>' . "\n";555 $list .= '<label><input type="radio" name="ci' . esc_attr( $cdi_id ) . '" value="0" checked="checked"><span><i></i>' . esc_html( __( 'all', DTBS_SCNAME ) ) . '</span></label>' . "\n"; 529 556 } 530 557 foreach ( $val['list'] as $cdd_id => $cdd_val ) { -
detabess/tags/2.0.1/detabess-info.php
r3753085 r3759320 54 54 <img src="<?php echo plugin_dir_url( __FILE__ ) ?>/images/info/common/logo.svg" alt="<?php _e( DTBS_SCNAME ); ?>" width="477" height="82" alt=""> 55 55 </span> 56 <span class="version">v2.0 </span>56 <span class="version">v2.0.1</span> 57 57 </h2> 58 58 </div> -
detabess/tags/2.0.1/detabess-reg.php
r3753085 r3759320 303 303 $admin_style = dtbs_get_admin_item_style(); 304 304 305 $view_default_css = dtbs_view_default_css( $_GET['cd_id']);305 $view_default_css = dtbs_view_default_css( isset( $_GET['cd_id'] ) ? absint( $_GET['cd_id'] ) : 0 ); 306 306 307 307 if ( isset( $added_item_list ) ) { … … 589 589 590 590 if ( isset( $_GET['cd_id'] ) && function_exists( 'dtbsp_acf' ) ) { 591 $dtbsp_acf_style = array(); 592 $dtbsp_acf_style = get_option( 'dtbsp_acf_style' ); 593 if ( ! empty( $dtbsp_acf_style ) ) { 591 $dtbsp_acf_style = get_option( 'dtbsp_acf_style', '' ); 592 if ( is_string( $dtbsp_acf_style ) ) { 593 $dtbsp_acf_style = maybe_unserialize( $dtbsp_acf_style ); 594 } 595 if ( is_array( $dtbsp_acf_style ) ) { 594 596 foreach( $dtbsp_acf_style as $acf_id => $acf_vals ) { 597 if ( ! is_array( $acf_vals ) || ! isset( $acf_vals['cd_id'] ) ) { 598 continue; 599 } 595 600 if ( $_GET['cd_id'] == $acf_vals['cd_id'] ) { 596 601 $reg_param['acf'] = $acf_vals['style']; -
detabess/tags/2.0.1/detabess-table.php
r3753085 r3759320 187 187 } 188 188 if ( 'n' == $active ) { 189 $sql = 'ALTER TABLE `' . $wpdb->prefix . "dtbs` ADD `cd_default_css` enum('y','n') NOT NULL DEFAULT 'y' AFTER `cd_search_word`"; 189 $default = ( 'y' === get_option( 'dtbs_css_active', 'n' ) ) ? 'y' : 'n'; 190 $sql = 'ALTER TABLE `' . $wpdb->prefix . "dtbs` ADD `cd_default_css` enum('y','n') NOT NULL DEFAULT '" . $default . "' AFTER `cd_search_word`"; 190 191 $wpdb->query( $sql ); 191 192 } -
detabess/tags/2.0.1/detabess.php
r3753085 r3759320 5 5 * Plugin URI: https://detabess.com/ 6 6 * Author: Kura 7 * Version: 2.0 7 * Version: 2.0.1 8 8 * Text Domain: detabess 9 9 * Domain Path: /languages … … 73 73 $enqueue_form_assets = false; 74 74 foreach ( $dtbs_list as $dtbs_val ) { 75 if ( ! isset( $dtbs_val['cd_default_css'] ) ||'y' === $dtbs_val['cd_default_css'] ) {75 if ( isset( $dtbs_val['cd_default_css'] ) && 'y' === $dtbs_val['cd_default_css'] ) { 76 76 $enqueue_form_assets = true; 77 77 break; … … 179 179 } 180 180 require_once plugin_dir_path( __FILE__ ) . 'detabess-table.php'; 181 global $wpdb; 181 182 if ( '2' !== get_option( 'dtbs_match_has_cdd_id_index' ) ) { 182 183 update_dtbs_detail_match_indexes(); 183 184 update_option( 'dtbs_match_has_cdd_id_index', '2', false ); 185 } 186 if ( ! get_option( 'dtbs_has_default_css_column' ) ) { 187 update_dtbs_table(); 188 $css_column = $wpdb->get_row( 'SHOW COLUMNS FROM ' . $wpdb->prefix . "dtbs WHERE Field='cd_default_css'" ); 189 if ( ! empty( $css_column ) ) { 190 update_option( 'dtbs_has_default_css_column', '1', false ); 191 } 184 192 } 185 193 if ( get_option( 'dtbs_item_has_admin_style' ) ) { … … 236 244 add_action( 'dtbs_loaded', 'dtbs_create_submenus', 30 ); 237 245 246 247 add_filter( 'query_vars', function( $vars ) { 248 $vars[] = 'cdb'; 249 return $vars; 250 } ); 238 251 239 252 add_action( 'wp_enqueue_scripts', 'dtbs_files' ); -
detabess/tags/2.0.1/js/detabess.js
r3753085 r3759320 426 426 }); 427 427 } 428 const uri_param = 'scd=' + dtbs_common.class_info.scd + now_param; 428 var joined = now_param; 429 if ( joined && joined.charAt( 0 ) !== '&' && joined.charAt( 0 ) !== ',' ) { 430 joined = '&' + joined; 431 } 432 const uri_param = 'scd=' + dtbs_common.class_info.scd + joined; 433 434 var count_path = ''; 435 if ( $( '#from_url' ).length ) { 436 count_path = $( '#from_url' ).val(); 437 } 429 438 430 439 $.ajax( … … 436 445 'scdb' : uri_param, 437 446 'params' : other_param, 447 'path' : count_path, 438 448 'lang' : def_params.lang 439 449 }, … … 563 573 564 574 if ( form_class.match( /^([-_0-9a-z]+)$/ ) && 'dtbs_forms' !== form_class ) { 565 location.href = ( '' === param ) ? def_params.site_url + '/' + form_class + '/' : def_params.site_url + '/' + form_class + '/' + param + '/'; 575 var search_path = ( '' === param ) ? def_params.site_url + '/' + form_class + '/' : def_params.site_url + '/' + form_class + '/' + param + '/'; 576 if ( '' !== with_param ) { 577 search_path += '?' + with_param; 578 } 579 location.href = search_path; 566 580 } else { 567 location.href = def_params.site_url + '/?s=' + param + '&cdb=' + submit_id[1]; 581 var search_path = def_params.site_url + '/?s=dtbs&cdb=' + submit_id[1]; 582 if ( '' !== param ) { 583 search_path += '&' + param; 584 } 585 if ( '' !== with_param ) { 586 search_path += '&' + with_param; 587 } 588 location.href = search_path; 568 589 } 569 590 -
detabess/tags/2.0.1/readme.txt
r3753085 r3759320 3 3 Tags: database, search, data, relation, list, データベース, 検索 4 4 Requires at least: 4.7.0 5 Tested up to: 6.86 Stable tag: 2.0 5 Tested up to: 7.1 6 Stable tag: 2.0.1 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 117 117 == Upgrade Notice == 118 118 119 = 2.0.1 = 120 プラグイン付属の CSS を、管理画面でオフにしているときは出さないようにした。旧バージョンから入れ替えたときに出ていた警告を止めた。「すべて」が英語のまま残るのを直した。検索条件が結果に反映されるよう、検索の受け渡しを直した。WordPress 7.1.3 で動作することを確認した。 121 119 122 = 2.0 = 120 123 オブジェクト形式への整理、管理画面の権限確認、検索件数の高速化、編集画面が白くなる問題の修正を行いました。 … … 141 144 == Changelog == 142 145 146 = 2.0.1 = 147 * プラグイン付属の CSS を、管理画面でオフにしているときは出さないようにした 148 * 旧バージョンから入れ替えたときに出ていた警告を止めた 149 * 「すべて」が英語のまま残るのを直した 150 * 検索条件が結果に反映されるよう、検索の受け渡しを直した 151 * WordPress 7.1.3 で動作することを確認した 152 143 153 = 2.0 = 144 154 オブジェクト形式への整理、管理画面の権限確認、検索件数の高速化、編集画面が白くなる問題の修正を行いました。 -
detabess/trunk/detabess-core.php
r3753085 r3759320 51 51 return; 52 52 } 53 if ( ! $query instanceof WP_Query || ! $query->is_main_query() || ! $query->is_search() ) { 53 if ( ! $query instanceof WP_Query || ! $query->is_main_query() ) { 54 return; 55 } 56 57 $cdb = $this->request_cdb( $query ); 58 if ( $cdb <= 0 ) { 54 59 return; 55 60 } … … 67 72 68 73 $param = $this->post_param_array(); 69 70 // 通常の検索の場合 71 if ( ! isset( $_GET['cdb'] ) || ! is_numeric( $_GET['cdb'] ) ) { 72 return; 73 } 74 75 $cdb = 0; 76 77 if ( isset( $_GET['cdb'] ) ) { 78 $cdb = sanitize_key( $_GET['cdb'] ); 79 80 if ( ! is_numeric( $cdb ) ) { 81 return; 82 } 83 } else { 84 return; 85 } 86 87 // 検索ページではない場合 88 if ( ! $query->is_search() ) { 89 return; 90 } 91 92 // 管理画面,メインクエリに干渉しないために必須 93 if ( is_admin() || ! $query->is_main_query() ) { 94 return; 95 } 96 97 $target_postID = ( is_array( $param ) && count( $param ) > 0 ) ? $this->target_list( $cdb, $param , $lang ) : dtbs_all_postid_list( $cdb , $lang ); 74 if ( ! is_array( $param ) ) { 75 $param = array(); 76 } 77 78 // s に検索条件そのものを入れると、WordPress のキーワード検索で件数が 0 になる 79 $query->set( 's', '' ); 80 81 $target_postID = ( count( $param ) > 0 ) ? $this->target_list( $cdb, $param , $lang ) : dtbs_all_postid_list( $cdb , $lang ); 98 82 99 83 if ( count( $target_postID ) > 0 ) { … … 112 96 113 97 /** 114 * 入力されてきたパラメータの分解 115 * 116 * @param string $source URLパラメータを指定 117 * @return array 118 */ 98 * リクエストからデタベス ID を取り出す 99 * 100 * @param WP_Query|null $query メインクエリ 101 * @return int 102 */ 103 public function request_cdb( $query = null ) { 104 if ( isset( $_GET['cdb'] ) && is_numeric( $_GET['cdb'] ) ) { 105 return absint( $_GET['cdb'] ); 106 } 107 if ( $query instanceof WP_Query && is_numeric( $query->get( 'cdb' ) ) ) { 108 return absint( $query->get( 'cdb' ) ); 109 } 110 if ( function_exists( 'get_query_var' ) ) { 111 $query_cdb = get_query_var( 'cdb' ); 112 if ( is_numeric( $query_cdb ) && $query_cdb > 0 ) { 113 return absint( $query_cdb ); 114 } 115 } 116 return 0; 117 } 118 119 /** 120 * ci1_3 や ci6_28_29 を項目 ID => 値 に分解する 121 * 122 * @param array $res_param 既存の条件 123 * @param string $text URL またはクエリ文字列 124 */ 125 protected function append_directory_params( &$res_param, $text ) { 126 if ( ! is_string( $text ) || '' === $text ) { 127 return; 128 } 129 if ( ! preg_match_all( '/(?:^|[,\/&?])ci([0-9]+)_([0-9]+(?:_[0-9]+)*)/', $text, $matches, PREG_SET_ORDER ) ) { 130 return; 131 } 132 foreach ( $matches as $val ) { 133 $id = (string) absint( $val[1] ); 134 if ( isset( $res_param[ $id ] ) && '' !== (string) $res_param[ $id ] ) { 135 continue; 136 } 137 $res_param[ $id ] = str_replace( '_', ',', $val[2] ); 138 } 139 } 140 119 141 public function post_param_array( $source = '' ) { 120 if ( empty( $_GET['cdb'] ) && empty( $source ) ) {142 if ( empty( $_GET['cdb'] ) && empty( $source ) && $this->request_cdb() <= 0 ) { 121 143 return; 122 144 } … … 124 146 $res_param = array(); 125 147 126 $key = ! empty( $source ) ? $source : $_SERVER['QUERY_STRING'];148 $key = ! empty( $source ) ? $source : ( isset( $_SERVER['QUERY_STRING'] ) ? $_SERVER['QUERY_STRING'] : '' ); 127 149 128 150 preg_match_all( '/ci([0-9]{1,})=([,0-9]{1,})?/us', $key, $param, PREG_SET_ORDER ); … … 140 162 } 141 163 } 164 } 165 166 $this->append_directory_params( $res_param, $key ); 167 if ( empty( $source ) && isset( $_SERVER['REQUEST_URI'] ) ) { 168 $this->append_directory_params( $res_param, wp_unslash( $_SERVER['REQUEST_URI'] ) ); 142 169 } 143 170 … … 526 553 $list .= '<span' . $class_id_param . ">\n"; 527 554 if ( ! isset( $child_tree_list[ $cdi_id ] ) ) { 528 $list .= '<label><input type="radio" name="ci' . esc_attr( $cdi_id ) . '" value="0" checked="checked"><span><i></i>' . esc_html( __( ' For all', DTBS_SCNAME ) ) . '</span></label>' . "\n";555 $list .= '<label><input type="radio" name="ci' . esc_attr( $cdi_id ) . '" value="0" checked="checked"><span><i></i>' . esc_html( __( 'all', DTBS_SCNAME ) ) . '</span></label>' . "\n"; 529 556 } 530 557 foreach ( $val['list'] as $cdd_id => $cdd_val ) { -
detabess/trunk/detabess-info.php
r3753085 r3759320 54 54 <img src="<?php echo plugin_dir_url( __FILE__ ) ?>/images/info/common/logo.svg" alt="<?php _e( DTBS_SCNAME ); ?>" width="477" height="82" alt=""> 55 55 </span> 56 <span class="version">v2.0 </span>56 <span class="version">v2.0.1</span> 57 57 </h2> 58 58 </div> -
detabess/trunk/detabess-reg.php
r3753085 r3759320 303 303 $admin_style = dtbs_get_admin_item_style(); 304 304 305 $view_default_css = dtbs_view_default_css( $_GET['cd_id']);305 $view_default_css = dtbs_view_default_css( isset( $_GET['cd_id'] ) ? absint( $_GET['cd_id'] ) : 0 ); 306 306 307 307 if ( isset( $added_item_list ) ) { … … 589 589 590 590 if ( isset( $_GET['cd_id'] ) && function_exists( 'dtbsp_acf' ) ) { 591 $dtbsp_acf_style = array(); 592 $dtbsp_acf_style = get_option( 'dtbsp_acf_style' ); 593 if ( ! empty( $dtbsp_acf_style ) ) { 591 $dtbsp_acf_style = get_option( 'dtbsp_acf_style', '' ); 592 if ( is_string( $dtbsp_acf_style ) ) { 593 $dtbsp_acf_style = maybe_unserialize( $dtbsp_acf_style ); 594 } 595 if ( is_array( $dtbsp_acf_style ) ) { 594 596 foreach( $dtbsp_acf_style as $acf_id => $acf_vals ) { 597 if ( ! is_array( $acf_vals ) || ! isset( $acf_vals['cd_id'] ) ) { 598 continue; 599 } 595 600 if ( $_GET['cd_id'] == $acf_vals['cd_id'] ) { 596 601 $reg_param['acf'] = $acf_vals['style']; -
detabess/trunk/detabess-table.php
r3753085 r3759320 187 187 } 188 188 if ( 'n' == $active ) { 189 $sql = 'ALTER TABLE `' . $wpdb->prefix . "dtbs` ADD `cd_default_css` enum('y','n') NOT NULL DEFAULT 'y' AFTER `cd_search_word`"; 189 $default = ( 'y' === get_option( 'dtbs_css_active', 'n' ) ) ? 'y' : 'n'; 190 $sql = 'ALTER TABLE `' . $wpdb->prefix . "dtbs` ADD `cd_default_css` enum('y','n') NOT NULL DEFAULT '" . $default . "' AFTER `cd_search_word`"; 190 191 $wpdb->query( $sql ); 191 192 } -
detabess/trunk/detabess.php
r3753085 r3759320 5 5 * Plugin URI: https://detabess.com/ 6 6 * Author: Kura 7 * Version: 2.0 7 * Version: 2.0.1 8 8 * Text Domain: detabess 9 9 * Domain Path: /languages … … 73 73 $enqueue_form_assets = false; 74 74 foreach ( $dtbs_list as $dtbs_val ) { 75 if ( ! isset( $dtbs_val['cd_default_css'] ) ||'y' === $dtbs_val['cd_default_css'] ) {75 if ( isset( $dtbs_val['cd_default_css'] ) && 'y' === $dtbs_val['cd_default_css'] ) { 76 76 $enqueue_form_assets = true; 77 77 break; … … 179 179 } 180 180 require_once plugin_dir_path( __FILE__ ) . 'detabess-table.php'; 181 global $wpdb; 181 182 if ( '2' !== get_option( 'dtbs_match_has_cdd_id_index' ) ) { 182 183 update_dtbs_detail_match_indexes(); 183 184 update_option( 'dtbs_match_has_cdd_id_index', '2', false ); 185 } 186 if ( ! get_option( 'dtbs_has_default_css_column' ) ) { 187 update_dtbs_table(); 188 $css_column = $wpdb->get_row( 'SHOW COLUMNS FROM ' . $wpdb->prefix . "dtbs WHERE Field='cd_default_css'" ); 189 if ( ! empty( $css_column ) ) { 190 update_option( 'dtbs_has_default_css_column', '1', false ); 191 } 184 192 } 185 193 if ( get_option( 'dtbs_item_has_admin_style' ) ) { … … 236 244 add_action( 'dtbs_loaded', 'dtbs_create_submenus', 30 ); 237 245 246 247 add_filter( 'query_vars', function( $vars ) { 248 $vars[] = 'cdb'; 249 return $vars; 250 } ); 238 251 239 252 add_action( 'wp_enqueue_scripts', 'dtbs_files' ); -
detabess/trunk/js/detabess.js
r3753085 r3759320 426 426 }); 427 427 } 428 const uri_param = 'scd=' + dtbs_common.class_info.scd + now_param; 428 var joined = now_param; 429 if ( joined && joined.charAt( 0 ) !== '&' && joined.charAt( 0 ) !== ',' ) { 430 joined = '&' + joined; 431 } 432 const uri_param = 'scd=' + dtbs_common.class_info.scd + joined; 433 434 var count_path = ''; 435 if ( $( '#from_url' ).length ) { 436 count_path = $( '#from_url' ).val(); 437 } 429 438 430 439 $.ajax( … … 436 445 'scdb' : uri_param, 437 446 'params' : other_param, 447 'path' : count_path, 438 448 'lang' : def_params.lang 439 449 }, … … 563 573 564 574 if ( form_class.match( /^([-_0-9a-z]+)$/ ) && 'dtbs_forms' !== form_class ) { 565 location.href = ( '' === param ) ? def_params.site_url + '/' + form_class + '/' : def_params.site_url + '/' + form_class + '/' + param + '/'; 575 var search_path = ( '' === param ) ? def_params.site_url + '/' + form_class + '/' : def_params.site_url + '/' + form_class + '/' + param + '/'; 576 if ( '' !== with_param ) { 577 search_path += '?' + with_param; 578 } 579 location.href = search_path; 566 580 } else { 567 location.href = def_params.site_url + '/?s=' + param + '&cdb=' + submit_id[1]; 581 var search_path = def_params.site_url + '/?s=dtbs&cdb=' + submit_id[1]; 582 if ( '' !== param ) { 583 search_path += '&' + param; 584 } 585 if ( '' !== with_param ) { 586 search_path += '&' + with_param; 587 } 588 location.href = search_path; 568 589 } 569 590 -
detabess/trunk/readme.txt
r3753085 r3759320 3 3 Tags: database, search, data, relation, list, データベース, 検索 4 4 Requires at least: 4.7.0 5 Tested up to: 6.86 Stable tag: 2.0 5 Tested up to: 7.1 6 Stable tag: 2.0.1 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 117 117 == Upgrade Notice == 118 118 119 = 2.0.1 = 120 プラグイン付属の CSS を、管理画面でオフにしているときは出さないようにした。旧バージョンから入れ替えたときに出ていた警告を止めた。「すべて」が英語のまま残るのを直した。検索条件が結果に反映されるよう、検索の受け渡しを直した。WordPress 7.1.3 で動作することを確認した。 121 119 122 = 2.0 = 120 123 オブジェクト形式への整理、管理画面の権限確認、検索件数の高速化、編集画面が白くなる問題の修正を行いました。 … … 141 144 == Changelog == 142 145 146 = 2.0.1 = 147 * プラグイン付属の CSS を、管理画面でオフにしているときは出さないようにした 148 * 旧バージョンから入れ替えたときに出ていた警告を止めた 149 * 「すべて」が英語のまま残るのを直した 150 * 検索条件が結果に反映されるよう、検索の受け渡しを直した 151 * WordPress 7.1.3 で動作することを確認した 152 143 153 = 2.0 = 144 154 オブジェクト形式への整理、管理画面の権限確認、検索件数の高速化、編集画面が白くなる問題の修正を行いました。
Note:
See TracChangeset
for help on using the changeset viewer.