◆ getDefaultAmountOfStepsPerRun()
ilExternalFeedRemoveMigration::getDefaultAmountOfStepsPerRun |
( |
| ) |
|
◆ getLabel()
ilExternalFeedRemoveMigration::getLabel |
( |
| ) |
|
◆ getPreconditions()
ilExternalFeedRemoveMigration::getPreconditions |
( |
Environment |
$environment | ) |
|
◆ getRemainingAmountOfSteps()
ilExternalFeedRemoveMigration::getRemainingAmountOfSteps |
( |
| ) |
|
◆ log()
ilExternalFeedRemoveMigration::log |
( |
string |
$str | ) |
|
|
protected |
◆ manipulate()
ilExternalFeedRemoveMigration::manipulate |
( |
string |
$query | ) |
|
|
protected |
◆ step()
ilExternalFeedRemoveMigration::step |
( |
Environment |
$environment | ) |
|
Definition at line 60 of file class.ilExternalFeedRemoveMigration.php.
References $db, ilDBInterface\fetchAssoc(), ilDBInterface\in(), log(), manipulate(), ilDBInterface\queryF(), and ilDBInterface\quote().
68 "SELECT * FROM object_data d JOIN object_reference r ON (d.obj_id = r.obj_id) " .
69 " WHERE d.type = %s ",
74 $this->
log(
"Found title: " . $rec[
"title"] .
", ref id: " . $rec[
"ref_id"]);
75 $ref_ids[$rec[
"ref_id"]] = $rec[
"ref_id"];
76 $obj_ids[$rec[
"obj_id"]] = $rec[
"obj_id"];
81 "SELECT * FROM rbac_fa " .
82 " WHERE " .
$db->
in(
"parent", $ref_ids,
false,
"integer"),
88 $local_roles[$rec[
"rol_id"]] = $rec[
"rol_id"];
93 "SELECT * FROM object_data " .
94 " WHERE type = %s AND title = %s",
100 $typ_id = $rec[
"obj_id"];
105 "SELECT * FROM rbac_operations " .
106 " WHERE operation = %s",
112 $create_ops_id = $rec[
"ops_id"];
117 $this->
log(
"Delete tree nodes of feed objects.");
119 "DELETE FROM tree WHERE " .
120 " " .
$db->
in(
"child", $ref_ids,
false,
"integer")
124 $this->
log(
"Delete object_data entries of feed objects.");
126 "DELETE FROM object_data WHERE " .
127 " " .
$db->
in(
"obj_id", $obj_ids,
false,
"integer")
130 $this->
log(
"Delete object_data entries of local roles of feed objects.");
132 "DELETE FROM object_data WHERE " .
133 " " .
$db->
in(
"obj_id", $local_roles,
false,
"integer")
136 $this->
log(
"Delete object_data entry of feed type.");
138 "DELETE FROM object_data WHERE " .
139 " obj_id = " .
$db->
quote($typ_id,
"integer")
143 $this->
log(
"Delete object_description entries of feed objects.");
145 "DELETE FROM object_description WHERE " .
146 " " .
$db->
in(
"obj_id", $obj_ids,
false,
"integer")
150 $this->
log(
"Delete role_data entries of local roles of feed objects.");
152 "DELETE FROM role_data WHERE " .
153 " " .
$db->
in(
"role_id", $local_roles,
false,
"integer")
157 $this->
log(
"Delete object_reference entries of feed objects.");
159 "DELETE FROM object_reference WHERE " .
160 " " .
$db->
in(
"ref_id", $ref_ids,
false,
"integer")
164 $this->
log(
"Delete permissions of feed objects.");
166 "DELETE FROM rbac_pa WHERE " .
167 " " .
$db->
in(
"ref_id", $ref_ids,
false,
"integer")
171 $this->
log(
"Delete local roles of feed objects.");
173 "DELETE FROM rbac_fa WHERE " .
174 " " .
$db->
in(
"rol_id", $local_roles,
false,
"integer")
178 $this->
log(
"Delete operations of feed type.");
180 "DELETE FROM rbac_ta WHERE " .
181 " typ_id = " .
$db->
quote($typ_id,
"integer")
185 $this->
log(
"Delete permission templates of feed type.");
187 "DELETE FROM rbac_templates WHERE " .
188 " type = " .
$db->
quote(
"feed",
"text")
192 $this->
log(
"Delete create_feed operation from permission templates.");
194 "DELETE FROM rbac_templates WHERE " .
195 " ops_id = " .
$db->
quote($create_ops_id,
"integer")
200 $this->
log(
"Delete conditions of feed objects.");
202 "DELETE FROM conditions WHERE " .
203 " " .
$db->
in(
"target_ref_id", $ref_ids,
false,
"integer") .
204 " OR " .
$db->
in(
"trigger_ref_id", $ref_ids,
false,
"integer")
208 $this->
log(
"Empty il_external_feed_block.");
209 $this->
manipulate(
"DELETE FROM il_external_feed_block");
212 $this->
log(
"Delete il_custom_block entries of type 'feed'.");
213 $this->
manipulate(
"DELETE FROM il_custom_block WHERE type = " .
$db->
quote(
"feed",
"text"));
fetchAssoc(ilDBStatement $statement)
quote($value, string $type)
manipulate(string $query)
queryF(string $query, array $types, array $values)
in(string $field, array $values, bool $negate=false, string $type="")
◆ $db
The documentation for this class was generated from the following file: