Changeset 600
- Timestamp:
- Nov 25, 2013, 9:48:38 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Log/Log.php
r597 r600 54 54 define('LOG_TYPE_CZWOW', 13); 55 55 define('LOG_TYPE_ADMINISTRATION', 14); 56 define('LOG_TYPE_PAGE_NOT_FOUND', 15); 56 57 57 58 // TODO: Change global function to module class local method … … 193 194 $PageList['Output']; 194 195 if($this->System->User->Licence(LICENCE_ADMIN)) 195 $Output .= '<div><a href="'.$this->System->Link('/log.php?a=delerrlog').'">Vymázání chybových záznamů</a></div>'; 196 { 197 $Output .= '<div>Vymazat: <a href="'.$this->System->Link('/log.php?a=delerrlog&type='.LOG_TYPE_ERROR).'">Chybové záznamy</a> '. 198 '<a href="'.$this->System->Link('/log.php?a=delerrlog&type='.LOG_TYPE_PAGE_NOT_FOUND).'">Neznámé stránky</a></div>'; 199 } 196 200 } else $Output .= ShowMessage('Nemáte oprávnění.', MESSAGE_CRITICAL); 197 201 … … 201 205 function DeleteErrorLog() 202 206 { 203 if($this->System->User->Licence(LICENCE_ADMIN)) 207 if($this->System->User->Licence(LICENCE_ADMIN) and 208 (($_GET['type'] == LOG_TYPE_ERROR) or ($_GET['type'] == LOG_TYPE_PAGE_NOT_FOUND))) 204 209 { 205 $DbResult = $this->System->Database->query('SELECT COUNT(*) FROM `Log` WHERE `Type`='.LOG_TYPE_ERROR); 210 $DbResult = $this->System->Database->select('LogType', '*', 'Id='.$_GET['type']); 211 $LogType = $DbResult->fetch_assoc(); 212 $DbResult = $this->System->Database->query('SELECT COUNT(*) FROM `Log` WHERE `Type`='.$_GET['type']); 206 213 $DbRow = $DbResult->fetch_row(); 207 $this->System->Database->query('DELETE FROM `Log` WHERE `Type`='. LOG_TYPE_ERROR);208 $this->System->ModuleManager->Modules['Log']->WriteLog('Vymazán y chybové záznamy', LOG_TYPE_ADMINISTRATION);209 $Output = ShowMessage('Smazáno všech '.$DbRow[0].' chybových záznamů.');214 $this->System->Database->query('DELETE FROM `Log` WHERE `Type`='.$_GET['type']); 215 $this->System->ModuleManager->Modules['Log']->WriteLog('Vymazáno záznamů z '.$LogType['Description'].'.', LOG_TYPE_ADMINISTRATION); 216 $Output = ShowMessage('Smazáno všech '.$DbRow[0].' záznamů z '.$LogType['Description'].'.'); 210 217 $Output .= $this->ShowList(); 211 218 return($Output); -
trunk/admin/UpdateTrace.php
r585 r600 2515 2515 function UpdateTo510($Manager) 2516 2516 { 2517 global $System;2518 2519 2517 $Manager->Execute('ALTER TABLE `News` ADD `Title` VARCHAR( 255 ) NOT NULL AFTER `Time`'); 2520 2518 $Manager->Execute('UPDATE `News` SET `Title` = (SELECT `Name` FROM `User` AS `T` WHERE `T`.`ID` = `User`)'); … … 2523 2521 function UpdateTo524($Manager) 2524 2522 { 2525 global $System;2526 2527 2523 $Manager->Execute('ALTER TABLE `User` ADD `PreferredVersion` INT NULL DEFAULT NULL'); 2528 2524 $Manager->Execute('ALTER TABLE `User` ADD INDEX ( `PreferredVersion` )'); … … 2613 2609 } 2614 2610 2611 function UpdateTo600($Manager) 2612 { 2613 $Manager->Execute("INSERT INTO `LogType` (`Id` ,`Name` ,`Color` ,`Description`) 2614 VALUES (NULL , 'Nenalezené', 'teal', 'Nenalezené stránky');"); 2615 } 2616 2615 2617 $Updates = array( 2616 2618 498 => array('Revision' => 506, 'Function' => 'UpdateTo506'), … … 2623 2625 567 => array('Revision' => 574, 'Function' => 'UpdateTo574'), 2624 2626 574 => array('Revision' => 585, 'Function' => 'UpdateTo585'), 2627 585 => array('Revision' => 600, 'Function' => 'UpdateTo600'), 2625 2628 ); -
trunk/includes/Version.php
r599 r600 6 6 // and system will need database update. 7 7 8 $Revision = 599; // Subversion revision9 $DatabaseRevision = 585; // Database structure revision8 $Revision = 600; // Subversion revision 9 $DatabaseRevision = 600; // Database structure revision 10 10 $ReleaseTime = '2013-11-25'; -
trunk/includes/system.php
r591 r600 207 207 if(isset($this->ModuleManager->Modules['Log'])) 208 208 $this->ModuleManager->Modules['Log']->WriteLog('Stránka "'. 209 implode('/', $this->PathItems).'" nenalezena'.$Referer, LOG_TYPE_ ERROR);209 implode('/', $this->PathItems).'" nenalezena'.$Referer, LOG_TYPE_PAGE_NOT_FOUND); 210 210 return(ShowMessage('Stránka "'.implode('/', $this->PathItems).'" nenalezena.', MESSAGE_CRITICAL)); 211 211 }
Note:
See TracChangeset
for help on using the changeset viewer.