Test Setup Failed
Push — master ( b82aef...e4f80c )
by Angel Fernando Quiroz
345:44 queued 291:34
created
main/search/search_suggestions.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
  * @package chamilo.search
7 7
  */
8 8
 
9
-require_once dirname(__FILE__) . '/../inc/global.inc.php';
9
+require_once dirname(__FILE__).'/../inc/global.inc.php';
10 10
 
11 11
 function get_suggestions_from_search_engine($q)
12 12
 {
@@ -100,14 +100,14 @@  discard block
 block discarded – undo
100 100
                         // will create a copy as Yannick - Car - Speed
101 101
                         // in $output[3]
102 102
                         $c = count($output);
103
-                        for ($i=0;$i<$c; $i++) {
104
-                            $output[($c+$i)] = $current_field_val;
103
+                        for ($i = 0; $i < $c; $i++) {
104
+                            $output[($c + $i)] = $current_field_val;
105 105
                         }
106 106
                     } else {
107 107
                         //no identical field id, continue as usual
108 108
                         $c = count($output);
109 109
                         if ($c == 0) {
110
-                            $output[] = $row2->getValue() . ' - ';
110
+                            $output[] = $row2->getValue().' - ';
111 111
                         } else {
112 112
                             foreach ($output as $i=>$out) {
113 113
                                 //use the latest combination of fields
@@ -118,9 +118,9 @@  discard block
 block discarded – undo
118 118
                     }
119 119
                 }
120 120
                 foreach ($output as $i=>$out) {
121
-                    if (api_stristr($out,$q) === false) {continue;}
121
+                    if (api_stristr($out, $q) === false) {continue; }
122 122
                     $s = api_convert_encoding(substr($out, 0, -3), 'UTF-8', $charset);
123
-                    if (!in_array($s,$more_sugg)) {
123
+                    if (!in_array($s, $more_sugg)) {
124 124
                         $more_sugg[] = $s;
125 125
                         $json[] = [
126 126
                             'id' => $s,
Please login to merge, or discard this patch.