mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-11 17:44:56 +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();
|
||||
|
||||
$dir = $dropfolderdir.'/'.$user->getLogin();
|
||||
if(is_dir($dir)) {
|
||||
$d = dir($dir);
|
||||
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";
|
||||
/* Check if we are still looking in the configured directory and
|
||||
* not somewhere else, e.g. if the login was '../test'
|
||||
*/
|
||||
if(dirname($dir) == $dropfolderdir) {
|
||||
if(is_dir($dir)) {
|
||||
$d = dir($dir);
|
||||
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();
|
||||
|
|
Loading…
Reference in New Issue
Block a user