| 1 |
<?php |
<?php |
| 2 |
// $Id: hidden.display-pages.inc,v 1.2 2008/12/12 19:23:35 ekes Exp $ |
// $Id: hidden.display-pages.inc,v 1.3 2008/12/13 18:42:43 ekes Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* @file |
* @file |
| 12 |
* @see theme_hidden_list_nodes() |
* @see theme_hidden_list_nodes() |
| 13 |
*/ |
*/ |
| 14 |
function hidden_list_nodes() { |
function hidden_list_nodes() { |
|
// Want calls for non-hidden node pages as 404, if you got here with anything after hidden/node it doesn't exist |
|
|
if (arg(2)!=NULL) { |
|
|
drupal_not_found(); |
|
|
return; |
|
|
} |
|
|
|
|
| 15 |
$query = 'SELECT n.nid AS nid, n.title AS title,'. |
$query = 'SELECT n.nid AS nid, n.title AS title,'. |
| 16 |
' r.title AS reason,'. |
' r.title AS reason,'. |
| 17 |
' u.uid AS uid, u.name AS name'. |
' u.uid AS uid, u.name AS name'. |
| 32 |
* @see theme_hidden_list_comments() |
* @see theme_hidden_list_comments() |
| 33 |
*/ |
*/ |
| 34 |
function hidden_list_comments() { |
function hidden_list_comments() { |
| 35 |
// Want calls for non-hidden node pages as 404, if you got here with anything after hidden/comment it doesn't exist |
$query = 'SELECT c.cid AS cid, c.subject AS title,'. |
|
if (arg(2)!=NULL) { |
|
|
drupal_not_found(); |
|
|
return; |
|
|
} |
|
|
|
|
|
$query = 'SELECT c.nid AS nid, c.cid AS cid, c.subject AS title,'. |
|
| 36 |
' r.title AS reason,'. |
' r.title AS reason,'. |
| 37 |
' u.uid AS uid, u.name AS name'. |
' u.uid AS uid, u.name AS name'. |
| 38 |
' FROM {hidden_comment} AS h'. |
' FROM {hidden_comment} AS h'. |
| 39 |
' LEFT JOIN {hidden_reasons} AS r ON h.rid=r.rid'. |
' LEFT JOIN {hidden_reasons} AS r ON h.rid=r.rid'. |
| 40 |
' INNER JOIN ({users} AS u, {comments} AS c) ON (c.uid=u.uid AND c.nid=h.nid AND c.cid=h.cid)'. |
' INNER JOIN ({users} AS u, {comments} AS c) ON (c.uid=u.uid AND c.cid=h.cid)'. |
| 41 |
' ORDER BY h.created DESC'; |
' ORDER BY h.created DESC'; |
| 42 |
$table = _hidden_list_get($query, 'comment'); |
$table = _hidden_list_get($query, 'comment'); |
| 43 |
$output = theme('hidden_list_comments', $table); |
$output = theme('hidden_list_comments', $table); |