diff --git a/assets/components/gallery/connector.php b/assets/components/gallery/connector.php index 8086d71..958ac59 100644 --- a/assets/components/gallery/connector.php +++ b/assets/components/gallery/connector.php @@ -47,7 +47,6 @@ if ($modx->user->hasSessionContext($modx->context->get('key'))) { $_SERVER['HTTP_MODAUTH'] = $_SESSION["modx.{$modx->context->get('key')}.user.token"]; } else { - $_SESSION["modx.{$modx->context->get('key')}.user.token"] = 0; $_SERVER['HTTP_MODAUTH'] = 0; } } else { @@ -61,4 +60,4 @@ $modx->request->handleRequest(array( 'processors_path' => $path, 'location' => '', -)); \ No newline at end of file +)); diff --git a/core/components/gallery/model/gallery/galitem.class.php b/core/components/gallery/model/gallery/galitem.class.php index 1dc9915..13faf78 100644 --- a/core/components/gallery/model/gallery/galitem.class.php +++ b/core/components/gallery/model/gallery/galitem.class.php @@ -93,7 +93,7 @@ public function getPath($absolute = true) { public function getPhpThumbUrl() { $assetsUrl = $this->xpdo->getOption('gallery.assets_url',null,$this->xpdo->getOption('assets_url',null,MODX_ASSETS_URL).'components/gallery/'); - $assetsUrl .= 'connector.php?action=web/phpthumb'; + $assetsUrl .= 'connector.php?action=web/phpthumb&ctx='.$this->xpdo->context->get('key'); return $assetsUrl; } @@ -355,4 +355,4 @@ public static function getList(modX &$modx,array $scriptProperties = array()) { } return $data; } -} \ No newline at end of file +}