- Committed a partial administration page integration patch.
parent
e4695fd5ed
commit
2fbc7fcf27
|
@ -574,52 +574,54 @@ function import_admin() {
|
|||
switch ($op) {
|
||||
case "add":
|
||||
if (arg(4) == "bundle") {
|
||||
print import_form_bundle();
|
||||
$output = import_form_bundle();
|
||||
}
|
||||
else {
|
||||
print import_form_feed();
|
||||
$output = import_form_feed();
|
||||
}
|
||||
break;
|
||||
case "edit":
|
||||
if (arg(4) == "bundle") {
|
||||
print import_form_bundle(import_get_bundle(arg(5)));
|
||||
$output = import_form_bundle(import_get_bundle(arg(5)));
|
||||
}
|
||||
else {
|
||||
print import_form_feed(import_get_feed(arg(5)));
|
||||
$output = import_form_feed(import_get_feed(arg(5)));
|
||||
}
|
||||
break;
|
||||
case "remove":
|
||||
print status(import_remove(import_get_feed(arg(4))));
|
||||
print import_view();
|
||||
$output = status(import_remove(import_get_feed(arg(4))));
|
||||
$output .= import_view();
|
||||
break;
|
||||
case "update":
|
||||
print status(import_refresh(import_get_feed(arg(4))));
|
||||
print import_view();
|
||||
$output = status(import_refresh(import_get_feed(arg(4))));
|
||||
$output .= import_view();
|
||||
break;
|
||||
case "tag":
|
||||
print import_tag();
|
||||
$output = import_tag();
|
||||
break;
|
||||
case "Save attributes":
|
||||
print status(import_save_attributes($edit));
|
||||
print import_tag();
|
||||
$output = status(import_save_attributes($edit));
|
||||
$output .= import_tag();
|
||||
break;
|
||||
case "Delete":
|
||||
$edit["title"] = 0;
|
||||
// fall through:
|
||||
case "Submit":
|
||||
if (arg(4) == "bundle") {
|
||||
print status(import_save_bundle($edit));
|
||||
$output = status(import_save_bundle($edit));
|
||||
}
|
||||
else {
|
||||
print status(import_save_feed($edit));
|
||||
$output = status(import_save_feed($edit));
|
||||
}
|
||||
// fall through:
|
||||
default:
|
||||
print import_view();
|
||||
$output .= import_view();
|
||||
}
|
||||
return $output;
|
||||
|
||||
}
|
||||
else {
|
||||
print message_access();
|
||||
return message_access();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -574,52 +574,54 @@ function import_admin() {
|
|||
switch ($op) {
|
||||
case "add":
|
||||
if (arg(4) == "bundle") {
|
||||
print import_form_bundle();
|
||||
$output = import_form_bundle();
|
||||
}
|
||||
else {
|
||||
print import_form_feed();
|
||||
$output = import_form_feed();
|
||||
}
|
||||
break;
|
||||
case "edit":
|
||||
if (arg(4) == "bundle") {
|
||||
print import_form_bundle(import_get_bundle(arg(5)));
|
||||
$output = import_form_bundle(import_get_bundle(arg(5)));
|
||||
}
|
||||
else {
|
||||
print import_form_feed(import_get_feed(arg(5)));
|
||||
$output = import_form_feed(import_get_feed(arg(5)));
|
||||
}
|
||||
break;
|
||||
case "remove":
|
||||
print status(import_remove(import_get_feed(arg(4))));
|
||||
print import_view();
|
||||
$output = status(import_remove(import_get_feed(arg(4))));
|
||||
$output .= import_view();
|
||||
break;
|
||||
case "update":
|
||||
print status(import_refresh(import_get_feed(arg(4))));
|
||||
print import_view();
|
||||
$output = status(import_refresh(import_get_feed(arg(4))));
|
||||
$output .= import_view();
|
||||
break;
|
||||
case "tag":
|
||||
print import_tag();
|
||||
$output = import_tag();
|
||||
break;
|
||||
case "Save attributes":
|
||||
print status(import_save_attributes($edit));
|
||||
print import_tag();
|
||||
$output = status(import_save_attributes($edit));
|
||||
$output .= import_tag();
|
||||
break;
|
||||
case "Delete":
|
||||
$edit["title"] = 0;
|
||||
// fall through:
|
||||
case "Submit":
|
||||
if (arg(4) == "bundle") {
|
||||
print status(import_save_bundle($edit));
|
||||
$output = status(import_save_bundle($edit));
|
||||
}
|
||||
else {
|
||||
print status(import_save_feed($edit));
|
||||
$output = status(import_save_feed($edit));
|
||||
}
|
||||
// fall through:
|
||||
default:
|
||||
print import_view();
|
||||
$output .= import_view();
|
||||
}
|
||||
return $output;
|
||||
|
||||
}
|
||||
else {
|
||||
print message_access();
|
||||
return message_access();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -169,13 +169,16 @@ function block_admin_display() {
|
|||
$delete = "";
|
||||
}
|
||||
|
||||
$rows[] = array($block["info"], array("data" => form_checkbox(NULL, $block["module"]."][".$block["delta"]."][status", 1, $block["status"]), "align" => "center"), array("data" => form_checkbox(NULL, $block["module"]."][".$block["delta"]."][custom", 1, $block["custom"]), "align" => "center"), form_weight(NULL, $block["module"]."][".$block["delta"]."][weight", $block["weight"]), form_select(NULL, $block["module"]."][".$block["delta"]."][region", $block["region"], array(t("left"), t("right"))), form_textfield(NULL, $block["module"]."][".$block["delta"]."][path", $block["path"], 10, 255), $edit, $delete);
|
||||
$status = form_checkbox(NULL, $block["module"]."][".$block["delta"]."][status", 1, $block["status"]);
|
||||
$custom = form_checkbox(NULL, $block["module"]."][".$block["delta"]."][custom", 1, $block["custom"]);
|
||||
|
||||
$rows[] = array($block["info"], array("data" => $status, "align" => "center"), array("data" => $custom, "align" => "center"), form_weight(NULL, $block["module"]."][".$block["delta"]."][weight", $block["weight"]), form_select(NULL, $block["module"]."][".$block["delta"]."][region", $block["region"], array(t("left"), t("right"))), form_textfield(NULL, $block["module"]."][".$block["delta"]."][path", $block["path"], 10, 255), $edit, $delete);
|
||||
}
|
||||
|
||||
$output = table($header, $rows);
|
||||
$output .= form_submit(t("Save blocks"));
|
||||
|
||||
print form($output);
|
||||
return form($output);
|
||||
}
|
||||
|
||||
function block_admin_preview() {
|
||||
|
@ -228,7 +231,7 @@ function block_admin_preview() {
|
|||
$output .= " <tr><td colspan=\"2\" style=\"text-align: center;\">". t("footer") ."</td></tr>\n";
|
||||
$output .= "</table>\n";
|
||||
|
||||
print $output;
|
||||
return $output;
|
||||
}
|
||||
|
||||
function block_box_get($bid) {
|
||||
|
@ -251,7 +254,7 @@ function block_box_form($edit = array()) {
|
|||
|
||||
$form .= form_submit(t("Save block"));
|
||||
|
||||
print form($form);
|
||||
return form($form);
|
||||
}
|
||||
|
||||
function block_box_save($edit) {
|
||||
|
@ -288,34 +291,36 @@ function block_admin() {
|
|||
|
||||
switch ($op) {
|
||||
case "preview":
|
||||
block_admin_preview();
|
||||
$output = block_admin_preview();
|
||||
break;
|
||||
case "add":
|
||||
block_box_form();
|
||||
$output = block_box_form();
|
||||
break;
|
||||
case "edit":
|
||||
block_box_form(block_box_get(arg(3)));
|
||||
$output = block_box_form(block_box_get(arg(3)));
|
||||
break;
|
||||
case "delete":
|
||||
print status(block_box_delete(arg(3)));
|
||||
$output = status(block_box_delete(arg(3)));
|
||||
cache_clear_all();
|
||||
block_admin_display();
|
||||
$output .= block_admin_display();
|
||||
break;
|
||||
case t("Save block"):
|
||||
print status(block_box_save($edit));
|
||||
$output = status(block_box_save($edit));
|
||||
cache_clear_all();
|
||||
block_admin_display();
|
||||
$output .= block_admin_display();
|
||||
break;
|
||||
case t("Save blocks"):
|
||||
print status(block_admin_save($edit));
|
||||
$output = status(block_admin_save($edit));
|
||||
cache_clear_all();
|
||||
// fall through
|
||||
default:
|
||||
block_admin_display();
|
||||
$output .= block_admin_display();
|
||||
}
|
||||
|
||||
return $output;
|
||||
}
|
||||
else {
|
||||
print message_access();
|
||||
return message_access();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -169,13 +169,16 @@ function block_admin_display() {
|
|||
$delete = "";
|
||||
}
|
||||
|
||||
$rows[] = array($block["info"], array("data" => form_checkbox(NULL, $block["module"]."][".$block["delta"]."][status", 1, $block["status"]), "align" => "center"), array("data" => form_checkbox(NULL, $block["module"]."][".$block["delta"]."][custom", 1, $block["custom"]), "align" => "center"), form_weight(NULL, $block["module"]."][".$block["delta"]."][weight", $block["weight"]), form_select(NULL, $block["module"]."][".$block["delta"]."][region", $block["region"], array(t("left"), t("right"))), form_textfield(NULL, $block["module"]."][".$block["delta"]."][path", $block["path"], 10, 255), $edit, $delete);
|
||||
$status = form_checkbox(NULL, $block["module"]."][".$block["delta"]."][status", 1, $block["status"]);
|
||||
$custom = form_checkbox(NULL, $block["module"]."][".$block["delta"]."][custom", 1, $block["custom"]);
|
||||
|
||||
$rows[] = array($block["info"], array("data" => $status, "align" => "center"), array("data" => $custom, "align" => "center"), form_weight(NULL, $block["module"]."][".$block["delta"]."][weight", $block["weight"]), form_select(NULL, $block["module"]."][".$block["delta"]."][region", $block["region"], array(t("left"), t("right"))), form_textfield(NULL, $block["module"]."][".$block["delta"]."][path", $block["path"], 10, 255), $edit, $delete);
|
||||
}
|
||||
|
||||
$output = table($header, $rows);
|
||||
$output .= form_submit(t("Save blocks"));
|
||||
|
||||
print form($output);
|
||||
return form($output);
|
||||
}
|
||||
|
||||
function block_admin_preview() {
|
||||
|
@ -228,7 +231,7 @@ function block_admin_preview() {
|
|||
$output .= " <tr><td colspan=\"2\" style=\"text-align: center;\">". t("footer") ."</td></tr>\n";
|
||||
$output .= "</table>\n";
|
||||
|
||||
print $output;
|
||||
return $output;
|
||||
}
|
||||
|
||||
function block_box_get($bid) {
|
||||
|
@ -251,7 +254,7 @@ function block_box_form($edit = array()) {
|
|||
|
||||
$form .= form_submit(t("Save block"));
|
||||
|
||||
print form($form);
|
||||
return form($form);
|
||||
}
|
||||
|
||||
function block_box_save($edit) {
|
||||
|
@ -288,34 +291,36 @@ function block_admin() {
|
|||
|
||||
switch ($op) {
|
||||
case "preview":
|
||||
block_admin_preview();
|
||||
$output = block_admin_preview();
|
||||
break;
|
||||
case "add":
|
||||
block_box_form();
|
||||
$output = block_box_form();
|
||||
break;
|
||||
case "edit":
|
||||
block_box_form(block_box_get(arg(3)));
|
||||
$output = block_box_form(block_box_get(arg(3)));
|
||||
break;
|
||||
case "delete":
|
||||
print status(block_box_delete(arg(3)));
|
||||
$output = status(block_box_delete(arg(3)));
|
||||
cache_clear_all();
|
||||
block_admin_display();
|
||||
$output .= block_admin_display();
|
||||
break;
|
||||
case t("Save block"):
|
||||
print status(block_box_save($edit));
|
||||
$output = status(block_box_save($edit));
|
||||
cache_clear_all();
|
||||
block_admin_display();
|
||||
$output .= block_admin_display();
|
||||
break;
|
||||
case t("Save blocks"):
|
||||
print status(block_admin_save($edit));
|
||||
$output = status(block_admin_save($edit));
|
||||
cache_clear_all();
|
||||
// fall through
|
||||
default:
|
||||
block_admin_display();
|
||||
$output .= block_admin_display();
|
||||
}
|
||||
|
||||
return $output;
|
||||
}
|
||||
else {
|
||||
print message_access();
|
||||
return message_access();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -628,7 +628,7 @@ function book_page() {
|
|||
theme("footer");
|
||||
break;
|
||||
case "print":
|
||||
print book_print(arg(2), $depth = 1);
|
||||
return book_print(arg(2), $depth = 1);
|
||||
break;
|
||||
default:
|
||||
book_render();
|
||||
|
@ -810,18 +810,19 @@ function book_admin() {
|
|||
case t("Add to book outline"):
|
||||
case t("Remove from book outline"):
|
||||
case t("Update book outline"):
|
||||
print book_node_link();
|
||||
$output = book_node_link();
|
||||
break;
|
||||
case "orphan":
|
||||
print book_admin_orphan();
|
||||
$output = book_admin_orphan();
|
||||
break;
|
||||
case t("Save book pages"):
|
||||
print status(book_admin_save(arg(3), $edit));
|
||||
$output = status(book_admin_save(arg(3), $edit));
|
||||
// fall through:
|
||||
default:
|
||||
print book_admin_view(arg(3));
|
||||
$output .= book_admin_view(arg(3));
|
||||
break;
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -628,7 +628,7 @@ function book_page() {
|
|||
theme("footer");
|
||||
break;
|
||||
case "print":
|
||||
print book_print(arg(2), $depth = 1);
|
||||
return book_print(arg(2), $depth = 1);
|
||||
break;
|
||||
default:
|
||||
book_render();
|
||||
|
@ -810,18 +810,19 @@ function book_admin() {
|
|||
case t("Add to book outline"):
|
||||
case t("Remove from book outline"):
|
||||
case t("Update book outline"):
|
||||
print book_node_link();
|
||||
$output = book_node_link();
|
||||
break;
|
||||
case "orphan":
|
||||
print book_admin_orphan();
|
||||
$output = book_admin_orphan();
|
||||
break;
|
||||
case t("Save book pages"):
|
||||
print status(book_admin_save(arg(3), $edit));
|
||||
$output = status(book_admin_save(arg(3), $edit));
|
||||
// fall through:
|
||||
default:
|
||||
print book_admin_view(arg(3));
|
||||
$output .= book_admin_view(arg(3));
|
||||
break;
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -228,27 +228,28 @@ function cloud_admin() {
|
|||
if (user_access("administer site cloud")) {
|
||||
switch ($op) {
|
||||
case "add":
|
||||
print cloud_form();
|
||||
$output = cloud_form();
|
||||
break;
|
||||
case "edit":
|
||||
print cloud_form(cloud_get_site(arg(4)));
|
||||
$output = cloud_form(cloud_get_site(arg(4)));
|
||||
break;
|
||||
case "update":
|
||||
print status(cloud_update(cloud_get_site(arg(4))));
|
||||
print cloud_display();
|
||||
$output = status(cloud_update(cloud_get_site(arg(4))));
|
||||
$output .= cloud_display();
|
||||
break;
|
||||
case "Delete":
|
||||
$edit["name"] = 0;
|
||||
// fall through:
|
||||
case "Submit":
|
||||
print status(cloud_save($edit));
|
||||
$output = status(cloud_save($edit));
|
||||
// fall through:
|
||||
default:
|
||||
print cloud_display();
|
||||
$output .= cloud_display();
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
else {
|
||||
print message_access();
|
||||
return message_access();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1174,29 +1174,29 @@ function comment_admin() {
|
|||
if (user_access("administer comments")) {
|
||||
switch ($op) {
|
||||
case "edit":
|
||||
print comment_admin_edit(arg(3));
|
||||
$output = comment_admin_edit(arg(3));
|
||||
break;
|
||||
case "search":
|
||||
print search_type("comment", url("admin/comment/search"), $_POST["keys"]);
|
||||
$output = search_type("comment", url("admin/comment/search"), $_POST["keys"]);
|
||||
break;
|
||||
case "votes":
|
||||
case t("Add new vote"):
|
||||
case t("Delete vote"):
|
||||
case t("Save vote"):
|
||||
if (user_access("administer moderation")) {
|
||||
print comment_mod_votes($edit);
|
||||
$output = comment_mod_votes($edit);
|
||||
}
|
||||
break;
|
||||
case "roles":
|
||||
case t("Save scores"):
|
||||
if (user_access("administer moderation")) {
|
||||
print comment_mod_roles($edit);
|
||||
$output = comment_mod_roles($edit);
|
||||
}
|
||||
break;
|
||||
case "matrix":
|
||||
case t("Submit votes"):
|
||||
if (user_access("administer moderation")) {
|
||||
print comment_mod_matrix($edit);
|
||||
$output = comment_mod_matrix($edit);
|
||||
}
|
||||
break;
|
||||
case "filters":
|
||||
|
@ -1204,31 +1204,32 @@ function comment_admin() {
|
|||
case t("Delete threshold"):
|
||||
case t("Save threshold"):
|
||||
if (user_access("administer moderation")) {
|
||||
print comment_mod_filters($edit);
|
||||
$output = comment_mod_filters($edit);
|
||||
}
|
||||
break;
|
||||
case "delete":
|
||||
print comment_delete(array("cid" => arg(3)));
|
||||
$output = comment_delete(array("cid" => arg(3)));
|
||||
break;
|
||||
case t("Delete"):
|
||||
print status(comment_delete($edit));
|
||||
print comment_admin_overview(0);
|
||||
$output = status(comment_delete($edit));
|
||||
$output .= comment_admin_overview(0);
|
||||
break;
|
||||
case t("Submit"):
|
||||
print status(comment_save(check_query(arg(3)), $edit));
|
||||
print comment_admin_overview(0);
|
||||
$output = status(comment_save(check_query(arg(3)), $edit));
|
||||
$output .= comment_admin_overview(0);
|
||||
break;
|
||||
default:
|
||||
if (arg(3) == 1) {
|
||||
print comment_admin_overview(1);
|
||||
$output = comment_admin_overview(1);
|
||||
}
|
||||
else {
|
||||
print comment_admin_overview(0);
|
||||
$output = comment_admin_overview(0);
|
||||
}
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
else {
|
||||
print message_access();
|
||||
return message_access();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1174,29 +1174,29 @@ function comment_admin() {
|
|||
if (user_access("administer comments")) {
|
||||
switch ($op) {
|
||||
case "edit":
|
||||
print comment_admin_edit(arg(3));
|
||||
$output = comment_admin_edit(arg(3));
|
||||
break;
|
||||
case "search":
|
||||
print search_type("comment", url("admin/comment/search"), $_POST["keys"]);
|
||||
$output = search_type("comment", url("admin/comment/search"), $_POST["keys"]);
|
||||
break;
|
||||
case "votes":
|
||||
case t("Add new vote"):
|
||||
case t("Delete vote"):
|
||||
case t("Save vote"):
|
||||
if (user_access("administer moderation")) {
|
||||
print comment_mod_votes($edit);
|
||||
$output = comment_mod_votes($edit);
|
||||
}
|
||||
break;
|
||||
case "roles":
|
||||
case t("Save scores"):
|
||||
if (user_access("administer moderation")) {
|
||||
print comment_mod_roles($edit);
|
||||
$output = comment_mod_roles($edit);
|
||||
}
|
||||
break;
|
||||
case "matrix":
|
||||
case t("Submit votes"):
|
||||
if (user_access("administer moderation")) {
|
||||
print comment_mod_matrix($edit);
|
||||
$output = comment_mod_matrix($edit);
|
||||
}
|
||||
break;
|
||||
case "filters":
|
||||
|
@ -1204,31 +1204,32 @@ function comment_admin() {
|
|||
case t("Delete threshold"):
|
||||
case t("Save threshold"):
|
||||
if (user_access("administer moderation")) {
|
||||
print comment_mod_filters($edit);
|
||||
$output = comment_mod_filters($edit);
|
||||
}
|
||||
break;
|
||||
case "delete":
|
||||
print comment_delete(array("cid" => arg(3)));
|
||||
$output = comment_delete(array("cid" => arg(3)));
|
||||
break;
|
||||
case t("Delete"):
|
||||
print status(comment_delete($edit));
|
||||
print comment_admin_overview(0);
|
||||
$output = status(comment_delete($edit));
|
||||
$output .= comment_admin_overview(0);
|
||||
break;
|
||||
case t("Submit"):
|
||||
print status(comment_save(check_query(arg(3)), $edit));
|
||||
print comment_admin_overview(0);
|
||||
$output = status(comment_save(check_query(arg(3)), $edit));
|
||||
$output .= comment_admin_overview(0);
|
||||
break;
|
||||
default:
|
||||
if (arg(3) == 1) {
|
||||
print comment_admin_overview(1);
|
||||
$output = comment_admin_overview(1);
|
||||
}
|
||||
else {
|
||||
print comment_admin_overview(0);
|
||||
$output = comment_admin_overview(0);
|
||||
}
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
else {
|
||||
print message_access();
|
||||
return message_access();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -49,8 +49,8 @@ function help_admin() {
|
|||
}
|
||||
}
|
||||
|
||||
print "<small>". implode(" · ", $links) ."</small><hr />";
|
||||
print $output;
|
||||
$output = "<small>". implode(" · ", $links) ."</small><hr />". $output;
|
||||
return $output;
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
|
@ -49,8 +49,8 @@ function help_admin() {
|
|||
}
|
||||
}
|
||||
|
||||
print "<small>". implode(" · ", $links) ."</small><hr />";
|
||||
print $output;
|
||||
$output = "<small>". implode(" · ", $links) ."</small><hr />". $output;
|
||||
return $output;
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
|
@ -574,52 +574,54 @@ function import_admin() {
|
|||
switch ($op) {
|
||||
case "add":
|
||||
if (arg(4) == "bundle") {
|
||||
print import_form_bundle();
|
||||
$output = import_form_bundle();
|
||||
}
|
||||
else {
|
||||
print import_form_feed();
|
||||
$output = import_form_feed();
|
||||
}
|
||||
break;
|
||||
case "edit":
|
||||
if (arg(4) == "bundle") {
|
||||
print import_form_bundle(import_get_bundle(arg(5)));
|
||||
$output = import_form_bundle(import_get_bundle(arg(5)));
|
||||
}
|
||||
else {
|
||||
print import_form_feed(import_get_feed(arg(5)));
|
||||
$output = import_form_feed(import_get_feed(arg(5)));
|
||||
}
|
||||
break;
|
||||
case "remove":
|
||||
print status(import_remove(import_get_feed(arg(4))));
|
||||
print import_view();
|
||||
$output = status(import_remove(import_get_feed(arg(4))));
|
||||
$output .= import_view();
|
||||
break;
|
||||
case "update":
|
||||
print status(import_refresh(import_get_feed(arg(4))));
|
||||
print import_view();
|
||||
$output = status(import_refresh(import_get_feed(arg(4))));
|
||||
$output .= import_view();
|
||||
break;
|
||||
case "tag":
|
||||
print import_tag();
|
||||
$output = import_tag();
|
||||
break;
|
||||
case "Save attributes":
|
||||
print status(import_save_attributes($edit));
|
||||
print import_tag();
|
||||
$output = status(import_save_attributes($edit));
|
||||
$output .= import_tag();
|
||||
break;
|
||||
case "Delete":
|
||||
$edit["title"] = 0;
|
||||
// fall through:
|
||||
case "Submit":
|
||||
if (arg(4) == "bundle") {
|
||||
print status(import_save_bundle($edit));
|
||||
$output = status(import_save_bundle($edit));
|
||||
}
|
||||
else {
|
||||
print status(import_save_feed($edit));
|
||||
$output = status(import_save_feed($edit));
|
||||
}
|
||||
// fall through:
|
||||
default:
|
||||
print import_view();
|
||||
$output .= import_view();
|
||||
}
|
||||
return $output;
|
||||
|
||||
}
|
||||
else {
|
||||
print message_access();
|
||||
return message_access();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -241,22 +241,22 @@ function locale_admin() {
|
|||
|
||||
switch ($op) {
|
||||
case "delete":
|
||||
print status(locale_delete(check_query(arg(3))));
|
||||
print locale_seek();
|
||||
$output = status(locale_delete(check_query(arg(3))));
|
||||
$output .= locale_seek();
|
||||
break;
|
||||
case "edit":
|
||||
print locale_edit(check_query(arg(3)));
|
||||
$output = locale_edit(check_query(arg(3)));
|
||||
break;
|
||||
case "search":
|
||||
print locale_seek_form();
|
||||
$output = locale_seek_form();
|
||||
break;
|
||||
case t("Search"):
|
||||
print locale_seek();
|
||||
print locale_seek_form();
|
||||
$output = locale_seek();
|
||||
$output .= locale_seek_form();
|
||||
break;
|
||||
case t("Save translations"):
|
||||
print status(locale_save(check_query(arg(3))));
|
||||
print locale_seek();
|
||||
$output = status(locale_save(check_query(arg(3))));
|
||||
$output .= locale_seek();
|
||||
break;
|
||||
default:
|
||||
if (arg(3) == "translated") {
|
||||
|
@ -267,12 +267,13 @@ function locale_admin() {
|
|||
$edit["status"] = 2;
|
||||
$edit["language"] = arg(2);
|
||||
}
|
||||
print locale_seek();
|
||||
print locale_seek_form();
|
||||
$output = locale_seek();
|
||||
$output .= locale_seek_form();
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
else {
|
||||
print message_access();
|
||||
return message_access();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -241,22 +241,22 @@ function locale_admin() {
|
|||
|
||||
switch ($op) {
|
||||
case "delete":
|
||||
print status(locale_delete(check_query(arg(3))));
|
||||
print locale_seek();
|
||||
$output = status(locale_delete(check_query(arg(3))));
|
||||
$output .= locale_seek();
|
||||
break;
|
||||
case "edit":
|
||||
print locale_edit(check_query(arg(3)));
|
||||
$output = locale_edit(check_query(arg(3)));
|
||||
break;
|
||||
case "search":
|
||||
print locale_seek_form();
|
||||
$output = locale_seek_form();
|
||||
break;
|
||||
case t("Search"):
|
||||
print locale_seek();
|
||||
print locale_seek_form();
|
||||
$output = locale_seek();
|
||||
$output .= locale_seek_form();
|
||||
break;
|
||||
case t("Save translations"):
|
||||
print status(locale_save(check_query(arg(3))));
|
||||
print locale_seek();
|
||||
$output = status(locale_save(check_query(arg(3))));
|
||||
$output .= locale_seek();
|
||||
break;
|
||||
default:
|
||||
if (arg(3) == "translated") {
|
||||
|
@ -267,12 +267,13 @@ function locale_admin() {
|
|||
$edit["status"] = 2;
|
||||
$edit["language"] = arg(2);
|
||||
}
|
||||
print locale_seek();
|
||||
print locale_seek_form();
|
||||
$output = locale_seek();
|
||||
$output .= locale_seek_form();
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
else {
|
||||
print message_access();
|
||||
return message_access();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -767,7 +767,7 @@ function node_admin_settings($edit) {
|
|||
$output .= form_submit(t("Save configuration"));
|
||||
$output .= form_submit(t("Reset to defaults"));
|
||||
|
||||
print form($output);
|
||||
return form($output);
|
||||
|
||||
}
|
||||
|
||||
|
@ -886,43 +886,44 @@ function node_admin() {
|
|||
*/
|
||||
switch ($op) {
|
||||
case "search":
|
||||
print search_type("node", url("admin/node/search"), $_POST["keys"]);
|
||||
$output = search_type("node", url("admin/node/search"), $_POST["keys"]);
|
||||
break;
|
||||
case "edit":
|
||||
print node_admin_edit(arg(3));
|
||||
$output = node_admin_edit(arg(3));
|
||||
break;
|
||||
case "delete":
|
||||
print node_delete(array("nid" => arg(3)));
|
||||
$output = node_delete(array("nid" => arg(3)));
|
||||
break;
|
||||
case "rollback revision":
|
||||
print node_revision_rollback(node_load(array("nid" => arg(3))), arg(4));
|
||||
print node_admin_edit(arg(3));
|
||||
$output = node_revision_rollback(node_load(array("nid" => arg(3))), arg(4));
|
||||
$output .= node_admin_edit(arg(3));
|
||||
break;
|
||||
case "delete revision":
|
||||
print node_revision_delete(node_load(array("nid" => arg(3))), arg(4));
|
||||
print node_admin_edit(arg(3));
|
||||
$output = node_revision_delete(node_load(array("nid" => arg(3))), arg(4));
|
||||
$output .= node_admin_edit(arg(3));
|
||||
break;
|
||||
case t("Preview"):
|
||||
$edit = node_validate($edit, $error);
|
||||
print node_preview($edit, $error);
|
||||
$output = node_preview($edit, $error);
|
||||
break;
|
||||
case t("Submit"):
|
||||
print node_submit($edit);
|
||||
$output = node_submit($edit);
|
||||
break;
|
||||
case t("Delete"):
|
||||
print node_delete($edit);
|
||||
$output = node_delete($edit);
|
||||
break;
|
||||
case t("Save configuration"):
|
||||
case t("Reset to defaults"):
|
||||
case "settings":
|
||||
print node_admin_settings($edit);
|
||||
$output = node_admin_settings($edit);
|
||||
break;
|
||||
default:
|
||||
print node_admin_nodes();
|
||||
$output = node_admin_nodes();
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
else {
|
||||
print message_access();
|
||||
return message_access();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -767,7 +767,7 @@ function node_admin_settings($edit) {
|
|||
$output .= form_submit(t("Save configuration"));
|
||||
$output .= form_submit(t("Reset to defaults"));
|
||||
|
||||
print form($output);
|
||||
return form($output);
|
||||
|
||||
}
|
||||
|
||||
|
@ -886,43 +886,44 @@ function node_admin() {
|
|||
*/
|
||||
switch ($op) {
|
||||
case "search":
|
||||
print search_type("node", url("admin/node/search"), $_POST["keys"]);
|
||||
$output = search_type("node", url("admin/node/search"), $_POST["keys"]);
|
||||
break;
|
||||
case "edit":
|
||||
print node_admin_edit(arg(3));
|
||||
$output = node_admin_edit(arg(3));
|
||||
break;
|
||||
case "delete":
|
||||
print node_delete(array("nid" => arg(3)));
|
||||
$output = node_delete(array("nid" => arg(3)));
|
||||
break;
|
||||
case "rollback revision":
|
||||
print node_revision_rollback(node_load(array("nid" => arg(3))), arg(4));
|
||||
print node_admin_edit(arg(3));
|
||||
$output = node_revision_rollback(node_load(array("nid" => arg(3))), arg(4));
|
||||
$output .= node_admin_edit(arg(3));
|
||||
break;
|
||||
case "delete revision":
|
||||
print node_revision_delete(node_load(array("nid" => arg(3))), arg(4));
|
||||
print node_admin_edit(arg(3));
|
||||
$output = node_revision_delete(node_load(array("nid" => arg(3))), arg(4));
|
||||
$output .= node_admin_edit(arg(3));
|
||||
break;
|
||||
case t("Preview"):
|
||||
$edit = node_validate($edit, $error);
|
||||
print node_preview($edit, $error);
|
||||
$output = node_preview($edit, $error);
|
||||
break;
|
||||
case t("Submit"):
|
||||
print node_submit($edit);
|
||||
$output = node_submit($edit);
|
||||
break;
|
||||
case t("Delete"):
|
||||
print node_delete($edit);
|
||||
$output = node_delete($edit);
|
||||
break;
|
||||
case t("Save configuration"):
|
||||
case t("Reset to defaults"):
|
||||
case "settings":
|
||||
print node_admin_settings($edit);
|
||||
$output = node_admin_settings($edit);
|
||||
break;
|
||||
default:
|
||||
print node_admin_nodes();
|
||||
$output = node_admin_nodes();
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
else {
|
||||
print message_access();
|
||||
return message_access();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -74,9 +74,10 @@ function search_admin() {
|
|||
if (user_access("administer search")) {
|
||||
if ($op == "reindex") {
|
||||
search_invalidate();
|
||||
print t("index invalidated") ."<br />\n";
|
||||
$output = t("index invalidated") ."<br />\n";
|
||||
search_cron();
|
||||
print t("index recreated") ."<br /><hr />\n";
|
||||
$output .= t("index recreated") ."<br /><hr />\n";
|
||||
return $output;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -74,9 +74,10 @@ function search_admin() {
|
|||
if (user_access("administer search")) {
|
||||
if ($op == "reindex") {
|
||||
search_invalidate();
|
||||
print t("index invalidated") ."<br />\n";
|
||||
$output = t("index invalidated") ."<br />\n";
|
||||
search_cron();
|
||||
print t("index recreated") ."<br /><hr />\n";
|
||||
$output .= t("index recreated") ."<br /><hr />\n";
|
||||
return $output;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -265,11 +265,11 @@ function statistics_admin() {
|
|||
/* non-configuration admin pages */
|
||||
switch ($op) {
|
||||
case "statistics":
|
||||
return statistics_admin_topnodes();
|
||||
$output = statistics_admin_topnodes();
|
||||
case "referrers":
|
||||
return statistics_top_refer();
|
||||
$output = statistics_top_refer();
|
||||
case "log":
|
||||
return statistics_admin_displaylog();
|
||||
$output = statistics_admin_displaylog();
|
||||
}
|
||||
|
||||
/* configuration admin pages */
|
||||
|
@ -277,9 +277,9 @@ function statistics_admin() {
|
|||
switch (stripslashes($op)) {
|
||||
case "Submit \"top nodes\" block changes":
|
||||
statistics_save_topnodes_block($edit);
|
||||
return status(t("saved 'top nodes' block changes."));
|
||||
$output .= status(t("saved 'top nodes' block changes."));
|
||||
case "top nodes block":
|
||||
return statistics_config_topnodes_block(array(
|
||||
$output .= statistics_config_topnodes_block(array(
|
||||
"statistics_block_top_title" => variable_get("statistics_block_top_title", "Top nodes"),
|
||||
"statistics_block_top_day_head" => variable_get("statistics_block_top_day_head", "<b>Todays top:</b>"),
|
||||
"statistics_block_top_day_num" => variable_get("statistics_block_top_day_num", 0),
|
||||
|
@ -290,9 +290,9 @@ function statistics_admin() {
|
|||
));
|
||||
case "Submit \"who's online\" block changes":
|
||||
statistics_save_online_block($edit);
|
||||
return status(t("saved 'who's online' block changes."));
|
||||
$output .= status(t("saved 'who's online' block changes."));
|
||||
case "whos online block":
|
||||
return statistics_config_online_block(array(
|
||||
$output .= statistics_config_online_block(array(
|
||||
"statistics_block_online_title" => variable_get("statistics_block_online_title", "Who's online"),
|
||||
"statistics_block_online_subtitle" => variable_get("statistics_block_online_subtitle", "Online users:"),
|
||||
"statistics_block_online_time" => variable_get("statistics_block_online_time", 2700),
|
||||
|
@ -301,9 +301,9 @@ function statistics_admin() {
|
|||
));
|
||||
case "Submit \"top nodes\" page changes":
|
||||
statistics_save_userconfig($edit);
|
||||
return status(t("saved 'top nodes' page changes."));
|
||||
$output .= status(t("saved 'top nodes' page changes."));
|
||||
case "top nodes page":
|
||||
return statistics_admin_userpage_config(array(
|
||||
$output .= statistics_admin_userpage_config(array(
|
||||
"statistics_userpage_link" => variable_get("statistics_userpage_link", ""),
|
||||
"statistics_userpage_day_head" => variable_get("statistics_userpage_day_head", "Todays top"),
|
||||
"statistics_userpage_day_cnt" => variable_get("statistics_userpage_day_cnt", 0),
|
||||
|
@ -313,9 +313,10 @@ function statistics_admin() {
|
|||
"statistics_userpage_last_cnt" => variable_get("statistics_userpage_last_cnt", 0)
|
||||
));
|
||||
default:
|
||||
return statistics_admin_topnodes();
|
||||
$output .= statistics_admin_topnodes();
|
||||
}
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -265,11 +265,11 @@ function statistics_admin() {
|
|||
/* non-configuration admin pages */
|
||||
switch ($op) {
|
||||
case "statistics":
|
||||
return statistics_admin_topnodes();
|
||||
$output = statistics_admin_topnodes();
|
||||
case "referrers":
|
||||
return statistics_top_refer();
|
||||
$output = statistics_top_refer();
|
||||
case "log":
|
||||
return statistics_admin_displaylog();
|
||||
$output = statistics_admin_displaylog();
|
||||
}
|
||||
|
||||
/* configuration admin pages */
|
||||
|
@ -277,9 +277,9 @@ function statistics_admin() {
|
|||
switch (stripslashes($op)) {
|
||||
case "Submit \"top nodes\" block changes":
|
||||
statistics_save_topnodes_block($edit);
|
||||
return status(t("saved 'top nodes' block changes."));
|
||||
$output .= status(t("saved 'top nodes' block changes."));
|
||||
case "top nodes block":
|
||||
return statistics_config_topnodes_block(array(
|
||||
$output .= statistics_config_topnodes_block(array(
|
||||
"statistics_block_top_title" => variable_get("statistics_block_top_title", "Top nodes"),
|
||||
"statistics_block_top_day_head" => variable_get("statistics_block_top_day_head", "<b>Todays top:</b>"),
|
||||
"statistics_block_top_day_num" => variable_get("statistics_block_top_day_num", 0),
|
||||
|
@ -290,9 +290,9 @@ function statistics_admin() {
|
|||
));
|
||||
case "Submit \"who's online\" block changes":
|
||||
statistics_save_online_block($edit);
|
||||
return status(t("saved 'who's online' block changes."));
|
||||
$output .= status(t("saved 'who's online' block changes."));
|
||||
case "whos online block":
|
||||
return statistics_config_online_block(array(
|
||||
$output .= statistics_config_online_block(array(
|
||||
"statistics_block_online_title" => variable_get("statistics_block_online_title", "Who's online"),
|
||||
"statistics_block_online_subtitle" => variable_get("statistics_block_online_subtitle", "Online users:"),
|
||||
"statistics_block_online_time" => variable_get("statistics_block_online_time", 2700),
|
||||
|
@ -301,9 +301,9 @@ function statistics_admin() {
|
|||
));
|
||||
case "Submit \"top nodes\" page changes":
|
||||
statistics_save_userconfig($edit);
|
||||
return status(t("saved 'top nodes' page changes."));
|
||||
$output .= status(t("saved 'top nodes' page changes."));
|
||||
case "top nodes page":
|
||||
return statistics_admin_userpage_config(array(
|
||||
$output .= statistics_admin_userpage_config(array(
|
||||
"statistics_userpage_link" => variable_get("statistics_userpage_link", ""),
|
||||
"statistics_userpage_day_head" => variable_get("statistics_userpage_day_head", "Todays top"),
|
||||
"statistics_userpage_day_cnt" => variable_get("statistics_userpage_day_cnt", 0),
|
||||
|
@ -313,9 +313,10 @@ function statistics_admin() {
|
|||
"statistics_userpage_last_cnt" => variable_get("statistics_userpage_last_cnt", 0)
|
||||
));
|
||||
default:
|
||||
return statistics_admin_topnodes();
|
||||
$output .= statistics_admin_topnodes();
|
||||
}
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -238,7 +238,7 @@ function system_view($type, $arg = "") {
|
|||
$form .= form_submit(t("Save configuration"));
|
||||
$form .= form_submit(t("Reset to defaults"));
|
||||
|
||||
print form($form);
|
||||
return form($form);
|
||||
}
|
||||
|
||||
function system_dirscan($dir, $mask, $nomask = array(".", "..", "CVS")) {
|
||||
|
@ -329,17 +329,18 @@ function system_admin() {
|
|||
|
||||
if (user_access("administer site configuration")) {
|
||||
if ($op == t("Reset to defaults")) {
|
||||
print status(system_reset_default($edit));
|
||||
$output = status(system_reset_default($edit));
|
||||
}
|
||||
|
||||
if ($op == t("Save configuration")) {
|
||||
print status(system_save_settings($edit));
|
||||
$output = status(system_save_settings($edit));
|
||||
}
|
||||
|
||||
print system_view(arg(2), arg(3));
|
||||
$output .= system_view(arg(2), arg(3));
|
||||
return $output;
|
||||
}
|
||||
else {
|
||||
print message_access();
|
||||
return message_access();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -238,7 +238,7 @@ function system_view($type, $arg = "") {
|
|||
$form .= form_submit(t("Save configuration"));
|
||||
$form .= form_submit(t("Reset to defaults"));
|
||||
|
||||
print form($form);
|
||||
return form($form);
|
||||
}
|
||||
|
||||
function system_dirscan($dir, $mask, $nomask = array(".", "..", "CVS")) {
|
||||
|
@ -329,17 +329,18 @@ function system_admin() {
|
|||
|
||||
if (user_access("administer site configuration")) {
|
||||
if ($op == t("Reset to defaults")) {
|
||||
print status(system_reset_default($edit));
|
||||
$output = status(system_reset_default($edit));
|
||||
}
|
||||
|
||||
if ($op == t("Save configuration")) {
|
||||
print status(system_save_settings($edit));
|
||||
$output = status(system_save_settings($edit));
|
||||
}
|
||||
|
||||
print system_view(arg(2), arg(3));
|
||||
$output .= system_view(arg(2), arg(3));
|
||||
return $output;
|
||||
}
|
||||
else {
|
||||
print message_access();
|
||||
return message_access();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1648,35 +1648,36 @@ function user_admin() {
|
|||
|
||||
switch ($op) {
|
||||
case "search":
|
||||
print search_type("user", url("admin/user/search"), $_POST["keys"]);
|
||||
$output = search_type("user", url("admin/user/search"), $_POST["keys"]);
|
||||
break;
|
||||
case t("Add rule"):
|
||||
case t("Check"):
|
||||
case "access":
|
||||
print user_admin_access($edit);
|
||||
$output = user_admin_access($edit);
|
||||
break;
|
||||
case t("Save permissions"):
|
||||
case "permission":
|
||||
print user_admin_perm($edit);
|
||||
$output = user_admin_perm($edit);
|
||||
break;
|
||||
case t("Create account"):
|
||||
case "create":
|
||||
print user_admin_create($edit);
|
||||
$output = user_admin_create($edit);
|
||||
break;
|
||||
case t("Add role"):
|
||||
case t("Delete role"):
|
||||
case t("Save role"):
|
||||
case "role":
|
||||
print user_admin_role($edit);
|
||||
$output = user_admin_role($edit);
|
||||
break;
|
||||
case t("Delete account"):
|
||||
case t("Save account"):
|
||||
case "edit":
|
||||
print user_admin_edit($edit);
|
||||
$output = user_admin_edit($edit);
|
||||
break;
|
||||
default:
|
||||
print user_admin_account();
|
||||
$output = user_admin_account();
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
}
|
||||
// this help is for end users
|
||||
|
|
|
@ -1648,35 +1648,36 @@ function user_admin() {
|
|||
|
||||
switch ($op) {
|
||||
case "search":
|
||||
print search_type("user", url("admin/user/search"), $_POST["keys"]);
|
||||
$output = search_type("user", url("admin/user/search"), $_POST["keys"]);
|
||||
break;
|
||||
case t("Add rule"):
|
||||
case t("Check"):
|
||||
case "access":
|
||||
print user_admin_access($edit);
|
||||
$output = user_admin_access($edit);
|
||||
break;
|
||||
case t("Save permissions"):
|
||||
case "permission":
|
||||
print user_admin_perm($edit);
|
||||
$output = user_admin_perm($edit);
|
||||
break;
|
||||
case t("Create account"):
|
||||
case "create":
|
||||
print user_admin_create($edit);
|
||||
$output = user_admin_create($edit);
|
||||
break;
|
||||
case t("Add role"):
|
||||
case t("Delete role"):
|
||||
case t("Save role"):
|
||||
case "role":
|
||||
print user_admin_role($edit);
|
||||
$output = user_admin_role($edit);
|
||||
break;
|
||||
case t("Delete account"):
|
||||
case t("Save account"):
|
||||
case "edit":
|
||||
print user_admin_edit($edit);
|
||||
$output = user_admin_edit($edit);
|
||||
break;
|
||||
default:
|
||||
print user_admin_account();
|
||||
$output = user_admin_account();
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
}
|
||||
// this help is for end users
|
||||
|
|
|
@ -126,17 +126,18 @@ function watchdog_admin() {
|
|||
if (user_access("administer watchdog")) {
|
||||
switch (arg(2)) {
|
||||
case "help":
|
||||
watchdog_help();
|
||||
$output = watchdog_help();
|
||||
break;
|
||||
case "view":
|
||||
print watchdog_view(arg(3));
|
||||
$output = watchdog_view(arg(3));
|
||||
break;
|
||||
default:
|
||||
print watchdog_overview(arg(2));
|
||||
$output = watchdog_overview(arg(2));
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
else {
|
||||
print message_access();
|
||||
return message_access();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -126,17 +126,18 @@ function watchdog_admin() {
|
|||
if (user_access("administer watchdog")) {
|
||||
switch (arg(2)) {
|
||||
case "help":
|
||||
watchdog_help();
|
||||
$output = watchdog_help();
|
||||
break;
|
||||
case "view":
|
||||
print watchdog_view(arg(3));
|
||||
$output = watchdog_view(arg(3));
|
||||
break;
|
||||
default:
|
||||
print watchdog_overview(arg(2));
|
||||
$output = watchdog_overview(arg(2));
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
else {
|
||||
print message_access();
|
||||
return message_access();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue