Skip to content
Permalink
Browse files

4499: show all open cache reports

  • Loading branch information...
following
following committed Jan 30, 2013
1 parent daa748f commit 9ddfbd67218fe73092a9e72ba949d08ec4a63606
Showing with 18 additions and 6 deletions.
  1. +9 −4 htdocs/adminreports.php
  2. +9 −2 htdocs/templates2/ocstyle/adminreports.tpl
@@ -115,14 +115,19 @@
`c`.`name`,
`u2`.`username` AS `ownernick`,
`u`.`username`,
`cr`.`lastmodified`
`u3`.`username` AS `adminname`,
`cr`.`lastmodified`,
`cr`.`adminid` IS NOT NULL AND `cr`.`adminid`!=&1 AS otheradmin
FROM `cache_reports` `cr`
INNER JOIN `caches` `c` ON `c`.`cache_id` = `cr`.`cacheid`
INNER JOIN `user` `u` ON `u`.`user_id` = `cr`.`userid`
INNER JOIN `user` AS `u2` ON `u2`.`user_id`=`c`.`user_id`
WHERE `cr`.`status` < 3
AND (`cr`.`adminid` IS NULL OR `cr`.`adminid`=&1)
ORDER BY `cr`.`status` ASC, `cr`.`lastmodified` ASC",
LEFT JOIN `user` AS `u3` ON `u3`.`user_id`=`cr`.`adminid`
WHERE `cr`.`status` < 3 " .
// AND (`cr`.`adminid` IS NULL OR `cr`.`adminid`=&1)
"ORDER BY (`cr`.`adminid` IS NULL OR `cr`.`adminid`=&1) DESC,
`cr`.`status` ASC,
`cr`.`lastmodified` ASC",
$login->userid);
$tpl->assign_rs('reportedcaches', $rs);
@@ -28,13 +28,20 @@
{if $list == true}

<table class="table">
<tr><th>{t}ID{/t}</th><th>{t}Name{/t}</th><th>{t}Owner{/t}</th><th>{t}Reporter{/t}</th><th>{t}Date{/t}</th></tr>
<tr><th>{t}ID{/t}</th><th>{t}Name{/t}</th><th>{t}Owner{/t}</th><th>{t}Reporter{/t}</th><th>{t}Admin{/t}</th><th>{t}Date{/t}</th></tr>
{assign var="otheradmins" value=0}
{foreach from=$reportedcaches item=rc}
<tr>
{if $rc.otheradmin > $otheradmins}
<td colspan="6"><hr /></td></tr><tr>
{assign var="otheradmins" value=$rc.otheradmin}
{/if}
<td><a href="adminreports.php?id={$rc.id}">{$rc.id}</td>
<td><a href="adminreports.php?id={$rc.id}">{$rc.new|escape}{$rc.name|escape}</a></td>
<td>{$rc.ownernick|escape}</td>
<td>{$rc.username|escape}</td>
<td style="white-space: nowrap;">{$rc.lastmodified|date_format:$opt.format.datelong}</td></tr>
<td>{$rc.adminname|escape}</td>
<td style="white-space: nowrap;">{$rc.lastmodified|date_format:$opt.format.date}</td></tr>
{foreachelse}
<tr><td colspan=5>{t}No reported caches{/t}</td></tr>
{/foreach}

0 comments on commit 9ddfbd6

Please sign in to comment.
You can’t perform that action at this time.