Skip to content

Commit

Permalink
Fix for Gallery and 'Access Denied' messages in the MODX Manager
Browse files Browse the repository at this point in the history
(cherry picked from commit 16cc618)
  • Loading branch information
garryn authored and jpdevries committed Feb 13, 2014
1 parent b8e5126 commit ee31091
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions assets/components/gallery/connector.php
Expand Up @@ -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 {
Expand All @@ -61,4 +60,4 @@
$modx->request->handleRequest(array(
'processors_path' => $path,
'location' => '',
));
));
4 changes: 2 additions & 2 deletions core/components/gallery/model/gallery/galitem.class.php
Expand Up @@ -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;
}

Expand Down Expand Up @@ -355,4 +355,4 @@ public static function getList(modX &$modx,array $scriptProperties = array()) {
}
return $data;
}
}
}

0 comments on commit ee31091

Please sign in to comment.