summaryrefslogtreecommitdiff
path: root/modules/path/path.module
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2004-02-15 20:09:46 +0000
committerDries Buytaert <dries@buytaert.net>2004-02-15 20:09:46 +0000
commit4b0b2d02eecaa27e3162a0fad9d31bb08f4df53b (patch)
treecf369f7370c1be045e3d48e7a9beb26d1d0f3714 /modules/path/path.module
parentae5136e51b87b414c737f4726c367c18db79fc49 (diff)
downloadbrdo-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/path/path.module')
-rw-r--r--modules/path/path.module58
1 files changed, 26 insertions, 32 deletions
diff --git a/modules/path/path.module b/modules/path/path.module
index 9538a477e..15f43089e 100644
--- a/modules/path/path.module
+++ b/modules/path/path.module
@@ -5,44 +5,38 @@ function path_admin() {
$op = $_POST["op"];
$edit = $_POST["edit"];
- if (user_access("administer url aliases")) {
-
- if (empty($op)) {
- $op = arg(2);
- }
-
- switch ($op) {
- case "add":
- $output = path_form();
- break;
+ if (empty($op)) {
+ $op = arg(2);
+ }
- case "edit":
- $output = path_form(path_load(arg(3)));
- break;
+ switch ($op) {
+ case "add":
+ $output = path_form();
+ break;
- case "help":
- $output = path_help();
- break;
+ case "edit":
+ $output = path_form(path_load(arg(3)));
+ break;
- case "delete":
- path_delete(arg(3));
- $output .= path_overview();
- break;
+ case "help":
+ $output = path_help();
+ break;
- case t("Create new alias"):
- case t("Update alias"):
- $output = path_save($edit);
- break;
+ case "delete":
+ path_delete(arg(3));
+ $output .= path_overview();
+ break;
- default:
- $output .= path_overview();
- }
+ case t("Create new alias"):
+ case t("Update alias"):
+ $output = path_save($edit);
+ break;
- print theme("page", $output);
- }
- else {
- print theme("page", message_access());
+ default:
+ $output .= path_overview();
}
+
+ print theme("page", $output);
}
function path_set_alias($path = NULL, $alias = NULL) {
@@ -154,7 +148,7 @@ function path_link($type, $node = NULL) {
menu("admin/path", t("url aliasing"), "path_admin", 4);
menu("admin/path/add", t("new alias"), "path_admin");
menu("admin/path/help", t("help"), "path_admin", 9);
- }
+ }
}
function path_nodeapi(&$node, $op, $arg) {