Skip to content

Commit

Permalink
allow set elFinder::$volumesCnt by HTTP header
Browse files Browse the repository at this point in the history
elFinder::$volumesCnt initial value will be set by HTTP header "X-elFinder-VolumesCntStart".
  • Loading branch information
nao-pon committed Nov 24, 2015
1 parent 960be24 commit 49c9702
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions php/elFinder.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,11 @@ public function __construct($opts) {
$sessionUseCmds = array_merge($sessionUseCmds, $opts['sessionUseCmds']);
}

// set self::$volumesCnt by HTTP header "X-elFinder-VolumesCntStart"
if (isset($_SERVER['HTTP_X_ELFINDER_VOLUMESCNTSTART']) && ($volumesCntStart = intval($_SERVER['HTTP_X_ELFINDER_VOLUMESCNTSTART']))) {
self::$volumesCnt = $volumesCntStart;
}

$this->time = $this->utime();
$this->debug = (isset($opts['debug']) && $opts['debug'] ? true : false);
$this->sessionCloseEarlier = isset($opts['sessionCloseEarlier'])? (bool)$opts['sessionCloseEarlier'] : true;
Expand Down

0 comments on commit 49c9702

Please sign in to comment.