mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-14 21:51:32 +00:00
- make sure the drop box folder is used, even if the user has a login
name like '../user'
This commit is contained in:
parent
315fe7ac55
commit
39b4638134
|
@ -50,17 +50,22 @@ var targetName = document.<?php echo $form?>.dropfolderfile<?php print $form ?>;
|
||||||
$this->contentContainerStart();
|
$this->contentContainerStart();
|
||||||
|
|
||||||
$dir = $dropfolderdir.'/'.$user->getLogin();
|
$dir = $dropfolderdir.'/'.$user->getLogin();
|
||||||
if(is_dir($dir)) {
|
/* Check if we are still looking in the configured directory and
|
||||||
$d = dir($dir);
|
* not somewhere else, e.g. if the login was '../test'
|
||||||
echo "<table>\n";
|
*/
|
||||||
while (false !== ($entry = $d->read())) {
|
if(dirname($dir) == $dropfolderdir) {
|
||||||
if($entry != '..' && $entry != '.') {
|
if(is_dir($dir)) {
|
||||||
if(!is_dir($entry)) {
|
$d = dir($dir);
|
||||||
echo "<tr><td><span style=\"cursor: pointer;\" onClick=\"targetName.value = '".$entry."'; window.close();\">".$entry."</span></td><td align=\"right\">".LetoDMS_Core_File::format_filesize(filesize($dir.'/'.$entry))."</td></tr>\n";
|
echo "<table>\n";
|
||||||
|
while (false !== ($entry = $d->read())) {
|
||||||
|
if($entry != '..' && $entry != '.') {
|
||||||
|
if(!is_dir($entry)) {
|
||||||
|
echo "<tr><td><span style=\"cursor: pointer;\" onClick=\"targetName.value = '".$entry."'; window.close();\">".$entry."</span></td><td align=\"right\">".LetoDMS_Core_File::format_filesize(filesize($dir.'/'.$entry))."</td></tr>\n";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
echo "</table>\n";
|
||||||
}
|
}
|
||||||
echo "</table>\n";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->contentContainerEnd();
|
$this->contentContainerEnd();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user