- Patch #8405 by Adrian:
+ Fixed duplicated view. + Fixed node types not being picked up correctly. + Improved error handling in case a particular node has not been found.4.5.x
parent
5ba08f61c2
commit
bb961e2523
|
@ -111,10 +111,10 @@ function queue_overview() {
|
||||||
|
|
||||||
while ($node = db_fetch_object($sresult)) {
|
while ($node = db_fetch_object($sresult)) {
|
||||||
if ($user->uid == $node->uid || field_get($node->users, $user->uid)) {
|
if ($user->uid == $node->uid || field_get($node->users, $user->uid)) {
|
||||||
$rows[] = array(array("data" => l($node->title, "queue/$node->nid"), "class" => "title"), array("data" => format_name($node), "class" => "name"), array("data" => module_invoke($node->type, "node", "name"), "class" => "type"), array("data" => queue_score($node->nid), "class" => "score"));
|
$rows[] = array(array("data" => l($node->title, "queue/$node->nid"), "class" => "title"), array("data" => format_name($node), "class" => "name"), array("data" => module_invoke($node->type, "node_name", $node), "class" => "type"), array("data" => queue_score($node->nid), "class" => "score"));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$rows[] = array(array("data" => l($node->title, "queue/$node->nid"), "class" => "title"), array("data" => format_name($node), "class" => "name"), array("data" => module_invoke($node->type, "node", "name"), "class" => "type"), array("data" => l(t("vote"), "queue/$node->nid"), "class" => "score"));
|
$rows[] = array(array("data" => l($node->title, "queue/$node->nid"), "class" => "title"), array("data" => format_name($node), "class" => "name"), array("data" => module_invoke($node->type, "node_name", $node), "class" => "type"), array("data" => l(t("vote"), "queue/$node->nid"), "class" => "score"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -149,6 +149,7 @@ function queue_view($nid) {
|
||||||
|
|
||||||
$node = node_load(array("nid" => $nid, "moderate" => 1));
|
$node = node_load(array("nid" => $nid, "moderate" => 1));
|
||||||
|
|
||||||
|
if ($node) {
|
||||||
if ($user->uid != $node->uid && !field_get($node->users, $user->uid)) {
|
if ($user->uid != $node->uid && !field_get($node->users, $user->uid)) {
|
||||||
if ($op == t("Vote") && $votes[$edit["vote"]]) {
|
if ($op == t("Vote") && $votes[$edit["vote"]]) {
|
||||||
/*
|
/*
|
||||||
|
@ -179,13 +180,16 @@ function queue_view($nid) {
|
||||||
}
|
}
|
||||||
|
|
||||||
$output .= node_view($node);
|
$output .= node_view($node);
|
||||||
if ($output) {
|
$output = theme("box", t("Moderate"), $output);
|
||||||
$output .= theme("box", t("Moderate"), $output);
|
|
||||||
}
|
|
||||||
if ($node->comment && variable_get("queue_show_comments", 1)) {
|
if ($node->comment && variable_get("queue_show_comments", 1)) {
|
||||||
$output .= module_invoke("comment", "render", $node);
|
$output .= module_invoke("comment", "render", $node);
|
||||||
}
|
}
|
||||||
print theme("page", $output);
|
print theme("page", $output);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
drupal_not_found();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function queue_page() {
|
function queue_page() {
|
||||||
|
|
Loading…
Reference in New Issue