"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "Upload/forumdisplay.php" between
mybb_1819.zip and mybb_1820.zip

About: MyBB is a multilingual, standards-compliant and free forum (discussion board) software.

forumdisplay.php  (mybb_1819):forumdisplay.php  (mybb_1820)
skipping to change at line 22 skipping to change at line 22
define('THIS_SCRIPT', 'forumdisplay.php'); define('THIS_SCRIPT', 'forumdisplay.php');
$templatelist = "forumdisplay,forumdisplay_thread,forumbit_depth1_cat,forumbit_d epth2_cat,forumbit_depth2_forum,forumdisplay_subforums,forumdisplay_threadlist,f orumdisplay_moderatedby,forumdisplay_searchforum,forumdisplay_thread_rating,foru mdisplay_threadlist_rating"; $templatelist = "forumdisplay,forumdisplay_thread,forumbit_depth1_cat,forumbit_d epth2_cat,forumbit_depth2_forum,forumdisplay_subforums,forumdisplay_threadlist,f orumdisplay_moderatedby,forumdisplay_searchforum,forumdisplay_thread_rating,foru mdisplay_threadlist_rating";
$templatelist .= ",forumbit_depth1_forum_lastpost,forumdisplay_thread_multipage_ page,forumdisplay_thread_multipage,forumdisplay_thread_multipage_more,forumdispl ay_thread_gotounread,forumbit_depth2_forum_lastpost,forumdisplay_rules_link,foru mdisplay_orderarrow,forumdisplay_newthread"; $templatelist .= ",forumbit_depth1_forum_lastpost,forumdisplay_thread_multipage_ page,forumdisplay_thread_multipage,forumdisplay_thread_multipage_more,forumdispl ay_thread_gotounread,forumbit_depth2_forum_lastpost,forumdisplay_rules_link,foru mdisplay_orderarrow,forumdisplay_newthread";
$templatelist .= ",multipage,multipage_breadcrumb,multipage_end,multipage_jump_p age,multipage_nextpage,multipage_page,multipage_page_current,multipage_page_link _current,multipage_prevpage,multipage_start,forumdisplay_thread_unapproved_posts ,forumdisplay_nothreads"; $templatelist .= ",multipage,multipage_breadcrumb,multipage_end,multipage_jump_p age,multipage_nextpage,multipage_page,multipage_page_current,multipage_page_link _current,multipage_prevpage,multipage_start,forumdisplay_thread_unapproved_posts ,forumdisplay_nothreads";
$templatelist .= ",forumjump_advanced,forumjump_special,forumjump_bit,forumdispl ay_password_wrongpass,forumdisplay_password,forumdisplay_inlinemoderation_custom _tool,forumbit_subforums,forumbit_moderators,forumbit_depth2_forum_lastpost_neve r,forumbit_depth2_forum_lastpost_hidden"; $templatelist .= ",forumjump_advanced,forumjump_special,forumjump_bit,forumdispl ay_password_wrongpass,forumdisplay_password,forumdisplay_inlinemoderation_custom _tool,forumbit_subforums,forumbit_moderators,forumbit_depth2_forum_lastpost_neve r,forumbit_depth2_forum_lastpost_hidden";
$templatelist .= ",forumdisplay_usersbrowsing_user,forumdisplay_usersbrowsing,fo rumdisplay_inlinemoderation,forumdisplay_thread_modbit,forumdisplay_inlinemodera tion_col,forumdisplay_inlinemoderation_selectall,forumdisplay_threadlist_clearpa ss,forumdisplay_thread_rating_moved"; $templatelist .= ",forumdisplay_usersbrowsing_user,forumdisplay_usersbrowsing,fo rumdisplay_inlinemoderation,forumdisplay_thread_modbit,forumdisplay_inlinemodera tion_col,forumdisplay_inlinemoderation_selectall,forumdisplay_threadlist_clearpa ss,forumdisplay_thread_rating_moved";
$templatelist .= ",forumdisplay_announcements_announcement,forumdisplay_announce ments,forumdisplay_threads_sep,forumbit_depth3_statusicon,forumbit_depth3,forumd isplay_sticky_sep,forumdisplay_thread_attachment_count,forumdisplay_rssdiscovery ,forumbit_moderators_group"; $templatelist .= ",forumdisplay_announcements_announcement,forumdisplay_announce ments,forumdisplay_threads_sep,forumbit_depth3_statusicon,forumbit_depth3,forumd isplay_sticky_sep,forumdisplay_thread_attachment_count,forumdisplay_rssdiscovery ,forumbit_moderators_group";
$templatelist .= ",forumdisplay_inlinemoderation_openclose,forumdisplay_inlinemo deration_stickunstick,forumdisplay_inlinemoderation_softdelete,forumdisplay_inli nemoderation_restore,forumdisplay_inlinemoderation_delete,forumdisplay_inlinemod eration_manage,forumdisplay_nopermission"; $templatelist .= ",forumdisplay_inlinemoderation_openclose,forumdisplay_inlinemo deration_stickunstick,forumdisplay_inlinemoderation_softdelete,forumdisplay_inli nemoderation_restore,forumdisplay_inlinemoderation_delete,forumdisplay_inlinemod eration_manage,forumdisplay_nopermission";
$templatelist .= ",forumbit_depth2_forum_unapproved_posts,forumbit_depth2_forum_ unapproved_threads,forumbit_moderators_user,forumdisplay_inlinemoderation_standa rd,forumdisplay_threadlist_prefixes_prefix,forumdisplay_threadlist_prefixes,foru mdisplay_thread_icon,forumdisplay_rules"; $templatelist .= ",forumbit_depth2_forum_unapproved_posts,forumbit_depth2_forum_ unapproved_threads,forumbit_moderators_user,forumdisplay_inlinemoderation_standa rd,forumdisplay_threadlist_prefixes_prefix,forumdisplay_threadlist_prefixes,foru mdisplay_thread_icon,forumdisplay_rules";
$templatelist .= ",forumdisplay_thread_deleted,forumdisplay_announcements_announ cement_modbit,forumbit_depth2_forum_viewers,forumdisplay_threadlist_sortrating,f orumdisplay_inlinemoderation_custom,forumdisplay_announcement_rating,forumdispla y_inlinemoderation_approveunapprove"; $templatelist .= ",forumdisplay_thread_deleted,forumdisplay_announcements_announ cement_modbit,forumbit_depth2_forum_viewers,forumdisplay_threadlist_sortrating,f orumdisplay_inlinemoderation_custom,forumdisplay_announcement_rating,forumdispla y_inlinemoderation_approveunapprove,forumdisplay_threadlist_subscription";
require_once "./global.php"; require_once "./global.php";
require_once MYBB_ROOT."inc/functions_post.php"; require_once MYBB_ROOT."inc/functions_post.php";
require_once MYBB_ROOT."inc/functions_forumlist.php"; require_once MYBB_ROOT."inc/functions_forumlist.php";
require_once MYBB_ROOT."inc/class_parser.php"; require_once MYBB_ROOT."inc/class_parser.php";
$parser = new postParser; $parser = new postParser;
$orderarrow = $sortsel = array('rating' => '', 'subject' => '', 'starter' => '', 'started' => '', 'replies' => '', 'views' => '', 'lastpost' => ''); $orderarrow = $sortsel = array('rating' => '', 'subject' => '', 'starter' => '', 'started' => '', 'replies' => '', 'views' => '', 'lastpost' => '');
$ordersel = array('asc' => '', 'desc' => ''); $ordersel = array('asc' => '', 'desc' => '');
$datecutsel = array(1 => '', 5 => '', 10 => '', 20 => '', 50 => '', 75 => '', 10 0 => '', 365 => '', 9999 => ''); $datecutsel = array(1 => '', 5 => '', 10 => '', 20 => '', 50 => '', 75 => '', 10 0 => '', 365 => '', 9999 => '');
skipping to change at line 847 skipping to change at line 847
$announcementlist = ''; $announcementlist = '';
} }
$tids = $threadcache = array(); $tids = $threadcache = array();
$icon_cache = $cache->read("posticons"); $icon_cache = $cache->read("posticons");
if($fpermissions['canviewthreads'] != 0) if($fpermissions['canviewthreads'] != 0)
{ {
$plugins->run_hooks("forumdisplay_get_threads"); $plugins->run_hooks("forumdisplay_get_threads");
// Allow viewing unapproved threads for logged in users
if($mybb->user['uid'] && $mybb->settings['showownunapproved'])
{
$tvisibleonly .= " OR (t.fid='$fid' AND t.uid=".$mybb->user['uid'
].")";
}
// Start Getting Threads // Start Getting Threads
$query = $db->query(" $query = $db->query("
SELECT t.*, {$ratingadd}t.username AS threadusername, u.username SELECT t.*, {$ratingadd}t.username AS threadusername, u.username
FROM ".TABLE_PREFIX."threads t FROM ".TABLE_PREFIX."threads t
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid = t.uid) LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid = t.uid)
WHERE t.fid='$fid' $tuseronly $tvisibleonly $datecutsql2 $prefixs ql2 WHERE t.fid='$fid' $tuseronly $tvisibleonly $datecutsql2 $prefixs ql2
ORDER BY t.sticky DESC, {$t}{$sortfield} $sortordernow $sortfield 2 ORDER BY t.sticky DESC, {$t}{$sortfield} $sortordernow $sortfield 2
LIMIT $start, $perpage LIMIT $start, $perpage
"); ");
skipping to change at line 1447 skipping to change at line 1453
$unread_threads = fetch_unread_count($fid); $unread_threads = fetch_unread_count($fid);
if($unread_threads !== false && $unread_threads == 0 && empty($unread_forums)) if($unread_threads !== false && $unread_threads == 0 && empty($unread_forums))
{ {
mark_forum_read($fid); mark_forum_read($fid);
} }
// Subscription status // Subscription status
$add_remove_subscription = 'add'; $add_remove_subscription = 'add';
$add_remove_subscription_text = $lang->subscribe_forum; $add_remove_subscription_text = $lang->subscribe_forum;
$addremovesubscription = '';
if($mybb->user['uid']) if($mybb->user['uid'])
{ {
$query = $db->simple_select("forumsubscriptions", "fid", "fid='".$fid."' AND uid='{$mybb->user['uid']}'", array('limit' => 1)); $query = $db->simple_select("forumsubscriptions", "fid", "fid='".$fid."' AND uid='{$mybb->user['uid']}'", array('limit' => 1));
if($db->fetch_field($query, 'fid')) if($db->fetch_field($query, 'fid'))
{ {
$add_remove_subscription = 'remove'; $add_remove_subscription = 'remove';
$add_remove_subscription_text = $lang->unsubscribe_forum; $add_remove_subscription_text = $lang->unsubscribe_forum;
} }
eval("\$addremovesubscription = \"".$templates->get("forumdisplay_threadl
ist_subscription")."\";");
} }
$inline_edit_js = $clearstoredpass = ''; $inline_edit_js = $clearstoredpass = '';
// Is this a real forum with threads? // Is this a real forum with threads?
if($foruminfo['type'] != "c") if($foruminfo['type'] != "c")
{ {
if($fpermissions['canviewthreads'] != 1) if($fpermissions['canviewthreads'] != 1)
{ {
eval("\$threads = \"".$templates->get("forumdisplay_nopermission" )."\";"); eval("\$threads = \"".$templates->get("forumdisplay_nopermission" )."\";");
 End of changes. 4 change blocks. 
1 lines changed or deleted 12 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)