ILIAS  trunk Revision v11.0_alpha-1723-g8e69f309bab
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
class.ilWebResourceDropValidSteps.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
28 {
29  protected \ilDBInterface $db;
30 
31  public function prepare(\ilDBInterface $db): void
32  {
33  $this->db = $db;
34  }
35  public function step_1(): void
36  {
37  //Drops the column 'disable_check' from webr_items
38  if ($this->db->tableColumnExists('webr_items', 'disable_check')) {
39  $this->db->dropTableColumn('webr_items', 'disable_check');
40  }
41  }
42 
43  public function step_2(): void
44  {
45  //Drops the column 'last_check' from webr_items
46  if ($this->db->tableColumnExists('webr_items', 'last_check')) {
47  $this->db->dropTableColumn('webr_items', 'last_check');
48  }
49  }
50 
51  public function step_3(): void
52  {
53  //Drops the column 'valid' from webr_items
54  if ($this->db->tableColumnExists('webr_items', 'valid')) {
55  $this->db->dropTableColumn('webr_items', 'valid');
56  }
57  }
58 
59  public function step_4(): void
60  {
61  // Removes entries from table webr_params where 'value' is 2.
62  // This removes all link session_id link parameters
63  if ($this->db->tableExists('webr_params')) {
64  $this->db->manipulate("DELETE FROM webr_params WHERE value = " . $this->db->quote(2, 'integer'));
65  }
66  }
67 }
prepare(\ilDBInterface $db)
Prepare the execution of the steps.
These update steps drop the columns &#39;disable_check&#39;, &#39;last_check&#39; and &#39;valid&#39; from the table &#39;webr_it...