| @@ 2038-2050 (lines=13) @@ | ||
| 2035 | $this->enableMetadata(); |
|
| 2036 | $this->enableAnnotations(); |
|
| 2037 | ||
| 2038 | if ($recursive) { |
|
| 2039 | $disabled_with_it = elgg_get_entities_from_relationship(array( |
|
| 2040 | 'relationship' => 'disabled_with', |
|
| 2041 | 'relationship_guid' => $guid, |
|
| 2042 | 'inverse_relationship' => true, |
|
| 2043 | 'limit' => 0, |
|
| 2044 | )); |
|
| 2045 | ||
| 2046 | foreach ($disabled_with_it as $e) { |
|
| 2047 | $e->enable(); |
|
| 2048 | remove_entity_relationship($e->guid, 'disabled_with', $guid); |
|
| 2049 | } |
|
| 2050 | } |
|
| 2051 | ||
| 2052 | access_show_hidden_entities($old_access_status); |
|
| 2053 | ||
| @@ 60-72 (lines=13) @@ | ||
| 57 | 'relationship_guid' => $this->guid, |
|
| 58 | 'inverse_relationship' => false, |
|
| 59 | )); |
|
| 60 | if ($batch) { |
|
| 61 | $batch = $batch[0]; |
|
| 62 | $count = elgg_get_entities_from_relationship(array( |
|
| 63 | 'relationship' => 'belongs_to_batch', |
|
| 64 | 'relationship_guid' => $batch->guid, |
|
| 65 | 'inverse_relationship' => true, |
|
| 66 | 'count' => true, |
|
| 67 | )); |
|
| 68 | if ($count == 1) { |
|
| 69 | // last image so delete batch |
|
| 70 | $batch->delete(); |
|
| 71 | } |
|
| 72 | } |
|
| 73 | ||
| 74 | $this->removeThumbnails(); |
|
| 75 | ||