Created
June 29, 2015 17:56
-
-
Save ashalan/68a59964fe9288a0a9da to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/domain_path_rewrite.module b/domain_path_rewrite.module | |
index ac798af..c1ef06d 100644 | |
--- a/domain_path_rewrite.module | |
+++ b/domain_path_rewrite.module | |
@@ -18,7 +18,16 @@ function domain_path_rewrite_init() { | |
*/ | |
function domain_path_rewrite_url_inbound_alter(&$path, $original_path, $path_language) { | |
global $_domain; | |
- $domain_key = empty($_domain['machine_name']) ? domain_load($_domain['domain_id'])['machine_name'] : $_domain['machine_name']; | |
+ | |
+ $domain_key = ''; | |
+ | |
+ if (empty($_domain['machine_name'])) { | |
+ $load = domain_load($_domain['domain_id']); | |
+ $domain_key = $load['machine_name']; | |
+ } | |
+ else { | |
+ $domain_key = $_domain['machine_name']; | |
+ } | |
$redirect_source = $domain_key . ':' . ($original_path ? $original_path : '<front>'); | |
if (module_exists('redirect') && redirect_load_by_source($redirect_source)) { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment