Advertisement
jungermedia

Diamond Multisite Widgets Limit Fix

May 15th, 2011
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. $sqlstr = '';
  2. $blog_list = get_blog_list( 0, 'all' );
  3. if (($white == 0 && !in_array(1, $wgt_miss)) || ($white == 1 && in_array(1, $wgt_white))) {
  4. $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.")";
  5. }
  6. $uni = '';
  7.  
  8. foreach ($blog_list AS $blog) {
  9. if (($white == 0 && !in_array($blog['blog_id'], $wgt_miss) && $blog['blog_id'] != 1) ||
  10. ($white == 1 && $blog['blog_id'] != 1 && in_array($blog['blog_id'], $wgt_white))) {
  11. if ($sqlstr != '')
  12. $uni = ' union ';;
  13. $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.")";
  14. }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement