Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $sqlstr = '';
- $blog_list = get_blog_list( 0, 'all' );
- if (($white == 0 && !in_array(1, $wgt_miss)) || ($white == 1 && in_array(1, $wgt_white))) {
- $sqlstr = "(SELECT 1 as blog_id, id, post_date_gmt from ".$table_prefix ."posts where post_status = 'publish' and post_type = 'post' and post_title <> '".__('Hello world!')."' ORDER BY post_date_gmt desc ".$limitstr.")";
- }
- $uni = '';
- foreach ($blog_list AS $blog) {
- if (($white == 0 && !in_array($blog['blog_id'], $wgt_miss) && $blog['blog_id'] != 1) ||
- ($white == 1 && $blog['blog_id'] != 1 && in_array($blog['blog_id'], $wgt_white))) {
- if ($sqlstr != '')
- $uni = ' union ';;
- $sqlstr .= $uni . " (SELECT ".$blog['blog_id']." as blog_id, id, post_date_gmt from ".$table_prefix .$blog['blog_id']."_posts where post_status = 'publish' and post_type = 'post' and post_title <> '".__('Hello world!')."' ORDER BY post_date_gmt desc ".$limitstr.")";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement