5 protected $base_path =
'/var/iliasdata/ilias/default/ilFile';
27 (rid IS NULL OR rid = '')
28 AND (file_id != '' AND file_id IS NOT NULL)
30 $r = $this->database->query(
$query);
31 $d = $this->database->fetchObject($r);
32 if (!isset(
$d->file_id) ||
null ===
$d->file_id ||
'' ===
$d->file_id) {
33 throw new LogicException(
"error fetching file_id");
36 $file_id = (int)
$d->file_id;
46 for (
$i = 3;
$i > 0;
$i--) {
47 $factor = pow(100,
$i);
48 if (($tmp = (
int) ($num / $factor)) or $found) {
50 $num = $num % $factor;
56 $path_string = (implode(
'/', $path) .
'/');
59 return $this->base_path .
'/' . $path_string .
'file_' . $file_id;
An exception for terminatinating execution or to throw for unit testing.
Class ilFileObjectToStorageDirectory.
createPathFromId(int $file_id)
__construct(string $base_path, ilDBInterface $database)
for( $i=6;$i< 13;$i++) for($i=1; $i< 13; $i++) $d
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...