◆ prepare()
◆ step_1()
ilDataCollectionDBUpdateSteps9::step_1 |
( |
| ) |
|
Definition at line 30 of file class.ilDataCollectionDBUpdateSteps9.php.
32 $this->db->manipulate(
33 "UPDATE il_dcl_tableview " .
34 "SET description=" . $this->db->quote(
"",
"text") .
35 "WHERE description is null" 37 $this->db->modifyTableColumn(
"il_dcl_tableview",
"description", [
◆ step_10()
ilDataCollectionDBUpdateSteps9::step_10 |
( |
| ) |
|
Definition at line 144 of file class.ilDataCollectionDBUpdateSteps9.php.
146 if (!$this->db->indexExistsByFields(
'il_dcl_field_prop', array(
'field_id'))) {
147 $this->db->addIndex(
'il_dcl_field_prop', array(
'field_id'),
'i2');
149 if (!$this->db->indexExistsByFields(
'il_dcl_sel_opts', array(
'field_id'))) {
150 $this->db->addIndex(
'il_dcl_sel_opts', array(
'field_id'),
'i1');
152 if (!$this->db->indexExistsByFields(
'il_dcl_sel_opts', array(
'opt_id'))) {
153 $this->db->addIndex(
'il_dcl_sel_opts', array(
'opt_id'),
'i2');
155 if (!$this->db->indexExistsByFields(
'il_dcl_tview_set', array(
'field'))) {
156 $this->db->addIndex(
'il_dcl_tview_set', array(
'field'),
'i2');
158 if (!$this->db->indexExistsByFields(
'il_dcl_tview_set', array(
'in_filter'))) {
159 $this->db->addIndex(
'il_dcl_tview_set', array(
'in_filter'),
'i3');
161 if (!$this->db->indexExistsByFields(
'il_dcl_tfield_set', array(
'field'))) {
162 $this->db->addIndex(
'il_dcl_tfield_set', array(
'field'),
'i3');
164 if (!$this->db->indexExistsByFields(
'il_dcl_tfield_set', array(
'table_id'))) {
165 $this->db->addIndex(
'il_dcl_tfield_set', array(
'table_id'),
'i4');
◆ step_11()
ilDataCollectionDBUpdateSteps9::step_11 |
( |
| ) |
|
◆ step_12()
ilDataCollectionDBUpdateSteps9::step_12 |
( |
| ) |
|
◆ step_13()
ilDataCollectionDBUpdateSteps9::step_13 |
( |
| ) |
|
Definition at line 191 of file class.ilDataCollectionDBUpdateSteps9.php.
193 if ($this->db->tableColumnExists(
'il_dcl_tableview',
'step_vs')) {
194 $this->db->dropTableColumn(
'il_dcl_tableview',
'step_vs');
196 if ($this->db->tableColumnExists(
'il_dcl_tableview',
'step_c')) {
197 $this->db->dropTableColumn(
'il_dcl_tableview',
'step_c');
199 if ($this->db->tableColumnExists(
'il_dcl_tableview',
'step_e')) {
200 $this->db->dropTableColumn(
'il_dcl_tableview',
'step_e');
202 if ($this->db->tableColumnExists(
'il_dcl_tableview',
'step_o')) {
203 $this->db->dropTableColumn(
'il_dcl_tableview',
'step_o');
205 if ($this->db->tableColumnExists(
'il_dcl_tableview',
'step_s')) {
206 $this->db->dropTableColumn(
'il_dcl_tableview',
'step_s');
◆ step_14()
ilDataCollectionDBUpdateSteps9::step_14 |
( |
| ) |
|
◆ step_15()
ilDataCollectionDBUpdateSteps9::step_15 |
( |
| ) |
|
Definition at line 215 of file class.ilDataCollectionDBUpdateSteps9.php.
217 if ($this->db->tableExists(
'il_dcl_field_prop_b')) {
218 $this->db->dropTable(
'il_dcl_field_prop_b');
221 if ($this->db->tableExists(
'il_dcl_field_prop_s_b')) {
222 $this->db->dropTable(
'il_dcl_field_prop_s_b');
◆ step_16()
ilDataCollectionDBUpdateSteps9::step_16 |
( |
| ) |
|
Definition at line 226 of file class.ilDataCollectionDBUpdateSteps9.php.
References $DIC, $id, XapiProxy\$plugin, ilDclFieldTypePlugin\DB_TYPES, ilDclFieldTypePlugin\getDataType(), ilDclDatatype\INPUTFORMAT_PLUGIN, ILIAS\Repository\int(), ilDclFieldTypePlugin\SLOT_ID, ilDBConstants\T_INTEGER, and ilDBConstants\T_TEXT.
230 foreach ($slot->getPlugins() as
$plugin) {
235 $stmt = $this->db->queryF(
236 'SELECT field_id FROM il_dcl_field_prop WHERE name = "plugin_hook_name" AND value = %s',
240 while ($row = $this->db->fetchAssoc($stmt)) {
241 $field_ids[] = (
int) $row[
'field_id'];
245 $stmt = $this->db->queryF(
'SELECT id FROM il_dcl_datatype WHERE title LIKE %s', [
ilDBConstants::T_TEXT], [$field_type_name]);
246 while ($row = $this->db->fetchAssoc($stmt)) {
250 $type =
$plugin->getStorageLocation();
251 $field_model_class =
'il' .
$plugin->getPluginName() .
'FieldModel';
252 $type = (
new $field_model_class())->getStorageLocationOverride() ??
$plugin->getStorageLocation();
254 $this->db->manipulateF(
255 'INSERT INTO il_dcl_datatype (id, title, ildb_type, storage_location, sort) SELECT GREATEST(MAX(id), 1000) + 1, %s, %s, %s, GREATEST(MAX(sort), 10000) + 10 FROM il_dcl_datatype;',
267 $stmt = $this->db->queryF(
'SELECT id FROM il_dcl_datatype WHERE title LIKE %s', [
ilDBConstants::T_TEXT], [$field_type_name]);
268 $id = (
int) $this->db->fetchAssoc($stmt)[
'id'];
271 foreach ($field_ids as $field_id) {
272 $this->db->manipulateF(
273 'UPDATE il_dcl_field SET datatype_id = %s WHERE id = %s',
279 $this->db->manipulateF(
280 'DELETE FROM il_dcl_field_prop WHERE name = "plugin_hook_name" AND value = %s',
285 $this->db->manipulateF(
286 'DELETE FROM il_dcl_datatype WHERE id = %s',
static getDataType(string $plugin_id)
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
◆ step_17()
ilDataCollectionDBUpdateSteps9::step_17 |
( |
| ) |
|
◆ step_18()
ilDataCollectionDBUpdateSteps9::step_18 |
( |
| ) |
|
Definition at line 314 of file class.ilDataCollectionDBUpdateSteps9.php.
References ilDclDetailedViewDefinition\PARENT_TYPE, ilDBConstants\T_INTEGER, and ilDBConstants\T_TEXT.
316 $stmt = $this->db->queryF(
317 'SELECT * FROM page_object INNER JOIN il_dcl_tableview ON page_id = id WHERE rendered_content IS NOT NULL AND parent_type = %s',
322 while ($row = $this->db->fetchAssoc($stmt)) {
324 $content = $row[
'content'];
325 $rendered_content = $row[
'rendered_content'];
327 foreach ([
'id',
'create_date',
'last_update',
'owner',
'last_edit_by'] as $field) {
328 $content = str_replace(
'[' . $field .
']',
'[[' . $field .
']]', $content);
329 $content = str_replace(
'[[[' . $field .
']]]',
'[[' . $field .
']]', $content);
330 $rendered_content = str_replace(
'[' . $field .
']',
'[[' . $field .
']]', $rendered_content);
331 $rendered_content = str_replace(
'[[[' . $field .
']]]',
'[[' . $field .
']]', $rendered_content);
334 $sub_stmt = $this->db->queryF(
335 'SELECT * FROM il_dcl_field WHERE table_id = %s',
337 [(
int) $row[
'table_id']]
339 while ($field = $this->db->fetchAssoc($sub_stmt)) {
340 $old = [
'[' . $field[
'title'] .
']',
'[dclrefln field="' . $field[
'title'] .
'"][/dclrefln]' ];
341 $content = str_replace($old,
'[[' . $field[
'id'] .
']]', $content);
342 $rendered_content = str_replace($old,
'[[' . $field[
'id'] .
']]', $rendered_content);
345 $this->db->manipulateF(
346 'UPDATE page_object SET content = %s, rendered_content = %s WHERE page_id = %s',
348 [$content, $rendered_content, (
int) $row[
'page_id']]
◆ step_2()
ilDataCollectionDBUpdateSteps9::step_2 |
( |
| ) |
|
Definition at line 43 of file class.ilDataCollectionDBUpdateSteps9.php.
45 $this->db->manipulate(
46 "UPDATE il_dcl_tview_set " .
48 "WHERE in_filter is null" 50 $this->db->manipulate(
51 "UPDATE il_dcl_tview_set " .
53 "WHERE visible is null" 55 $this->db->manipulate(
56 "UPDATE il_dcl_tview_set " .
57 "SET filter_changeable=0 " .
58 "WHERE filter_changeable is null" 60 $this->db->modifyTableColumn(
"il_dcl_tview_set",
"in_filter", [
64 $this->db->modifyTableColumn(
"il_dcl_tview_set",
"visible", [
68 $this->db->modifyTableColumn(
"il_dcl_tview_set",
"filter_changeable", [
◆ step_3()
ilDataCollectionDBUpdateSteps9::step_3 |
( |
| ) |
|
Definition at line 74 of file class.ilDataCollectionDBUpdateSteps9.php.
76 $this->db->manipulate(
77 "UPDATE il_dcl_tfield_set " .
79 "WHERE exportable is null" 81 $this->db->modifyTableColumn(
"il_dcl_tfield_set",
"exportable", [
◆ step_4()
ilDataCollectionDBUpdateSteps9::step_4 |
( |
| ) |
|
◆ step_5()
ilDataCollectionDBUpdateSteps9::step_5 |
( |
| ) |
|
Definition at line 92 of file class.ilDataCollectionDBUpdateSteps9.php.
94 if (!$this->db->indexExistsByFields(
'il_dcl_field_prop', [
'id',
'field_id'])) {
95 $this->db->addIndex(
'il_dcl_field_prop', [
'id',
'field_id'],
'i1');
97 if (!$this->db->indexExistsByFields(
'il_dcl_tview_set', [
'tableview_id'])) {
98 $this->db->addIndex(
'il_dcl_tview_set', [
'tableview_id'],
'i1');
◆ step_6()
ilDataCollectionDBUpdateSteps9::step_6 |
( |
| ) |
|
◆ step_7()
ilDataCollectionDBUpdateSteps9::step_7 |
( |
| ) |
|
◆ step_8()
ilDataCollectionDBUpdateSteps9::step_8 |
( |
| ) |
|
◆ step_9()
ilDataCollectionDBUpdateSteps9::step_9 |
( |
| ) |
|
Definition at line 133 of file class.ilDataCollectionDBUpdateSteps9.php.
135 $this->db->manipulate(
136 "UPDATE il_dcl_field_prop, il_dcl_field 137 SET name='link_detail_page_text' 138 WHERE name='link_detail_page' 139 AND il_dcl_field_prop.field_id=il_dcl_field.id 140 AND il_dcl_field.datatype_id=2"
◆ $db
The documentation for this class was generated from the following file: