21 protected string $base_path =
'/var/iliasdata/ilias/default/ilFile';
37 $path_found = file_exists(
$path);
39 $this->database->update(
41 [
'rid' => [
'text',
'unknown']],
42 [
'file_id' => [
'integer', $next_id]]
47 }
while (!$path_found);
55 (rid IS NULL OR rid = '') 56 AND (file_id != '' AND file_id IS NOT NULL) 58 $r = $this->database->query(
$query);
59 $d = $this->database->fetchObject($r);
60 if (!isset(
$d->file_id) || null ===
$d->file_id ||
'' ===
$d->file_id) {
64 return (
int)
$d->file_id;
74 for (
$i = 3;
$i > 0;
$i--) {
75 $factor = pow(100,
$i);
76 if (($tmp = (
int) ($num / $factor)) or $found) {
78 $num = $num % $factor;
84 $path_string = (implode(
'/',
$path) .
'/');
87 return $this->base_path .
'/' . $path_string .
'file_' . $file_id;
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class ilResourceStorageMigrationHelper.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
createPathFromId(int $file_id)
__construct(ilResourceStorageMigrationHelper $irss_helper)
for($i=6; $i< 13; $i++) for($i=1; $i< 13; $i++) $d