- More mass-operation fixes.

4.3.x
Dries Buytaert 2003-08-26 07:12:06 +00:00
parent f58a88dd26
commit 8a6ba5f1d0
2 changed files with 8 additions and 8 deletions

View File

@ -631,7 +631,7 @@ function node_admin_nodes() {
);
$operations = array(
array(t("Approve the selected posts"), "UPDATE {node} SET status = 1, moderate = 1 WHERE nid = %d"),
array(t("Approve the selected posts"), "UPDATE {node} SET status = 1, moderate = 0 WHERE nid = %d"),
array(t("Promote the selected posts"), "UPDATE {node} SET status = 1, promote = 1 WHERE nid = %d"),
array(t("Make the selected posts static"), "UPDATE {node} SET status = 1, static = 1 WHERE nid = %d"),
array(t("Demote the selected posts"), "UPDATE {node} SET promote = 0 WHERE nid = %d"),
@ -646,15 +646,15 @@ function node_admin_nodes() {
$_SESSION["node-overview-filter"] = 0;
}
if ($_POST["edit"]["filter"]) {
if (isset($_POST["edit"]["filter"])) {
$_SESSION["node-overview-filter"] = $_POST["edit"]["filter"];
}
if ($_POST["edit"]["operation"]) {
if (isset($_POST["edit"]["operation"])) {
$operation = $operations[$_POST["edit"]["operation"]][1];
foreach ($_POST["edit"]["status"] as $nid => $value) {
if ($value) {
db_query($operation, $nid);
db_queryd($operation, $nid);
}
}

View File

@ -631,7 +631,7 @@ function node_admin_nodes() {
);
$operations = array(
array(t("Approve the selected posts"), "UPDATE {node} SET status = 1, moderate = 1 WHERE nid = %d"),
array(t("Approve the selected posts"), "UPDATE {node} SET status = 1, moderate = 0 WHERE nid = %d"),
array(t("Promote the selected posts"), "UPDATE {node} SET status = 1, promote = 1 WHERE nid = %d"),
array(t("Make the selected posts static"), "UPDATE {node} SET status = 1, static = 1 WHERE nid = %d"),
array(t("Demote the selected posts"), "UPDATE {node} SET promote = 0 WHERE nid = %d"),
@ -646,15 +646,15 @@ function node_admin_nodes() {
$_SESSION["node-overview-filter"] = 0;
}
if ($_POST["edit"]["filter"]) {
if (isset($_POST["edit"]["filter"])) {
$_SESSION["node-overview-filter"] = $_POST["edit"]["filter"];
}
if ($_POST["edit"]["operation"]) {
if (isset($_POST["edit"]["operation"])) {
$operation = $operations[$_POST["edit"]["operation"]][1];
foreach ($_POST["edit"]["status"] as $nid => $value) {
if ($value) {
db_query($operation, $nid);
db_queryd($operation, $nid);
}
}