$relativeG2Path = $galleryDir;
$embedUri = url('gallery', NULL, NULL, TRUE);
if (variable_get('clean_url', 0)) {
- if (arg(0) != 'gallery' && trim('http://'.$_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], '/') != $base_url) {
- for ($i = 0; $i < count(explode('/', $_GET['q'])); $i++ ) {
+ $path = str_replace($base_url . '/', '','http://'.$_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);
+ print "<!--"; print_r($path) ; print "-->";
+ if (arg(0) != 'gallery' && $path) {
+ for ($i = 0; $i < count(explode('/', $path)); $i++ ) {
$relativeG2Path = '../' . $relativeG2Path;
}
}
}
+ $embedUri = url('gallery', NULL, NULL, TRUE);
$params = array('embedUri' => $embedUri,
'relativeG2Path' => $relativeG2Path,
'loginRedirect' => url('user/login', NULL, NULL, TRUE),