Passed
Push — 1.10.x ( 04397c...5e25f1 )
by Angel Fernando Quiroz
181:14 queued 130:00
created
main/inc/lib/message.lib.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
                 format_file_size(api_get_setting('message_max_upload_filesize'))
245 245
             );
246 246
 
247
-            Display::addFlash(Display::return_message($warning , 'warning'));
247
+            Display::addFlash(Display::return_message($warning, 'warning'));
248 248
 
249 249
             return false;
250 250
         }
@@ -682,7 +682,7 @@  discard block
 block discarded – undo
682 682
      * @param string $type
683 683
      * @return bool
684 684
      */
685
-    public static function update_message_status($user_id, $message_id,$type)
685
+    public static function update_message_status($user_id, $message_id, $type)
686 686
     {
687 687
         $type = intval($type);
688 688
         if ($message_id != strval(intval($message_id)) || $user_id != strval(intval($user_id))) {
@@ -996,7 +996,7 @@  discard block
 block discarded – undo
996 996
 
997 997
         $receiverUserInfo = api_get_user_info($row['user_receiver_id']);
998 998
 
999
-        $message_content .='<tr>';
999
+        $message_content .= '<tr>';
1000 1000
         if (api_get_setting('allow_social_tool') == 'true') {
1001 1001
             if ($source == 'outbox') {
1002 1002
                 $message_content .= get_lang('From').': <a href="'.api_get_path(WEB_PATH).'main/social/profile.php?u='.$user_sender_id.'">'.$name.'</a> '.
@@ -1012,7 +1012,7 @@  discard block
 block discarded – undo
1012 1012
                 $message_content .= get_lang('From').':&nbsp;'.$name.'</b> '.api_strtolower(get_lang('To')).' <b>'.get_lang('Me').'</b>';
1013 1013
             }
1014 1014
         }
1015
-        $message_content .=' '.get_lang('Date').':  '.api_get_local_time($row['send_date']).'
1015
+        $message_content .= ' '.get_lang('Date').':  '.api_get_local_time($row['send_date']).'
1016 1016
 		        <br />
1017 1017
 		        <hr style="color:#ddd" />
1018 1018
 		        <table height="209px" width="100%">
@@ -1038,7 +1038,7 @@  discard block
 block discarded – undo
1038 1038
         $message_content .= '<a href="inbox.php?action=deleteone&id='.$message_id.'&'.$social_link.'" >'.
1039 1039
             Display::return_icon('delete.png', get_lang('DeleteMessage')).'</a>&nbsp';
1040 1040
 
1041
-        $message_content .='</div></td>
1041
+        $message_content .= '</div></td>
1042 1042
 		      <td width=10></td>
1043 1043
 		    </tr>
1044 1044
 		</table>';
@@ -1115,7 +1115,7 @@  discard block
 block discarded – undo
1115 1115
 
1116 1116
                 $items = $topic['count'];
1117 1117
                 $reply_label = ($items == 1) ? get_lang('GroupReply') : get_lang('GroupReplies');
1118
-                $label =  Display::label($items.' '.$reply_label);
1118
+                $label = Display::label($items.' '.$reply_label);
1119 1119
                 $topic['title'] = trim($topic['title']);
1120 1120
 
1121 1121
                 if (empty($topic['title'])) {
@@ -1225,7 +1225,7 @@  discard block
 block discarded – undo
1225 1225
         $name = $user_sender_info['complete_name'];
1226 1226
 
1227 1227
         $topic_page_nr = isset($_GET['topics_page_nr']) ? intval($_GET['topics_page_nr']) : null;
1228
-        $links.= '<div id="message-reply-link">';
1228
+        $links .= '<div id="message-reply-link">';
1229 1229
         if (($my_group_role == GROUP_USER_PERMISSION_ADMIN ||
1230 1230
             $my_group_role == GROUP_USER_PERMISSION_MODERATOR) ||
1231 1231
             $main_message['user_sender_id'] == $current_user_id
@@ -1237,7 +1237,7 @@  discard block
 block discarded – undo
1237 1237
                 'group_id' => $group_id,
1238 1238
                 'message_id' => $main_message['id'],
1239 1239
                 'action' => 'edit_message_group',
1240
-                'anchor_topic' => 'topic_' . $main_message['id'],
1240
+                'anchor_topic' => 'topic_'.$main_message['id'],
1241 1241
                 'topics_page_nr' => $topic_page_nr,
1242 1242
                 'items_page_nr' => $items_page_nr,
1243 1243
                 'topic_id' => $main_message['id']
@@ -1267,7 +1267,7 @@  discard block
 block discarded – undo
1267 1267
             'group_id' => $group_id,
1268 1268
             'message_id' => $main_message['id'],
1269 1269
             'action' => 'reply_message_group',
1270
-            'anchor_topic' => 'topic_' . $main_message['id'],
1270
+            'anchor_topic' => 'topic_'.$main_message['id'],
1271 1271
             'topics_page_nr' => $topic_page_nr,
1272 1272
             'topic_id' => $main_message['id']
1273 1273
         ]);
@@ -1283,10 +1283,10 @@  discard block
 block discarded – undo
1283 1283
             ]
1284 1284
         );
1285 1285
 
1286
-        $links.= '</div>';
1286
+        $links .= '</div>';
1287 1287
 
1288 1288
         $userPicture = $user_sender_info['avatar'];
1289
-        $main_content.= '<div class="message-group-author">
1289
+        $main_content .= '<div class="message-group-author">
1290 1290
                          <img src="'.$userPicture.'" alt="'.$name.'"  width="32" height="32" title="'.$name.'" /></div>';
1291 1291
         $user_link = '<a href="'.api_get_path(WEB_PATH).'main/social/profile.php?u='.$main_message['user_sender_id'].'">'.$name.'&nbsp;</a>';
1292 1292
 
@@ -1299,7 +1299,7 @@  discard block
 block discarded – undo
1299 1299
             $date = '<div class="message-group-date"> '.get_lang('Created').' '.date_to_str_ago($main_message['send_date']).'</div>';
1300 1300
         }
1301 1301
         $attachment = '<div class="message-attach">'.(!empty($files_attachments) ? implode('<br />', $files_attachments) : '').'</div>';
1302
-        $main_content.= '<div class="message-group-content">'.$links.$user_link.' '.$date.$main_message['content'].$attachment.'</div>';
1302
+        $main_content .= '<div class="message-group-content">'.$links.$user_link.' '.$date.$main_message['content'].$attachment.'</div>';
1303 1303
         $main_content = Security::remove_XSS($main_content, STUDENT, true);
1304 1304
 
1305 1305
         $html .= Display::div(Display::div(Display::div($main_content, array('class' => 'group_social_sub_item', 'style' => 'background-color:#fff;')), array('class' => 'group_social_item')), array('class' => 'group_social_grid'));
@@ -1320,18 +1320,18 @@  discard block
 block discarded – undo
1320 1320
                 $files_attachments = self::get_links_message_attachment_files($topic['id']);
1321 1321
                 $name = $user_sender_info['complete_name'];
1322 1322
 
1323
-                $links.= '<div id="message-reply-link">';
1323
+                $links .= '<div id="message-reply-link">';
1324 1324
                 if (($my_group_role == GROUP_USER_PERMISSION_ADMIN || $my_group_role == GROUP_USER_PERMISSION_MODERATOR) || $topic['user_sender_id'] == $current_user_id) {
1325
-                    $links.= '<a href="'.api_get_path(WEB_CODE_PATH).'social/message_for_group_form.inc.php?height=400&width=800&&user_friend='.$current_user_id.'&group_id='.$group_id.'&message_id='.$topic['id'].'&action=edit_message_group&anchor_topic=topic_'.$topic_id.'&topics_page_nr='.$topic_page_nr.'&items_page_nr='.$items_page_nr.'&topic_id='.$topic_id.'" class="ajax btn" data-size="lg" data-title="'.get_lang('Edit').'" title="'.get_lang('Edit').'">'.
1325
+                    $links .= '<a href="'.api_get_path(WEB_CODE_PATH).'social/message_for_group_form.inc.php?height=400&width=800&&user_friend='.$current_user_id.'&group_id='.$group_id.'&message_id='.$topic['id'].'&action=edit_message_group&anchor_topic=topic_'.$topic_id.'&topics_page_nr='.$topic_page_nr.'&items_page_nr='.$items_page_nr.'&topic_id='.$topic_id.'" class="ajax btn" data-size="lg" data-title="'.get_lang('Edit').'" title="'.get_lang('Edit').'">'.
1326 1326
                         Display :: return_icon('edit.png', get_lang('Edit'), array(), ICON_SIZE_SMALL).'</a>';
1327 1327
                 }
1328
-                $links.= '&nbsp;&nbsp;<a href="'.api_get_path(WEB_CODE_PATH).'social/message_for_group_form.inc.php?height=400&width=800&&user_friend='.api_get_user_id().'&group_id='.$group_id.'&message_id='.$topic['id'].'&action=reply_message_group&anchor_topic=topic_'.$topic_id.'&topics_page_nr='.$topic_page_nr.'&items_page_nr='.$items_page_nr.'&topic_id='.$topic_id.'" class="ajax btn" data-size="lg" data-title="'.get_lang('Reply').'" title="'.get_lang('Reply').'">';
1329
-                $links.= Display :: return_icon('talk.png', get_lang('Reply')).'</a>';
1330
-                $links.= '</div>';
1328
+                $links .= '&nbsp;&nbsp;<a href="'.api_get_path(WEB_CODE_PATH).'social/message_for_group_form.inc.php?height=400&width=800&&user_friend='.api_get_user_id().'&group_id='.$group_id.'&message_id='.$topic['id'].'&action=reply_message_group&anchor_topic=topic_'.$topic_id.'&topics_page_nr='.$topic_page_nr.'&items_page_nr='.$items_page_nr.'&topic_id='.$topic_id.'" class="ajax btn" data-size="lg" data-title="'.get_lang('Reply').'" title="'.get_lang('Reply').'">';
1329
+                $links .= Display :: return_icon('talk.png', get_lang('Reply')).'</a>';
1330
+                $links .= '</div>';
1331 1331
 
1332 1332
                 $userPicture = $user_sender_info['avatar'];
1333 1333
 
1334
-                $html_items.= '<div class="message-group-author"><img src="'.$userPicture.'" alt="'.$name.'"  width="32" height="32" title="'.$name.'" /></div>';
1334
+                $html_items .= '<div class="message-group-author"><img src="'.$userPicture.'" alt="'.$name.'"  width="32" height="32" title="'.$name.'" /></div>';
1335 1335
                 $user_link = '<a href="'.api_get_path(WEB_PATH).'main/social/profile.php?u='.$topic['user_sender_id'].'">'.$name.'&nbsp;</a>';
1336 1336
 
1337 1337
                 $date = '';
@@ -1343,7 +1343,7 @@  discard block
 block discarded – undo
1343 1343
                     $date = '<div class="message-group-date"> '.get_lang('Created').' '.date_to_str_ago($topic['send_date']).'</div>';
1344 1344
                 }
1345 1345
                 $attachment = '<div class="message-attach">'.(!empty($files_attachments) ? implode('<br />', $files_attachments) : '').'</div>';
1346
-                $html_items.= '<div class="message-group-content">'.$links.$user_link.' '.$date.Security::remove_XSS($topic['content'], STUDENT, true).$attachment.'</div>';
1346
+                $html_items .= '<div class="message-group-content">'.$links.$user_link.' '.$date.Security::remove_XSS($topic['content'], STUDENT, true).$attachment.'</div>';
1347 1347
 
1348 1348
                 $base_padding = 20;
1349 1349
 
@@ -1618,7 +1618,7 @@  discard block
 block discarded – undo
1618 1618
                     break;
1619 1619
                 case 'deleteone' :
1620 1620
                     MessageManager::delete_message_by_user_receiver(api_get_user_id(), $_GET['id']);
1621
-                    $html .=Display::return_message(api_xml_http_response_encode($success), 'normal', false);
1621
+                    $html .= Display::return_message(api_xml_http_response_encode($success), 'normal', false);
1622 1622
                     $html .= '<br/>';
1623 1623
                     break;
1624 1624
             }
@@ -1710,7 +1710,7 @@  discard block
 block discarded – undo
1710 1710
                 ON m.user_sender_id = u.user_id
1711 1711
                 WHERE
1712 1712
                     m.user_receiver_id = $userId AND
1713
-                    m.msg_status = " . MESSAGE_STATUS_UNREAD . "
1713
+                    m.msg_status = ".MESSAGE_STATUS_UNREAD."
1714 1714
                     AND m.id > $lastId
1715 1715
                 ORDER BY m.send_date DESC";
1716 1716
 
Please login to merge, or discard this patch.
main/inc/lib/skill.lib.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -734,7 +734,7 @@  discard block
 block discarded – undo
734 734
     {
735 735
         $skill_rel_skill = new SkillRelSkill();
736 736
         $skills = $skill_rel_skill->get_direct_parents($skill_id, true);
737
-        foreach($skills as &$skill) {
737
+        foreach ($skills as &$skill) {
738 738
             $skill['data'] = self::get($skill['skill_id']);
739 739
             $skill_info2 = $skill_rel_skill->get_skill_info($skill['skill_id']);
740 740
             $skill['data']['parent_id'] = $skill_info2['parent_id'];
@@ -772,7 +772,7 @@  discard block
 block discarded – undo
772 772
                     $attributes = array(
773 773
                         'skill_id'      => $skill_id,
774 774
                         'parent_id'     => $parent_id,
775
-                        'relation_type' => (isset($params['relation_type'])?$params['relation_type']:0),
775
+                        'relation_type' => (isset($params['relation_type']) ? $params['relation_type'] : 0),
776 776
                         //'level'         => $params['level'],
777 777
                     );
778 778
                     $skill_rel_skill->save($attributes);
@@ -969,8 +969,8 @@  discard block
 block discarded – undo
969 969
                     // 2nd node
970 970
                     $skills[$skill_id] = $skill_info;
971 971
                     // Uncomment code below to hide the searched skill
972
-                    $skills[$skill_id]['data']['parent_id'] =  $skill_info['extra']['parent_id'];
973
-                    $skills[$skill_id]['parent_id'] =  1;
972
+                    $skills[$skill_id]['data']['parent_id'] = $skill_info['extra']['parent_id'];
973
+                    $skills[$skill_id]['parent_id'] = 1;
974 974
                 }
975 975
             }
976 976
         }
@@ -1033,7 +1033,7 @@  discard block
 block discarded – undo
1033 1033
                     $skill['data']['skill_has_gradebook'] = true;
1034 1034
                 }
1035 1035
                 $refs[$skill['id']] = &$skill;
1036
-                $flat_array[$skill['id']] =  &$skill;
1036
+                $flat_array[$skill['id']] = &$skill;
1037 1037
             }
1038 1038
 
1039 1039
             // Checking family value
@@ -1054,7 +1054,7 @@  discard block
 block discarded – undo
1054 1054
                 $refs['root']['children'][0] = $skills[1];
1055 1055
                 $skills[$skill_id]['data']['family_id'] = 1;
1056 1056
                 $refs['root']['children'][0]['children'][0] = $skills[$skill_id];
1057
-                $flat_array[$skill_id] =  $skills[$skill_id];
1057
+                $flat_array[$skill_id] = $skills[$skill_id];
1058 1058
             } else {
1059 1059
                 // Moving node to the children index of their parents
1060 1060
 
@@ -1063,7 +1063,7 @@  discard block
 block discarded – undo
1063 1063
                         $skill['data']['family_id'] = $new_family_array[$skill['id']];
1064 1064
                     }
1065 1065
                     $refs[$skill['parent_id']]['children'][] = &$skill;
1066
-                    $flat_array[$my_skill_id] =  $skill;
1066
+                    $flat_array[$my_skill_id] = $skill;
1067 1067
                 }
1068 1068
             }
1069 1069
 
@@ -1161,7 +1161,7 @@  discard block
 block discarded – undo
1161 1161
                 INNER JOIN {$this->table_skill_rel_user} su
1162 1162
                 ON (s.id = su.skill_id)
1163 1163
                 WHERE user_id = $user_id";
1164
-        $result  = Database::query($sql);
1164
+        $result = Database::query($sql);
1165 1165
         if (Database::num_rows($result)) {
1166 1166
             $result = Database::fetch_row($result);
1167 1167
             return $result[0];
@@ -1203,7 +1203,7 @@  discard block
 block discarded – undo
1203 1203
      */
1204 1204
     public function get_user_list_skill_ranking_count()
1205 1205
     {
1206
-        $sql    = "SELECT count(*) FROM (
1206
+        $sql = "SELECT count(*) FROM (
1207 1207
                         SELECT count(distinct 1)
1208 1208
                         FROM {$this->table} s
1209 1209
                         INNER JOIN {$this->table_skill_rel_user} su
@@ -1256,7 +1256,7 @@  discard block
 block discarded – undo
1256 1256
                 ON c.code = g.course_code
1257 1257
                 WHERE sg.skill_id = $skill_id
1258 1258
                 AND (g.session_id IS NULL OR g.session_id = 0)";
1259
-        $result   = Database::query($sql);
1259
+        $result = Database::query($sql);
1260 1260
 
1261 1261
         return Database::store_result($result, 'ASSOC');
1262 1262
     }
@@ -1443,7 +1443,7 @@  discard block
 block discarded – undo
1443 1443
                 WHERE sg.skill_id = $skillId
1444 1444
                 AND g.session_id > 0";
1445 1445
 
1446
-        $result   = Database::query($sql);
1446
+        $result = Database::query($sql);
1447 1447
 
1448 1448
         return Database::store_result($result, 'ASSOC');
1449 1449
     }
Please login to merge, or discard this patch.
main/inc/lib/search/xapian/XapianIndexer.class.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
  */
7 7
 
8 8
 require_once 'xapian.php';
9
-require_once dirname(__FILE__) . '/../IndexableChunk.class.php';
9
+require_once dirname(__FILE__).'/../IndexableChunk.class.php';
10 10
 
11 11
 /**
12 12
  * Abstract helper class
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
                     if (!empty($chunk->terms)) {
131 131
                         foreach ($chunk->terms as $term) {
132 132
                             /* FIXME: think of getting weight */
133
-                            $doc->add_term($term['flag'] . $term['name'], 1);
133
+                            $doc->add_term($term['flag'].$term['name'], 1);
134 134
                         }
135 135
                     }
136 136
 
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
         $doc->clear_terms();
216 216
         foreach ($terms as $term) {
217 217
             //add directly
218
-            $doc->add_term($prefix . $term, 1);
218
+            $doc->add_term($prefix.$term, 1);
219 219
         }
220 220
         $this->db->replace_document($did, $doc);
221 221
         $this->db->flush();
Please login to merge, or discard this patch.
main/inc/lib/search/xapian/XapianQuery.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -8,11 +8,11 @@  discard block
 block discarded – undo
8 8
  * Code
9 9
  */
10 10
 require_once 'xapian.php';
11
-require_once dirname(__FILE__) . '/../IndexableChunk.class.php';
11
+require_once dirname(__FILE__).'/../IndexableChunk.class.php';
12 12
 //TODO: think another way without including specific fields here
13
-require_once api_get_path(LIBRARY_PATH) . 'specific_fields_manager.lib.php';
13
+require_once api_get_path(LIBRARY_PATH).'specific_fields_manager.lib.php';
14 14
 
15
-define('XAPIAN_DB', api_get_path(SYS_UPLOAD_PATH) . 'plugins/xapian/searchdb/');
15
+define('XAPIAN_DB', api_get_path(SYS_UPLOAD_PATH).'plugins/xapian/searchdb/');
16 16
 
17 17
 /**
18 18
  * Queries the database.
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
 
96 96
                 // process each specific field prefix
97 97
                 foreach ($specific_fields as $specific_field) {
98
-                    $results[$count]['sf-' . $specific_field['code']] = xapian_get_doc_terms($document, $specific_field['code']);
98
+                    $results[$count]['sf-'.$specific_field['code']] = xapian_get_doc_terms($document, $specific_field['code']);
99 99
                 }
100 100
 
101 101
                 // rest of data
@@ -261,6 +261,6 @@  discard block
 block discarded – undo
261 261
     } else {
262 262
         $message_error = get_lang('SearchOtherXapianError');
263 263
     }
264
-    $display_message = get_lang('Error') . ' : ' . $message_error;
264
+    $display_message = get_lang('Error').' : '.$message_error;
265 265
     Display::display_error_message($display_message);
266 266
 }
Please login to merge, or discard this patch.
main/inc/lib/search/search_widget.php 1 patch
Spacing   +67 added lines, -67 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
 /**
8 8
  * Code
9 9
  */
10
-require_once dirname(__FILE__) . '/IndexableChunk.class.php';
10
+require_once dirname(__FILE__).'/IndexableChunk.class.php';
11 11
 require_once api_get_path(LIBRARY_PATH).'specific_fields_manager.lib.php';
12 12
 
13 13
 /**
@@ -29,13 +29,13 @@  discard block
 block discarded – undo
29 29
 /**
30 30
  * Get one term html select
31 31
  */
32
-function format_one_specific_field_select($prefix, $sf_term_array, $op, $extra_select_attr='size="7" class="sf-select-multiple"') {
32
+function format_one_specific_field_select($prefix, $sf_term_array, $op, $extra_select_attr = 'size="7" class="sf-select-multiple"') {
33 33
 	global $charset;
34
-    $multiple_select = '<select '. $extra_select_attr .' title="'. $prefix .'" id="sf-'. $prefix .'" name="sf_'. $prefix .'[]">';
34
+    $multiple_select = '<select '.$extra_select_attr.' title="'.$prefix.'" id="sf-'.$prefix.'" name="sf_'.$prefix.'[]">';
35 35
 
36 36
     $all_selected = '';
37
-    if (!empty($_REQUEST['sf_'. $prefix]) ) {
38
-        if (in_array('__all__', $_REQUEST['sf_'. $prefix])) {
37
+    if (!empty($_REQUEST['sf_'.$prefix])) {
38
+        if (in_array('__all__', $_REQUEST['sf_'.$prefix])) {
39 39
             $all_selected = 'selected="selected"';
40 40
         }
41 41
     }
@@ -44,17 +44,17 @@  discard block
 block discarded – undo
44 44
     } else if ($op == 'or') {
45 45
         $all_selected_name = get_lang('Any');
46 46
     }
47
-    $multiple_select .= '<option value="__all__" '. $all_selected .' >-- '. $all_selected_name .' --</option>';
47
+    $multiple_select .= '<option value="__all__" '.$all_selected.' >-- '.$all_selected_name.' --</option>';
48 48
 
49 49
     foreach ($sf_term_array as $raw_term) {
50 50
         $term = substr($raw_term, 1);
51 51
         if (empty($term)) continue;
52 52
         $html_term = htmlspecialchars($term, ENT_QUOTES, $charset);
53 53
         $selected = '';
54
-        if (!empty($_REQUEST['sf_'.$prefix]) && is_array($_REQUEST['sf_'.$prefix]) && in_array($term,$_REQUEST['sf_'.$prefix])) {
54
+        if (!empty($_REQUEST['sf_'.$prefix]) && is_array($_REQUEST['sf_'.$prefix]) && in_array($term, $_REQUEST['sf_'.$prefix])) {
55 55
             $selected = 'selected="selected"';
56 56
         }
57
-        $multiple_select .= '<option value="'. $html_term .'" '.$selected.'>'. $html_term .'</option>';
57
+        $multiple_select .= '<option value="'.$html_term.'" '.$selected.'>'.$html_term.'</option>';
58 58
     }
59 59
     $multiple_select .= '</select>';
60 60
     return $multiple_select;
@@ -63,15 +63,15 @@  discard block
 block discarded – undo
63 63
 /**
64 64
  * Get terms html selects
65 65
  */
66
-function format_specific_fields_selects($sf_terms, $op, $prefilter_prefix='') {
66
+function format_specific_fields_selects($sf_terms, $op, $prefilter_prefix = '') {
67 67
     // Process each prefix type term
68 68
     $i = 0;
69 69
     $max = count($sf_terms);
70
-    $multiple_selects .='';
70
+    $multiple_selects .= '';
71 71
     foreach ($sf_terms as $prefix => $sf_term_array) {
72 72
         if ($prefix == $prefilter_prefix) continue;
73 73
         $multiple_select = '';
74
-        if ($i>0) {
74
+        if ($i > 0) {
75 75
             //print "+" image
76 76
             $multiple_select .= '<td><img class="sf-select-splitter" src="../img/search-big-plus.gif" alt="plus-sign-decoration"/></td>';
77 77
         }
@@ -89,9 +89,9 @@  discard block
 block discarded – undo
89 89
 
90 90
         $sf_copy = $sf_term_array;
91 91
         // get specific field name
92
-        $sf_value = get_specific_field_list(array( 'code' => "'$prefix'" ));
92
+        $sf_value = get_specific_field_list(array('code' => "'$prefix'"));
93 93
         $sf_value = array_shift($sf_value);
94
-        $multiple_select .= '<td><label class="sf-select-multiple-title" for="sf_'. $prefix .'[]">'.$icons_for_search_terms[$prefix].' '.$sf_value['name'].'</label><br />';
94
+        $multiple_select .= '<td><label class="sf-select-multiple-title" for="sf_'.$prefix.'[]">'.$icons_for_search_terms[$prefix].' '.$sf_value['name'].'</label><br />';
95 95
         $multiple_select .= format_one_specific_field_select($prefix, $sf_term_array, $op, 'multiple="multiple" size="7" class="sf-select-multiple"');
96 96
         $multiple_select .= '</td>';
97 97
         $multiple_selects .= $multiple_select;
@@ -107,11 +107,11 @@  discard block
 block discarded – undo
107 107
  */
108 108
 function search_widget_normal_form($action, $show_thesaurus, $sf_terms, $op) {
109 109
     $thesaurus_icon = Display::return_icon('thesaurus.gif', get_lang('SearchAdvancedOptions'), array('id'=>'thesaurus-icon'));
110
-    $advanced_options = '<a id="tags-toggle" href="#">'.  get_lang('SearchAdvancedOptions') .'</a>';
111
-    $display_thesaurus = ($show_thesaurus==true? 'block': 'none');
112
-    $help = '<h3>'. get_lang('SearchKeywordsHelpTitle') .'</h3>'. get_lang('SearchKeywordsHelpComment');
113
-    $mode = (!empty($_REQUEST['mode'])? htmlentities($_REQUEST['mode']): 'gallery');
114
-    $type = (!empty($_REQUEST['type'])? htmlentities($_REQUEST['type']): 'normal');
110
+    $advanced_options = '<a id="tags-toggle" href="#">'.get_lang('SearchAdvancedOptions').'</a>';
111
+    $display_thesaurus = ($show_thesaurus == true ? 'block' : 'none');
112
+    $help = '<h3>'.get_lang('SearchKeywordsHelpTitle').'</h3>'.get_lang('SearchKeywordsHelpComment');
113
+    $mode = (!empty($_REQUEST['mode']) ? htmlentities($_REQUEST['mode']) : 'gallery');
114
+    $type = (!empty($_REQUEST['type']) ? htmlentities($_REQUEST['type']) : 'normal');
115 115
 
116 116
     /**
117 117
      * POST avoid long urls, but we are using GET because
@@ -119,34 +119,34 @@  discard block
 block discarded – undo
119 119
      * could not send a form in pagination
120 120
      */
121 121
 
122
-	if (isset($_GET['action']) && strcmp(trim($_GET['action']),'search')===0) {
123
-		$action='index.php';
122
+	if (isset($_GET['action']) && strcmp(trim($_GET['action']), 'search') === 0) {
123
+		$action = 'index.php';
124 124
 	}
125 125
 	$navigator_info = api_get_navigator();
126 126
 
127
-	if ($navigator_info['name']=='Internet Explorer' &&  $navigator_info['version']=='6') {
128
-		$submit_button1	= '<input type="submit" id="submit" value="'. get_lang('Search') .'" />';
129
-		$submit_button2 = '<input class="lower-submit" type="submit" value="'. get_lang('Search') .'" />';
130
-        $reset_button 	= '<input type="submit" id="tags-clean" value="'. get_lang('SearchResetKeywords') .'" />';
127
+	if ($navigator_info['name'] == 'Internet Explorer' && $navigator_info['version'] == '6') {
128
+		$submit_button1	= '<input type="submit" id="submit" value="'.get_lang('Search').'" />';
129
+		$submit_button2 = '<input class="lower-submit" type="submit" value="'.get_lang('Search').'" />';
130
+        $reset_button = '<input type="submit" id="tags-clean" value="'.get_lang('SearchResetKeywords').'" />';
131 131
 	} else {
132
-		$submit_button1 = '<button class="search" type="submit" id="submit" value="'. get_lang("Search") .'" /> '. get_lang('Search') .'</button>';
133
-		$submit_button2 = '<button class="search" type="submit" value="'. get_lang('Search') .'" />'. get_lang('Search') .'</button>';
134
-        $reset_button 	= '<button class="save"   type="submit" id="tags-clean" value="'. get_lang('SearchResetKeywords') .'" />'. get_lang('SearchResetKeywords') .'</button> ';
132
+		$submit_button1 = '<button class="search" type="submit" id="submit" value="'.get_lang("Search").'" /> '.get_lang('Search').'</button>';
133
+		$submit_button2 = '<button class="search" type="submit" value="'.get_lang('Search').'" />'.get_lang('Search').'</button>';
134
+        $reset_button = '<button class="save"   type="submit" id="tags-clean" value="'.get_lang('SearchResetKeywords').'" />'.get_lang('SearchResetKeywords').'</button> ';
135 135
 	}
136 136
 
137
-    $form = '<form id="chamilo_search" action="'. $action .'" method="GET">
137
+    $form = '<form id="chamilo_search" action="'.$action.'" method="GET">
138 138
             <input type="text" id="query" name="query" size="40" value="'.stripslashes(Security::remove_XSS($_REQUEST['query'])).'" />
139
-            <input type="hidden" name="mode" value="'. $mode .'"/>
140
-            <input type="hidden" name="type" value="'. $type .'"/>
139
+            <input type="hidden" name="mode" value="'. $mode.'"/>
140
+            <input type="hidden" name="type" value="'. $type.'"/>
141 141
             <input type="hidden" name="tablename_page_nr" value="1" />
142 142
           	'.$submit_button1.'
143 143
             <br /><br />';
144 144
     $list = get_specific_field_list();
145 145
 
146
-    if(!empty($list)) {
147
-        $form .= '<span class="search-links-box">'. $advanced_options .'&nbsp;</span>
148
-            <div id="tags" class="tags" style="display:'. $display_thesaurus .';">
149
-                <div class="search-help-box">'. $help .'</div>
146
+    if (!empty($list)) {
147
+        $form .= '<span class="search-links-box">'.$advanced_options.'&nbsp;</span>
148
+            <div id="tags" class="tags" style="display:'. $display_thesaurus.';">
149
+                <div class="search-help-box">'. $help.'</div>
150 150
                 <table>
151 151
                 <tr>';
152 152
         $form .= format_specific_fields_selects($sf_terms, $op);
@@ -160,9 +160,9 @@  discard block
 block discarded – undo
160 160
         $form .= '</tr>
161 161
                     <tr>
162 162
                         <td id="operator-select">
163
-                            '. get_lang('SearchCombineSearchWith') .':<br />
164
-                            <input type="radio" class="search-operator" name="operator" value="or" '. $or_checked .'>'. api_strtoupper(get_lang('Or')) .'</input>
165
-                            <input type="radio" class="search-operator" name="operator" value="and" '. $and_checked .'>'. api_strtoupper(get_lang('And')) .'</input>
163
+                            '. get_lang('SearchCombineSearchWith').':<br />
164
+                            <input type="radio" class="search-operator" name="operator" value="or" '. $or_checked.'>'.api_strtoupper(get_lang('Or')).'</input>
165
+                            <input type="radio" class="search-operator" name="operator" value="and" '. $and_checked.'>'.api_strtoupper(get_lang('And')).'</input>
166 166
                         </td>
167 167
                         <td></td>
168 168
                         <td>
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
                     </table>
175 175
                 </div>';
176 176
     }
177
-    $form .='</form>
177
+    $form .= '</form>
178 178
     <br style="clear: both;"/>';
179 179
     return $form;
180 180
 }
@@ -184,36 +184,36 @@  discard block
 block discarded – undo
184 184
  *
185 185
  * This type allow filter all other multiple select terms by one term in a dinamic way
186 186
  */
187
-function search_widget_prefilter_form($action, $show_thesaurus, $sf_terms, $op, $prefilter_prefix=NULL) {
187
+function search_widget_prefilter_form($action, $show_thesaurus, $sf_terms, $op, $prefilter_prefix = NULL) {
188 188
     $thesaurus_icon = Display::return_icon('thesaurus.gif', get_lang('SearchAdvancedOptions'), array('id'=>'thesaurus-icon'));
189
-    $advanced_options = '<a id="tags-toggle" href="#">'.  get_lang('SearchAdvancedOptions') .'</a>';
190
-    $display_thesaurus = ($show_thesaurus==true? 'block': 'none');
191
-    $help = '<h3>'. get_lang('SearchKeywordsHelpTitle') .'</h3>'. get_lang('SearchKeywordsHelpComment');
192
-    $mode = (!empty($_REQUEST['mode'])? htmlentities($_REQUEST['mode']): 'gallery');
193
-    $type = (!empty($_REQUEST['type'])? htmlentities($_REQUEST['type']): 'normal');
189
+    $advanced_options = '<a id="tags-toggle" href="#">'.get_lang('SearchAdvancedOptions').'</a>';
190
+    $display_thesaurus = ($show_thesaurus == true ? 'block' : 'none');
191
+    $help = '<h3>'.get_lang('SearchKeywordsHelpTitle').'</h3>'.get_lang('SearchKeywordsHelpComment');
192
+    $mode = (!empty($_REQUEST['mode']) ? htmlentities($_REQUEST['mode']) : 'gallery');
193
+    $type = (!empty($_REQUEST['type']) ? htmlentities($_REQUEST['type']) : 'normal');
194 194
 
195 195
     /**
196 196
      * POST avoid long urls, but we are using GET because
197 197
      * SortableTableFromArray pagination is done with simple links, so now we
198 198
      * could not send a form in pagination
199 199
      */
200
-	if (isset($_GET['action']) && strcmp(trim($_GET['action']),'search')===0) {
201
-		$action='index.php';
200
+	if (isset($_GET['action']) && strcmp(trim($_GET['action']), 'search') === 0) {
201
+		$action = 'index.php';
202 202
 	}
203 203
 
204 204
     $form = '
205
-        <form id="chamilo_search" action="'. $action .'" method="GET">
205
+        <form id="chamilo_search" action="'. $action.'" method="GET">
206 206
             <input type="text" id="query" name="query" size="40" />
207
-            <input type="hidden" name="mode" value="'. $mode .'"/>
208
-            <input type="hidden" name="type" value="'. $type .'"/>
207
+            <input type="hidden" name="mode" value="'. $mode.'"/>
208
+            <input type="hidden" name="type" value="'. $type.'"/>
209 209
             <input type="hidden" name="tablename_page_nr" value="1" />
210
-            <input type="submit" id="submit" value="'. get_lang("Search") .'" />
210
+            <input type="submit" id="submit" value="'. get_lang("Search").'" />
211 211
             <br /><br />';
212 212
         $list = get_specific_field_list();
213
-        if(!empty($list)) {
214
-            $form .=' <span class="search-links-box">'. $thesaurus_icon . $advanced_options .'&nbsp;</span>
215
-                    <div id="tags" class="tags" style="display:'. $display_thesaurus .';">
216
-                        <div class="search-help-box">'. $help .'</div>
213
+        if (!empty($list)) {
214
+            $form .= ' <span class="search-links-box">'.$thesaurus_icon.$advanced_options.'&nbsp;</span>
215
+                    <div id="tags" class="tags" style="display:'. $display_thesaurus.';">
216
+                        <div class="search-help-box">'. $help.'</div>
217 217
                         <table>
218 218
                         <tr>';
219 219
             if (!is_null($prefilter_prefix)) {
@@ -228,9 +228,9 @@  discard block
 block discarded – undo
228 228
                 $sf_term_array = $temp;
229 229
 
230 230
                 // get specific field name
231
-                $sf_value = get_specific_field_list(array( 'code' => "'$prefilter_prefix'" ));
231
+                $sf_value = get_specific_field_list(array('code' => "'$prefilter_prefix'"));
232 232
                 $sf_value = array_shift($sf_value);
233
-                $form .= '<label class="sf-select-multiple-title" for="sf_'. $prefix .'[]">'.$icons_for_search_terms[$prefix].' '.$sf_value['name'].'</label><br />';
233
+                $form .= '<label class="sf-select-multiple-title" for="sf_'.$prefix.'[]">'.$icons_for_search_terms[$prefix].' '.$sf_value['name'].'</label><br />';
234 234
 
235 235
                 $form .= format_one_specific_field_select($prefilter_prefix, $sf_term_array, $op, 'id="prefilter"');
236 236
                 $form .= format_specific_fields_selects($sf_terms, $op, $prefilter_prefix);
@@ -250,15 +250,15 @@  discard block
 block discarded – undo
250 250
                         </tr>
251 251
                         <tr>
252 252
                             <td id="operator-select">
253
-                                '. get_lang('SearchCombineSearchWith') .':<br />
254
-                                <input type="radio" class="search-operator" name="operator" value="or" '. $or_checked .'>'. api_strtoupper(get_lang('Or')) .'</input>
255
-                                <input type="radio" class="search-operator" name="operator" value="and" '. $and_checked .'>'. api_strtoupper(get_lang('And')) .'</input>
253
+                                '. get_lang('SearchCombineSearchWith').':<br />
254
+                                <input type="radio" class="search-operator" name="operator" value="or" '. $or_checked.'>'.api_strtoupper(get_lang('Or')).'</input>
255
+                                <input type="radio" class="search-operator" name="operator" value="and" '. $and_checked.'>'.api_strtoupper(get_lang('And')).'</input>
256 256
                             </td>
257 257
                             <td></td>
258 258
                             <td>
259 259
                                 <br />
260
-                                <input class="lower-submit" type="submit" value="'. get_lang('Search') .'" />
261
-                                <input type="submit" id="tags-clean" value="'. get_lang('SearchResetKeywords') .'" />
260
+                                <input class="lower-submit" type="submit" value="'. get_lang('Search').'" />
261
+                                <input type="submit" id="tags-clean" value="'. get_lang('SearchResetKeywords').'" />
262 262
                             </td>
263 263
                         </tr>
264 264
                         </table>
@@ -275,7 +275,7 @@  discard block
 block discarded – undo
275 275
  * Show search form
276 276
  */
277 277
 function display_search_form($action, $show_thesaurus, $sf_terms, $op) {
278
-    $type = (!empty($_REQUEST['type'])? htmlentities($_REQUEST['type']): 'normal');
278
+    $type = (!empty($_REQUEST['type']) ? htmlentities($_REQUEST['type']) : 'normal');
279 279
 
280 280
     switch ($type) {
281 281
         case 'prefilter':
@@ -302,7 +302,7 @@  discard block
 block discarded – undo
302 302
  * @param   string $action     Just in case your action is not
303 303
  * index.php
304 304
  */
305
-function search_widget_show($action='index.php')
305
+function search_widget_show($action = 'index.php')
306 306
 {
307 307
     require_once api_get_path(LIBRARY_PATH).'search/ChamiloQuery.php';
308 308
     // TODO: load images dinamically when they're avalaible from specific field ui to add
@@ -315,14 +315,14 @@  discard block
 block discarded – undo
315 315
     if (($cid = api_get_course_id()) != -1) { // with cid
316 316
 
317 317
         // get search engine terms
318
-        $course_filter = chamilo_get_boolean_query(XAPIAN_PREFIX_COURSEID . $cid);
318
+        $course_filter = chamilo_get_boolean_query(XAPIAN_PREFIX_COURSEID.$cid);
319 319
         $dkterms = chamilo_query_simple_query('', 0, 1000, array($course_filter));
320 320
 
321 321
         //prepare specific fields names (and also get possible URL param names)
322 322
         foreach ($specific_fields as $specific_field) {
323 323
             $temp = array();
324
-            if (is_array($dkterms) && count($dkterms)>0) {
325
-            	foreach($dkterms[1] as $obj) {
324
+            if (is_array($dkterms) && count($dkterms) > 0) {
325
+            	foreach ($dkterms[1] as $obj) {
326 326
                 	$temp = array_merge($obj['sf-'.$specific_field['code']], $temp);
327 327
             	}
328 328
         	}
@@ -350,7 +350,7 @@  discard block
 block discarded – undo
350 350
     }
351 351
 
352 352
     $op = 'or';
353
-    if (!empty($_REQUEST['operator']) && in_array($op,array('or','and'))) {
353
+    if (!empty($_REQUEST['operator']) && in_array($op, array('or', 'and'))) {
354 354
         $op = $_REQUEST['operator'];
355 355
     }
356 356
 
Please login to merge, or discard this patch.
main/inc/lib/search/ChamiloIndexer.class.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
 /**
8 8
  * code
9 9
  */
10
-require_once dirname(__FILE__) . '/../../global.inc.php';
10
+require_once dirname(__FILE__).'/../../global.inc.php';
11 11
 include_once 'xapian/XapianIndexer.class.php';
12 12
 
13 13
 /**
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
         if ((count(array_diff($terms, $stored_terms)) == 0) && (count(array_diff($stored_terms, $terms)) == 0))
40 40
             return FALSE;
41 41
 
42
-        require_once api_get_path(LIBRARY_PATH) . 'search/xapian/XapianQuery.php';
42
+        require_once api_get_path(LIBRARY_PATH).'search/xapian/XapianQuery.php';
43 43
 
44 44
         // compare terms
45 45
         $doc = $this->get_document($search_did);
@@ -55,10 +55,10 @@  discard block
 block discarded – undo
55 55
 
56 56
         // save it to search engine
57 57
         foreach ($missing_terms as $term) {
58
-            $this->add_term_to_doc($prefix . $term, $doc);
58
+            $this->add_term_to_doc($prefix.$term, $doc);
59 59
         }
60 60
         foreach ($deprecated_terms as $term) {
61
-            $this->remove_term_from_doc($prefix . $term, $doc);
61
+            $this->remove_term_from_doc($prefix.$term, $doc);
62 62
         }
63 63
 
64 64
         // don't do anything if no change
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
      * @return  array Array of terms
75 75
      */
76 76
     function get_terms_on_db($prefix, $course_code, $tool_id, $ref_id) {
77
-        require_once api_get_path(LIBRARY_PATH) . 'specific_fields_manager.lib.php';
77
+        require_once api_get_path(LIBRARY_PATH).'specific_fields_manager.lib.php';
78 78
         $terms = get_specific_field_values_list_by_prefix($prefix, $course_code, $tool_id, $ref_id);
79 79
         $prefix_terms = array();
80 80
         foreach ($terms as $term) {
Please login to merge, or discard this patch.
main/inc/lib/search/ChamiloQuery.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -18,12 +18,12 @@  discard block
 block discarded – undo
18 18
  * @param   array     extra           Extra queries to join with. Optional
19 19
  * @return  array
20 20
  */
21
-function chamilo_query_query($query_string, $offset=0, $length=10, $extra=NULL) {
21
+function chamilo_query_query($query_string, $offset = 0, $length = 10, $extra = NULL) {
22 22
     list($count, $results) = xapian_query($query_string, NULL, $offset, $length, $extra);
23 23
     return chamilo_preprocess_results($results);
24 24
 }
25 25
 
26
-function chamilo_query_simple_query($query_string, $offset=0, $length=10, $extra=NULL) {
26
+function chamilo_query_simple_query($query_string, $offset = 0, $length = 10, $extra = NULL) {
27 27
     return xapian_query($query_string, NULL, $offset, $length, $extra);
28 28
 }
29 29
 
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 function chamilo_preprocess_results($results) {
43 43
     // group by toolid
44 44
     $results_by_tool = array();
45
-    if (count($results)>0) {
45
+    if (count($results) > 0) {
46 46
 
47 47
 	    foreach ($results as $key => $row) {
48 48
 	        $results_by_tool[$row['toolid']][] = $row;
@@ -50,8 +50,8 @@  discard block
 block discarded – undo
50 50
 
51 51
 	    $processed_results = array();
52 52
 	    foreach ($results_by_tool as $toolid => $rows) {
53
-	        $tool_processor_class = $toolid .'_processor';
54
-	        $tool_processor_path = api_get_path(LIBRARY_PATH) .'search/tool_processors/'. $tool_processor_class .'.class.php';
53
+	        $tool_processor_class = $toolid.'_processor';
54
+	        $tool_processor_path = api_get_path(LIBRARY_PATH).'search/tool_processors/'.$tool_processor_class.'.class.php';
55 55
 	        if (file_exists($tool_processor_path)) {
56 56
 	            require_once($tool_processor_path);
57 57
 	            $tool_processor = new $tool_processor_class($rows);
@@ -71,6 +71,6 @@  discard block
 block discarded – undo
71 71
  * @param string $op
72 72
  * @return XapianQuery query joined
73 73
  */
74
-function chamilo_join_queries($query1, $query2=NULL, $op='or') {
74
+function chamilo_join_queries($query1, $query2 = NULL, $op = 'or') {
75 75
 	return xapian_join_queries($query1, $query2, $op);
76 76
 }
Please login to merge, or discard this patch.
main/inc/lib/search/get_terms.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -17,8 +17,8 @@  discard block
 block discarded – undo
17 17
     return;
18 18
 }
19 19
 
20
-require_once dirname(__FILE__) . '../../../global.inc.php';
21
-require_once api_get_path(LIBRARY_PATH) . 'search/ChamiloQuery.php';
20
+require_once dirname(__FILE__).'../../../global.inc.php';
21
+require_once api_get_path(LIBRARY_PATH).'search/ChamiloQuery.php';
22 22
 
23 23
 /**
24 24
  * search with filter and build base array avoding repeated terms
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
     if (is_array($dkterms) && is_array($dkterms[1])) {
34 34
         foreach ($specific_fields as $specific_field) {
35 35
             foreach ($dkterms[1] as $obj) {
36
-                foreach ($obj['sf-' . $specific_field['code']] as $raw_term) {
36
+                foreach ($obj['sf-'.$specific_field['code']] as $raw_term) {
37 37
                     if (count($raw_term['name']) > 1) {
38 38
                         $normal_term = substr($raw_term['name'], 1);
39 39
                         $sf_terms[$specific_field['code']][$normal_term] = $normal_term;
@@ -54,10 +54,10 @@  discard block
 block discarded – undo
54 54
 
55 55
 if (($cid = api_get_course_id()) != -1) { // with cid
56 56
     // course filter
57
-    $filter[] = chamilo_get_boolean_query(XAPIAN_PREFIX_COURSEID . $cid);
57
+    $filter[] = chamilo_get_boolean_query(XAPIAN_PREFIX_COURSEID.$cid);
58 58
     // term filter
59 59
     if ($term != '__all__') {
60
-        $filter[] = chamilo_get_boolean_query($prefix . $term);
60
+        $filter[] = chamilo_get_boolean_query($prefix.$term);
61 61
         // always and between term and courseid
62 62
         $filter = chamilo_join_queries($filter, null, 'and');
63 63
     }
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
     $sf_terms = get_usual_sf_terms($filter, $specific_fields);
66 66
 } else { // without cid
67 67
     if ($term != '__all__') {
68
-        $filter[] = chamilo_get_boolean_query($prefix . $term);
68
+        $filter[] = chamilo_get_boolean_query($prefix.$term);
69 69
 
70 70
         $sf_terms = get_usual_sf_terms($filter, $specific_fields);
71 71
     } else { // no cid and all/any terms
Please login to merge, or discard this patch.
main/inc/lib/search/tool_processors/quiz_processor.class.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -8,8 +8,8 @@  discard block
 block discarded – undo
8 8
 /**
9 9
  * Code
10 10
  */
11
-include_once dirname(__FILE__) . '/../../../global.inc.php';
12
-require_once dirname(__FILE__) . '/search_processor.class.php';
11
+include_once dirname(__FILE__).'/../../../global.inc.php';
12
+require_once dirname(__FILE__).'/search_processor.class.php';
13 13
 
14 14
 /**
15 15
  * Process exercises before pass it to search listing scripts
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
                     $visibility = api_get_item_visibility(api_get_course_info($courseid), TOOL_QUIZ, $exercise_id);
71 71
                     if ($visibility) {
72 72
                         list($thumbnail, $image, $name, $author) = $this->get_information($courseid, $exercise_id);
73
-                        $url = api_get_path(WEB_PATH) . 'main/exercice/exercise_submit.php?cidReq=%s&exerciseId=%s';
73
+                        $url = api_get_path(WEB_PATH).'main/exercice/exercise_submit.php?cidReq=%s&exerciseId=%s';
74 74
                         $url = sprintf($url, $courseid, $exercise_id);
75 75
                         $result = array(
76 76
                             'toolid' => TOOL_QUIZ,
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
             $name = '';
128 128
             if ($row = Database::fetch_array($dk_result)) {
129 129
                 // Get the image path
130
-                $thumbnail = api_get_path(WEB_PATH) . 'main/img/quiz.gif';
130
+                $thumbnail = api_get_path(WEB_PATH).'main/img/quiz.gif';
131 131
                 $image = $thumbnail; //FIXME: use big images
132 132
                 $name = $row['title'];
133 133
                 // get author
Please login to merge, or discard this patch.