summaryrefslogtreecommitdiff
path: root/modules/path
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2006-11-21 19:40:09 +0000
committerDries Buytaert <dries@buytaert.net>2006-11-21 19:40:09 +0000
commitb3dae71697597835c31aea71b13b3a516d3fa457 (patch)
tree9569d1c6c788afd03b0bb19859386ac45403f28a /modules/path
parent8996aad911c329ca71c8dc3c8847b9eb87c7a3a0 (diff)
downloadbrdo-b3dae71697597835c31aea71b13b3a516d3fa457.tar.gz
brdo-b3dae71697597835c31aea71b13b3a516d3fa457.tar.bz2
- Patch #98293 by Steven: remove restrictions on path aliases.
Diffstat (limited to 'modules/path')
-rw-r--r--modules/path/path.module13
1 files changed, 1 insertions, 12 deletions
diff --git a/modules/path/path.module b/modules/path/path.module
index 469052c64..d8a1a8aab 100644
--- a/modules/path/path.module
+++ b/modules/path/path.module
@@ -224,10 +224,7 @@ function path_nodeapi(&$node, $op, $arg) {
switch ($op) {
case 'validate':
$node->path = trim($node->path);
- if ($node->path && !valid_url($node->path)) {
- form_set_error('path', t('The path is invalid.'));
- }
- else if (db_result(db_query("SELECT COUNT(dst) FROM {url_alias} WHERE dst = '%s' AND src != '%s'", $node->path, "node/$node->nid"))) {
+ if (db_result(db_query("SELECT COUNT(dst) FROM {url_alias} WHERE dst = '%s' AND src != '%s'", $node->path, "node/$node->nid"))) {
form_set_error('path', t('The path is already in use.'));
}
break;
@@ -345,14 +342,6 @@ function path_form_validate($form_id, $form_values) {
$dst = $form_values['dst'];
$pid = $form_values['pid'];
- if (!valid_url($src)) {
- form_set_error('src', t('The system path %path is invalid.', array('%path' => $src)));
- }
-
- if (!valid_url($dst)) {
- form_set_error('dst', t('The alias %alias is invalid.', array('%alias' => $dst)));
- }
-
if (db_result(db_query("SELECT COUNT(dst) FROM {url_alias} WHERE pid != %d AND dst = '%s'", $pid, $dst))) {
form_set_error('dst', t('The alias %alias is already in use.', array('%alias' => $dst)));
}