--- securepages.module +++ (clipboard) @@ -216,6 +216,25 @@ $pages = variable_get('securepages_pages', "node/add*\nnode/*/edit\nuser/*\nadmin*"); $ignore = variable_get('securepages_ignore', "*/autocomplete/*\n*/ajax/*"); + // remove language prefix from path before matching the path + $languages = language_list('enabled'); + + if (is_array($languages)) { + $languages = $languages[1]; + + if (is_array($languages)) { + + foreach($languages as $language) { + + if (!empty($language->prefix) && strpos($path, $language->prefix .'/') === 0) { + $length = strlen($language->prefix .'/'); + $path = substr($path, $length); + break; + } + } + } + } + if ($ignore) { $regexp = '/^('. preg_replace(array('/(\r\n?|\n)/', '/\\\\\*/', '/(^|\|)\\\\($|\|)/'), array('|', '.*', '\1'. preg_quote(variable_get('site_frontpage', 'node'), '/') .'\2'), preg_quote($ignore, '/')) .')$/'; if (preg_match($regexp, $path)) {