5087: added creation date to cache reports
This commit is contained in:
@@ -144,7 +144,8 @@
|
||||
IFNULL(`cr`.`adminid`, 0) AS `adminid`,
|
||||
IFNULL(`u2`.`username`, '') AS `adminnick`,
|
||||
IFNULL(`tt2`.`text`, `crr`.`name`) AS `reason`, `cr`.`note`, IFNULL(tt.text, crs.name) AS `status`,
|
||||
`cr`.`lastmodified`, `c`.`name` AS `cachename`,
|
||||
`cr`.`date_created`, `cr`.`lastmodified`,
|
||||
`c`.`name` AS `cachename`,
|
||||
`c`.`user_id` AS `ownerid`
|
||||
FROM `cache_reports` AS `cr`
|
||||
LEFT JOIN `cache_report_reasons` AS `crr` ON `cr`.`reason`=`crr`.`id`
|
||||
@@ -168,6 +169,7 @@
|
||||
$tpl->assign('reason', $record['reason']);
|
||||
$tpl->assign('note', $record['note']);
|
||||
$tpl->assign('status', $record['status']);
|
||||
$tpl->assign('created', $record['date_created']);
|
||||
$tpl->assign('lastmodified', $record['lastmodified']);
|
||||
$tpl->assign('cachename', $record['cachename']);
|
||||
$tpl->assign('ownerid', $record['ownerid']);
|
||||
|
||||
@@ -58,3 +58,4 @@ date commit ID change
|
||||
2013-03-20 085c1398 added field caches.listing_last_modified;
|
||||
must be initialized once via Admin / DB Maintenance / sp_updateall_cache_listingdates
|
||||
2013-03-24 added table 'pw_dict'
|
||||
2013-03-25 added field cache_reports.date_created
|
||||
|
||||
@@ -1421,4 +1421,13 @@
|
||||
END IF;
|
||||
END;");
|
||||
|
||||
sql_dropTrigger('cacheReportsBeforeInsert');
|
||||
sql("CREATE TRIGGER `cacheReportsBeforeInsert` BEFORE INSERT ON `cache_reports`
|
||||
FOR EACH ROW
|
||||
BEGIN
|
||||
/* dont overwrite creation date while XML client is running */
|
||||
IF ISNULL(@XMLSYNC) OR @XMLSYNC!=1 THEN
|
||||
SET NEW.`date_created`=NOW();
|
||||
END IF;
|
||||
END;");
|
||||
?>
|
||||
@@ -2,6 +2,7 @@ SET NAMES 'utf8';
|
||||
DROP TABLE IF EXISTS `cache_reports`;
|
||||
CREATE TABLE `cache_reports` (
|
||||
`id` int(11) unsigned NOT NULL auto_increment,
|
||||
`date_created` datetime default NULL,
|
||||
`cacheid` int(11) unsigned NOT NULL,
|
||||
`userid` int(11) unsigned NOT NULL,
|
||||
`reason` tinyint(3) unsigned NOT NULL,
|
||||
|
||||
@@ -3,4 +3,4 @@ DROP TABLE IF EXISTS `pw_dict`;
|
||||
CREATE TABLE `pw_dict` (
|
||||
`pw` varchar(40) NOT NULL,
|
||||
UNIQUE KEY `pw` (`pw`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ;
|
||||
|
||||
@@ -54,7 +54,12 @@
|
||||
{/if}
|
||||
{else}
|
||||
<p style="line-height: 1.6em;">{t}Details for report of {/t} <a href="viewcache.php?cacheid={$cacheid}" target="_blank">{$cachename|escape}</a> {t} by {/t} <a href="viewprofile.php?userid={$userid}" target="_blank">{$usernick|escape}</a></p>
|
||||
<p style="line-height: 1.6em;"><b>{t}Last modified{/t}:</b> {$lastmodified|date_format:$opt.format.datelong}</p>
|
||||
{if $created != null}
|
||||
<p style="line-height: 1.6em;"><b>{t}Created at{/t}:</b> {$created|date_format:$opt.format.datelong}</p>
|
||||
{/if}
|
||||
{if $lastmodified != $created}
|
||||
<p style="line-height: 1.6em;"><b>{t}Last modified{/t}:</b> {$lastmodified|date_format:$opt.format.datelong}</p>
|
||||
{/if}
|
||||
<p style="line-height: 1.6em;"><b>{t}State:{/t}</b> {$status} <b>Admin:</b> {if $adminnick==''}{t}not assigned{/t}{else}{if $otheradmin}<font color="red"><b>{/if}{$adminnick|escape}{if $otheradmin}</b></font>{/if}{/if}</p>
|
||||
<p style="line-height: 1.6em;"><b>{t}Reason:{/t}</b> {$reason|escape|nl2br}</p>
|
||||
<p style="line-height: 1.6em;"><b>{t}Comment:{/t}</b> {$note|escape|nl2br}</p>
|
||||
|
||||
Reference in New Issue
Block a user