Changeset 902
- Timestamp:
- Feb 15, 2025, 9:29:56 AM (7 days ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Application/Version.php
r900 r902 7 7 8 8 $Version = '1.0'; 9 $Revision = 90 0; // Subversion revision9 $Revision = 902; // Subversion revision 10 10 $DatabaseRevision = 900; // Database structure revision 11 $ReleaseDate = strtotime('202 4-04-10');11 $ReleaseDate = strtotime('2025-02-15'); -
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 { -
trunk/includes/Global.php
r901 r902 311 311 $Moderators = array('Překladatel', 'Moderátor', 'Administrátor'); 312 312 313 function HumanDate( string $SQLDateTime): string314 { 315 if ( $SQLDateTime == '') return ' ';313 function HumanDate(?string $SQLDateTime): string 314 { 315 if (($SQLDateTime == NULL) or ($SQLDateTime == '')) return ' '; 316 316 $DateTimeParts = explode(' ', $SQLDateTime); 317 317 if ($DateTimeParts[0] != '0000-00-00') … … 322 322 } 323 323 324 function HumanDateTime( string $SQLDateTime): string325 { 326 if ( $SQLDateTime == '') return ' ';324 function HumanDateTime(?string $SQLDateTime): string 325 { 326 if (($SQLDateTime == NULL) or ($SQLDateTime == '')) return ' '; 327 327 $DateTimeParts = explode(' ', $SQLDateTime); 328 328 if ($DateTimeParts[0] != '0000-00-00' and $SQLDateTime <> '') … … 430 430 function LoadCommandLineParameters(): void 431 431 { 432 if (!array_key_exists('REMOTE_ADDR', $_SERVER) )432 if (!array_key_exists('REMOTE_ADDR', $_SERVER) && is_array($_SERVER['argv'])) 433 433 { 434 434 foreach ($_SERVER['argv'] as $Parameter)
Note:
See TracChangeset
for help on using the changeset viewer.