Completed
Push — 1.11.x ( ca7787...41c0f2 )
by José
31:51
created
main/document/upload.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 }
73 73
 
74 74
 if (empty($document_data)) {
75
-    $document_id = $parent_id =  0;
75
+    $document_id = $parent_id = 0;
76 76
     $path = '/';
77 77
 } else {
78 78
     $document_id = $document_data['id'];
@@ -199,10 +199,10 @@  discard block
 block discarded – undo
199 199
         true
200 200
     );
201 201
 
202
-    $redirectUrl = api_get_self() . '?' . api_get_cidreq();
202
+    $redirectUrl = api_get_self().'?'.api_get_cidreq();
203 203
 
204 204
     if ($document_data) {
205
-        $redirectUrl .= '&' . http_build_query([
205
+        $redirectUrl .= '&'.http_build_query([
206 206
             'id' => $document_data['iid']
207 207
         ]);
208 208
     }
@@ -217,11 +217,11 @@  discard block
 block discarded – undo
217 217
 // Actions
218 218
 // Link back to the documents overview
219 219
 if ($is_certificate_mode) {
220
-    $actions = '<a href="document.php?id='.$document_id.'&selectcat=' . $selectcat.'&'.api_get_cidreq().'">'.
221
-        Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('CertificateOverview'),'',ICON_SIZE_MEDIUM).'</a>';
220
+    $actions = '<a href="document.php?id='.$document_id.'&selectcat='.$selectcat.'&'.api_get_cidreq().'">'.
221
+        Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('CertificateOverview'), '', ICON_SIZE_MEDIUM).'</a>';
222 222
 } else {
223 223
     $actions = '<a href="document.php?id='.$document_id.'&'.api_get_cidreq().'">'.
224
-        Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('DocumentsOverview'),'',ICON_SIZE_MEDIUM).'</a>';
224
+        Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('DocumentsOverview'), '', ICON_SIZE_MEDIUM).'</a>';
225 225
 }
226 226
 
227 227
 // Link to create a folder
Please login to merge, or discard this patch.
plugin/bbb/ajax.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
 $course_plugin = 'bbb'; //needed in order to load the plugin lang variables
8 8
 $cidReset = true;
9 9
 
10
-require_once __DIR__ . '/../../main/inc/global.inc.php';
10
+require_once __DIR__.'/../../main/inc/global.inc.php';
11 11
 
12 12
 $action = isset($_REQUEST['a']) ? $_REQUEST['a'] : null;
13 13
 $meetingId = isset($_REQUEST['meeting']) ? intval($_REQUEST['meeting']) : 0;
@@ -33,10 +33,10 @@  discard block
 block discarded – undo
33 33
                 'first'
34 34
             );
35 35
 
36
-            $url = $meetingInfo['video_url'] . '/capture.m4v';
36
+            $url = $meetingInfo['video_url'].'/capture.m4v';
37 37
             $link = Display::url(
38 38
                 Display::return_icon('save.png', get_lang('DownloadFile')),
39
-                $meetingInfo['video_url'] . '/capture.m4v',
39
+                $meetingInfo['video_url'].'/capture.m4v',
40 40
                 ['target' => '_blank']
41 41
             );
42 42
 
Please login to merge, or discard this patch.
main/exercise/question_list_admin.inc.php 1 patch
Spacing   +15 added lines, -16 removed lines patch added patch discarded remove patch
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
             .sortable({
137 137
                 cursor: "move", // works?
138 138
                 update: function(event, ui) {
139
-                    var order = $(this).sortable("serialize") + "&a=update_question_order&exercise_id=<?php echo intval($_GET['exerciseId']);?>";
139
+                    var order = $(this).sortable("serialize") + "&a=update_question_order&exercise_id=<?php echo intval($_GET['exerciseId']); ?>";
140 140
                     $.post("<?php echo $ajax_url ?>", order, function(reponse){
141 141
                         $("#message").html(reponse);
142 142
                     });
@@ -172,12 +172,12 @@  discard block
 block discarded – undo
172 172
     echo "<div class='table-responsive'>";
173 173
     echo "<table class='table table-condensed'>";
174 174
     echo "<tr>";
175
-    echo "<th style=\"width: 40%;\">" .get_lang('Questions'). "</th>";
176
-    echo "<th style=\"width: 10%;\">" .get_lang('Type'). "</th>";
177
-    echo "<th style=\"width: 20%;\">" .get_lang('Category'). "</th>";
178
-    echo "<th style=\"width: 10%;\">" .get_lang('Difficulty'). "</th>";
179
-    echo "<th style=\"width: 10%;\">" .get_lang('Score'). "</th>";
180
-    echo "<th style=\"width: 10%;\">" .get_lang('Actions'). "</th>";
175
+    echo "<th style=\"width: 40%;\">".get_lang('Questions')."</th>";
176
+    echo "<th style=\"width: 10%;\">".get_lang('Type')."</th>";
177
+    echo "<th style=\"width: 20%;\">".get_lang('Category')."</th>";
178
+    echo "<th style=\"width: 10%;\">".get_lang('Difficulty')."</th>";
179
+    echo "<th style=\"width: 10%;\">".get_lang('Score')."</th>";
180
+    echo "<th style=\"width: 10%;\">".get_lang('Actions')."</th>";
181 181
     echo "</tr>";
182 182
     echo "</table>";
183 183
     echo "</div>";
@@ -217,15 +217,14 @@  discard block
 block discarded – undo
217 217
                 $question_class = get_class($objQuestionTmp);
218 218
 
219 219
                 $clone_link = '<a href="'.api_get_self().'?'.api_get_cidreq().'&clone_question='.$id.'">'.
220
-                    Display::return_icon('cd.png',get_lang('Copy'), array(), ICON_SIZE_SMALL).'</a>';
220
+                    Display::return_icon('cd.png', get_lang('Copy'), array(), ICON_SIZE_SMALL).'</a>';
221 221
                 $edit_link = ($objQuestionTmp->type == CALCULATED_ANSWER && $objQuestionTmp->isAnswered()) ?
222 222
                     '<a>'.Display::return_icon(
223 223
                         'edit_na.png',
224 224
                         get_lang('QuestionEditionNotAvailableBecauseItIsAlreadyAnsweredHoweverYouCanCopyItAndModifyTheCopy'),
225 225
                         array(),
226 226
                         ICON_SIZE_SMALL
227
-                    ).'</a>' :
228
-                    '<a href="'.api_get_self().'?'.api_get_cidreq().'&type='.
227
+                    ).'</a>' : '<a href="'.api_get_self().'?'.api_get_cidreq().'&type='.
229 228
                     $objQuestionTmp->selectType().'&myid=1&editQuestion='.$id.'">'.
230 229
                     Display::return_icon(
231 230
                         'edit.png',
@@ -235,17 +234,17 @@  discard block
 block discarded – undo
235 234
                     ).'</a>';
236 235
                 $delete_link = null;
237 236
                 if ($objExercise->edit_exercise_in_lp == true) {
238
-                    $delete_link = '<a id="delete_'.$id.'" class="opener"  href="'.api_get_self().'?'.api_get_cidreq().'&exerciseId='.$exerciseId.'&deleteQuestion='.$id.'" >'.Display::return_icon('delete.png',get_lang('RemoveFromTest'), array(), ICON_SIZE_SMALL).'</a>';
237
+                    $delete_link = '<a id="delete_'.$id.'" class="opener"  href="'.api_get_self().'?'.api_get_cidreq().'&exerciseId='.$exerciseId.'&deleteQuestion='.$id.'" >'.Display::return_icon('delete.png', get_lang('RemoveFromTest'), array(), ICON_SIZE_SMALL).'</a>';
239 238
                 }
240 239
                 
241
-                $edit_link = Display::tag('span', $edit_link,   array('class'=>'items'));
242
-                $clone_link = Display::tag('span', $clone_link,  array('class'=>'items'));
240
+                $edit_link = Display::tag('span', $edit_link, array('class'=>'items'));
241
+                $clone_link = Display::tag('span', $clone_link, array('class'=>'items'));
243 242
                 $delete_link = Display::tag('span', $delete_link, array('class'=>'items'));
244
-                $btnActions = Display::tag('td',Display::tag(
243
+                $btnActions = Display::tag('td', Display::tag(
245 244
                     'div',
246 245
                     $edit_link.$clone_link.$delete_link,
247 246
                     array('class'=>'edition')
248
-                ), array ('class'=>'btn-actions'));
247
+                ), array('class'=>'btn-actions'));
249 248
 
250 249
                 $title = Security::remove_XSS($objQuestionTmp->selectTitle());
251 250
                 /* $move = Display::return_icon(
@@ -285,7 +284,7 @@  discard block
 block discarded – undo
285 284
                 $questionScore = Display::tag('td', $objQuestionTmp->selectWeighting(), array('class'=>$styleScore));
286 285
 
287 286
                 echo '<div id="question_id_list_'.$id.'" >';
288
-                echo '<div class="header_operations" data-exercise="' . $objExercise->selectId() . '" data-question="' . $id . '">';
287
+                echo '<div class="header_operations" data-exercise="'.$objExercise->selectId().'" data-question="'.$id.'">';
289 288
                 echo "<div class='table-responsive'>";
290 289
                 echo "<table class='table'>";
291 290
                 echo "<tr>";
Please login to merge, or discard this patch.
main/session/session_add.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 				' LIMIT 10';
52 52
 
53 53
 		if (api_is_multiple_url_enabled()) {
54
-			$tbl_user_rel_access_url= Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER);
54
+			$tbl_user_rel_access_url = Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER);
55 55
 			$access_url_id = api_get_current_access_url_id();
56 56
 			if ($access_url_id != -1) {
57 57
 				$sql = 'SELECT username, lastname, firstname
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 			$return .= '<a href="javascript: void(0);" onclick="javascript: fill_coach_field(\''.$user['username'].'\')">'.api_get_person_name($user['firstname'], $user['lastname']).' ('.$user['username'].')</a><br />';
77 77
 		}
78 78
 	}
79
-	$xajax_response -> addAssign('ajax_list_coachs','innerHTML', api_utf8_encode($return));
79
+	$xajax_response -> addAssign('ajax_list_coachs', 'innerHTML', api_utf8_encode($return));
80 80
 	return $xajax_response;
81 81
 }
82 82
 $xajax -> processRequests();
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
 $form->addElement('header', $tool_name);
138 138
 $result = SessionManager::setForm($form);
139 139
 
140
-$htmlHeadXtra[] ='
140
+$htmlHeadXtra[] = '
141 141
 <script>
142 142
 $(function() {
143 143
     '.$result['js'].'
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
 $form->addButtonNext(get_lang('NextStep'));
148 148
 
149 149
 if (!$formSent) {
150
-    $formDefaults['access_start_date'] =  $formDefaults['display_start_date'] = api_get_local_time();
150
+    $formDefaults['access_start_date'] = $formDefaults['display_start_date'] = api_get_local_time();
151 151
     $formDefaults['coach_username'] = api_get_user_id();
152 152
 } else {
153 153
     $formDefaults['name'] = api_htmlentities($name, ENT_QUOTES, $charset);
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
     $id_visibility = $params['session_visibility'];
173 173
     $duration = isset($params['duration']) ? $params['duration'] : null;
174 174
     $description = $params['description'];
175
-    $showDescription = isset($params['show_description']) ? 1: 0;
175
+    $showDescription = isset($params['show_description']) ? 1 : 0;
176 176
     $sendSubscriptionNotification = isset($params['send_subscription_notification']);
177 177
     $isThisImageCropped = isset($params['picture_crop_result']);
178 178
 
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
 
210 210
     if ($return == strval(intval($return))) {
211 211
         // integer => no error on session creation
212
-        header('Location: add_courses_to_session.php?id_session=' . $return . '&add=true&msg=');
212
+        header('Location: add_courses_to_session.php?id_session='.$return.'&add=true&msg=');
213 213
         exit();
214 214
     }
215 215
 }
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
 
223 223
 echo '<div class="actions">';
224 224
 echo '<a href="../session/session_list.php">'.
225
-    Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('PlatformAdmin'),'',ICON_SIZE_MEDIUM).'</a>';
225
+    Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('PlatformAdmin'), '', ICON_SIZE_MEDIUM).'</a>';
226 226
 echo '</div>';
227 227
 
228 228
 $form->display();
Please login to merge, or discard this patch.
main/inc/lib/online.inc.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -33,17 +33,17 @@  discard block
 block discarded – undo
33 33
 
34 34
         $login_date = api_get_utc_datetime();
35 35
         $access_url_id = 1;
36
-        if (api_get_multiple_access_url() && api_get_current_access_url_id()!=-1) {
36
+        if (api_get_multiple_access_url() && api_get_current_access_url_id() != -1) {
37 37
             $access_url_id = api_get_current_access_url_id();
38 38
         }
39 39
         $session_id = api_get_session_id();
40 40
         // if the $_course array exists this means we are in a course and we have to store this in the who's online table also
41 41
         // to have the x users in this course feature working
42
-        if (is_array($_course) && count($_course)>0 && !empty($_course['id'])) {
43
-            $query = "REPLACE INTO ".$online_table ." (login_id,login_user_id,login_date,user_ip, c_id, session_id, access_url_id)
42
+        if (is_array($_course) && count($_course) > 0 && !empty($_course['id'])) {
43
+            $query = "REPLACE INTO ".$online_table." (login_id,login_user_id,login_date,user_ip, c_id, session_id, access_url_id)
44 44
                       VALUES ($uid,$uid,'$login_date','$user_ip', '".$_course['real_id']."' , '$session_id' , '$access_url_id' )";
45 45
         } else {
46
-            $query = "REPLACE INTO ".$online_table ." (login_id,login_user_id,login_date,user_ip, c_id, session_id, access_url_id)
46
+            $query = "REPLACE INTO ".$online_table." (login_id,login_user_id,login_date,user_ip, c_id, session_id, access_url_id)
47 47
                       VALUES ($uid,$uid,'$login_date','$user_ip', 0, '$session_id', '$access_url_id')";
48 48
         }
49 49
         Database::query($query);
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
     		ORDER BY login_date DESC
118 118
     		LIMIT 0,1";
119 119
     $q_last_connection = Database::query($sql);
120
-    if (Database::num_rows($q_last_connection)>0) {
120
+    if (Database::num_rows($q_last_connection) > 0) {
121 121
         $i_id_last_connection = Database::result($q_last_connection, 0, "login_id");
122 122
     }
123 123
 
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
 {
168 168
     $online_table = Database::get_main_table(TABLE_STATISTIC_TRACK_E_ONLINE);
169 169
     $user_id = intval($user_id);
170
-    $query = "DELETE FROM " . $online_table . " WHERE login_user_id = $user_id";
170
+    $query = "DELETE FROM ".$online_table." WHERE login_user_id = $user_id";
171 171
     Database::query($query);
172 172
 }
173 173
 
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
     $current_date = api_get_utc_datetime($online_time);
249 249
     $track_online_table = Database::get_main_table(TABLE_STATISTIC_TRACK_E_ONLINE);
250 250
     $friend_user_table = Database::get_main_table(TABLE_MAIN_USER_REL_USER);
251
-    $table_user	= Database::get_main_table(TABLE_MAIN_USER);
251
+    $table_user = Database::get_main_table(TABLE_MAIN_USER);
252 252
 
253 253
     if ($friends) {
254 254
         // 	who friends from social network is online
@@ -264,8 +264,8 @@  discard block
 block discarded – undo
264 264
                   LIMIT $from, $number_of_items";
265 265
     } else {
266 266
         $query = "SELECT DISTINCT login_user_id, login_date
267
-                    FROM ".$track_online_table ." e
268
-                    INNER JOIN ".$table_user ." u ON (u.id = e.login_user_id)
267
+                    FROM ".$track_online_table." e
268
+                    INNER JOIN ".$table_user." u ON (u.id = e.login_user_id)
269 269
                   WHERE u.status != ".ANONYMOUS." AND login_date >= '".$current_date."'
270 270
                   ORDER BY $column $direction
271 271
                   LIMIT $from, $number_of_items";
@@ -288,8 +288,8 @@  discard block
 block discarded – undo
288 288
             } else {
289 289
                 // all users online
290 290
                 $query = "SELECT login_user_id, login_date
291
-                          FROM ".$track_online_table ." track
292
-                          INNER JOIN ".$table_user ." u
291
+                          FROM ".$track_online_table." track
292
+                          INNER JOIN ".$table_user." u
293 293
                           ON (u.id=track.login_user_id)
294 294
                           WHERE u.status != ".ANONYMOUS." AND track.access_url_id =  $access_url_id AND
295 295
                                 login_date >= '".$current_date."'
@@ -426,7 +426,7 @@  discard block
 block discarded – undo
426 426
 	if ($result) {
427 427
 		$users_online = array();
428 428
 
429
-		while(list($login_user_id, $login_date) = Database::fetch_row($result)) {
429
+		while (list($login_user_id, $login_date) = Database::fetch_row($result)) {
430 430
             $users_online[] = $login_user_id;
431 431
 		}
432 432
 		return $users_online;
@@ -435,7 +435,7 @@  discard block
 block discarded – undo
435 435
 	}
436 436
 }
437 437
 
438
-function who_is_online_in_this_course_count($uid, $time_limit, $coursecode=null)
438
+function who_is_online_in_this_course_count($uid, $time_limit, $coursecode = null)
439 439
 {
440 440
 	if (empty($coursecode)) {
441 441
 		return false;
Please login to merge, or discard this patch.
plugin/bbb/listing.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -11,14 +11,14 @@  discard block
 block discarded – undo
11 11
 $tool_name = $plugin->get_lang('Videoconference');
12 12
 
13 13
 $htmlHeadXtra[] = api_get_js_simple(
14
-    api_get_path(WEB_PLUGIN_PATH) . 'bbb/resources/utils.js'
14
+    api_get_path(WEB_PLUGIN_PATH).'bbb/resources/utils.js'
15 15
 );
16
-$htmlHeadXtra[] = "<script>var _p = {web_plugin: '" . api_get_path(WEB_PLUGIN_PATH). "'}</script>";
16
+$htmlHeadXtra[] = "<script>var _p = {web_plugin: '".api_get_path(WEB_PLUGIN_PATH)."'}</script>";
17 17
 
18 18
 $tpl = new Template($tool_name);
19 19
 
20 20
 $isGlobal = isset($_GET['global']) ? true : false;
21
-$isGlobalPerUser = isset($_GET['user_id']) ? (int) $_GET['user_id']: false;
21
+$isGlobalPerUser = isset($_GET['user_id']) ? (int) $_GET['user_id'] : false;
22 22
 
23 23
 $bbb = new bbb('', '', $isGlobal, $isGlobalPerUser);
24 24
 $action = isset($_GET['action']) ? $_GET['action'] : null;
@@ -83,22 +83,22 @@  discard block
 block discarded – undo
83 83
         case 'end':
84 84
             $bbb->endMeeting($_GET['id']);
85 85
             $message = Display::return_message(
86
-                $plugin->get_lang('MeetingClosed') . '<br />' . $plugin->get_lang(
86
+                $plugin->get_lang('MeetingClosed').'<br />'.$plugin->get_lang(
87 87
                     'MeetingClosedComment'
88 88
                 ),
89 89
                 'success',
90 90
                 false
91 91
             );
92 92
 
93
-            if (file_exists(__DIR__ . '/config.vm.php')) {
94
-                require __DIR__ . '/../../vendor/autoload.php';
93
+            if (file_exists(__DIR__.'/config.vm.php')) {
94
+                require __DIR__.'/../../vendor/autoload.php';
95 95
 
96
-                require __DIR__ . '/lib/vm/AbstractVM.php';
97
-                require __DIR__ . '/lib/vm/VMInterface.php';
98
-                require __DIR__ . '/lib/vm/DigitalOceanVM.php';
99
-                require __DIR__ . '/lib/VM.php';
96
+                require __DIR__.'/lib/vm/AbstractVM.php';
97
+                require __DIR__.'/lib/vm/VMInterface.php';
98
+                require __DIR__.'/lib/vm/DigitalOceanVM.php';
99
+                require __DIR__.'/lib/VM.php';
100 100
 
101
-                $config = require __DIR__ . '/config.vm.php';
101
+                $config = require __DIR__.'/config.vm.php';
102 102
 
103 103
                 $vm = new VM($config);
104 104
                 $vm->resizeToMinLimit();
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
     $actionLinks = [
196 196
         Display::toolbarButton(
197 197
             $plugin->get_lang('AdminView'),
198
-            api_get_path(WEB_PLUGIN_PATH) . 'bbb/admin.php',
198
+            api_get_path(WEB_PLUGIN_PATH).'bbb/admin.php',
199 199
             'list',
200 200
             'primary'
201 201
         )
Please login to merge, or discard this patch.
main/admin/index.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 $nameTools = get_lang('PlatformAdmin');
20 20
 
21 21
 $accessUrlId = 0;
22
-$adminExtraContentDir = api_get_path(SYS_APP_PATH) . "home/admin/";
22
+$adminExtraContentDir = api_get_path(SYS_APP_PATH)."home/admin/";
23 23
 
24 24
 if (api_is_multiple_url_enabled()) {
25 25
     $accessUrlId = api_get_current_access_url_id();
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
         $urlInfo = api_get_access_url($accessUrlId);
29 29
         $url = api_remove_trailing_slash(preg_replace('/https?:\/\//i', '', $urlInfo['url']));
30 30
         $cleanUrl = str_replace('/', '-', $url);
31
-        $adminExtraContentDir = api_get_path(SYS_APP_PATH) . "home/$cleanUrl/admin/";
31
+        $adminExtraContentDir = api_get_path(SYS_APP_PATH)."home/$cleanUrl/admin/";
32 32
     }
33 33
 }
34 34
 
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
             <div class="form-group">
85 85
                 <input class="form-control" type="text" name="keyword" value="">
86 86
                 <button class="btn btn-default" type="submit">
87
-                    <em class="fa fa-search"></em> ' . get_lang('Search') . '
87
+                    <em class="fa fa-search"></em> ' . get_lang('Search').'
88 88
                 </button>
89 89
             </div>
90 90
         </form>';
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
             <div class="form-group">
138 138
                 <input class="form-control" type="text" name="keyword" value="">
139 139
                 <button class="btn btn-default" type="submit">
140
-                    <em class="fa fa-search"></em> ' . get_lang('Search') . '
140
+                    <em class="fa fa-search"></em> ' . get_lang('Search').'
141 141
                 </button>
142 142
             </div>
143 143
         </form>';
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
                 <input class="form-control" type="text" name="search_field" value="" >
198 198
                 <input type="hidden" value="search_setting" name="category">
199 199
                 <button class="btn btn-default" type="submit">
200
-                    <em class="fa fa-search"></em> ' . get_lang('Search') . '
200
+                    <em class="fa fa-search"></em> ' . get_lang('Search').'
201 201
                 </button>
202 202
             </div>
203 203
         </form>';
@@ -210,24 +210,24 @@  discard block
 block discarded – undo
210 210
     $items[] = array('url' => 'settings.php?category=Regions', 'label' => get_lang('Regions'));
211 211
     $items[] = array('url' => 'system_announcements.php', 'label' => get_lang('SystemAnnouncements'));
212 212
     $items[] = array(
213
-        'url' => api_get_path(WEB_CODE_PATH) . 'calendar/agenda_js.php?type=admin',
213
+        'url' => api_get_path(WEB_CODE_PATH).'calendar/agenda_js.php?type=admin',
214 214
         'label' => get_lang('GlobalAgenda')
215 215
     );
216 216
     $items[] = array('url' => 'configure_homepage.php', 'label' => get_lang('ConfigureHomePage'));
217 217
     $items[] = array('url' => 'configure_inscription.php', 'label' => get_lang('ConfigureInscription'));
218 218
     $items[] = array('url' => 'statistics/index.php', 'label' => get_lang('Statistics'));
219 219
     $items[] = array(
220
-        'url' => api_get_path(WEB_CODE_PATH) . 'mySpace/company_reports.php',
220
+        'url' => api_get_path(WEB_CODE_PATH).'mySpace/company_reports.php',
221 221
         'label' => get_lang('Reports')
222 222
     );
223 223
     $items[] = array(
224
-        'url' => api_get_path(WEB_CODE_PATH) . 'admin/teacher_time_report.php',
224
+        'url' => api_get_path(WEB_CODE_PATH).'admin/teacher_time_report.php',
225 225
         'label' => get_lang('TeacherTimeReport')
226 226
     );
227 227
 
228 228
     if (api_get_configuration_value('chamilo_cms')) {
229 229
         $items[] = array(
230
-            'url' => api_get_path(WEB_PATH) . 'web/app_dev.php/administration/dashboard',
230
+            'url' => api_get_path(WEB_PATH).'web/app_dev.php/administration/dashboard',
231 231
             'label' => get_lang('CMS')
232 232
         );
233 233
     }
@@ -277,7 +277,7 @@  discard block
 block discarded – undo
277 277
                     <div class="form-group">
278 278
                         <input class="form-control" type="text" name="keyword" value="">
279 279
                         <button class="btn btn-default" type="submit">
280
-                            <em class="fa fa-search"></em> ' . get_lang('Search') . '
280
+                            <em class="fa fa-search"></em> ' . get_lang('Search').'
281 281
                         </button>
282 282
                     </div>
283 283
                 </form>';
@@ -305,7 +305,7 @@  discard block
 block discarded – undo
305 305
 
306 306
 if (api_is_platform_admin()) {
307 307
     // option only visible in development mode. Enable through code if required
308
-    if (is_dir(api_get_path(SYS_TEST_PATH) . 'datafiller/')) {
308
+    if (is_dir(api_get_path(SYS_TEST_PATH).'datafiller/')) {
309 309
         $items[] = array('url' => 'user_move_stats.php', 'label' => get_lang('MoveUserStats'));
310 310
     }
311 311
     $items[] = array('url' => 'career_dashboard.php', 'label' => get_lang('CareersAndPromotions'));
@@ -331,7 +331,7 @@  discard block
 block discarded – undo
331 331
     $items = array();
332 332
     $items[] = array('url' => 'special_exports.php', 'label' => get_lang('SpecialExports'));
333 333
     $items[] = array('url' => 'system_status.php', 'label' => get_lang('SystemStatus'));
334
-    if (is_dir(api_get_path(SYS_TEST_PATH) . 'datafiller/')) {
334
+    if (is_dir(api_get_path(SYS_TEST_PATH).'datafiller/')) {
335 335
         $items[] = array('url' => 'filler.php', 'label' => get_lang('DataFiller'));
336 336
     }
337 337
 
@@ -375,15 +375,15 @@  discard block
 block discarded – undo
375 375
         $items[] = array('url' => 'skills_wheel.php', 'label' => get_lang('SkillsWheel'));
376 376
         $items[] = array('url' => 'skills_import.php', 'label' => get_lang('SkillsImport'));
377 377
         $items[] = array('url' => 'skill_list.php', 'label' => get_lang('ManageSkills'));
378
-        $items[] = array('url'=>'skill.php',   'label' => get_lang('ManageSkillsLevels'));
378
+        $items[] = array('url'=>'skill.php', 'label' => get_lang('ManageSkillsLevels'));
379 379
         //$items[] = array('url'=>'skills_profile.php',   'label' => get_lang('SkillsProfile'));
380 380
         $items[] = array(
381
-            'url' => api_get_path(WEB_CODE_PATH) . 'social/skills_ranking.php',
381
+            'url' => api_get_path(WEB_CODE_PATH).'social/skills_ranking.php',
382 382
             'label' => get_lang('SkillsRanking')
383 383
         );
384 384
         $items[] = array('url' => 'skills_gradebook.php', 'label' => get_lang('SkillsAndGradebooks'));
385 385
         $items[] = array(
386
-            'url' => api_get_path(WEB_CODE_PATH) . 'admin/skill_badge.php',
386
+            'url' => api_get_path(WEB_CODE_PATH).'admin/skill_badge.php',
387 387
             'label' => get_lang('Badges')
388 388
         );
389 389
         $blocks['skills']['items'] = $items;
@@ -426,12 +426,12 @@  discard block
 block discarded – undo
426 426
                     $itemUrl = '/start.php';
427 427
                 }
428 428
 
429
-                if (!file_exists(api_get_path(SYS_PLUGIN_PATH) . $pluginName . $itemUrl)) {
429
+                if (!file_exists(api_get_path(SYS_PLUGIN_PATH).$pluginName.$itemUrl)) {
430 430
                     continue;
431 431
                 }
432 432
 
433 433
                 $items[] = array(
434
-                    'url' => api_get_path(WEB_PLUGIN_PATH) . $plugin_name . $itemUrl,
434
+                    'url' => api_get_path(WEB_PLUGIN_PATH).$plugin_name.$itemUrl,
435 435
                     'label' => $plugin_info['title']
436 436
                 );
437 437
             }
@@ -510,7 +510,7 @@  discard block
 block discarded – undo
510 510
     }
511 511
     //end hack
512 512
 }
513
-$admin_ajax_url = api_get_path(WEB_AJAX_PATH) . 'admin.ajax.php';
513
+$admin_ajax_url = api_get_path(WEB_AJAX_PATH).'admin.ajax.php';
514 514
 
515 515
 $tpl = new Template();
516 516
 
@@ -563,7 +563,7 @@  discard block
 block discarded – undo
563 563
                 die;
564 564
             }
565 565
 
566
-            $fullFilePath = $adminExtraContentDir . $extraData['block'];
566
+            $fullFilePath = $adminExtraContentDir.$extraData['block'];
567 567
             $fullFilePath .= "_extra.html";
568 568
 
569 569
             file_put_contents($fullFilePath, $extraData['extra_content']);
Please login to merge, or discard this patch.
main/messages/download.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -48,8 +48,8 @@  discard block
 block discarded – undo
48 48
 
49 49
 // get message user id for inbox/outbox
50 50
 $message_uid = '';
51
-$message_type = array('inbox','outbox');
52
-if (in_array($_GET['type'],$message_type)) {
51
+$message_type = array('inbox', 'outbox');
52
+if (in_array($_GET['type'], $message_type)) {
53 53
 	if ($_GET['type'] == 'inbox') {
54 54
 		$message_uid = $row_users['user_receiver_id'];
55 55
 	} else {
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 
64 64
 if (!empty($row_users['group_id'])) {
65 65
 	$users_group = $userGroup->get_all_users_by_group($row_users['group_id']);
66
-	if (!in_array($current_uid,array_keys($users_group))) {
66
+	if (!in_array($current_uid, array_keys($users_group))) {
67 67
 		$not_allowed_to_edit = true;
68 68
 	}
69 69
 } else {
Please login to merge, or discard this patch.
main/admin/sub_language_add.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -39,8 +39,8 @@  discard block
 block discarded – undo
39 39
     $sublanguage_available = Database::escape_string($sublanguage_available);
40 40
     $parent_id = intval($parent_id);
41 41
 
42
-    $sql = 'INSERT INTO ' . $tbl_admin_languages . '(original_name,english_name,isocode,dokeos_folder,available,parent_id)
43
-    	  VALUES ("' . $original_name . '","' . $english_name . '","' . $isocode . '","' . $english_name . '","' . $sublanguage_available . '","' . $parent_id . '")';
42
+    $sql = 'INSERT INTO '.$tbl_admin_languages.'(original_name,english_name,isocode,dokeos_folder,available,parent_id)
43
+    	  VALUES ("' . $original_name.'","'.$english_name.'","'.$isocode.'","'.$english_name.'","'.$sublanguage_available.'","'.$parent_id.'")';
44 44
     $res = Database::query($sql);
45 45
     if ($res === false) {
46 46
         return false;
@@ -65,8 +65,8 @@  discard block
 block discarded – undo
65 65
 function check_if_language_exist($original_name, $english_name, $isocode, $sublanguage_available)
66 66
 {
67 67
     $tbl_admin_languages = Database:: get_main_table(TABLE_MAIN_LANGUAGE);
68
-    $sql_original_name = 'SELECT count(*) AS count_original_name FROM ' . $tbl_admin_languages . ' WHERE original_name="' . Database::escape_string($original_name) . '" ';
69
-    $sql_english_name = 'SELECT count(*) AS count_english_name FROM ' . $tbl_admin_languages . ' WHERE english_name="' . Database::escape_string($english_name) . '" ';
68
+    $sql_original_name = 'SELECT count(*) AS count_original_name FROM '.$tbl_admin_languages.' WHERE original_name="'.Database::escape_string($original_name).'" ';
69
+    $sql_english_name = 'SELECT count(*) AS count_english_name FROM '.$tbl_admin_languages.' WHERE english_name="'.Database::escape_string($english_name).'" ';
70 70
     //$sql_isocode='SELECT count(*) AS count_isocode FROM '.$tbl_admin_languages.' WHERE isocode="'.Database::escape_string($isocode).'" ';
71 71
     $rs_original_name = Database::query($sql_original_name);
72 72
     $rs_english_name = Database::query($sql_english_name);
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
  */
123 123
 function ckeck_if_is_parent_of_sub_language($parent_id)
124 124
 {
125
-    $sql = 'SELECT count(*) AS count FROM language WHERE parent_id= ' . intval($parent_id) . '';
125
+    $sql = 'SELECT count(*) AS count FROM language WHERE parent_id= '.intval($parent_id).'';
126 126
     $rs = Database::query($sql);
127 127
     if (Database::num_rows($rs) > 0 && Database::result($rs, 0, 'count') == 1) {
128 128
         return true;
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
     }
184 184
 }
185 185
 
186
-$language_name = get_lang('CreateSubLanguageForLanguage') . ' ( ' . strtolower($language_name) . ' )';
186
+$language_name = get_lang('CreateSubLanguageForLanguage').' ( '.strtolower($language_name).' )';
187 187
 
188 188
 if (ckeck_if_is_parent_of_sub_language($parent_id) === true && isset($_GET['action']) && $_GET['action'] == 'deletesublanguage') {
189 189
     $language_name = get_lang('DeleteSubLanguage');
@@ -204,15 +204,15 @@  discard block
 block discarded – undo
204 204
     foreach ($check_information as $index_information => $value_information) {
205 205
         $allow_insert_info = false;
206 206
         if ($index_information == 'original_name') {
207
-            $msg .= Display::return_message(get_lang('AlreadyExists') . ' "' . get_lang('OriginalName') . '" ' . '(' . $original_name . ')',
207
+            $msg .= Display::return_message(get_lang('AlreadyExists').' "'.get_lang('OriginalName').'" '.'('.$original_name.')',
208 208
                 'error');
209 209
         }
210 210
         if ($index_information == 'english_name') {
211
-            $msg .= Display::return_message(get_lang('AlreadyExists') . ' "' . get_lang('EnglishName') . '" ' . '(' . $english_name . ')',
211
+            $msg .= Display::return_message(get_lang('AlreadyExists').' "'.get_lang('EnglishName').'" '.'('.$english_name.')',
212 212
                 'error');
213 213
         }
214 214
         if ($index_information == 'isocode') {
215
-            $msg .= Display::return_message(get_lang('CodeDoesNotExists') . ': ' . $isocode . '', 'error');
215
+            $msg .= Display::return_message(get_lang('CodeDoesNotExists').': '.$isocode.'', 'error');
216 216
         }
217 217
         if ($index_information == 'execute_add' && $value_information === true) {
218 218
             $allow_insert_info = true;
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
             $english_name = api_strtolower($english_name);
227 227
 
228 228
             $isocode = str_replace(' ', '_', $isocode);
229
-            $str_info = '<br/>' . get_lang('OriginalName') . ' : ' . $original_name . '<br/>' . get_lang('EnglishName') . ' : ' . $english_name . '<br/>' . get_lang('PlatformCharsetTitle') . ' : ' . $isocode;
229
+            $str_info = '<br/>'.get_lang('OriginalName').' : '.$original_name.'<br/>'.get_lang('EnglishName').' : '.$english_name.'<br/>'.get_lang('PlatformCharsetTitle').' : '.$isocode;
230 230
 
231 231
             $mkdir_result = SubLanguageManager::add_language_directory($english_name);
232 232
             if ($mkdir_result) {
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
                     SubLanguageManager::remove_language_directory($english_name);
236 236
                     $msg .= Display::return_message(get_lang('LanguageDirectoryNotWriteableContactAdmin'), 'error');
237 237
                 } else {
238
-                    Display::addFlash(Display::return_message(get_lang('TheNewSubLanguageHasBeenAdded') . $str_info, null, false));
238
+                    Display::addFlash(Display::return_message(get_lang('TheNewSubLanguageHasBeenAdded').$str_info, null, false));
239 239
                     unset($interbreadcrumb);
240 240
                     $_GET['sub_language_id'] = $_REQUEST['sub_language_id'] = $sl_id;
241 241
                     require 'sub_language.php';
@@ -271,7 +271,7 @@  discard block
 block discarded – undo
271 271
 if (isset($_GET['action']) && $_GET['action'] == 'definenewsublanguage') {
272 272
     $text = $language_name;
273 273
     $form = new FormValidator('addsublanguage', 'post',
274
-        'sub_language_add.php?id=' . Security::remove_XSS($_GET['id']) . '&action=definenewsublanguage');
274
+        'sub_language_add.php?id='.Security::remove_XSS($_GET['id']).'&action=definenewsublanguage');
275 275
     $class = 'add';
276 276
     $form->addElement('header', '', $text);
277 277
     $form->addElement('text', 'original_name', get_lang('OriginalName'), 'class="input_titles"');
@@ -284,7 +284,7 @@  discard block
 block discarded – undo
284 284
     $form->addElement('checkbox', 'sub_language_is_visible', '', get_lang('Visibility'));
285 285
     $form->addButtonCreate(get_lang('CreateSubLanguage'), 'SubmitAddNewLanguage');
286 286
     //$values['original_name'] = $language_details['original_name'].'...'; -> cannot be used because of quickform filtering (freeze)
287
-    $values['english_name'] = $language_details['english_name'] . '2';
287
+    $values['english_name'] = $language_details['english_name'].'2';
288 288
     $values['isocode'] = $language_details['isocode'];
289 289
     $form->setDefaults($values);
290 290
     $form->display();
@@ -292,7 +292,7 @@  discard block
 block discarded – undo
292 292
     if (isset($_GET['action']) && $_GET['action'] == 'deletesublanguage') {
293 293
         $text = $language_name;
294 294
         $form = new FormValidator('deletesublanguage', 'post',
295
-            'sub_language_add.php?id=' . Security::remove_XSS($_GET['id']) . '&sub_language_id=' . Security::remove_XSS($_GET['sub_language_id']));
295
+            'sub_language_add.php?id='.Security::remove_XSS($_GET['id']).'&sub_language_id='.Security::remove_XSS($_GET['sub_language_id']));
296 296
         $class = 'minus';
297 297
         $form->addElement('header', '', $text);
298 298
         $form->addElement('static', '', get_lang('OriginalName'), $original_name);
Please login to merge, or discard this patch.