Skip to content

Commit

Permalink
Properly identify the base G2 url when G2 isn't using the rewrite
Browse files Browse the repository at this point in the history
module.  Fixes ticket #1322.
  • Loading branch information
bharat committed Aug 30, 2010
1 parent e881693 commit 3707d4e
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion modules/g2_import/helpers/g2_import.php
Expand Up @@ -178,7 +178,17 @@ static function init_embed($embed_path) {
"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;
}
Expand Down

0 comments on commit 3707d4e

Please sign in to comment.