Passed
Branch oai_solr (423cc8)
by Erik
09:50 queued 02:55
created
dlf/ext_localconf.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
  * LICENSE.txt file that was distributed with this source code.
10 10
  */
11 11
 
12
-if (!defined ('TYPO3_MODE')) 	die ('Access denied.');
12
+if (!defined('TYPO3_MODE')) 	die ('Access denied.');
13 13
 
14 14
 // Register plugins.
15 15
 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPItoST43($_EXTKEY, 'plugins/audioplayer/class.tx_dlf_audioplayer.php', '_audioplayer', 'list_type', TRUE);
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['dlf/common/class.tx_dlf_document.php']['hookClass'][] = 'EXT:'.$_EXTKEY.'/hooks/class.tx_dlf_hacks.php:tx_dlf_hacks';
66 66
 
67 67
 // Register command line scripts.
68
-$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['GLOBAL']['cliKeys'][$_EXTKEY] = array ('EXT:'.$_EXTKEY.'/cli/class.tx_dlf_cli.php', '_CLI_dlf');
68
+$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['GLOBAL']['cliKeys'][$_EXTKEY] = array('EXT:'.$_EXTKEY.'/cli/class.tx_dlf_cli.php', '_CLI_dlf');
69 69
 
70 70
 // Register AJAX eID handlers.
71 71
 $GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['tx_dlf_search_suggest'] = 'EXT:'.$_EXTKEY.'/plugins/search/class.tx_dlf_search_suggest.php';
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,9 @@
 block discarded – undo
9 9
  * LICENSE.txt file that was distributed with this source code.
10 10
  */
11 11
 
12
-if (!defined ('TYPO3_MODE')) 	die ('Access denied.');
12
+if (!defined ('TYPO3_MODE')) {
13
+	die ('Access denied.');
14
+}
13 15
 
14 16
 // Register plugins.
15 17
 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPItoST43($_EXTKEY, 'plugins/audioplayer/class.tx_dlf_audioplayer.php', '_audioplayer', 'list_type', TRUE);
Please login to merge, or discard this patch.
dlf/ext_autoload.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,8 +33,8 @@
 block discarded – undo
33 33
 	'tx_dlf_modIndexing' => $extensionPath.'modules/indexing/index.php',
34 34
 	'tx_dlf_modNewclient' => $extensionPath.'modules/newclient/index.php',
35 35
 	'tx_dlf_audioplayer' => $extensionPath.'plugins/audioplayer/class.tx_dlf_audioplayer.php',
36
-    'tx_dlf_basket' => $extensionPath.'plugins/basket/class.tx_dlf_basket.php',
37
-    'tx_dlf_collection' => $extensionPath.'plugins/collection/class.tx_dlf_collection.php',
36
+	'tx_dlf_basket' => $extensionPath.'plugins/basket/class.tx_dlf_basket.php',
37
+	'tx_dlf_collection' => $extensionPath.'plugins/collection/class.tx_dlf_collection.php',
38 38
 	'tx_dlf_feeds' => $extensionPath.'plugins/feeds/class.tx_dlf_feeds.php',
39 39
 	'tx_dlf_listview' => $extensionPath.'plugins/listview/class.tx_dlf_listview.php',
40 40
 	'tx_dlf_metadata' => $extensionPath.'plugins/metadata/class.tx_dlf_metadata.php',
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
 
12 12
 $extensionPath = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('dlf');
13 13
 
14
-return array (
14
+return array(
15 15
 	'tx_dlf_cli' => $extensionPath.'cli/class.tx_dlf_cli.php',
16 16
 	'tx_dlf_alto' => $extensionPath.'common/class.tx_dlf_alto.php',
17 17
 	'tx_dlf_document' => $extensionPath.'common/class.tx_dlf_document.php',
Please login to merge, or discard this patch.
dlf/lib/SolrPhpClient/Apache/Solr/Document.php 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -121,8 +121,7 @@  discard block
 block discarded – undo
121 121
 		if ($boost > 0.0)
122 122
 		{
123 123
 			$this->_documentBoost = $boost;
124
-		}
125
-		else
124
+		} else
126 125
 		{
127 126
 			$this->_documentBoost = false;
128 127
 		}
@@ -157,8 +156,7 @@  discard block
 block discarded – undo
157 156
 		{
158 157
 			// create holding array if this is the first value
159 158
 			$this->_fields[$key] = array();
160
-		}
161
-		else if (!is_array($this->_fields[$key]))
159
+		} else if (!is_array($this->_fields[$key]))
162 160
 		{
163 161
 			// move existing value into array if it is not already an array
164 162
 			$this->_fields[$key] = array($this->_fields[$key]);
@@ -168,8 +166,7 @@  discard block
 block discarded – undo
168 166
 		{
169 167
 			// boost not already set, set it now
170 168
 			$this->setFieldBoost($key, $boost);
171
-		}
172
-		else if ((float) $boost > 0.0)
169
+		} else if ((float) $boost > 0.0)
173 170
 		{
174 171
 			// multiply passed boost with current field boost - similar to SolrJ implementation
175 172
 			$this->_fieldBoosts[$key] *= (float) $boost;
@@ -252,8 +249,7 @@  discard block
 block discarded – undo
252 249
 		if ($boost > 0.0)
253 250
 		{
254 251
 			$this->_fieldBoosts[$key] = $boost;
255
-		}
256
-		else
252
+		} else
257 253
 		{
258 254
 			$this->_fieldBoosts[$key] = false;
259 255
 		}
Please login to merge, or discard this patch.
dlf/lib/SolrPhpClient/Apache/Solr/HttpTransport/Interface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
  */
38 38
 
39 39
 // require Apache_Solr_HttpTransport_Response
40
-require_once(dirname(__FILE__) . '/Response.php');
40
+require_once(dirname(__FILE__).'/Response.php');
41 41
 
42 42
 /**
43 43
  * Interface that all Transport (HTTP Requester) implementations must implement. These
Please login to merge, or discard this patch.
dlf/lib/SolrPhpClient/Apache/Solr/HttpTransport/FileGetContents.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
  */
38 38
 
39 39
 // Require Apache_Solr_HttpTransport_Abstract
40
-require_once(dirname(__FILE__) . '/Abstract.php');
40
+require_once(dirname(__FILE__).'/Abstract.php');
41 41
 
42 42
 /**
43 43
  * HTTP Transport implemenation that uses the builtin http URL wrappers and file_get_contents
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -81,8 +81,7 @@
 block discarded – undo
81 81
 			$timeout = (float) $timeout / 2;
82 82
 
83 83
 			stream_context_set_option($this->_getContext, 'http', 'timeout', $timeout);
84
-		}
85
-		else
84
+		} else
86 85
 		{
87 86
 			// use the default timeout pulled from default_socket_timeout otherwise
88 87
 			stream_context_set_option($this->_getContext, 'http', 'timeout', $this->getDefaultTimeout());
Please login to merge, or discard this patch.
dlf/lib/SolrPhpClient/Apache/Solr/HttpTransport/Curl.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
  */
38 38
 
39 39
 // Require Apache_Solr_HttpTransport_Abstract
40
-require_once(dirname(__FILE__) . '/Abstract.php');
40
+require_once(dirname(__FILE__).'/Abstract.php');
41 41
 
42 42
 /**
43 43
  * A Curl based HTTP transport. Uses a single curl session for all requests.
Please login to merge, or discard this patch.
dlf/lib/SolrPhpClient/Apache/Solr/HttpTransport/CurlNoReuse.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
  */
38 38
 
39 39
 // Require Apache_Solr_HttpTransport_Abstract
40
-require_once(dirname(__FILE__) . '/Abstract.php');
40
+require_once(dirname(__FILE__).'/Abstract.php');
41 41
 
42 42
 /**
43 43
  * An alternative Curl HTTP transport that opens and closes a curl session for
Please login to merge, or discard this patch.
dlf/lib/SolrPhpClient/Apache/Solr/Response.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
  * @author Donovan Jimenez <[email protected]>
37 37
  */
38 38
 
39
-require_once(dirname(__FILE__) . '/ParserException.php');
39
+require_once(dirname(__FILE__).'/ParserException.php');
40 40
 
41 41
 /**
42 42
  * Represents a Solr response.  Parses the raw response into a set of stdClass objects
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -217,8 +217,7 @@
 block discarded – undo
217 217
 				if ($this->_createDocuments)
218 218
 				{
219 219
 					$document = new Apache_Solr_Document();
220
-				}
221
-				else
220
+				} else
222 221
 				{
223 222
 					$document = $originalDocument;
224 223
 				}
Please login to merge, or discard this patch.
dlf/lib/SolrPhpClient/Apache/Solr/Service/Balancer.php 2 patches
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -38,9 +38,9 @@  discard block
 block discarded – undo
38 38
 
39 39
 // See Issue #1 (http://code.google.com/p/solr-php-client/issues/detail?id=1)
40 40
 // Doesn't follow typical include path conventions, but is more convenient for users
41
-require_once(dirname(dirname(__FILE__)) . '/Service.php');
41
+require_once(dirname(dirname(__FILE__)).'/Service.php');
42 42
 
43
-require_once(dirname(dirname(__FILE__)) . '/NoServiceAvailableException.php');
43
+require_once(dirname(dirname(__FILE__)).'/NoServiceAvailableException.php');
44 44
 
45 45
 /**
46 46
  * Reference Implementation for using multiple Solr services in a distribution. Functionality
@@ -72,10 +72,10 @@  discard block
 block discarded – undo
72 72
 	protected $_writePingTimeout = 4;
73 73
 
74 74
 	// Configuration for server selection backoff intervals
75
-	protected $_useBackoff = false;		// Set to true to use more resillient write server selection
76
-	protected $_backoffLimit = 600;		// 10 minute default maximum
77
-	protected $_backoffEscalation = 2.0; 	// Rate at which to increase backoff period
78
-	protected $_defaultBackoff = 2.0;		// Default backoff interval
75
+	protected $_useBackoff = false; // Set to true to use more resillient write server selection
76
+	protected $_backoffLimit = 600; // 10 minute default maximum
77
+	protected $_backoffEscalation = 2.0; // Rate at which to increase backoff period
78
+	protected $_defaultBackoff = 2.0; // Default backoff interval
79 79
 
80 80
 	/**
81 81
 	 * Escape a value for special query characters such as ':', '(', ')', '*', '?', etc.
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
 	 */
159 159
 	protected function _getServiceId($host, $port, $path)
160 160
 	{
161
-		return $host . ':' . $port . $path;
161
+		return $host.':'.$port.$path;
162 162
 	}
163 163
 
164 164
 	/**
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
 		{
182 182
 			if (isset($service['host']) && isset($service['port']) && isset($service['path']))
183 183
 			{
184
-				$id = $this->_getServiceId((string)$service['host'], (int)$service['port'], (string)$service['path']);
184
+				$id = $this->_getServiceId((string) $service['host'], (int) $service['port'], (string) $service['path']);
185 185
 
186 186
 				$this->_readableServices[$id] = $service;
187 187
 			}
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
 		{
212 212
 			if (isset($service['host']) && isset($service['port']) && isset($service['path']))
213 213
 			{
214
-				$id = $this->_getServiceId((string)$service['host'], (int)$service['port'], (string)$service['path']);
214
+				$id = $this->_getServiceId((string) $service['host'], (int) $service['port'], (string) $service['path']);
215 215
 			}
216 216
 			else
217 217
 			{
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
 		{
250 250
 			if (isset($service['host']) && isset($service['port']) && isset($service['path']))
251 251
 			{
252
-				$id = $this->_getServiceId((string)$service['host'], (int)$service['port'], (string)$service['path']);
252
+				$id = $this->_getServiceId((string) $service['host'], (int) $service['port'], (string) $service['path']);
253 253
 
254 254
 				$this->_writeableServices[$id] = $service;
255 255
 			}
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
 		{
280 280
 			if (isset($service['host']) && isset($service['port']) && isset($service['path']))
281 281
 			{
282
-				$id = $this->_getServiceId((string)$service['host'], (int)$service['port'], (string)$service['path']);
282
+				$id = $this->_getServiceId((string) $service['host'], (int) $service['port'], (string) $service['path']);
283 283
 			}
284 284
 			else
285 285
 			{
@@ -355,7 +355,7 @@  discard block
 block discarded – undo
355 355
 	 */
356 356
 	protected function _selectWriteService($forceSelect = false)
357 357
 	{
358
-		if($this->_useBackoff)
358
+		if ($this->_useBackoff)
359 359
 		{
360 360
 			return $this->_selectWriteServiceSafe($forceSelect);
361 361
 		}
@@ -435,12 +435,12 @@  discard block
 block discarded – undo
435 435
 
436 436
 					$backoff *= $this->_backoffEscalation;
437 437
 
438
-					if($backoff > $this->_backoffLimit)
438
+					if ($backoff > $this->_backoffLimit)
439 439
 					{
440 440
 						throw new Apache_Solr_NoServiceAvailableException('No write services were available.  All timeouts exceeded.');
441 441
 					}
442 442
 
443
-				} while($this->_writeableServices[$this->_currentWriteService]->ping($backoff) === false);
443
+				} while ($this->_writeableServices[$this->_currentWriteService]->ping($backoff) === false);
444 444
 			}
445 445
 			else
446 446
 			{
Please login to merge, or discard this patch.
Braces   +61 added lines, -62 removed lines patch added patch discarded remove patch
@@ -176,16 +176,14 @@  discard block
 block discarded – undo
176 176
 			$id = $this->_getServiceId($service->getHost(), $service->getPort(), $service->getPath());
177 177
 
178 178
 			$this->_readableServices[$id] = $service;
179
-		}
180
-		else if (is_array($service))
179
+		} else if (is_array($service))
181 180
 		{
182 181
 			if (isset($service['host']) && isset($service['port']) && isset($service['path']))
183 182
 			{
184 183
 				$id = $this->_getServiceId((string)$service['host'], (int)$service['port'], (string)$service['path']);
185 184
 
186 185
 				$this->_readableServices[$id] = $service;
187
-			}
188
-			else
186
+			} else
189 187
 			{
190 188
 				throw new Apache_Solr_InvalidArgumentException('A Readable Service description array does not have all required elements of host, port, and path');
191 189
 			}
@@ -206,19 +204,16 @@  discard block
 block discarded – undo
206 204
 		if ($service instanceof Apache_Solr_Service)
207 205
 		{
208 206
 			$id = $this->_getServiceId($service->getHost(), $service->getPort(), $service->getPath());
209
-		}
210
-		else if (is_array($service))
207
+		} else if (is_array($service))
211 208
 		{
212 209
 			if (isset($service['host']) && isset($service['port']) && isset($service['path']))
213 210
 			{
214 211
 				$id = $this->_getServiceId((string)$service['host'], (int)$service['port'], (string)$service['path']);
215
-			}
216
-			else
212
+			} else
217 213
 			{
218 214
 				throw new Apache_Solr_InvalidArgumentException('A Readable Service description array does not have all required elements of host, port, and path');
219 215
 			}
220
-		}
221
-		else if (is_string($service))
216
+		} else if (is_string($service))
222 217
 		{
223 218
 			$id = $service;
224 219
 		}
@@ -244,16 +239,14 @@  discard block
 block discarded – undo
244 239
 			$id = $this->_getServiceId($service->getHost(), $service->getPort(), $service->getPath());
245 240
 
246 241
 			$this->_writeableServices[$id] = $service;
247
-		}
248
-		else if (is_array($service))
242
+		} else if (is_array($service))
249 243
 		{
250 244
 			if (isset($service['host']) && isset($service['port']) && isset($service['path']))
251 245
 			{
252 246
 				$id = $this->_getServiceId((string)$service['host'], (int)$service['port'], (string)$service['path']);
253 247
 
254 248
 				$this->_writeableServices[$id] = $service;
255
-			}
256
-			else
249
+			} else
257 250
 			{
258 251
 				throw new Apache_Solr_InvalidArgumentException('A Writeable Service description array does not have all required elements of host, port, and path');
259 252
 			}
@@ -274,19 +267,16 @@  discard block
 block discarded – undo
274 267
 		if ($service instanceof Apache_Solr_Service)
275 268
 		{
276 269
 			$id = $this->_getServiceId($service->getHost(), $service->getPort(), $service->getPath());
277
-		}
278
-		else if (is_array($service))
270
+		} else if (is_array($service))
279 271
 		{
280 272
 			if (isset($service['host']) && isset($service['port']) && isset($service['path']))
281 273
 			{
282 274
 				$id = $this->_getServiceId((string)$service['host'], (int)$service['port'], (string)$service['path']);
283
-			}
284
-			else
275
+			} else
285 276
 			{
286 277
 				throw new Apache_Solr_InvalidArgumentException('A Readable Service description array does not have all required elements of host, port, and path');
287 278
 			}
288
-		}
289
-		else if (is_string($service))
279
+		} else if (is_string($service))
290 280
 		{
291 281
 			$id = $service;
292 282
 		}
@@ -335,8 +325,7 @@  discard block
 block discarded – undo
335 325
 
336 326
 				$service->setCreateDocuments($this->_createDocuments);
337 327
 				$this->_currentReadService = $id;
338
-			}
339
-			else
328
+			} else
340 329
 			{
341 330
 				throw new Apache_Solr_NoServiceAvailableException('No read services were available');
342 331
 			}
@@ -387,8 +376,7 @@  discard block
 block discarded – undo
387 376
 				}
388 377
 
389 378
 				$this->_currentWriteService = $id;
390
-			}
391
-			else
379
+			} else
392 380
 			{
393 381
 				throw new Apache_Solr_NoServiceAvailableException('No write services were available');
394 382
 			}
@@ -441,8 +429,7 @@  discard block
 block discarded – undo
441 429
 					}
442 430
 
443 431
 				} while($this->_writeableServices[$this->_currentWriteService]->ping($backoff) === false);
444
-			}
445
-			else
432
+			} else
446 433
 			{
447 434
 				throw new Apache_Solr_NoServiceAvailableException('No write services were available');
448 435
 			}
@@ -497,13 +484,14 @@  discard block
 block discarded – undo
497 484
 			try
498 485
 			{
499 486
 				return $service->add($rawPost);
500
-			}
501
-			catch (Apache_Solr_HttpTransportException $e)
487
+			} catch (Apache_Solr_HttpTransportException $e)
502 488
 			{
503
-				if ($e->getCode() != 0) //IF NOT COMMUNICATION ERROR
489
+				if ($e->getCode() != 0) {
490
+					//IF NOT COMMUNICATION ERROR
504 491
 				{
505 492
 					throw $e;
506 493
 				}
494
+				}
507 495
 			}
508 496
 
509 497
 			$service = $this->_selectWriteService(true);
@@ -532,13 +520,14 @@  discard block
 block discarded – undo
532 520
 			try
533 521
 			{
534 522
 				return $service->addDocument($document, $allowDups, $overwritePending, $overwriteCommitted);
535
-			}
536
-			catch (Apache_Solr_HttpTransportException $e)
523
+			} catch (Apache_Solr_HttpTransportException $e)
537 524
 			{
538
-				if ($e->getCode() != 0) //IF NOT COMMUNICATION ERROR
525
+				if ($e->getCode() != 0) {
526
+					//IF NOT COMMUNICATION ERROR
539 527
 				{
540 528
 					throw $e;
541 529
 				}
530
+				}
542 531
 			}
543 532
 
544 533
 			$service = $this->_selectWriteService(true);
@@ -567,13 +556,14 @@  discard block
 block discarded – undo
567 556
 			try
568 557
 			{
569 558
 				return $service->addDocuments($documents, $allowDups, $overwritePending, $overwriteCommitted);
570
-			}
571
-			catch (Apache_Solr_HttpTransportException $e)
559
+			} catch (Apache_Solr_HttpTransportException $e)
572 560
 			{
573
-				if ($e->getCode() != 0) //IF NOT COMMUNICATION ERROR
561
+				if ($e->getCode() != 0) {
562
+					//IF NOT COMMUNICATION ERROR
574 563
 				{
575 564
 					throw $e;
576 565
 				}
566
+				}
577 567
 			}
578 568
 
579 569
 			$service = $this->_selectWriteService(true);
@@ -601,13 +591,14 @@  discard block
 block discarded – undo
601 591
 			try
602 592
 			{
603 593
 				return $service->commit($optimize, $waitFlush, $waitSearcher, $timeout);
604
-			}
605
-			catch (Apache_Solr_HttpTransportException $e)
594
+			} catch (Apache_Solr_HttpTransportException $e)
606 595
 			{
607
-				if ($e->getCode() != 0) //IF NOT COMMUNICATION ERROR
596
+				if ($e->getCode() != 0) {
597
+					//IF NOT COMMUNICATION ERROR
608 598
 				{
609 599
 					throw $e;
610 600
 				}
601
+				}
611 602
 			}
612 603
 
613 604
 			$service = $this->_selectWriteService(true);
@@ -635,13 +626,14 @@  discard block
 block discarded – undo
635 626
 			try
636 627
 			{
637 628
 				return $service->delete($rawPost, $timeout);
638
-			}
639
-			catch (Apache_Solr_HttpTransportException $e)
629
+			} catch (Apache_Solr_HttpTransportException $e)
640 630
 			{
641
-				if ($e->getCode() != 0) //IF NOT COMMUNICATION ERROR
631
+				if ($e->getCode() != 0) {
632
+					//IF NOT COMMUNICATION ERROR
642 633
 				{
643 634
 					throw $e;
644 635
 				}
636
+				}
645 637
 			}
646 638
 
647 639
 			$service = $this->_selectWriteService(true);
@@ -670,13 +662,14 @@  discard block
 block discarded – undo
670 662
 			try
671 663
 			{
672 664
 				return $service->deleteById($id, $fromPending, $fromCommitted, $timeout);
673
-			}
674
-			catch (Apache_Solr_HttpTransportException $e)
665
+			} catch (Apache_Solr_HttpTransportException $e)
675 666
 			{
676
-				if ($e->getCode() != 0) //IF NOT COMMUNICATION ERROR
667
+				if ($e->getCode() != 0) {
668
+					//IF NOT COMMUNICATION ERROR
677 669
 				{
678 670
 					throw $e;
679 671
 				}
672
+				}
680 673
 			}
681 674
 
682 675
 			$service = $this->_selectWriteService(true);
@@ -705,13 +698,14 @@  discard block
 block discarded – undo
705 698
 			try
706 699
 			{
707 700
 				return $service->deleteByMultipleId($ids, $fromPending, $fromCommitted, $timeout);
708
-			}
709
-			catch (Apache_Solr_HttpTransportException $e)
701
+			} catch (Apache_Solr_HttpTransportException $e)
710 702
 			{
711
-				if ($e->getCode() != 0) //IF NOT COMMUNICATION ERROR
703
+				if ($e->getCode() != 0) {
704
+					//IF NOT COMMUNICATION ERROR
712 705
 				{
713 706
 					throw $e;
714 707
 				}
708
+				}
715 709
 			}
716 710
 
717 711
 			$service = $this->_selectWriteService(true);
@@ -740,13 +734,14 @@  discard block
 block discarded – undo
740 734
 			try
741 735
 			{
742 736
 				return $service->deleteByQuery($rawQuery, $fromPending, $fromCommitted, $timeout);
743
-			}
744
-			catch (Apache_Solr_HttpTransportException $e)
737
+			} catch (Apache_Solr_HttpTransportException $e)
745 738
 			{
746
-				if ($e->getCode() != 0) //IF NOT COMMUNICATION ERROR
739
+				if ($e->getCode() != 0) {
740
+					//IF NOT COMMUNICATION ERROR
747 741
 				{
748 742
 					throw $e;
749 743
 				}
744
+				}
750 745
 			}
751 746
 
752 747
 			$service = $this->_selectWriteService(true);
@@ -782,13 +777,14 @@  discard block
 block discarded – undo
782 777
 			try
783 778
 			{
784 779
 				return $service->extract($file, $params, $document, $mimetype);
785
-			}
786
-			catch (Apache_Solr_HttpTransportException $e)
780
+			} catch (Apache_Solr_HttpTransportException $e)
787 781
 			{
788
-				if ($e->getCode() != 0) //IF NOT COMMUNICATION ERROR
782
+				if ($e->getCode() != 0) {
783
+					//IF NOT COMMUNICATION ERROR
789 784
 				{
790 785
 					throw $e;
791 786
 				}
787
+				}
792 788
 			}
793 789
 
794 790
 			$service = $this->_selectWriteService(true);
@@ -826,13 +822,14 @@  discard block
 block discarded – undo
826 822
 			try
827 823
 			{
828 824
 				return $service->extractFromString($data, $params, $document, $mimetype);
829
-			}
830
-			catch (Apache_Solr_HttpTransportException $e)
825
+			} catch (Apache_Solr_HttpTransportException $e)
831 826
 			{
832
-				if ($e->getCode() != 0) //IF NOT COMMUNICATION ERROR
827
+				if ($e->getCode() != 0) {
828
+					//IF NOT COMMUNICATION ERROR
833 829
 				{
834 830
 					throw $e;
835 831
 				}
832
+				}
836 833
 			}
837 834
 
838 835
 			$service = $this->_selectWriteService(true);
@@ -861,13 +858,14 @@  discard block
 block discarded – undo
861 858
 			try
862 859
 			{
863 860
 				return $service->optimize($waitFlush, $waitSearcher, $timeout);
864
-			}
865
-			catch (Apache_Solr_HttpTransportException $e)
861
+			} catch (Apache_Solr_HttpTransportException $e)
866 862
 			{
867
-				if ($e->getCode() != 0) //IF NOT COMMUNICATION ERROR
863
+				if ($e->getCode() != 0) {
864
+					//IF NOT COMMUNICATION ERROR
868 865
 				{
869 866
 					throw $e;
870 867
 				}
868
+				}
871 869
 			}
872 870
 
873 871
 			$service = $this->_selectWriteService(true);
@@ -897,13 +895,14 @@  discard block
 block discarded – undo
897 895
 			try
898 896
 			{
899 897
 				return $service->search($query, $offset, $limit, $params, $method);
900
-			}
901
-			catch (Apache_Solr_HttpTransportException $e)
898
+			} catch (Apache_Solr_HttpTransportException $e)
902 899
 			{
903
-				if ($e->getCode() != 0) //IF NOT COMMUNICATION ERROR
900
+				if ($e->getCode() != 0) {
901
+					//IF NOT COMMUNICATION ERROR
904 902
 				{
905 903
 					throw $e;
906 904
 				}
905
+				}
907 906
 			}
908 907
 
909 908
 			$service = $this->_selectReadService(true);
Please login to merge, or discard this patch.