summaryrefslogtreecommitdiff
path: root/includes/menu.inc
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2009-11-01 23:02:13 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2009-11-01 23:02:13 +0000
commit14c1c505e0b5915ff85f0698afc209f530fd83fb (patch)
treefb56f39b8ccf4ea846977b50c07845b5b80cc911 /includes/menu.inc
parentfedcd1acf0f1ee126febe211e8a1f47c27282956 (diff)
downloadbrdo-14c1c505e0b5915ff85f0698afc209f530fd83fb.tar.gz
brdo-14c1c505e0b5915ff85f0698afc209f530fd83fb.tar.bz2
#607008 by dww, Gerhard Killesreiter, JacobSingh, and chx: Changed Fix bugs in https support and use https for authorize.php if available.
Diffstat (limited to 'includes/menu.inc')
-rw-r--r--includes/menu.inc12
1 files changed, 2 insertions, 10 deletions
diff --git a/includes/menu.inc b/includes/menu.inc
index 7a6787c5f..558209355 100644
--- a/includes/menu.inc
+++ b/includes/menu.inc
@@ -2517,7 +2517,7 @@ function menu_link_save(&$item) {
// This is the easiest way to handle the unique internal path '<front>',
// since a path marked as external does not need to match a router path.
- $item['external'] = (menu_path_is_external($item['link_path']) || $item['link_path'] == '<front>') ? 1 : 0;
+ $item['external'] = (url_is_external($item['link_path']) || $item['link_path'] == '<front>') ? 1 : 0;
// Load defaults.
$item += array(
'menu_name' => 'navigation',
@@ -3187,14 +3187,6 @@ function _menu_router_save($menu, $masks) {
}
/**
- * Returns TRUE if a path is external (e.g. http://example.com).
- */
-function menu_path_is_external($path) {
- $colonpos = strpos($path, ':');
- return $colonpos !== FALSE && !preg_match('![/?#]!', substr($path, 0, $colonpos)) && filter_xss_bad_protocol($path, FALSE) == check_plain($path);
-}
-
-/**
* Checks whether the site is in maintenance mode.
*
* This function will log the current user out and redirect to front page
@@ -3254,7 +3246,7 @@ function menu_valid_path($form_item) {
$path = $form_item['link_path'];
// We indicate that a menu administrator is running the menu access check.
$menu_admin = TRUE;
- if ($path == '<front>' || menu_path_is_external($path)) {
+ if ($path == '<front>' || url_is_external($path)) {
$item = array('access' => TRUE);
}
elseif (preg_match('/\/\%/', $path)) {