Skip to content
This repository was archived by the owner on Dec 25, 2018. It is now read-only.

returning path when using 'info' command + provided GET query parameters #19

Merged
merged 1 commit into from
Jun 4, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions src/Connector/ElFinderConnector.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,22 +51,23 @@ public function __construct($elFinder, $debug=false) {
/**
* Execute elFinder command and output result
*
* @param array $queryParameters GET query parameters.
* @return void
* @author Nicolas MURE
**/
public function run() {
exit(json_encode($this->execute()));
public function run($queryParameters) {
exit(json_encode($this->execute($queryParameters)));
}

/**
* Execute elFinder command and returns result
*
* @param array $queryParameters GET query parameters.
* @return array
* @author Dmitry (dio) Levashov
**/
public function execute() {
public function execute($queryParameters) {
$isPost = $_SERVER["REQUEST_METHOD"] == 'POST';
$src = $_SERVER["REQUEST_METHOD"] == 'POST' ? $_POST : $_GET;
$src = $_SERVER["REQUEST_METHOD"] == 'POST' ? $_POST : $queryParameters;
if ($isPost && !$src && $rawPostData = @file_get_contents('php://input')) {
// for support IE XDomainRequest()
$parts = explode('&', $rawPostData);
Expand Down
3 changes: 3 additions & 0 deletions src/Driver/ElFinderVolumeDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -2175,6 +2175,9 @@ protected function updateCache($path, $stat) {
if (empty($stat['phash'])) {
$stat['phash'] = $this->encode($this->_dirname($path));
}
if (empty($stat['path'])) {
$stat['path'] = $this->_path($path);
}
}

// fix name if required
Expand Down