FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » Bug Reports » Extra ampersand in URL causes incomplete topic listing
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Extra ampersand in URL causes incomplete topic listing [message #186158 is a reply to message #186154] Mon, 16 June 2014 22:11 Go to previous message
Matt Samudio is currently offline  Matt Samudio   United States
Messages: 3
Registered: June 2014
Location: Albert Lea, MN
Karma:
Junior Member

Here is a patch for the problem ...

diff -Naur 3.0.5/theme/default/index.php rk4n3/theme/default/index.php
--- 3.0.5/theme/default/index.php	2014-06-16 16:04:39.000000000 -0500
+++ rk4n3/theme/default/index.php	2014-06-16 17:16:46.000000000 -0500
@@ -140,9 +140,16 @@
 		}
 
 		/* Compact category view (ignore when expanded). */
-		if ($r[18] & 4 && $cat_id != $cid) {
-			$cbuf .= '&nbsp; '.(_uid && $r[15] < $r[2] && $usr->last_read < $r[2] ? '**' : '' )  .'
-<a href="'.(empty($r[12]) ? 'index.php?t='.t_thread_view.'&amp;frm_id='.$r[7].'&amp;'._rsid : $r[12] )  .'">'.$r[10].'</a>';
+		if ( $r[18] & 4 && $cat_id != $cid) {
+			$sRSID = ''._rsid;
+			$sTID = empty( $sRSID) ? '' : '&amp;'._rsid;
+			$sDbg = ''; // '&amp;dbg=rk4n3_01';
+			$sFrm = '&amp;frm_id='.$r[7];
+			$sX = (_uid && $r[15] < $r[2] && $usr->last_read < $r[2]) ?'**':'';
+			$sURL	= empty($r[12])
+					?	'index.php?t='.t_thread_view.$sFrm.$sTID.$sDbg
+					: $r[12];
+			$cbuf .= '&nbsp; '.$sX.'<a href="'.$sURL.'">'.$r[10].'</a>';
 			continue;
 		}
 
@@ -180,10 +187,16 @@
 			$moderators = '&nbsp;';
 		}
 
+		$sRSID = ''._rsid;
+		$sTID = empty( $sRSID) ? '' : '&amp;'._rsid;
+		$sDbg = ''; // '&amp;dbg=rk4n3_02';
+		$sFrm = '&amp;frm_id='.$r[7];
+		$sRdr = empty($r[12]) ? $forum_read_indicator : '<img title="Redirection" src="theme/default/images/moved.png" alt="" />';
+		$sURL = empty($r[12]) ? 'index.php?t='.t_thread_view.$sFrm.$sTID : $r[12];
 		$forum_list_table_data .= '<tr style="display: '.(empty($collapse[$cid]) ? 'table-row' : 'none' )  .'" class="row child-c'.$r[5].'">
 	<td class="RowStyleA wo">'.($r[6] ? '<img src="images/forum_icons/'.$r[6].'" alt="Forum Icon" />' : '&nbsp;' ) .'</td>
-	<td class="RowStyleB ac wo">'.(empty($r[12]) ? $forum_read_indicator : '<img title="Redirection" src="theme/default/images/moved.png" alt="" />' )  .'</td>
-	<td class="RowStyleA wa"><a href="'.(empty($r[12]) ? 'index.php?t='.t_thread_view.'&amp;frm_id='.$r[7].'&amp;'._rsid : $r[12] )  .'" class="big">'.$r[10].'</a>'.($r[11] ? '<br />'.$r[11] : '').$moderators.'</td>
+	<td class="RowStyleB ac wo">'.$sRdr.'</td>
+	<td class="RowStyleA wa"><a href="'.$sURL.$sDbg.'" class="big">'.$r[10].'</a>'.($r[11] ? '<br />'.$r[11] : '').$moderators.'</td>
 	<td class="RowStyleB ac">'.(empty($r[12]) ? $r[13] : '--' )  .'</td>
 	<td class="RowStyleB ac">'.(empty($r[12]) ? $r[14] : '--' )  .'</td>
 	<td class="RowStyleA ac nw">'.(empty($r[12]) ? ($r[8] ? '<span class="DateText">'.strftime('%a, %d %B %Y', $r[2]).'</span><br />By: '.($r[3] ? '<a href="index.php?t=usrinfo&amp;id='.$r[3].'&amp;'._rsid.'">'.$r[4].'</a>' : $GLOBALS['ANON_NICK'] ) .' <a href="index.php?t='.d_thread_view.'&amp;goto='.$r[8].'&amp;'._rsid.'#msg_'.$r[8].'"><img title="'.$r[0].'" src="theme/default/images/goto.gif" alt="'.$r[0].'" /></a>' : 'n/a' )  : '--' )  .'</td>
@@ -459,9 +472,9 @@
 </div>
 <?php echo (_uid ? '<span class="GenText">Welcome <b>'.$usr->alias.'</b>, your last visit was on '.strftime('%a, %d %B %Y %H:%M', $usr->last_visit).'</span><br />' : ''); ?>
 <span class="GenText fb">Show:</span>
-<a href="index.php?t=selmsg&amp;date=today&amp;<?php echo _rsid; ?>&amp;frm_id=<?php echo (isset($frm->forum_id) ? $frm->forum_id.'' : $frm->id.'' )  .'&amp;th='.$th.'" title="Show all messages that were posted today" rel="nofollow">Today's Messages</a>
+<a href="index.php?t=selmsg&amp;date=today&amp;<?php echo _rsid; ?>&amp;frm_id=<?php echo (isset($frm->forum_id) ? $frm->forum_id.'' : $frm->id.'' ).'&amp;th='.$th.'" title="Show all messages that were posted today" rel="nofollow">Today's Messages</a>
 '.(_uid ? '<b>::</b> <a href="index.php?t=selmsg&amp;unread=1&amp;'._rsid.'&amp;frm_id='.(isset($frm->forum_id) ? $frm->forum_id.'' : $frm->id.'' )  .'" title="Show all unread messages" rel="nofollow">Unread Messages</a>&nbsp;' : ''); ?>
-<?php echo (!$th ? '<b>::</b> <a href="index.php?t=selmsg&amp;reply_count=0&amp;'._rsid.'&amp;frm_id='.(isset($frm->forum_id) ? $frm->forum_id.'' : $frm->id.'' )  .'" title="Show all messages, which have no replies" rel="nofollow">Unanswered Messages</a>&nbsp;' : ''); ?>
+<?php echo (!$th ? '<b>::</b> <a href="index.php?t=selmsg&amp;reply_count=0&amp;'._rsid.'&amp;frm_id='.(isset($frm->forum_id) ? $frm->forum_id.'' : $frm->id.'' ).'" title="Show all messages, which have no replies" rel="nofollow">Unanswered Messages</a>&nbsp;' : ''); ?>
 <b>::</b> <a href="index.php?t=polllist&amp;<?php echo _rsid; ?>" rel="nofollow">Show Polls</a>
 <b>::</b> <a href="index.php?t=mnav&amp;<?php echo _rsid; ?>" rel="nofollow">Message Navigator</a><?php echo $admin_cp; ?>
 <?php echo $cat_path; ?>


I've also attached a patch file.

[Updated on: Mon, 16 June 2014 22:29]

Report message to a moderator

[Message index]
 
Read Message
Read Message
Previous Topic: secret admin log in screen (aka batcave)
Next Topic: global settings not sticking
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 24 19:30:04 GMT 2024

Total time taken to generate the page: 0.03761 seconds