19declare(strict_types=1);
49 if ($this->
database->tableExists(
'file_data')) {
75 if (!$this->
database->tableExists(
'file_data')) {
78 if ($this->
database->tableColumnExists(
'file_data',
'downloads')) {
95 UPDATE file_data SET downloads = (
96 SELECT COALESCE(SUM(read_event.read_count), 0) FROM read_event
97 WHERE read_event.obj_id = file_data.file_id
114 'module' => [
'text', General::MODULE_NAME],
115 'keyword' => [
'text', General::F_SHOW_AMOUNT_OF_DOWNLOADS],
116 'value' => [
'text',
'1'],
127 if (!$this->
database->tableExists(IconDatabaseRepository::ICON_TABLE_NAME)) {
129 IconDatabaseRepository::ICON_TABLE_NAME,
131 IconDatabaseRepository::ICON_RESOURCE_IDENTIFICATION => [
137 IconDatabaseRepository::ICON_ACTIVE => [
143 IconDatabaseRepository::IS_DEFAULT_ICON => [
152 if (!$this->
database->tableExists(IconDatabaseRepository::SUFFIX_TABLE_NAME)) {
154 IconDatabaseRepository::SUFFIX_TABLE_NAME,
156 IconDatabaseRepository::ICON_RESOURCE_IDENTIFICATION => [
162 IconDatabaseRepository::SUFFIX => [
178 "UPDATE il_file_icon_suffixes SET suffix = REPLACE(suffix, 'icon_file_', '') WHERE suffix LIKE 'icon_file_%';"
189 if (!$this->
database->tableExists(
'file_data')) {
192 if ($this->
database->tableColumnExists(
217 $query =
"UPDATE `object_data` SET `offline` = 0 WHERE `type` = \"file\" AND `offline` IS NULL";
218 $this->
database->manipulate($query);
230 throw new LogicException(self::class .
"::prepare() must be called before db-update-steps execution.");
step_2()
adds a new table column called 'downloads' which is used to keep
step_7()
This step sets all files which were created before the "centralizing online/offline status" feature t...
step_6()
Adds a new table column called 'important_info' to store important information regarding a file such ...
step_4()
adds two new tables to store data concerning suffix-specific icons for files
step_1()
adds a new table column called 'direct_download' that is used to determine if the on-click action in ...
step_3()
sets the default visibility of the amount of downloads to visible ('1' or true).
prepare(ilDBInterface $db)
abortIfNotPrepared()
Halts the execution of these update steps if no database was provided.
const CLICK_MODE_DOWNLOAD
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...