Skip to content

Commit

Permalink
startPath now works, closes Studio-42#141
Browse files Browse the repository at this point in the history
  • Loading branch information
troex committed Nov 22, 2011
1 parent dcacca5 commit a53880b
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 12 deletions.
4 changes: 2 additions & 2 deletions elfinder.src.html
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,9 @@
}
},
// onlyMimes : ['image', 'text/plain']
lang : 'hu',
lang : 'ru',
// requestType : 'POST',
// rememberLastDir : false, // TODO need more testing
// rememberLastDir : false,
// ui : ['tree', 'toolbar'],
// commands : [],
// commandsOptions : {
Expand Down
2 changes: 1 addition & 1 deletion php/connector.php
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ function validName($name) {
'tmbPath' => '.tmb',
'utf8fix' => true,
'tmbCrop' => false,
'startPath' => '../files/test',
// 'startPath' => '../files/test',
// 'deep' => 3,
// 'separator' => ':',
'attributes' => array(
Expand Down
2 changes: 1 addition & 1 deletion php/elFinder.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ protected function open($args) {

if (($tree = $v->tree('', 0, $cwd['hash'])) != false) {
$files = array_merge($files, $tree);
}
}
}
}

Expand Down
15 changes: 7 additions & 8 deletions php/elFinderVolumeDriver.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,7 @@ public function mount(array $opts) {
for ($i = 1, $size = count($mime); $i < $size ; $i++) {
if (!isset(self::$mimetypes[$mime[$i]])) {
self::$mimetypes[$mime[$i]] = $mime[0];
}
}
}
}
}
Expand All @@ -716,11 +716,11 @@ public function mount(array $opts) {
if ($this->options['startPath']) {
$start = $this->stat($this->options['startPath']);
if (!empty($start)
&& $start['mime'] == 'directory'
&& $start['read']
&& !$start['hidden']
&& $start['mime'] == 'directory'
&& $start['read']
&& !$start['hidden']
&& $this->_inpath($this->options['startPath'], $this->root)) {
$this->startPath = $path;
$this->startPath = $this->options['startPath'];
}
}
} else {
Expand All @@ -729,13 +729,12 @@ public function mount(array $opts) {
$this->options['tmbPath'] = '';
// read only volume
array_unshift($this->attributes, array(
'pattern' => '/.*/',
'pattern' => '/.*/',
'read' => false
));
}

$this->treeDeep = $this->options['treeDeep'] > 0 ? (int)$this->options['treeDeep'] : 1;
$this->tmbSize = $this->options['tmbSize'] > 0 ? (int)$this->options['tmbSize'] : 48;
$this->tmbSize = $this->options['tmbSize'] > 0 ? (int)$this->options['tmbSize'] : 48;
$this->URL = $this->options['URL'];
if ($this->URL && preg_match("|[^/?&=]$|", $this->URL)) {
$this->URL .= '/';
Expand Down

0 comments on commit a53880b

Please sign in to comment.