Changeset 902 for trunk/Modules
- Timestamp:
- Feb 15, 2025, 9:29:56 AM (2 weeks ago)
- Location:
- trunk/Modules
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Forum/Forum.php
r900 r902 190 190 } else $SearchQuery = ''; 191 191 192 $DbResult = $this->System->Database->query('SELECT * FROM `ForumThread` WHERE ID='.($_GET['Thread']*1).' LIMIT 1'); 193 if ($DbResult->num_rows > 0) 194 { 195 $Thread = $DbResult->fetch_assoc(); 196 $Output .= '<h3>'.htmlspecialchars($Thread['Text']).'</h3>'; 197 198 $DbResult = $this->System->Database->query('SELECT COUNT(*) FROM `ForumText` WHERE `Thread` = '.($_GET['Thread']*1).' '.$SearchQuery); 199 $DbRow = $DbResult->fetch_row(); 200 $PageList = GetPageList($DbRow[0]); 201 202 $Output .= $PageList['Output']; 203 $Output .= '<div class="shoutbox">'; 204 $DbResult = $this->System->Database->query('SELECT * FROM `ForumText` WHERE `Thread` = '. 205 ($_GET['Thread'] * 1).' '.$SearchQuery.' ORDER BY `ID` DESC '.$PageList['SQLLimit']); 206 while ($Line = $DbResult->fetch_assoc()) 207 { 208 if ($User->Id == $Line['User']) 192 $ThreadId = 0; 193 if (TryGetUrlParameterInt('Thread', $ThreadId)) 194 { 195 $DbResult = $this->System->Database->query('SELECT * FROM `ForumThread` WHERE ID='.$ThreadId.' LIMIT 1'); 196 if ($DbResult->num_rows > 0) 209 197 { 210 $edit = '<a href="?Edit='.$Line['ID'].'">'.T('edit').'</a>'; 211 } else $edit = ''; 212 $Text = str_replace("\n", '<br />', ShowBBcodes(htmlspecialchars($Line['Text']))); 213 $Output .= '<div><span style="float:right;">'.$edit.' ('.HumanDate($Line['Date']). 214 ')</span><strong>'.$Line['UserName'].'</strong>: '.$Text.' </div> '; 215 } 216 $Output .= '</div>'.$PageList['Output']; 217 } else $Output .= ShowMessage(T('Item not found'), MESSAGE_CRITICAL); 198 $Thread = $DbResult->fetch_assoc(); 199 $Output .= '<h3>'.htmlspecialchars($Thread['Text']).'</h3>'; 200 201 $DbResult = $this->System->Database->query('SELECT COUNT(*) FROM `ForumText` WHERE `Thread` = '.$ThreadId.' '.$SearchQuery); 202 $DbRow = $DbResult->fetch_row(); 203 $PageList = GetPageList($DbRow[0]); 204 205 $Output .= $PageList['Output']; 206 $Output .= '<div class="shoutbox">'; 207 $DbResult = $this->System->Database->query('SELECT * FROM `ForumText` WHERE `Thread` = '. 208 $ThreadId.' '.$SearchQuery.' ORDER BY `ID` DESC '.$PageList['SQLLimit']); 209 while ($Line = $DbResult->fetch_assoc()) 210 { 211 if ($User->Id == $Line['User']) 212 { 213 $Edit = '<a href="?Edit='.$Line['ID'].'">'.T('edit').'</a>'; 214 } else $Edit = ''; 215 $Text = str_replace("\n", '<br />', ShowBBcodes(htmlspecialchars($Line['Text']))); 216 $Output .= '<div><span style="float:right;">'.$Edit.' ('.HumanDate($Line['Date']). 217 ')</span><strong>'.$Line['UserName'].'</strong>: '.$Text.' </div> '; 218 } 219 $Output .= '</div>'.$PageList['Output']; 220 } else $Output .= ShowMessage(T('Item not found'), MESSAGE_CRITICAL); 221 } else $Output .= ShowMessage(T('Id not found'), MESSAGE_CRITICAL); 218 222 return $Output; 219 223 } -
trunk/Modules/Wiki/Wiki.php
r893 r902 25 25 { 26 26 $DbRow = $DbResult->fetch_assoc(); 27 if (array_key_exists('ver', $_GET)) 28 { 29 $DbResult2 = $this->Database->select('WikiPageContent', '*', 'Page='.$DbRow['Id'].' AND Id='.$_GET['ver']*1); 27 $Ver = 0; 28 if (TryGetUrlParameterInt('ver', $Ver)) 29 { 30 $DbResult2 = $this->Database->select('WikiPageContent', '*', 'Page='.$DbRow['Id'].' AND Id='.$Ver); 30 31 if ($DbResult2->num_rows > 0) 31 32 {
Note:
See TracChangeset
for help on using the changeset viewer.