mirror of
https://github.com/Studio-42/elFinder
synced 2026-06-08 12:37:09 +00:00
[VD:OneDrive] re-fix problem of not show thumbnail of new items
c.f d38bc4fa47
This commit is contained in:
@@ -436,7 +436,7 @@ class elFinderVolumeOneDrive extends elFinderVolumeDriver
|
||||
if ($raw->thumbnails[0]->small->url) {
|
||||
$stat['tmb'] = substr($raw->thumbnails[0]->small->url, 8); // remove "https://"
|
||||
}
|
||||
} else if (!empty($raw->file->processingMetadata)) {
|
||||
} elseif (!empty($raw->file->processingMetadata)) {
|
||||
$stat['tmb'] = '1';
|
||||
}
|
||||
}
|
||||
@@ -949,6 +949,27 @@ class elFinderVolumeOneDrive extends elFinderVolumeDriver
|
||||
**/
|
||||
protected function createTmb($path, $stat)
|
||||
{
|
||||
if ($this->options['useApiThumbnail']) {
|
||||
if (func_num_args() > 2) {
|
||||
list(, , $count) = func_get_args();
|
||||
} else {
|
||||
$count = 0;
|
||||
}
|
||||
if ($count < 10) {
|
||||
if (isset($stat['tmb']) && $stat['tmb'] != '1') {
|
||||
return $stat['tmb'];
|
||||
} else {
|
||||
sleep(2);
|
||||
elFinder::extendTimeLimit();
|
||||
$this->clearcache();
|
||||
$stat = $this->stat($path);
|
||||
|
||||
return $this->createTmb($path, $stat, ++$count);
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
if (!$stat || !$this->canCreateTmb($path, $stat)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user