ILIAS  trunk Revision v11.0_alpha-2645-g16283d3b3f8
ilDataCollectionDBUpdateSteps10 Class Reference
+ Inheritance diagram for ilDataCollectionDBUpdateSteps10:
+ Collaboration diagram for ilDataCollectionDBUpdateSteps10:

Public Member Functions

 prepare (ilDBInterface $db)
 
 step_1 ()
 
- Public Member Functions inherited from ilDatabaseUpdateSteps
 prepare (\ilDBInterface $db)
 Prepare the execution of the steps. More...
 

Protected Attributes

ilDBInterface $db
 

Detailed Description

Definition at line 21 of file class.ilDataCollectionDBUpdateSteps10.php.

Member Function Documentation

◆ prepare()

ilDataCollectionDBUpdateSteps10::prepare ( ilDBInterface  $db)

Definition at line 25 of file class.ilDataCollectionDBUpdateSteps10.php.

References $db.

25  : void
26  {
27  $this->db = $db;
28  }

◆ step_1()

ilDataCollectionDBUpdateSteps10::step_1 ( )

Definition at line 30 of file class.ilDataCollectionDBUpdateSteps10.php.

References ilDclDatatype\INPUTFORMAT_TEXT, ilDclBaseFieldModel\PROP_LENGTH, ilDBConstants\T_INTEGER, and ilDBConstants\T_TEXT.

30  : void
31  {
32  $stmt = $this->db->queryF(
33  'SELECT il_dcl_field.*, area.value As text_area FROM il_dcl_field ' .
34  'LEFT JOIN il_dcl_field_prop AS lenght ON il_dcl_field.id = lenght.field_id AND lenght.name = %s' .
35  'LEFT JOIN il_dcl_field_prop AS area ON il_dcl_field.id = area.field_id AND area.name = %s' .
36  'WHERE il_dcl_field.datatype_id = %s AND lenght.value IS NULL',
37  [ilDBConstants::T_TEXT, ilDbConstants::T_TEXT, ilDbConstants::T_INTEGER],
39  );
40 
41  while ($row = $this->db->fetchAssoc($stmt)) {
42  $this->db->insert(
43  'il_dcl_field_prop',
44  [
45  'id' => [ilDBConstants::T_INTEGER, $this->db->nextId('il_dcl_field_prop')],
46  'field_id' => [ilDBConstants::T_INTEGER, $row['id']],
48  'value' => [ilDBConstants::T_TEXT, ($row['text_area'] === '1') ? '4000' : '200'],
49  ]
50  );
51  }
52 
53  $this->db->manipulateF(
54  "DELETE FROM il_dcl_field_prop WHERE name = %s",
56  ['text_area']
57  );
58  }
const PROP_LENGTH
General properties.

Field Documentation

◆ $db

ilDBInterface ilDataCollectionDBUpdateSteps10::$db
protected

Definition at line 23 of file class.ilDataCollectionDBUpdateSteps10.php.

Referenced by prepare().


The documentation for this class was generated from the following file: