summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2010-08-29 21:50:25 -0700
committerBharat Mediratta <bharat@menalto.com>2010-08-29 21:50:25 -0700
commit3707d4e94fc46fb3b92c399111ef6fc7f351aaba (patch)
tree626a21fa8f2382b2f01c42cc5001f53ce6a92ed6
parente881693798224f150e577f6b71131d712faf6a7c (diff)
Properly identify the base G2 url when G2 isn't using the rewrite
module. Fixes ticket #1322.
-rw-r--r--modules/g2_import/helpers/g2_import.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/modules/g2_import/helpers/g2_import.php b/modules/g2_import/helpers/g2_import.php
index f2404f60..c3737f8f 100644
--- a/modules/g2_import/helpers/g2_import.php
+++ b/modules/g2_import/helpers/g2_import.php
@@ -178,7 +178,17 @@ class g2_import_Core {
"module", "rewrite", "modrewrite.embeddedLocation", $g2_embed_location));
g2($gallery->getStorage()->checkPoint());
}
- self::$g2_base_url = $g2_embed_location;
+
+ if ($g2_embed_location) {
+ self::$g2_base_url = $g2_embed_location;
+ } else {
+ self::$g2_base_url = $GLOBALS["gallery"]->getUrlGenerator()->generateUrl(
+ array(),
+ array("forceSessionId" => false,
+ "htmlEntities" => false,
+ "urlEncode" => false,
+ "useAuthToken" => false));
+ }
return true;
}