| @@ 140-150 (lines=11) @@ | ||
| 137 | * @param array $args The argument list. |
|
| 138 | * @param array &$data The local request data. |
|
| 139 | */ |
|
| 140 | public function _handler_delete($handler_id, array $args, array &$data) |
|
| 141 | { |
|
| 142 | $this->_article = new midcom_db_article($args[0]); |
|
| 143 | // Relocate to delete the link instead of the article itself |
|
| 144 | if ($this->_article->topic !== $this->_content_topic->id) |
|
| 145 | { |
|
| 146 | return new midcom_response_relocate("delete/link/{$args[0]}/"); |
|
| 147 | } |
|
| 148 | $workflow = $this->get_workflow('delete', array('object' => $this->_article)); |
|
| 149 | return $workflow->run(); |
|
| 150 | } |
|
| 151 | } |
|
| 152 | ||
| @@ 171-181 (lines=11) @@ | ||
| 168 | * @param array $args The argument list. |
|
| 169 | * @param array &$data The local request data. |
|
| 170 | */ |
|
| 171 | public function _handler_delete($handler_id, array $args, array &$data) |
|
| 172 | { |
|
| 173 | $this->_article = new midcom_db_article($args[0]); |
|
| 174 | // Relocate to delete the link instead of the article itself |
|
| 175 | if ($this->_article->topic !== $this->_content_topic->id) |
|
| 176 | { |
|
| 177 | return new midcom_response_relocate("delete/link/{$args[0]}/"); |
|
| 178 | } |
|
| 179 | $workflow = $this->get_workflow('delete', array('object' => $this->_article)); |
|
| 180 | return $workflow->run(); |
|
| 181 | } |
|
| 182 | } |
|
| 183 | ||