diff options
author | Dries Buytaert <dries@buytaert.net> | 2004-02-15 20:09:46 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2004-02-15 20:09:46 +0000 |
commit | 4b0b2d02eecaa27e3162a0fad9d31bb08f4df53b (patch) | |
tree | cf369f7370c1be045e3d48e7a9beb26d1d0f3714 /modules/taxonomy/taxonomy.module | |
parent | ae5136e51b87b414c737f4726c367c18db79fc49 (diff) | |
download | brdo-4b0b2d02eecaa27e3162a0fad9d31bb08f4df53b.tar.gz brdo-4b0b2d02eecaa27e3162a0fad9d31bb08f4df53b.tar.bz2 |
- Patch by Steven: removed redundant permission checks. These are no longer
required thanks to the new 404 handling.
Diffstat (limited to 'modules/taxonomy/taxonomy.module')
-rw-r--r-- | modules/taxonomy/taxonomy.module | 105 |
1 files changed, 50 insertions, 55 deletions
diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module index 0d32a606b..f426f09a1 100644 --- a/modules/taxonomy/taxonomy.module +++ b/modules/taxonomy/taxonomy.module @@ -767,68 +767,63 @@ function taxonomy_admin() { $op = $_POST["op"]; $edit = $_POST["edit"]; - if (user_access("administer taxonomy")) { - if (empty($op)) { - $op = arg(2); - } + if (empty($op)) { + $op = arg(2); + } - switch ($op) { - case "add": - if (arg(3) == "vocabulary") { - $output .= taxonomy_form_vocabulary(); - } - else if (arg(3) == "term") { - $output .= taxonomy_form_term(); - } - break; - case "edit": + switch ($op) { + case "add": + if (arg(3) == "vocabulary") { + $output .= taxonomy_form_vocabulary(); + } + else if (arg(3) == "term") { + $output .= taxonomy_form_term(); + } + break; + case "edit": + if (arg(3) == "vocabulary") { + $output .= taxonomy_form_vocabulary(object2array(taxonomy_get_vocabulary(arg(4)))); + } + else if (arg(3) == "term") { + $output .= taxonomy_form_term(object2array(taxonomy_get_term(arg(4)))); + } + break; + case "preview": + $output .= taxonomy_form(arg(4)); + break; + case "help": + $output .= taxonomy_help(); + break; + case t("Delete"): + if (!$edit["confirm"]) { if (arg(3) == "vocabulary") { - $output .= taxonomy_form_vocabulary(object2array(taxonomy_get_vocabulary(arg(4)))); + $output .= _taxonomy_confirm_del_vocabulary($edit["vid"]); } - else if (arg(3) == "term") { - $output .= taxonomy_form_term(object2array(taxonomy_get_term(arg(4)))); + else { + $output .= _taxonomy_confirm_del_term($edit["tid"]); } break; - case "preview": - $output .= taxonomy_form(arg(4)); - break; - case "help": - $output .= taxonomy_help(); - break; - case t("Delete"): - if (!$edit["confirm"]) { - if (arg(3) == "vocabulary") { - $output .= _taxonomy_confirm_del_vocabulary($edit["vid"]); - } - else { - $output .= _taxonomy_confirm_del_term($edit["tid"]); - } + } + else { + $edit["name"] = 0; + // fall through: + } + case t("Submit"): + if (arg(3) == "vocabulary") { + taxonomy_save_vocabulary($edit); + } + else { + taxonomy_save_term($edit); + if (!$edit["tid"]) { + // if INSERT show form again + $output .= taxonomy_form_term(); break; } - else { - $edit["name"] = 0; - // fall through: - } - case t("Submit"): - if (arg(3) == "vocabulary") { - taxonomy_save_vocabulary($edit); - } - else { - taxonomy_save_term($edit); - if (!$edit["tid"]) { - // if INSERT show form again - $output .= taxonomy_form_term(); - break; - } - // else (UPDATE or DELETE) fall through - } - // fall through: - default: - $output .= taxonomy_overview(); - } - } - else { - $output .= message_access(); + // else (UPDATE or DELETE) fall through + } + // fall through: + default: + $output .= taxonomy_overview(); } print theme("page", $output); |