Completed
Push — dev2 ( f0efe9...1a1275 )
by Gordon
03:01
created
searchpage/ElasticSearchPage.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -196,7 +196,7 @@
 block discarded – undo
196 196
 									setSource($ottos);
197 197
 		$df->setEmptyString('-- Please select what do do after find as you type has occurred --');
198 198
 
199
-		$ottos = $this->ElasticaSearchableFields()->filter('EnableAutocomplete',1)->Map('ID', 'Name')->toArray();
199
+		$ottos = $this->ElasticaSearchableFields()->filter('EnableAutocomplete', 1)->Map('ID', 'Name')->toArray();
200 200
 		$autoCompleteFieldDF = DropDownField::create('AutoCompleteFieldID', 'Field to use for autocomplete')->setSource($ottos);
201 201
 		$autoCompleteFieldDF->setEmptyString('-- Please select which field to use for autocomplete --');
202 202
 
Please login to merge, or discard this patch.
searchpage/ElasticSearchPage_Controller.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -72,23 +72,23 @@  discard block
 block discarded – undo
72 72
 			'SimilarSearchable' => true
73 73
 		));
74 74
 
75
-		foreach ($editedSearchFields->getIterator() as $searchField) {
75
+		foreach($editedSearchFields->getIterator() as $searchField) {
76 76
 			$fieldsToSearch[$searchField->Name] = $searchField->Weight;
77 77
 		}
78 78
 
79 79
 		// Use the standard field for more like this, ie not stemmed
80
-		foreach ($fieldsToSearch as $field => $value) {
81
-			$fieldsToSearch[$field.'.standard'] = $value;
80
+		foreach($fieldsToSearch as $field => $value) {
81
+			$fieldsToSearch[$field . '.standard'] = $value;
82 82
 			unset($fieldsToSearch[$field]);
83 83
 		}
84 84
 
85 85
 		try {
86 86
 			// Simulate server being down for testing purposes
87
-			if (isset($_GET['ServerDown'])) {
87
+			if(isset($_GET['ServerDown'])) {
88 88
 				throw new Elastica\Exception\Connection\HttpException('Unable to reach search server');
89 89
 			}
90
-			if (class_exists($class)) {
91
-				$instance = \DataObject::get_by_id($class,$instanceID);
90
+			if(class_exists($class)) {
91
+				$instance = \DataObject::get_by_id($class, $instanceID);
92 92
 
93 93
 				$paginated = $es->moreLikeThis($instance, $fieldsToSearch);
94 94
 
@@ -219,14 +219,14 @@  discard block
 block discarded – undo
219 219
 			'Searchable' => true
220 220
 		));
221 221
 
222
-		foreach ($editedSearchFields->getIterator() as $searchField) {
222
+		foreach($editedSearchFields->getIterator() as $searchField) {
223 223
 			$fieldsToSearch[$searchField->Name] = $searchField->Weight;
224 224
 		}
225 225
 
226 226
 		$paginated = null;
227 227
 		try {
228 228
 			// Simulate server being down for testing purposes
229
-			if (isset($_GET['ServerDown'])) {
229
+			if(isset($_GET['ServerDown'])) {
230 230
 				throw new Elastica\Exception\Connection\HttpException('Unable to reach search server');
231 231
 			}
232 232
 
Please login to merge, or discard this patch.