Changeset 7116
- Timestamp:
- 08/10/2020 07:51:23 PM (4 years ago)
- Location:
- branches/0.9
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/0.9/bb-admin/admin-functions.php
r6160 r7116 35 35 36 36 $message = "<div class='$class'>$message</div>"; 37 $message = str_replace("'", "\'", $message); 38 $lambda = create_function( '', "echo '$message';" ); 37 $lambda = function () use ( $message ) { echo $message; }; 39 38 add_action( 'bb_admin_notices', $lambda ); 40 39 return $lambda; -
branches/0.9/bb-includes/template-functions.php
r7115 r7116 1009 1009 $user_id = bb_get_current_user_info( 'id' ); 1010 1010 if ( isset($topic->bozos[$user_id]) && 'all' != @$_GET['view'] ) 1011 add_filter('get_topic_deleted_posts', create_function('$a', "\$a -= {$topic->bozos[$user_id]}; return \$a;"));1011 add_filter('get_topic_deleted_posts', function ( $a ) use ( $topic, $user_id ) { $a -= $topic->bozos[$user_id]; return $a; } ); 1012 1012 if ( $deleted = get_topic_deleted_posts( $id ) ) { 1013 1013 $extra = sprintf(__('+%d more'), $deleted); -
branches/0.9/search.php
r2378 r7116 8 8 9 9 if ( $q = stripslashes( $q ) ) { 10 add_filter( 'bb_recent_search_fields', create_function( '$f', 'return $f . ", MAX(post_time) AS post_time";' ));11 add_filter( 'bb_recent_search_group_by', create_function( '', 'return "t.topic_id";' ));10 add_filter( 'bb_recent_search_fields', function( $f ) { return $f . ", MAX(post_time) AS post_time"; } ); 11 add_filter( 'bb_recent_search_group_by', function() { return "t.topic_id"; } ); 12 12 $bb_query_form->BB_Query_Form( 'post', array(), array( 'order_by' => 'p.post_time', 'per_page' => 5, 'post_status' => 0, 'topic_status' => 0, 'post_text' => $q, 'forum_id', 'tag', 'topic_author', 'post_author' ), 'bb_recent_search' ); 13 13 $recent = $bb_query_form->results;
Note: See TracChangeset
for help on using the changeset viewer.