@@ -131,7 +131,8 @@ discard block |
||
| 131 | 131 | try { |
| 132 | 132 | $this->_backend->index($documents); |
| 133 | 133 | return true; |
| 134 | - } catch (Exception $e) { |
|
| 134 | + } |
|
| 135 | + catch (Exception $e) { |
|
| 135 | 136 | if ($batch) { |
| 136 | 137 | throw $e; |
| 137 | 138 | } |
@@ -160,7 +161,8 @@ discard block |
||
| 160 | 161 | try { |
| 161 | 162 | $this->_backend->delete($RIs); |
| 162 | 163 | return true; |
| 163 | - } catch (Exception $e) { |
|
| 164 | + } |
|
| 165 | + catch (Exception $e) { |
|
| 164 | 166 | debug_add("Deleting error: " . $e->getMessage(), MIDCOM_LOG_ERROR); |
| 165 | 167 | return false; |
| 166 | 168 | } |
@@ -182,7 +184,8 @@ discard block |
||
| 182 | 184 | try { |
| 183 | 185 | $this->_backend->delete_all($constraint); |
| 184 | 186 | return true; |
| 185 | - } catch (Exception $e) { |
|
| 187 | + } |
|
| 188 | + catch (Exception $e) { |
|
| 186 | 189 | debug_add("Deleting error: " . $e->getMessage(), MIDCOM_LOG_ERROR); |
| 187 | 190 | return false; |
| 188 | 191 | } |
@@ -216,7 +219,8 @@ discard block |
||
| 216 | 219 | |
| 217 | 220 | try { |
| 218 | 221 | $result_raw = $this->_backend->query($query, $filter, $options); |
| 219 | - } catch (Exception $e) { |
|
| 222 | + } |
|
| 223 | + catch (Exception $e) { |
|
| 220 | 224 | debug_add("Query error: " . $e->getMessage(), MIDCOM_LOG_ERROR); |
| 221 | 225 | return $result; |
| 222 | 226 | } |
@@ -237,7 +241,8 @@ discard block |
||
| 237 | 241 | if (!empty($document->topic_guid)) { |
| 238 | 242 | try { |
| 239 | 243 | midcom_db_topic::get_cached($document->topic_guid); |
| 240 | - } catch (midcom_error $e) { |
|
| 244 | + } |
|
| 245 | + catch (midcom_error $e) { |
|
| 241 | 246 | // Skip document, the object is hidden. |
| 242 | 247 | debug_add("Skipping the generic document {$document->title}, its topic seems to be invisible, we cannot proceed."); |
| 243 | 248 | continue; |
@@ -250,7 +255,8 @@ discard block |
||
| 250 | 255 | // Strip language code from end of RI if it looks like "<GUID>_<LANG>" |
| 251 | 256 | try { |
| 252 | 257 | midcom::get()->dbfactory->get_object_by_guid(preg_replace('/^([0-9a-f]{32,80})_[a-z]{2}$/', '\\1', $document->RI)); |
| 253 | - } catch (midcom_error $e) { |
|
| 258 | + } |
|
| 259 | + catch (midcom_error $e) { |
|
| 254 | 260 | // Skip document, the object is hidden, deleted or otherwise unavailable. |
| 255 | 261 | //@todo Maybe nonexistent objects should be removed from index? |
| 256 | 262 | continue; |
@@ -105,12 +105,12 @@ |
||
| 105 | 105 | return $status; |
| 106 | 106 | } |
| 107 | 107 | |
| 108 | - /** |
|
| 109 | - * Get the object of a revision |
|
| 110 | - * |
|
| 111 | - * @param string $revision identifier of revision wanted |
|
| 112 | - * @return array array representation of the object |
|
| 113 | - */ |
|
| 108 | + /** |
|
| 109 | + * Get the object of a revision |
|
| 110 | + * |
|
| 111 | + * @param string $revision identifier of revision wanted |
|
| 112 | + * @return array array representation of the object |
|
| 113 | + */ |
|
| 114 | 114 | public function get_revision($revision) : array |
| 115 | 115 | { |
| 116 | 116 | if (empty($this->_guid)) { |