Completed
Pull Request — 1.11.x (#1163)
by José
71:40 queued 25:11
created
src/Chamilo/CoreBundle/Entity/SkillRelUser.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -293,7 +293,7 @@  discard block
 block discarded – undo
293 293
     /**
294 294
      * Get comments
295 295
      * @param boolean $sortDescByDateTime
296
-     * @return ArrayCollection
296
+     * @return \Doctrine\Common\Collections\ArrayCollection
297 297
      */
298 298
     public function getComments($sortDescByDateTime = false)
299 299
     {
@@ -311,7 +311,7 @@  discard block
 block discarded – undo
311 311
 
312 312
     /**
313 313
      * Calculate the average value from the feedback comments
314
-     * @return type
314
+     * @return string
315 315
      */
316 316
     public function getAverage()
317 317
     {
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -455,7 +455,7 @@  discard block
 block discarded – undo
455 455
      */
456 456
     public function getIssueUrl()
457 457
     {
458
-        return api_get_path(WEB_PATH) . "badge/{$this->id}";
458
+        return api_get_path(WEB_PATH)."badge/{$this->id}";
459 459
     }
460 460
 
461 461
     /**
@@ -464,7 +464,7 @@  discard block
 block discarded – undo
464 464
      */
465 465
     public function getIssueUrlAll()
466 466
     {
467
-        return api_get_path(WEB_PATH) . "skill/{$this->skill->getId()}/user/{$this->user->getId()}";
467
+        return api_get_path(WEB_PATH)."skill/{$this->skill->getId()}/user/{$this->user->getId()}";
468 468
     }
469 469
 
470 470
     /**
@@ -473,7 +473,7 @@  discard block
 block discarded – undo
473 473
      */
474 474
     public function getAssertionUrl()
475 475
     {
476
-        $url = api_get_path(WEB_CODE_PATH) . "badge/assertion.php?";
476
+        $url = api_get_path(WEB_CODE_PATH)."badge/assertion.php?";
477 477
 
478 478
         $url .= http_build_query(array(
479 479
             'user' => $this->user->getId(),
Please login to merge, or discard this patch.
src/Chamilo/CoreBundle/Entity/Skill.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -222,14 +222,14 @@
 block discarded – undo
222 222
                 return \Display::return_icon('badges-default.png', null, null, ICON_SIZE_BIG, null, true);
223 223
             }
224 224
 
225
-            return api_get_path(WEB_UPLOAD_PATH) . 'badges/' . sha1($this->name) . '-small.png';
225
+            return api_get_path(WEB_UPLOAD_PATH).'badges/'.sha1($this->name).'-small.png';
226 226
         }
227 227
 
228 228
         if (empty($this->icon)) {
229 229
             return \Display::return_icon('badges-default.png', null, null, ICON_SIZE_HUGE, null, true);
230 230
         }
231 231
 
232
-        return api_get_path(WEB_UPLOAD_PATH) . "badges/{$this->icon}";
232
+        return api_get_path(WEB_UPLOAD_PATH)."badges/{$this->icon}";
233 233
     }
234 234
 
235 235
     /**
Please login to merge, or discard this patch.
main/badge/issued.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
 require_once '../inc/lib/baker.lib.php';
10 10
 
11 11
 if (!isset($_REQUEST['user'], $_REQUEST['issue'])) {
12
-    header('Location: ' . api_get_path(WEB_PATH));
12
+    header('Location: '.api_get_path(WEB_PATH));
13 13
     exit;
14 14
 }
15 15
 
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
         Display::return_message(get_lang('NoResults'), 'error')
25 25
     );
26 26
 
27
-    header('Location: ' . api_get_path(WEB_PATH));
27
+    header('Location: '.api_get_path(WEB_PATH));
28 28
     exit;
29 29
 }
30 30
 
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
         Display::return_message(get_lang('NoResults'), 'error')
34 34
     );
35 35
 
36
-    header('Location: ' . api_get_path(WEB_PATH));
36
+    header('Location: '.api_get_path(WEB_PATH));
37 37
     exit;
38 38
 }
39 39
 
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
     $entityManager->persist($skillIssue);
145 145
     $entityManager->flush();
146 146
 
147
-    header("Location: " . $skillIssue->getIssueUrl());
147
+    header("Location: ".$skillIssue->getIssueUrl());
148 148
     exit;
149 149
 }
150 150
 
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
     $entityManager->persist($skillUserComment);
176 176
     $entityManager->flush();
177 177
 
178
-    header("Location: " . $skillIssue->getIssueUrl());
178
+    header("Location: ".$skillIssue->getIssueUrl());
179 179
     exit;
180 180
 }
181 181
 
@@ -191,11 +191,11 @@  discard block
 block discarded – undo
191 191
         $backpack = $configBackpack;
192 192
     }
193 193
 
194
-    $htmlHeadXtra[] = '<script src="' . $backpack . 'issuer.js"></script>';
194
+    $htmlHeadXtra[] = '<script src="'.$backpack.'issuer.js"></script>';
195 195
     $objSkill = new Skill();
196 196
     $assertionUrl = $skillIssueInfo['badge_asserion'][0];
197 197
     $skills = $objSkill->get($skillId);
198
-    $unbakedBadge = api_get_path(SYS_UPLOAD_PATH) . "badges/".$skills['icon'];
198
+    $unbakedBadge = api_get_path(SYS_UPLOAD_PATH)."badges/".$skills['icon'];
199 199
 
200 200
     $unbakedBadge = file_get_contents($unbakedBadge);
201 201
     $badgeInfoError = false;
@@ -210,12 +210,12 @@  discard block
 block discarded – undo
210 210
             mkdir($bakedBadge, api_get_permissions_for_new_directories(), true);
211 211
         }
212 212
         $skillRelUserId = $skillIssueInfo['id'];
213
-        if (!file_exists($bakedBadge . "/badge_" . $skillRelUserId)) {
214
-            file_put_contents($bakedBadge . "/badge_" . $skillRelUserId . ".png", $bakedInfo);
213
+        if (!file_exists($bakedBadge."/badge_".$skillRelUserId)) {
214
+            file_put_contents($bakedBadge."/badge_".$skillRelUserId.".png", $bakedInfo);
215 215
         }
216 216
 
217 217
         //Process to validate a baked badge
218
-        $badgeContent = file_get_contents($bakedBadge . "/badge_" . $skillRelUserId . ".png");
218
+        $badgeContent = file_get_contents($bakedBadge."/badge_".$skillRelUserId.".png");
219 219
         $verifyBakedBadge = $png->extractBadgeInfo($badgeContent);
220 220
         if (!is_array($verifyBakedBadge)) {
221 221
             $badgeInfoError = true;
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
 
224 224
         if (!$badgeInfoError) {
225 225
             $personalBadge = UserManager::getUserPathById($userId, "web");
226
-            $personalBadge = $personalBadge."badges/badge_" . $skillRelUserId . ".png";
226
+            $personalBadge = $personalBadge."badges/badge_".$skillRelUserId.".png";
227 227
         }
228 228
     }
229 229
 }
Please login to merge, or discard this patch.
main/admin/skill_level.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
 
17 17
 $listAction = api_get_self();
18 18
 
19
-$action =  '';
19
+$action = '';
20 20
 if (isset($_GET['action']) && in_array($_GET['action'], ['add', 'edit', 'delete', 'add_level'])) {
21 21
     $action = $_GET['action'];
22 22
 }
@@ -49,8 +49,8 @@  discard block
 block discarded – undo
49 49
 }
50 50
 $formToDisplay = $form->returnForm();
51 51
 
52
-$interbreadcrumb[] = array ('url' => 'index.php', 'name' => get_lang('PlatformAdmin'));
53
-$interbreadcrumb[] = array ('url' => api_get_self(), 'name' => get_lang('SkillProfile'));
52
+$interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('PlatformAdmin'));
53
+$interbreadcrumb[] = array('url' => api_get_self(), 'name' => get_lang('SkillProfile'));
54 54
 
55 55
 $tpl = new Template($action);
56 56
 switch ($action) {
Please login to merge, or discard this patch.
src/Chamilo/CoreBundle/Entity/SkillRelUserComment.php 1 patch
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 
79 79
     /**
80 80
      * Get skillRelUser
81
-     * @return Chamilo\CoreBundle\Entity\SkillRelUser
81
+     * @return SkillRelUser
82 82
      */
83 83
     public function getSkillRelUser()
84 84
     {
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 
88 88
     /**
89 89
      * Get feedbackGiver
90
-     * @return Chamilo\UserBundle\Entity\User
90
+     * @return \Chamilo\UserBundle\Entity\User
91 91
      */
92 92
     public function getFeedbackGiver()
93 93
     {
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
 
115 115
     /**
116 116
      * Get feedbackDateTime
117
-     * @return type
117
+     * @return \DateTime
118 118
      */
119 119
     public function getFeedbackDateTime()
120 120
     {
Please login to merge, or discard this patch.
src/Chamilo/UserBundle/Entity/User.php 1 patch
Doc Comments   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -991,7 +991,7 @@  discard block
 block discarded – undo
991 991
     /**
992 992
      * Get pictureUri
993 993
      *
994
-     * @return Media
994
+     * @return string
995 995
      */
996 996
     public function getPictureUri()
997 997
     {
@@ -1368,7 +1368,7 @@  discard block
 block discarded – undo
1368 1368
     }
1369 1369
 
1370 1370
     /**
1371
-     * @return Media
1371
+     * @return string
1372 1372
      */
1373 1373
     public function getAvatar()
1374 1374
     {
@@ -1637,7 +1637,7 @@  discard block
 block discarded – undo
1637 1637
     /**
1638 1638
      * Returns the creation date.
1639 1639
      *
1640
-     * @return \DateTime|null
1640
+     * @return \DateTime
1641 1641
      */
1642 1642
     public function getCreatedAt()
1643 1643
     {
@@ -1661,7 +1661,7 @@  discard block
 block discarded – undo
1661 1661
     /**
1662 1662
      * Returns the last update date.
1663 1663
      *
1664
-     * @return \DateTime|null
1664
+     * @return \DateTime
1665 1665
      */
1666 1666
     public function getUpdatedAt()
1667 1667
     {
@@ -1671,7 +1671,7 @@  discard block
 block discarded – undo
1671 1671
     /**
1672 1672
      * Returns the expiration date.
1673 1673
      *
1674
-     * @return \DateTime|null
1674
+     * @return \DateTime
1675 1675
      */
1676 1676
     public function getExpiresAt()
1677 1677
     {
@@ -2137,7 +2137,7 @@  discard block
 block discarded – undo
2137 2137
       /**
2138 2138
      * Returns the user roles
2139 2139
      *
2140
-     * @return array The roles
2140
+     * @return string[] The roles
2141 2141
      */
2142 2142
     public function getRoles()
2143 2143
     {
@@ -2463,7 +2463,7 @@  discard block
 block discarded – undo
2463 2463
     /**
2464 2464
      * Check if the user has the skill
2465 2465
      * @param \Chamilo\CoreBundle\Entity\Skill $skill The skill
2466
-     * @return boolean
2466
+     * @return boolean|null
2467 2467
      */
2468 2468
     public function hasSkill(\Chamilo\CoreBundle\Entity\Skill $skill)
2469 2469
     {
Please login to merge, or discard this patch.
main/admin/skill.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
 
18 18
 $listAction = api_get_self();
19 19
 
20
-$action =  '';
20
+$action = '';
21 21
 if (isset($_GET['action']) && in_array($_GET['action'], ['add', 'edit', 'delete'])) {
22 22
     $action = $_GET['action'];
23 23
 }
@@ -52,8 +52,8 @@  discard block
 block discarded – undo
52 52
 }
53 53
 $formToDisplay = $form->returnForm();
54 54
 
55
-$interbreadcrumb[] = array ('url' => 'index.php', 'name' => get_lang('PlatformAdmin'));
56
-$interbreadcrumb[] = array ('url' => api_get_self(), 'name' => get_lang('ManageSkillsLevels'));
55
+$interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('PlatformAdmin'));
56
+$interbreadcrumb[] = array('url' => api_get_self(), 'name' => get_lang('ManageSkillsLevels'));
57 57
 
58 58
 $tpl = new Template($action);
59 59
 switch ($action) {
Please login to merge, or discard this patch.
main/admin/index.php 1 patch
Spacing   +17 added lines, -17 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
 
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
             <div class="form-group">
97 97
                 <input class="form-control" type="text" name="keyword" value="">
98 98
                 <button class="btn btn-default" type="submit">
99
-                    <em class="fa fa-search"></em> ' . get_lang('Search') . '
99
+                    <em class="fa fa-search"></em> ' . get_lang('Search').'
100 100
                 </button>
101 101
             </div>
102 102
         </form>';
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
             <div class="form-group">
150 150
                 <input class="form-control" type="text" name="keyword" value="">
151 151
                 <button class="btn btn-default" type="submit">
152
-                    <em class="fa fa-search"></em> ' . get_lang('Search') . '
152
+                    <em class="fa fa-search"></em> ' . get_lang('Search').'
153 153
                 </button>
154 154
             </div>
155 155
         </form>';
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
                 <input class="form-control" type="text" name="search_field" value="" >
210 210
                 <input type="hidden" value="search_setting" name="category">
211 211
                 <button class="btn btn-default" type="submit">
212
-                    <em class="fa fa-search"></em> ' . get_lang('Search') . '
212
+                    <em class="fa fa-search"></em> ' . get_lang('Search').'
213 213
                 </button>
214 214
             </div>
215 215
         </form>';
@@ -222,24 +222,24 @@  discard block
 block discarded – undo
222 222
     $items[] = array('url' => 'settings.php?category=Regions', 'label' => get_lang('Regions'));
223 223
     $items[] = array('url' => 'system_announcements.php', 'label' => get_lang('SystemAnnouncements'));
224 224
     $items[] = array(
225
-        'url' => api_get_path(WEB_CODE_PATH) . 'calendar/agenda_js.php?type=admin',
225
+        'url' => api_get_path(WEB_CODE_PATH).'calendar/agenda_js.php?type=admin',
226 226
         'label' => get_lang('GlobalAgenda')
227 227
     );
228 228
     $items[] = array('url' => 'configure_homepage.php', 'label' => get_lang('ConfigureHomePage'));
229 229
     $items[] = array('url' => 'configure_inscription.php', 'label' => get_lang('ConfigureInscription'));
230 230
     $items[] = array('url' => 'statistics/index.php', 'label' => get_lang('Statistics'));
231 231
     $items[] = array(
232
-        'url' => api_get_path(WEB_CODE_PATH) . 'mySpace/company_reports.php',
232
+        'url' => api_get_path(WEB_CODE_PATH).'mySpace/company_reports.php',
233 233
         'label' => get_lang('Reports')
234 234
     );
235 235
     $items[] = array(
236
-        'url' => api_get_path(WEB_CODE_PATH) . 'admin/teacher_time_report.php',
236
+        'url' => api_get_path(WEB_CODE_PATH).'admin/teacher_time_report.php',
237 237
         'label' => get_lang('TeacherTimeReport')
238 238
     );
239 239
 
240 240
     if (api_get_configuration_value('chamilo_cms')) {
241 241
         $items[] = array(
242
-            'url' => api_get_path(WEB_PATH) . 'web/app_dev.php/administration/dashboard',
242
+            'url' => api_get_path(WEB_PATH).'web/app_dev.php/administration/dashboard',
243 243
             'label' => get_lang('CMS')
244 244
         );
245 245
     }
@@ -289,7 +289,7 @@  discard block
 block discarded – undo
289 289
                     <div class="form-group">
290 290
                         <input class="form-control" type="text" name="keyword" value="">
291 291
                         <button class="btn btn-default" type="submit">
292
-                            <em class="fa fa-search"></em> ' . get_lang('Search') . '
292
+                            <em class="fa fa-search"></em> ' . get_lang('Search').'
293 293
                         </button>
294 294
                     </div>
295 295
                 </form>';
@@ -317,7 +317,7 @@  discard block
 block discarded – undo
317 317
 
318 318
 if (api_is_platform_admin()) {
319 319
     // option only visible in development mode. Enable through code if required
320
-    if (is_dir(api_get_path(SYS_TEST_PATH) . 'datafiller/')) {
320
+    if (is_dir(api_get_path(SYS_TEST_PATH).'datafiller/')) {
321 321
         $items[] = array('url' => 'user_move_stats.php', 'label' => get_lang('MoveUserStats'));
322 322
     }
323 323
     $items[] = array('url' => 'career_dashboard.php', 'label' => get_lang('CareersAndPromotions'));
@@ -344,7 +344,7 @@  discard block
 block discarded – undo
344 344
     $items = array();
345 345
     $items[] = array('url' => 'special_exports.php', 'label' => get_lang('SpecialExports'));
346 346
     $items[] = array('url' => 'system_status.php', 'label' => get_lang('SystemStatus'));
347
-    if (is_dir(api_get_path(SYS_TEST_PATH) . 'datafiller/')) {
347
+    if (is_dir(api_get_path(SYS_TEST_PATH).'datafiller/')) {
348 348
         $items[] = array('url' => 'filler.php', 'label' => get_lang('DataFiller'));
349 349
     }
350 350
 
@@ -386,15 +386,15 @@  discard block
 block discarded – undo
386 386
         $items[] = array('url' => 'skills_wheel.php', 'label' => get_lang('SkillsWheel'));
387 387
         $items[] = array('url' => 'skills_import.php', 'label' => get_lang('SkillsImport'));
388 388
         $items[] = array('url' => 'skill_list.php', 'label' => get_lang('ManageSkills'));
389
-        $items[] = array('url'=>'skill.php',   'label' => get_lang('ManageSkillsLevels'));
389
+        $items[] = array('url'=>'skill.php', 'label' => get_lang('ManageSkillsLevels'));
390 390
         //$items[] = array('url'=>'skills_profile.php',   'label' => get_lang('SkillsProfile'));
391 391
         $items[] = array(
392
-            'url' => api_get_path(WEB_CODE_PATH) . 'social/skills_ranking.php',
392
+            'url' => api_get_path(WEB_CODE_PATH).'social/skills_ranking.php',
393 393
             'label' => get_lang('SkillsRanking')
394 394
         );
395 395
         $items[] = array('url' => 'skills_gradebook.php', 'label' => get_lang('SkillsAndGradebooks'));
396 396
         $items[] = array(
397
-            'url' => api_get_path(WEB_CODE_PATH) . 'admin/skill_badge.php',
397
+            'url' => api_get_path(WEB_CODE_PATH).'admin/skill_badge.php',
398 398
             'label' => get_lang('Badges')
399 399
         );
400 400
         $blocks['skills']['items'] = $items;
@@ -447,7 +447,7 @@  discard block
 block discarded – undo
447 447
         }
448 448
     }
449 449
 }
450
-$admin_ajax_url = api_get_path(WEB_AJAX_PATH) . 'admin.ajax.php';
450
+$admin_ajax_url = api_get_path(WEB_AJAX_PATH).'admin.ajax.php';
451 451
 
452 452
 $tpl = new Template();
453 453
 
@@ -500,7 +500,7 @@  discard block
 block discarded – undo
500 500
                 die;
501 501
             }
502 502
 
503
-            $fullFilePath = $adminExtraContentDir . $extraData['block'];
503
+            $fullFilePath = $adminExtraContentDir.$extraData['block'];
504 504
             $fullFilePath .= "_extra.html";
505 505
 
506 506
             file_put_contents($fullFilePath, $extraData['extra_content']);
Please login to merge, or discard this patch.
main/admin/user_list.php 1 patch
Spacing   +44 added lines, -44 removed lines patch added patch discarded remove patch
@@ -107,10 +107,10 @@  discard block
 block discarded – undo
107 107
 function display_advanced_search_form () {
108 108
     if ($("#advanced_search_form").css("display") == "none") {
109 109
         $("#advanced_search_form").css("display","block");
110
-        $("#img_plus_and_minus").html(\'&nbsp;'.Display::return_icon('div_hide.gif',get_lang('Hide'),array('style'=>'vertical-align:middle')).'&nbsp;'.get_lang('AdvancedSearch').'\');
110
+        $("#img_plus_and_minus").html(\'&nbsp;'.Display::return_icon('div_hide.gif', get_lang('Hide'), array('style'=>'vertical-align:middle')).'&nbsp;'.get_lang('AdvancedSearch').'\');
111 111
     } else {
112 112
         $("#advanced_search_form").css("display","none");
113
-        $("#img_plus_and_minus").html(\'&nbsp;'.Display::return_icon('div_show.gif',get_lang('Show'),array('style'=>'vertical-align:middle')).'&nbsp;'.get_lang('AdvancedSearch').'\');
113
+        $("#img_plus_and_minus").html(\'&nbsp;'.Display::return_icon('div_show.gif', get_lang('Show'), array('style'=>'vertical-align:middle')).'&nbsp;'.get_lang('AdvancedSearch').'\');
114 114
     }
115 115
 }
116 116
 
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
     // adding the filter to see the user's only of the current access_url
189 189
     if ((api_is_platform_admin() || api_is_session_admin()) && api_get_multiple_access_url()) {
190 190
         $access_url_rel_user_table = Database :: get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER);
191
-        $sql.= " INNER JOIN $access_url_rel_user_table url_rel_user ON (u.id=url_rel_user.user_id)";
191
+        $sql .= " INNER JOIN $access_url_rel_user_table url_rel_user ON (u.id=url_rel_user.user_id)";
192 192
     }
193 193
 
194 194
     $keywordList = array(
@@ -219,11 +219,11 @@  discard block
 block discarded – undo
219 219
     if (isset($keyword_extra_data) && !empty($keyword_extra_data)) {
220 220
         $extra_info = UserManager::get_extra_field_information_by_name($keyword_extra_data);
221 221
         $field_id = $extra_info['id'];
222
-        $sql.= " INNER JOIN user_field_values ufv ON u.id=ufv.user_id AND ufv.field_id=$field_id ";
222
+        $sql .= " INNER JOIN user_field_values ufv ON u.id=ufv.user_id AND ufv.field_id=$field_id ";
223 223
     }
224 224
 
225 225
     if (isset($_GET['keyword']) && !empty($_GET['keyword'])) {
226
-        $keywordFiltered = Database::escape_string("%". $_GET['keyword'] ."%");
226
+        $keywordFiltered = Database::escape_string("%".$_GET['keyword']."%");
227 227
         $sql .= " WHERE (
228 228
                     u.firstname LIKE '$keywordFiltered' OR
229 229
                     u.lastname LIKE '$keywordFiltered' OR
@@ -254,7 +254,7 @@  discard block
 block discarded – undo
254 254
 
255 255
         $sql .= " $query_admin_table
256 256
                 WHERE (
257
-                    u.firstname LIKE '". Database::escape_string("%".$keywordListValues['keyword_firstname']."%")."' AND
257
+                    u.firstname LIKE '".Database::escape_string("%".$keywordListValues['keyword_firstname']."%")."' AND
258 258
                     u.lastname LIKE '". Database::escape_string("%".$keywordListValues['keyword_lastname']."%")."' AND
259 259
                     u.username LIKE '". Database::escape_string("%".$keywordListValues['keyword_username']."%")."' AND
260 260
                     u.email LIKE '". Database::escape_string("%".$keywordListValues['keyword_email']."%")."' AND
@@ -309,7 +309,7 @@  discard block
 block discarded – undo
309 309
     $lastname = $userInfo['lastname'];
310 310
 
311 311
 	if (api_is_western_name_order()) {
312
-		$message = sprintf(get_lang('AttemptingToLoginAs'),$firstname, $lastname, $userId);
312
+		$message = sprintf(get_lang('AttemptingToLoginAs'), $firstname, $lastname, $userId);
313 313
 	} else {
314 314
 		$message = sprintf(get_lang('AttemptingToLoginAs'), $lastname, $firstname, $userId);
315 315
 	}
@@ -343,7 +343,7 @@  discard block
 block discarded – undo
343 343
         Session::write('login_as', true);
344 344
 
345 345
         $target_url = api_get_path(WEB_PATH)."user_portal.php";
346
-        $message .= '<br />'.sprintf(get_lang('LoginSuccessfulGoToX'),'<a href="'.$target_url.'">'.$target_url.'</a>');
346
+        $message .= '<br />'.sprintf(get_lang('LoginSuccessfulGoToX'), '<a href="'.$target_url.'">'.$target_url.'</a>');
347 347
         Display :: display_header(get_lang('UserList'));
348 348
         Display :: display_normal_message($message, false);
349 349
         Display :: display_footer();
@@ -387,11 +387,11 @@  discard block
 block discarded – undo
387 387
         $sql .= "AND password LIKE '$easyPassword' ";
388 388
     }*/
389 389
 
390
-    if (!in_array($direction, array('ASC','DESC'))) {
390
+    if (!in_array($direction, array('ASC', 'DESC'))) {
391 391
     	$direction = 'ASC';
392 392
     }
393 393
     $column = intval($column);
394
-    $from 	= intval($from);
394
+    $from = intval($from);
395 395
     $number_of_items = intval($number_of_items);
396 396
 
397 397
     $preventSessionAdminsToManageAllUsers = api_get_setting('prevent_session_admins_to_manage_all_users');
@@ -404,7 +404,7 @@  discard block
 block discarded – undo
404 404
 
405 405
 	$res = Database::query($sql);
406 406
 
407
-	$users = array ();
407
+	$users = array();
408 408
     $t = time();
409 409
 	while ($user = Database::fetch_row($res)) {
410 410
 		$userPicture = UserManager::getUserPicture($user[0], USER_IMAGE_SIZE_SMALL);
@@ -465,13 +465,13 @@  discard block
 block discarded – undo
465 465
  */
466 466
 function modify_filter($user_id, $url_params, $row) {
467 467
 	global $charset, $_admins_list;
468
-	$is_admin   = in_array($user_id,$_admins_list);
468
+	$is_admin   = in_array($user_id, $_admins_list);
469 469
 	$statusname = api_get_status_langvars();
470 470
 	$user_is_anonymous = false;
471 471
     $current_user_status_label = $row['7'];
472 472
 
473 473
 	if ($current_user_status_label == $statusname[ANONYMOUS]) {
474
-		$user_is_anonymous =true;
474
+		$user_is_anonymous = true;
475 475
 	}
476 476
 	$result = '';
477 477
 	if (!$user_is_anonymous) {
@@ -487,8 +487,8 @@  discard block
 block discarded – undo
487 487
 					<div class="blackboard_hide" id="div_s_'.$user_id.'">&nbsp;&nbsp;</div>
488 488
 					</a>';
489 489
 	} else {
490
-		$result .= Display::return_icon('course_na.png',get_lang('Courses')).'&nbsp;&nbsp;';
491
-		$result .= Display::return_icon('course_na.png',get_lang('Sessions')).'&nbsp;&nbsp;';
490
+		$result .= Display::return_icon('course_na.png', get_lang('Courses')).'&nbsp;&nbsp;';
491
+		$result .= Display::return_icon('course_na.png', get_lang('Sessions')).'&nbsp;&nbsp;';
492 492
 	}
493 493
 
494 494
 	if (api_is_platform_admin()) {
@@ -524,7 +524,7 @@  discard block
 block discarded – undo
524 524
         $editProfileUrl = Display::getProfileEditionLink($user_id, true);
525 525
 
526 526
         if (!$user_is_anonymous && api_global_admin_can_edit_admin($user_id, null, true)) {
527
-            $result .= '<a href="' . $editProfileUrl . '">'.Display::return_icon('edit.png', get_lang('Edit'), array(), ICON_SIZE_SMALL).'</a>&nbsp;';
527
+            $result .= '<a href="'.$editProfileUrl.'">'.Display::return_icon('edit.png', get_lang('Edit'), array(), ICON_SIZE_SMALL).'</a>&nbsp;';
528 528
 		} else {
529 529
             $result .= Display::return_icon('edit_na.png', get_lang('Edit'), array(), ICON_SIZE_SMALL).'</a>&nbsp;';
530 530
 		}
@@ -535,12 +535,12 @@  discard block
 block discarded – undo
535 535
     if ($allowAssignSkill) {
536 536
         $result .= Display::url(
537 537
             Display::return_icon('skill-badges.png', get_lang('AssignSkill'), null, ICON_SIZE_SMALL),
538
-            api_get_path(WEB_CODE_PATH) . 'badge/assign.php?' . http_build_query(['user' => $user_id])
538
+            api_get_path(WEB_CODE_PATH).'badge/assign.php?'.http_build_query(['user' => $user_id])
539 539
         );
540 540
     }
541 541
 
542 542
 	if ($is_admin) {
543
-		$result .= Display::return_icon('admin_star.png', get_lang('IsAdministrator'),array('width'=> ICON_SIZE_SMALL, 'heigth'=> ICON_SIZE_SMALL));
543
+		$result .= Display::return_icon('admin_star.png', get_lang('IsAdministrator'), array('width'=> ICON_SIZE_SMALL, 'heigth'=> ICON_SIZE_SMALL));
544 544
 	} else {
545 545
 		$result .= Display::return_icon('admin_star_na.png', get_lang('IsNotAdministrator'));
546 546
 	}
@@ -592,7 +592,7 @@  discard block
 block discarded – undo
592 592
                 api_global_admin_can_edit_admin($user_id)
593 593
             ) {
594 594
                 // you cannot lock yourself out otherwise you could disable all the accounts including your own => everybody is locked out and nobody can change it anymore.
595
-                $result .= ' <a href="user_list.php?action=delete_user&user_id='.$user_id.'&'.$url_params.'&sec_token='.$_SESSION['sec_token'].'"  onclick="javascript:if(!confirm('."'".addslashes(api_htmlentities(get_lang("ConfirmYourChoice"),ENT_QUOTES,$charset))."'".')) return false;">'.Display::return_icon('delete.png', get_lang('Delete'), array(), ICON_SIZE_SMALL).'</a>';
595
+                $result .= ' <a href="user_list.php?action=delete_user&user_id='.$user_id.'&'.$url_params.'&sec_token='.$_SESSION['sec_token'].'"  onclick="javascript:if(!confirm('."'".addslashes(api_htmlentities(get_lang("ConfirmYourChoice"), ENT_QUOTES, $charset))."'".')) return false;">'.Display::return_icon('delete.png', get_lang('Delete'), array(), ICON_SIZE_SMALL).'</a>';
596 596
             } else {
597 597
                 $result .= Display::return_icon('delete_na.png', get_lang('Delete'), array(), ICON_SIZE_SMALL);
598 598
             }
@@ -630,7 +630,7 @@  discard block
 block discarded – undo
630 630
 
631 631
     if ($action == 'edit') {
632 632
         $result = Display::return_icon($image.'.png', get_lang('AccountExpired'), array(), 16);
633
-    } elseif ($row['0']<>$_user['user_id']) {
633
+    } elseif ($row['0'] <> $_user['user_id']) {
634 634
     	// you cannot lock yourself out otherwise you could disable all the accounts including your own => everybody is locked out and nobody can change it anymore.
635 635
 		$result = Display::return_icon($image.'.png', get_lang(ucfirst($action)), array('onclick'=>'active_user(this);', 'id'=>'img_'.$row['0']), 16).'</a>';
636 636
 	}
@@ -652,11 +652,11 @@  discard block
 block discarded – undo
652 652
 }
653 653
 
654 654
 if (isset($_GET['keyword']) || isset($_GET['keyword_firstname'])) {
655
-    $interbreadcrumb[] = array ("url" => 'index.php', "name" => get_lang('PlatformAdmin'));
656
-    $interbreadcrumb[] = array ("url" => 'user_list.php', "name" => get_lang('UserList'));
655
+    $interbreadcrumb[] = array("url" => 'index.php', "name" => get_lang('PlatformAdmin'));
656
+    $interbreadcrumb[] = array("url" => 'user_list.php', "name" => get_lang('UserList'));
657 657
     $tool_name = get_lang('SearchUsers');
658 658
 } else {
659
-    $interbreadcrumb[] = array ("url" => 'index.php', "name" => get_lang('PlatformAdmin'));
659
+    $interbreadcrumb[] = array("url" => 'index.php', "name" => get_lang('PlatformAdmin'));
660 660
     $tool_name = get_lang('UserList');
661 661
 }
662 662
 
@@ -669,10 +669,10 @@  discard block
 block discarded – undo
669 669
             case 'add_user_to_my_url':
670 670
                 $user_id = $_REQUEST["user_id"];
671 671
                 $result = UrlManager::add_user_to_url($user_id, $current_access_url_id);
672
-                if ($result ) {
672
+                if ($result) {
673 673
                     $user_info = api_get_user_info($user_id);
674 674
                     $message = get_lang('UserAdded').' '.$user_info['firstname'].' '.$user_info['lastname'].' ('.$user_info['username'].')';
675
-                    $message  = Display::return_message($message, 'confirmation');
675
+                    $message = Display::return_message($message, 'confirmation');
676 676
                 }
677 677
                 break;
678 678
 			case 'delete_user':
@@ -687,7 +687,7 @@  discard block
 block discarded – undo
687 687
 							$message = Display :: return_message(get_lang('CannotDeleteUserBecauseOwnsCourse'), 'error');
688 688
 						}
689 689
 					} else {
690
-						$message = Display :: return_message(get_lang('CannotDeleteUser'),'error');
690
+						$message = Display :: return_message(get_lang('CannotDeleteUser'), 'error');
691 691
 					}
692 692
 				}
693 693
 				break;
@@ -731,17 +731,17 @@  discard block
 block discarded – undo
731 731
     </a>'
732 732
 );
733 733
 
734
-$actions  = '';
734
+$actions = '';
735 735
 if (api_is_platform_admin()) {
736 736
 	$actions .= '<div style="float:right;">'.
737 737
 		 '<a href="'.api_get_path(WEB_CODE_PATH).'admin/user_add.php">'.
738
-         Display::return_icon('new_user.png',get_lang('AddUsers'),'',ICON_SIZE_MEDIUM).'</a>'.
738
+         Display::return_icon('new_user.png', get_lang('AddUsers'), '', ICON_SIZE_MEDIUM).'</a>'.
739 739
 		 '</div>';
740 740
 }
741 741
 $actions .= $form->return_form();
742 742
 
743 743
 if (isset ($_GET['keyword'])) {
744
-	$parameters = array ('keyword' => Security::remove_XSS($_GET['keyword']));
744
+	$parameters = array('keyword' => Security::remove_XSS($_GET['keyword']));
745 745
 } elseif (isset ($_GET['keyword_firstname'])) {
746 746
 	$parameters['keyword_firstname'] 	= Security::remove_XSS($_GET['keyword_firstname']);
747 747
 	$parameters['keyword_lastname']	 	= Security::remove_XSS($_GET['keyword_lastname']);
@@ -750,7 +750,7 @@  discard block
 block discarded – undo
750 750
 	$parameters['keyword_officialcode'] = Security::remove_XSS($_GET['keyword_officialcode']);
751 751
 	$parameters['keyword_status'] 		= Security::remove_XSS($_GET['keyword_status']);
752 752
 	$parameters['keyword_active'] 		= Security::remove_XSS($_GET['keyword_active']);
753
-	$parameters['keyword_inactive'] 	= Security::remove_XSS($_GET['keyword_inactive']);
753
+	$parameters['keyword_inactive'] = Security::remove_XSS($_GET['keyword_inactive']);
754 754
 }
755 755
 // Create a sortable table with user-data
756 756
 $parameters['sec_token'] = Security::get_token();
@@ -767,15 +767,15 @@  discard block
 block discarded – undo
767 767
 // Display Advanced search form.
768 768
 $form = new FormValidator('advanced_search', 'get', '', '', array(), FormValidator::LAYOUT_HORIZONTAL);
769 769
 
770
-$form->addElement('html','<div id="advanced_search_form" style="display:none;">');
770
+$form->addElement('html', '<div id="advanced_search_form" style="display:none;">');
771 771
 $form->addElement('header', get_lang('AdvancedSearch'));
772
-$form->addText('keyword_firstname',get_lang('FirstName'),false);
773
-$form->addText('keyword_lastname',get_lang('LastName'),false);
772
+$form->addText('keyword_firstname', get_lang('FirstName'), false);
773
+$form->addText('keyword_lastname', get_lang('LastName'), false);
774 774
 
775
-$form->addText('keyword_username',get_lang('LoginName'),false);
776
-$form->addText('keyword_email',get_lang('Email'),false);
775
+$form->addText('keyword_username', get_lang('LoginName'), false);
776
+$form->addText('keyword_email', get_lang('Email'), false);
777 777
 
778
-$form->addText('keyword_officialcode',get_lang('OfficialCode'),false);
778
+$form->addText('keyword_officialcode', get_lang('OfficialCode'), false);
779 779
 
780 780
 $status_options = array();
781 781
 $status_options['%'] = get_lang('All');
@@ -785,12 +785,12 @@  discard block
 block discarded – undo
785 785
 $status_options[SESSIONADMIN] = get_lang('SessionsAdmin');
786 786
 $status_options[PLATFORM_ADMIN] = get_lang('Administrator');
787 787
 
788
-$form->addElement('select','keyword_status',get_lang('Profile'), $status_options    );
788
+$form->addElement('select', 'keyword_status', get_lang('Profile'), $status_options);
789 789
 
790 790
 $active_group = array();
791
-$active_group[] = $form->createElement('checkbox','keyword_active','', get_lang('Active'));
792
-$active_group[] = $form->createElement('checkbox','keyword_inactive','', get_lang('Inactive'));
793
-$form->addGroup($active_group,'',get_lang('ActiveAccount'), '<br/>',false);
791
+$active_group[] = $form->createElement('checkbox', 'keyword_active', '', get_lang('Active'));
792
+$active_group[] = $form->createElement('checkbox', 'keyword_inactive', '', get_lang('Inactive'));
793
+$form->addGroup($active_group, '', get_lang('ActiveAccount'), '<br/>', false);
794 794
 
795 795
 $form->addElement('checkbox', 'check_easy_passwords', null, get_lang('CheckEasyPasswords'));
796 796
 
@@ -801,7 +801,7 @@  discard block
 block discarded – undo
801 801
 $defaults['keyword_active'] = 1;
802 802
 $defaults['keyword_inactive'] = 1;
803 803
 $form->setDefaults($defaults);
804
-$form->addElement('html','</div>');
804
+$form->addElement('html', '</div>');
805 805
 
806 806
 $form = $form->returnForm();
807 807
 
@@ -883,10 +883,10 @@  discard block
 block discarded – undo
883 883
                 }
884 884
                 if ($add_user) {
885 885
                     $row_table = array();
886
-                    $row_table[] =  api_get_person_name($user['firstname'], $user['lastname']).' ('.$user['username'].') ';
887
-                    $row_table[] =  $access_info_to_string;
886
+                    $row_table[] = api_get_person_name($user['firstname'], $user['lastname']).' ('.$user['username'].') ';
887
+                    $row_table[] = $access_info_to_string;
888 888
                     $url = api_get_self().'?action=add_user_to_my_url&user_id='.$user['id'].'&sec_token='.$_SESSION['sec_token'];
889
-                    $row_table[] =  Display::url(get_lang('AddUserToMyURL'), $url, array('class' => 'btn'));
889
+                    $row_table[] = Display::url(get_lang('AddUserToMyURL'), $url, array('class' => 'btn'));
890 890
 
891 891
                     foreach ($row_table as $cell) {
892 892
                         $table->setCellContents($row, $column, $cell);
Please login to merge, or discard this patch.