Changeset 2858932
- Timestamp:
- 02/02/2023 11:54:57 AM (3 years ago)
- Location:
- dashi/trunk
- Files:
-
- 5 edited
-
classes/Posttype/Posttype.php (modified) (2 diffs)
-
classes/Posttype/Search.php (modified) (3 diffs)
-
classes/Session.php (modified) (1 diff)
-
dashi.php (modified) (1 diff)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
dashi/trunk/classes/Posttype/Posttype.php
r2843753 r2858932 106 106 { 107 107 add_action('posts_request', array('\\Dashi\\Core\\Posttype\\Search', 'postsRequest'), 1, 2); 108 add_action('posts_join', array('\\Dashi\\Core\\Posttype\\Search', 'searchJoin') );108 add_action('posts_join', array('\\Dashi\\Core\\Posttype\\Search', 'searchJoin'), 1, 2); 109 109 add_filter('posts_search', array('\\Dashi\\Core\\Posttype\\Search', 'searchFields'), 1, 2); 110 110 add_filter('posts_distinct', array('\\Dashi\\Core\\Posttype\\Search', 'searchDistinct'), 1, 2); … … 362 362 $posttypes_files[] = $filename; 363 363 } 364 365 /* 366 require PHP7: 367 foreach (glob(get_stylesheet_directory()."/posttype/*.php") as $filename) 368 { 369 try { 370 require_once($filename); 371 } catch (\ParseError $e) { 372 trigger_error("cannot include posttype file. '$e'", E_USER_ERROR); 373 } 374 $posttypes_files[] = $filename; 375 } 376 */ 364 377 365 378 // 子テーマを使っているなら、親テーマを読む -
dashi/trunk/classes/Posttype/Search.php
r2224211 r2858932 75 75 * @return string 76 76 */ 77 public static function searchJoin($join )77 public static function searchJoin($join, $obj) 78 78 { 79 79 global $wp_query, $wpdb; … … 85 85 if ( ! static::nullBytelessS()) return $join; 86 86 if ( ! isset($wp_query->is_search) || ! $wp_query->is_search) return $join; 87 88 $join .= " LEFT OUTER JOIN {$wpdb->postmeta} ON ({$wpdb->posts}.ID = {$wpdb->postmeta}.post_id)"; 87 if ( ! isset($obj->query['s'])) return $join; 88 89 // $join .= " LEFT OUTER JOIN {$wpdb->postmeta} ON ({$wpdb->posts}.ID = {$wpdb->postmeta}.post_id)"; 90 $join .= " LEFT OUTER JOIN {$wpdb->postmeta} AS post_metas ON ({$wpdb->posts}.ID = post_metas.post_id)"; 89 91 return $join; 90 92 } … … 105 107 106 108 // modify sql 109 /* $sql = $wpdb->prepare( 110 ") OR ({$wpdb->postmeta}.meta_key = 'dashi_search' AND {$wpdb->postmeta}.meta_value LIKE %s", 111 '%'.static::nullBytelessS().'%'); 112 */ 107 113 $sql = $wpdb->prepare( 108 ") OR ( {$wpdb->postmeta}.meta_key = 'dashi_search' AND {$wpdb->postmeta}.meta_value LIKE %s",114 ") OR (post_metas.meta_key = 'dashi_search' AND post_metas.meta_value LIKE %s", 109 115 '%'.static::nullBytelessS().'%'); 110 116 $search = str_replace(')))', $sql.')))', $search); -
dashi/trunk/classes/Session.php
r1722033 r2858932 43 43 ini_set('session.use_trans_sid', 0); 44 44 ini_set('session.use_only_cookies', 1); 45 // session_save_path('/var/tmp'); 45 46 session_name($session_name); 46 47 session_start(); -
dashi/trunk/dashi.php
r2843753 r2858932 7 7 Text Domain: dashi 8 8 Domain Path: /languages/ 9 Version: 3.0. 59 Version: 3.0.6 10 10 Author URI: http://www.jidaikobo.com/ 11 11 thx: https://github.com/trentrichardson/jQuery-Timepicker-Addon/tree/master/src -
dashi/trunk/readme.txt
r2843753 r2858932 44 44 == Changelog == 45 45 46 = 3.0.6 = 47 fix advanced search problem 48 46 49 = 3.0.5 = 47 50 fix php 8.0 not allow null argument at some built-in functions
Note: See TracChangeset
for help on using the changeset viewer.