Skip to content

Commit

Permalink
[php:core] add public function getVolume that call protected volume()
Browse files Browse the repository at this point in the history
  • Loading branch information
nao-pon committed Jan 14, 2014
1 parent 3dc406c commit 1c12c11
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion php/elFinder.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,17 @@ public function commandExists($cmd) {
return $this->loaded && isset($this->commands[$cmd]) && method_exists($this, $cmd);
}

/**
* Return root - file's owner (public func of volume())
*
* @param string file hash
* @return elFinderStorageDriver
* @author Naoki Sawada
*/
public function getVolume($hash) {
return $this->volume($hash);
}

/**
* Return command required arguments info
*
Expand Down Expand Up @@ -386,7 +397,7 @@ public function exec($cmd, $args) {
// call handlers for this command
if (!empty($this->listeners[$cmd])) {
foreach ($this->listeners[$cmd] as $handler) {
if (call_user_func($handler,$cmd,$result,$args,$this)) {
if (call_user_func_array($handler,array($cmd,&$result,$args,$this))) {
// handler return true to force sync client after command completed
$result['sync'] = true;
}
Expand Down

0 comments on commit 1c12c11

Please sign in to comment.