Completed
Push — 1.11.x ( 7ffd51...902ebd )
by José
50:21 queued 21:28
created
main/work/work.lib.php 4 patches
Doc Comments   +14 added lines, -12 removed lines patch added patch discarded remove patch
@@ -729,7 +729,7 @@  discard block
 block discarded – undo
729 729
  * @author Bert Vanderkimpen
730 730
  * @author Yannick Warnier <[email protected]> Adaptation for work tool
731 731
  * @param  string $base_work_dir Base work dir (.../work)
732
- * @param  string $desiredDirName complete path of the desired name
732
+ * @param  string $desired_dir_name complete path of the desired name
733 733
  *
734 734
  * @return  string actual directory name if it succeeds, boolean false otherwise
735 735
  */
@@ -751,7 +751,7 @@  discard block
 block discarded – undo
751 751
 /**
752 752
  * Delete a work-tool directory
753 753
  * @param   int  $id work directory id to delete
754
- * @return  integer -1 on error
754
+ * @return  boolean|null -1 on error
755 755
  */
756 756
 function deleteDirWork($id)
757 757
 {
@@ -955,7 +955,7 @@  discard block
 block discarded – undo
955 955
  * Update the url of a dir in the student_publication table
956 956
  * @param  array $work_data work original data
957 957
  * @param  string $newPath Example: "folder1"
958
- * @return bool
958
+ * @return boolean|null
959 959
  */
960 960
 function updateDirName($work_data, $newPath)
961 961
 {
@@ -1014,6 +1014,7 @@  discard block
 block discarded – undo
1014 1014
 /**
1015 1015
  * Transform an all directory structure (only directories) in an array
1016 1016
  * @param   string path of the directory
1017
+ * @param string $directory
1017 1018
  * @return  array the directory structure into an array
1018 1019
  * @author  Julio Montoya
1019 1020
  * @version April 2008
@@ -1087,7 +1088,7 @@  discard block
 block discarded – undo
1087 1088
  * @param   string the path of the directory
1088 1089
  * @param   boolean true if we want the total quantity of files
1089 1090
  * include in others child directories, false only  files in the directory
1090
- * @return  array the first element is an integer with the number of files
1091
+ * @return  integer[] the first element is an integer with the number of files
1091 1092
  * in the folder, the second element is the number of directories
1092 1093
  * @author  Julio Montoya
1093 1094
  * @version April 2008
@@ -2898,7 +2899,7 @@  discard block
 block discarded – undo
2898 2899
  * @param int $userId
2899 2900
  * @param int $workId
2900 2901
  * @param int $courseId
2901
- * @return bool
2902
+ * @return boolean|null
2902 2903
  */
2903 2904
 function allowOnlySubscribedUser($userId, $workId, $courseId)
2904 2905
 {
@@ -3175,6 +3176,7 @@  discard block
 block discarded – undo
3175 3176
  * @param array $parentInfo
3176 3177
  * @param array $courseInfo
3177 3178
  * @param int $sessionId
3179
+ * @param integer $userId
3178 3180
  * @return int
3179 3181
  */
3180 3182
 function getLastWorkStudentFromParentByUser(
@@ -3326,7 +3328,7 @@  discard block
 block discarded – undo
3326 3328
  * @param array $parentWork
3327 3329
  * @param array $work
3328 3330
  * @param array $data
3329
- * @return int
3331
+ * @return false|null
3330 3332
  */
3331 3333
 function addWorkComment($courseInfo, $userId, $parentWork, $work, $data)
3332 3334
 {
@@ -4616,7 +4618,7 @@  discard block
 block discarded – undo
4616 4618
 }
4617 4619
 
4618 4620
 /**
4619
- * @return array
4621
+ * @return string[]
4620 4622
  */
4621 4623
 function getUploadDocumentType()
4622 4624
 {
@@ -5004,7 +5006,7 @@  discard block
 block discarded – undo
5004 5006
  * @param int Session ID
5005 5007
  * @param $correction
5006 5008
  *
5007
- * @return array|bool
5009
+ * @return boolean
5008 5010
  */
5009 5011
 function getFileContents($id, $course_info, $sessionId = 0, $correction = false)
5010 5012
 {
@@ -5133,7 +5135,7 @@  discard block
 block discarded – undo
5133 5135
  * @param int $userId
5134 5136
  * @param array $courseInfo
5135 5137
  * @param string $format
5136
- * @return bool
5138
+ * @return false|null
5137 5139
  */
5138 5140
 function exportAllWork($userId, $courseInfo, $format = 'pdf')
5139 5141
 {
@@ -5179,7 +5181,7 @@  discard block
 block discarded – undo
5179 5181
  * @param array $courseInfo
5180 5182
  * @param int $sessionId
5181 5183
  * @param string $format
5182
- * @return bool
5184
+ * @return false|null
5183 5185
  */
5184 5186
 function exportAllStudentWorkFromPublication(
5185 5187
     $workId,
@@ -5313,7 +5315,7 @@  discard block
 block discarded – undo
5313 5315
  * Downloads all user files per user
5314 5316
  * @param int $userId
5315 5317
  * @param array $courseInfo
5316
- * @return bool
5318
+ * @return false|null
5317 5319
  */
5318 5320
 function downloadAllFilesPerUser($userId, $courseInfo)
5319 5321
 {
@@ -5428,7 +5430,7 @@  discard block
 block discarded – undo
5428 5430
 /**
5429 5431
  * @param array $courseInfo
5430 5432
  * @param int $workId
5431
- * @return bool
5433
+ * @return boolean|null
5432 5434
  */
5433 5435
 function protectWork($courseInfo, $workId)
5434 5436
 {
Please login to merge, or discard this patch.
Upper-Lower-Casing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -830,11 +830,11 @@  discard block
 block discarded – undo
830 830
             }
831 831
 
832 832
             // Deleting all contents inside the folder
833
-            $sql = "UPDATE $table SET active = 2
833
+            $sql = "update $table SET active = 2
834 834
                     WHERE c_id = $course_id AND filetype = 'folder' AND id = $id";
835 835
             Database::query($sql);
836 836
 
837
-            $sql = "UPDATE $table SET active = 2
837
+            $sql = "update $table SET active = 2
838 838
                     WHERE c_id = $course_id AND parent_id = $id";
839 839
             Database::query($sql);
840 840
 
@@ -941,7 +941,7 @@  discard block
 block discarded – undo
941 941
         $new_url = $new_path.$filename;
942 942
         $new_url = Database::escape_string($new_url);
943 943
 
944
-        $sql = "UPDATE $table SET
944
+        $sql = "update $table SET
945 945
                    url = '$new_url',
946 946
                    parent_id = '$parent_id'
947 947
                 WHERE c_id = $course_id AND id = $id";
@@ -974,7 +974,7 @@  discard block
 block discarded – undo
974 974
 
975 975
     if (!empty($newPath)) {
976 976
         $table = Database::get_course_table(TABLE_STUDENT_PUBLICATION);
977
-        $sql = "UPDATE $table SET
977
+        $sql = "update $table SET
978 978
                     title = '".$originalNewPath."'
979 979
                 WHERE
980 980
                     c_id = $course_id AND
@@ -3366,7 +3366,7 @@  discard block
 block discarded – undo
3366 3366
         Display::addFlash(
3367 3367
             Display::return_message(get_lang('CommentAdded'))
3368 3368
         );
3369
-        $sql = "UPDATE $commentTable SET id = iid WHERE iid = $commentId";
3369
+        $sql = "update $commentTable SET id = iid WHERE iid = $commentId";
3370 3370
         Database::query($sql);
3371 3371
     }
3372 3372
 
@@ -3901,12 +3901,12 @@  discard block
 block discarded – undo
3901 3901
         $workId = Database::insert($work_table, $params);
3902 3902
 
3903 3903
         if ($workId) {
3904
-            $sql = "UPDATE $work_table SET id = iid WHERE iid = $workId ";
3904
+            $sql = "update $work_table SET id = iid WHERE iid = $workId ";
3905 3905
             Database::query($sql);
3906 3906
 
3907 3907
             if (array_key_exists('filename', $workInfo) && !empty($filename)) {
3908 3908
                 $filename = Database::escape_string($filename);
3909
-                $sql = "UPDATE $work_table SET
3909
+                $sql = "update $work_table SET
3910 3910
                             filename = '$filename'
3911 3911
                         WHERE iid = $workId";
3912 3912
                 Database::query($sql);
@@ -3914,7 +3914,7 @@  discard block
 block discarded – undo
3914 3914
 
3915 3915
             if (array_key_exists('document_id', $workInfo)) {
3916 3916
                 $documentId = isset($values['document_id']) ? intval($values['document_id']) : 0;
3917
-                $sql = "UPDATE $work_table SET
3917
+                $sql = "update $work_table SET
3918 3918
                             document_id = '$documentId'
3919 3919
                         WHERE iid = $workId";
3920 3920
                 Database::query($sql);
@@ -4286,19 +4286,19 @@  discard block
 block discarded – undo
4286 4286
         $my_last_id = Database::insert_id();
4287 4287
 
4288 4288
         if ($my_last_id) {
4289
-            $sql = "UPDATE $table SET
4289
+            $sql = "update $table SET
4290 4290
                         id = iid
4291 4291
                     WHERE iid = $my_last_id";
4292 4292
             Database::query($sql);
4293 4293
 
4294
-            $sql = "UPDATE $workTable SET
4294
+            $sql = "update $workTable SET
4295 4295
                         has_properties  = $my_last_id,
4296 4296
                         view_properties = 1
4297 4297
                     WHERE c_id = $course_id AND id = $workId";
4298 4298
             Database::query($sql);
4299 4299
         }
4300 4300
     } else {
4301
-        $sql = "UPDATE $table SET
4301
+        $sql = "update $table SET
4302 4302
                     $expiryDateCondition
4303 4303
                     $endOnCondition
4304 4304
                     add_to_calendar  = $agendaId,
@@ -4461,7 +4461,7 @@  discard block
 block discarded – undo
4461 4461
                 }
4462 4462
             } // end of considered_working_time check section
4463 4463
 
4464
-            $sql = "UPDATE $work_table SET active = 2
4464
+            $sql = "update $work_table SET active = 2
4465 4465
                     WHERE c_id = $course_id AND id = $item_id";
4466 4466
             Database::query($sql);
4467 4467
             $sql = "DELETE FROM $TSTDPUBASG
@@ -4659,7 +4659,7 @@  discard block
 block discarded – undo
4659 4659
         return false;
4660 4660
     }
4661 4661
 
4662
-    $query = "UPDATE $main_course_table
4662
+    $query = "update $main_course_table
4663 4663
               SET show_score = '$showScore'
4664 4664
               WHERE id = $courseId";
4665 4665
     Database::query($query);
@@ -4708,7 +4708,7 @@  discard block
 block discarded – undo
4708 4708
     $course_id = $course_info['real_id'];
4709 4709
     $item_id = intval($item_id);
4710 4710
 
4711
-    $sql = "UPDATE $work_table SET accepted = 1
4711
+    $sql = "update $work_table SET accepted = 1
4712 4712
             WHERE c_id = $course_id AND id = $item_id";
4713 4713
     Database::query($sql);
4714 4714
     api_item_property_update($course_info, 'work', $item_id, 'visible', api_get_user_id());
@@ -5497,7 +5497,7 @@  discard block
 block discarded – undo
5497 5497
     if (isset($work['url_correction']) && !empty($work['url_correction']) && isset($work['iid'])) {
5498 5498
         $id = $work['iid'];
5499 5499
         $table = Database::get_course_table(TABLE_STUDENT_PUBLICATION);
5500
-        $sql = "UPDATE $table SET
5500
+        $sql = "update $table SET
5501 5501
                     url_correction = '',
5502 5502
                     title_correction = ''
5503 5503
                 WHERE iid = $id";
Please login to merge, or discard this patch.
Braces   +24 added lines, -12 removed lines patch added patch discarded remove patch
@@ -442,7 +442,8 @@  discard block
 block discarded – undo
442 442
     $sessionId,
443 443
     $userId = null,
444 444
     $onlyUserList = array()
445
-) {
445
+)
446
+{
446 447
     $work_table = Database::get_course_table(TABLE_STUDENT_PUBLICATION);
447 448
     $user_table = Database::get_main_table(TABLE_MAIN_USER);
448 449
 
@@ -1369,7 +1370,8 @@  discard block
 block discarded – undo
1369 1370
     $direction,
1370 1371
     $where_condition,
1371 1372
     $getCount = false
1372
-) {
1373
+)
1374
+{
1373 1375
     $workTable = Database::get_course_table(TABLE_STUDENT_PUBLICATION);
1374 1376
     $workTableAssignment = Database::get_course_table(TABLE_STUDENT_PUBLICATION_ASSIGNMENT);
1375 1377
     $courseInfo = api_get_course_info();
@@ -1528,7 +1530,8 @@  discard block
 block discarded – undo
1528 1530
     $direction,
1529 1531
     $where_condition,
1530 1532
     $getCount = false
1531
-) {
1533
+)
1534
+{
1532 1535
     $workTable = Database::get_course_table(TABLE_STUDENT_PUBLICATION);
1533 1536
     $workTableAssignment = Database::get_course_table(TABLE_STUDENT_PUBLICATION_ASSIGNMENT);
1534 1537
 
@@ -1715,7 +1718,8 @@  discard block
 block discarded – undo
1715 1718
     $studentId = null,
1716 1719
     $whereCondition = '',
1717 1720
     $getCount = false
1718
-) {
1721
+)
1722
+{
1719 1723
     if ($getCount) {
1720 1724
         $select1 = " SELECT count(u.user_id) as count ";
1721 1725
         $select2 = " SELECT count(u.user_id) as count ";
@@ -1916,7 +1920,8 @@  discard block
 block discarded – undo
1916 1920
     $getCount = false,
1917 1921
     $courseId = 0,
1918 1922
     $sessionId = 0
1919
-) {
1923
+)
1924
+{
1920 1925
     $work_table = Database::get_course_table(TABLE_STUDENT_PUBLICATION);
1921 1926
     $user_table = Database::get_main_table(TABLE_MAIN_USER);
1922 1927
 
@@ -2870,7 +2875,8 @@  discard block
 block discarded – undo
2870 2875
     $groupId = null,
2871 2876
     $sessionId = null,
2872 2877
     $getCount = false
2873
-) {
2878
+)
2879
+{
2874 2880
     $usersInWork = null;
2875 2881
     $usersInCourse = null;
2876 2882
 
@@ -3103,7 +3109,8 @@  discard block
 block discarded – undo
3103 3109
     $parentId,
3104 3110
     $courseInfo = array(),
3105 3111
     $sessionId = 0
3106
-) {
3112
+)
3113
+{
3107 3114
     if (empty($courseInfo)) {
3108 3115
         $courseInfo = api_get_course_info();
3109 3116
     }
@@ -3147,7 +3154,8 @@  discard block
 block discarded – undo
3147 3154
     $parentId,
3148 3155
     $courseInfo = array(),
3149 3156
     $sessionId = 0
3150
-) {
3157
+)
3158
+{
3151 3159
     if (empty($courseInfo)) {
3152 3160
         $courseInfo = api_get_course_info();
3153 3161
     }
@@ -3196,7 +3204,8 @@  discard block
 block discarded – undo
3196 3204
     $parentInfo,
3197 3205
     $courseInfo = array(),
3198 3206
     $sessionId = 0
3199
-) {
3207
+)
3208
+{
3200 3209
     if (empty($courseInfo)) {
3201 3210
         $courseInfo = api_get_course_info();
3202 3211
     }
@@ -3813,7 +3822,8 @@  discard block
 block discarded – undo
3813 3822
     $file = [],
3814 3823
     $checkDuplicated = false,
3815 3824
     $showFlashMessage = true
3816
-) {
3825
+)
3826
+{
3817 3827
     $work_table = Database::get_course_table(TABLE_STUDENT_PUBLICATION);
3818 3828
 
3819 3829
     $courseId = $courseInfo['real_id'];
@@ -4921,7 +4931,8 @@  discard block
 block discarded – undo
4921 4931
     $sidx,
4922 4932
     $sord,
4923 4933
     $getCount = false
4924
-) {
4934
+)
4935
+{
4925 4936
     $my_folder_data = get_work_data_by_id($workId);
4926 4937
     $workParents = array();
4927 4938
     if (empty($my_folder_data)) {
@@ -5202,7 +5213,8 @@  discard block
 block discarded – undo
5202 5213
     $courseInfo,
5203 5214
     $sessionId,
5204 5215
     $format = 'pdf'
5205
-) {
5216
+)
5217
+{
5206 5218
     if (empty($courseInfo)) {
5207 5219
         return false;
5208 5220
     }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3308,7 +3308,7 @@
 block discarded – undo
3308 3308
         $label = 'warning';
3309 3309
     }
3310 3310
 
3311
-    $scoreBasedInModel = ExerciseLib::convertScoreToModel($relativeScore*100);
3311
+    $scoreBasedInModel = ExerciseLib::convertScoreToModel($relativeScore * 100);
3312 3312
     if (empty($scoreBasedInModel)) {
3313 3313
         $finalScore = api_number_format($score, 1).' / '.$weight;
3314 3314
 
Please login to merge, or discard this patch.
main/user/session_list.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -55,13 +55,13 @@  discard block
 block discarded – undo
55 55
     array('name'=>'access_end_date', 'index'=>'access_end_date', 'width'=>'40', 'align'=>'left', 'search' => 'true'),
56 56
     array('name'=>'coach_name', 'index'=>'coach_name', 'width'=>'80', 'align'=>'left', 'search' => 'false'),
57 57
     array('name'=>'status', 'index'=>'session_active', 'width'=>'40', 'align'=>'left', 'search' => 'true', 'stype'=>'select',
58
-      //for the bottom bar
58
+        //for the bottom bar
59 59
         'searchoptions' => array(
60 60
             'defaultValue' => '1',
61 61
             'value' => '1:'.get_lang('Active').';0:'.get_lang('Inactive')
62 62
         ),
63
-      //for the top bar
64
-      'editoptions' => array('value' => ':'.get_lang('All').';1:'.get_lang('Active').';0:'.get_lang('Inactive'))),
63
+        //for the top bar
64
+        'editoptions' => array('value' => ':'.get_lang('All').';1:'.get_lang('Active').';0:'.get_lang('Inactive'))),
65 65
     array('name'=>'visibility', 'index'=>'visibility', 'width'=>'40', 'align'=>'left', 'search' => 'false'),
66 66
     array('name'=>'actions', 'index'=>'actions', 'width'=>'100', 'align'=>'left', 'formatter'=>'action_formatter', 'sortable'=>'false', 'search' => 'false')
67 67
 );
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 //With this function we can add actions to the jgrid (edit, delete, etc)
77 77
 $action_links = 'function action_formatter(cellvalue, options, rowObject) {
78 78
      return \'&nbsp;<a href="add_users_to_session.php?page=session_list.php&id_session=\'+options.rowId+\'">'.Display::return_icon('user_subscribe_session.png', get_lang('SubscribeUsersToSession'), '', ICON_SIZE_SMALL).'</a>'.
79
-     '\';
79
+        '\';
80 80
 }';
81 81
 ?>
82 82
 <script>
Please login to merge, or discard this patch.
src/Chamilo/CourseBundle/Component/CourseCopy/CourseRestorer.php 3 patches
Doc Comments   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1152,7 +1152,7 @@  discard block
 block discarded – undo
1152 1152
     /**
1153 1153
      * Restore a forum-topic
1154 1154
      * @param false|string $forum_id
1155
-     * @return int
1155
+     * @return false|string
1156 1156
      */
1157 1157
     public function restore_topic($thread_id, $forum_id, $sessionId = 0)
1158 1158
     {
@@ -1210,7 +1210,8 @@  discard block
 block discarded – undo
1210 1210
      * Restore a forum-post
1211 1211
      * @TODO Restore tree-structure of posts. For example: attachments to posts.
1212 1212
      * @param false|string $topic_id
1213
-     * @return int
1213
+     * @param false|string $forum_id
1214
+     * @return false|string
1214 1215
      */
1215 1216
     public function restore_post($id, $topic_id, $forum_id, $sessionId = 0)
1216 1217
     {
@@ -3316,7 +3317,7 @@  discard block
 block discarded – undo
3316 3317
     /**
3317 3318
      * Restore gradebook
3318 3319
      * @param int $sessionId
3319
-     * @return  bool
3320
+     * @return  false|null
3320 3321
      */
3321 3322
     public function restore_gradebook($sessionId = 0)
3322 3323
     {
Please login to merge, or discard this patch.
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -25,8 +25,8 @@  discard block
 block discarded – undo
25 25
 class CourseRestorer
26 26
 {
27 27
     /**
28
-    * The course-object
29
-    */
28
+     * The course-object
29
+     */
30 30
     public $course;
31 31
     public $destination_course_info;
32 32
 
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
         'events',
46 46
         'forum_category',
47 47
         'forums',
48
-       // 'forum_topics',
48
+        // 'forum_topics',
49 49
         'glossary',
50 50
         'quizzes',
51 51
         'test_category',
@@ -2864,15 +2864,15 @@  discard block
 block discarded – undo
2864 2864
     }
2865 2865
 
2866 2866
     /**
2867
-    * copy all directory and sub directory
2868
-    * @param string The path origin
2869
-    * @param string The path destination
2870
-    * @param boolean Option Overwrite
2871
-    * @param string $source
2872
-    * @param string $dest
2873
-    * @return void
2874
-    * @deprecated
2875
-    */
2867
+     * copy all directory and sub directory
2868
+     * @param string The path origin
2869
+     * @param string The path destination
2870
+     * @param boolean Option Overwrite
2871
+     * @param string $source
2872
+     * @param string $dest
2873
+     * @return void
2874
+     * @deprecated
2875
+     */
2876 2876
     public function allow_create_all_directory($source, $dest, $overwrite = false)
2877 2877
     {
2878 2878
         if (!is_dir($dest)) {
@@ -2885,7 +2885,7 @@  discard block
 block discarded – undo
2885 2885
                 if ($file != '.' && $file != '..') {
2886 2886
                     $path = $source.'/'.$file;
2887 2887
                     if (is_file($path)) {
2888
-                       /* if (!is_file($dest . '/' . $file) || $overwrite)
2888
+                        /* if (!is_file($dest . '/' . $file) || $overwrite)
2889 2889
                         if (!@copy($path, $dest . '/' . $file)) {
2890 2890
                             echo '<font color="red">File ('.$path.') '.get_lang('NotHavePermission').'</font>';
2891 2891
                         }*/
@@ -3415,7 +3415,7 @@  discard block
 block discarded – undo
3415 3415
                                         break;
3416 3416
                                 }
3417 3417
 
3418
-                                 if ($this->course->has_resources($type) &&
3418
+                                    if ($this->course->has_resources($type) &&
3419 3419
                                     isset($this->course->resources[$type][$itemId])
3420 3420
                                 ) {
3421 3421
                                     $item = $this->course->resources[$type][$itemId];
Please login to merge, or discard this patch.
Upper-Lower-Casing   +47 added lines, -47 removed lines patch added patch discarded remove patch
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
 
235 235
                                 $id = Database::insert($table, $params);
236 236
                                 if ($id) {
237
-                                    $sql = "UPDATE $table SET id = iid WHERE iid = $id";
237
+                                    $sql = "update $table SET id = iid WHERE iid = $id";
238 238
                                     Database::query($sql);
239 239
                                 }
240 240
                             }
@@ -465,7 +465,7 @@  discard block
 block discarded – undo
465 465
                                     $document_id = Database::insert($table, $params);
466 466
 
467 467
                                     if ($document_id) {
468
-                                        $sql = "UPDATE $table SET id = iid WHERE iid = $document_id";
468
+                                        $sql = "update $table SET id = iid WHERE iid = $document_id";
469 469
                                         Database::query($sql);
470 470
                                     }
471 471
                                     $this->course->resources[RESOURCE_DOCUMENT][$id]->destination_id = $document_id;
@@ -692,7 +692,7 @@  discard block
 block discarded – undo
692 692
                                     $document_id = Database::insert($table, $params);
693 693
 
694 694
                                     if ($document_id) {
695
-                                        $sql = "UPDATE $table SET id = iid WHERE iid = $document_id";
695
+                                        $sql = "update $table SET id = iid WHERE iid = $document_id";
696 696
                                         Database::query($sql);
697 697
                                     }
698 698
 
@@ -755,7 +755,7 @@  discard block
 block discarded – undo
755 755
                                     $document_id = Database::insert($table, $params);
756 756
 
757 757
                                     if ($document_id) {
758
-                                        $sql = "UPDATE $table SET id = iid WHERE iid = $document_id";
758
+                                        $sql = "update $table SET id = iid WHERE iid = $document_id";
759 759
                                         Database::query($sql);
760 760
 
761 761
                                         $this->course->resources[RESOURCE_DOCUMENT][$id]->destination_id = $document_id;
@@ -821,7 +821,7 @@  discard block
 block discarded – undo
821 821
                                 $document_id = Database::insert($table, $params);
822 822
 
823 823
                                 if ($document_id) {
824
-                                    $sql = "UPDATE $table SET id = iid WHERE iid = $document_id";
824
+                                    $sql = "update $table SET id = iid WHERE iid = $document_id";
825 825
                                     Database::query($sql);
826 826
                                 }
827 827
 
@@ -898,7 +898,7 @@  discard block
 block discarded – undo
898 898
                         $document_id = Database::insert($table, $params);
899 899
 
900 900
                         if ($document_id) {
901
-                            $sql = "UPDATE $table SET id = iid WHERE iid = $document_id";
901
+                            $sql = "update $table SET id = iid WHERE iid = $document_id";
902 902
                             Database::query($sql);
903 903
                         }
904 904
 
@@ -1095,7 +1095,7 @@  discard block
 block discarded – undo
1095 1095
                 $new_id = Database::insert($table_forum, $params);
1096 1096
 
1097 1097
                 if ($new_id) {
1098
-                    $sql = "UPDATE $table_forum SET forum_id = iid WHERE iid = $new_id";
1098
+                    $sql = "update $table_forum SET forum_id = iid WHERE iid = $new_id";
1099 1099
                     Database::query($sql);
1100 1100
                 }
1101 1101
 
@@ -1151,7 +1151,7 @@  discard block
 block discarded – undo
1151 1151
                     $new_id = Database::insert($forum_cat_table, $params);
1152 1152
 
1153 1153
                     if ($new_id) {
1154
-                        $sql = "UPDATE $forum_cat_table SET cat_id = iid WHERE iid = $new_id";
1154
+                        $sql = "update $forum_cat_table SET cat_id = iid WHERE iid = $new_id";
1155 1155
                         Database::query($sql);
1156 1156
                     }
1157 1157
 
@@ -1192,7 +1192,7 @@  discard block
 block discarded – undo
1192 1192
         $new_id = Database::insert($table, $params);
1193 1193
 
1194 1194
         if ($new_id) {
1195
-            $sql = "UPDATE $table SET thread_id = iid WHERE iid = $new_id";
1195
+            $sql = "update $table SET thread_id = iid WHERE iid = $new_id";
1196 1196
             Database::query($sql);
1197 1197
         }
1198 1198
 
@@ -1250,7 +1250,7 @@  discard block
 block discarded – undo
1250 1250
         $new_id = Database::insert($table_post, $params);
1251 1251
 
1252 1252
         if ($new_id) {
1253
-            $sql = "UPDATE $table_post SET post_id = iid WHERE iid = $new_id";
1253
+            $sql = "update $table_post SET post_id = iid WHERE iid = $new_id";
1254 1254
             Database::query($sql);
1255 1255
         }
1256 1256
 
@@ -1310,7 +1310,7 @@  discard block
 block discarded – undo
1310 1310
                 $id = Database::insert($link_table, $params);
1311 1311
 
1312 1312
                 if ($id) {
1313
-                    $sql = "UPDATE $link_table SET id = iid WHERE iid = $id";
1313
+                    $sql = "update $link_table SET id = iid WHERE iid = $id";
1314 1314
                     Database::query($sql);
1315 1315
 
1316 1316
                     api_item_property_update(
@@ -1362,7 +1362,7 @@  discard block
 block discarded – undo
1362 1362
             $new_id = Database::insert($link_cat_table, $params);
1363 1363
 
1364 1364
             if ($new_id) {
1365
-                $sql = "UPDATE $link_cat_table 
1365
+                $sql = "update $link_cat_table 
1366 1366
                         SET id = iid 
1367 1367
                         WHERE iid = $new_id";
1368 1368
                 Database::query($sql);
@@ -1452,7 +1452,7 @@  discard block
 block discarded – undo
1452 1452
                 $new_event_id = Database::insert($table, $params);
1453 1453
 
1454 1454
                 if ($new_event_id) {
1455
-                    $sql = "UPDATE $table SET id = iid WHERE iid = $new_event_id";
1455
+                    $sql = "update $table SET id = iid WHERE iid = $new_event_id";
1456 1456
                     Database::query($sql);
1457 1457
 
1458 1458
                     if (!isset($this->course->resources[RESOURCE_EVENT][$id])) {
@@ -1495,7 +1495,7 @@  discard block
 block discarded – undo
1495 1495
                             ];
1496 1496
                             $id = Database::insert($table_attachment, $params);
1497 1497
                             if ($id) {
1498
-                                $sql = "UPDATE $table_attachment SET id = iid WHERE iid = $id";
1498
+                                $sql = "update $table_attachment SET id = iid WHERE iid = $id";
1499 1499
                                 Database::query($sql);
1500 1500
                             }
1501 1501
                         }
@@ -1525,7 +1525,7 @@  discard block
 block discarded – undo
1525 1525
                             $id = Database::insert($table_attachment, $params);
1526 1526
 
1527 1527
                             if ($id) {
1528
-                                $sql = "UPDATE $table_attachment SET id = iid WHERE iid = $id";
1528
+                                $sql = "update $table_attachment SET id = iid WHERE iid = $id";
1529 1529
                                 Database::query($sql);
1530 1530
                             }
1531 1531
                         }
@@ -1572,7 +1572,7 @@  discard block
 block discarded – undo
1572 1572
 
1573 1573
                 $id = Database::insert($table, $params);
1574 1574
                 if ($id) {
1575
-                    $sql = "UPDATE $table SET id = iid WHERE iid = $id";
1575
+                    $sql = "update $table SET id = iid WHERE iid = $id";
1576 1576
                     Database::query($sql);
1577 1577
 
1578 1578
                     if (!isset($this->course->resources[RESOURCE_COURSEDESCRIPTION][$id])) {
@@ -1617,7 +1617,7 @@  discard block
 block discarded – undo
1617 1617
                 $new_announcement_id = Database::insert($table, $params);
1618 1618
 
1619 1619
                 if ($new_announcement_id) {
1620
-                    $sql = "UPDATE $table SET id = iid WHERE iid = $new_announcement_id";
1620
+                    $sql = "update $table SET id = iid WHERE iid = $new_announcement_id";
1621 1621
                     Database::query($sql);
1622 1622
 
1623 1623
                     if (!isset($this->course->resources[RESOURCE_ANNOUNCEMENT][$id])) {
@@ -1665,7 +1665,7 @@  discard block
 block discarded – undo
1665 1665
                             $attachmentId = Database::insert($table_attachment, $params);
1666 1666
 
1667 1667
                             if ($attachmentId) {
1668
-                                $sql = "UPDATE $table_attachment SET id = iid WHERE iid = $attachmentId";
1668
+                                $sql = "update $table_attachment SET id = iid WHERE iid = $attachmentId";
1669 1669
                                 Database::query($sql);
1670 1670
                             }
1671 1671
                         }
@@ -1694,7 +1694,7 @@  discard block
 block discarded – undo
1694 1694
                             $attachmentId = Database::insert($table_attachment, $params);
1695 1695
 
1696 1696
                             if ($attachmentId) {
1697
-                                $sql = "UPDATE $table_attachment SET id = iid WHERE iid = $attachmentId";
1697
+                                $sql = "update $table_attachment SET id = iid WHERE iid = $attachmentId";
1698 1698
                                 Database::query($sql);
1699 1699
                             }
1700 1700
                         }
@@ -1804,7 +1804,7 @@  discard block
 block discarded – undo
1804 1804
                     $new_id = Database::insert($table_qui, $params);
1805 1805
 
1806 1806
                     if ($new_id) {
1807
-                        $sql = "UPDATE $table_qui SET id = iid WHERE iid = $new_id";
1807
+                        $sql = "update $table_qui SET id = iid WHERE iid = $new_id";
1808 1808
                         Database::query($sql);
1809 1809
                     }
1810 1810
 
@@ -1889,7 +1889,7 @@  discard block
 block discarded – undo
1889 1889
             $new_id = Database::insert($table_que, $params);
1890 1890
 
1891 1891
             if ($new_id) {
1892
-                $sql = "UPDATE $table_que SET id = iid WHERE iid = $new_id";
1892
+                $sql = "update $table_que SET id = iid WHERE iid = $new_id";
1893 1893
                 Database::query($sql);
1894 1894
             }
1895 1895
 
@@ -1991,7 +1991,7 @@  discard block
 block discarded – undo
1991 1991
                     $answerId = Database::insert($table_ans, $params);
1992 1992
 
1993 1993
                     if ($answerId) {
1994
-                        $sql = "UPDATE $table_ans SET id = iid, id_auto = iid WHERE iid = $answerId";
1994
+                        $sql = "update $table_ans SET id = iid, id_auto = iid WHERE iid = $answerId";
1995 1995
                         Database::query($sql);
1996 1996
                     }
1997 1997
 
@@ -2021,7 +2021,7 @@  discard block
 block discarded – undo
2021 2021
                         $question_option_id = Database::insert($table_options, $item);
2022 2022
                         if ($question_option_id) {
2023 2023
                             $old_option_ids[$old_id] = $question_option_id;
2024
-                            $sql = "UPDATE $table_options SET id = iid WHERE iid = $question_option_id";
2024
+                            $sql = "update $table_options SET id = iid WHERE iid = $question_option_id";
2025 2025
                             Database::query($sql);
2026 2026
                         }
2027 2027
                     }
@@ -2069,7 +2069,7 @@  discard block
 block discarded – undo
2069 2069
 
2070 2070
                             if ($question_option_id) {
2071 2071
                                 $new_options[$obj->obj->id] = $question_option_id;
2072
-                                $sql = "UPDATE $table_options SET id = iid WHERE iid = $question_option_id";
2072
+                                $sql = "update $table_options SET id = iid WHERE iid = $question_option_id";
2073 2073
                                 Database::query($sql);
2074 2074
                             }
2075 2075
                         }
@@ -2299,16 +2299,16 @@  discard block
 block discarded – undo
2299 2299
                             $params['code'] = $survey_code;
2300 2300
                             $new_id = Database::insert($table_sur, $params);
2301 2301
                             if ($new_id) {
2302
-                                $sql = "UPDATE $table_sur SET survey_id = iid WHERE iid = $new_id";
2302
+                                $sql = "update $table_sur SET survey_id = iid WHERE iid = $new_id";
2303 2303
                                 Database::query($sql);
2304 2304
 
2305 2305
                                 $this->course->resources[RESOURCE_SURVEY][$id]->destination_id = $new_id;
2306 2306
                                 foreach ($survey->question_ids as $index => $question_id) {
2307 2307
                                     $qid = $this->restore_survey_question($question_id, $new_id);
2308
-                                    $sql = "UPDATE $table_que SET survey_id = $new_id
2308
+                                    $sql = "update $table_que SET survey_id = $new_id
2309 2309
                                             WHERE c_id = ".$this->destination_course_id." AND question_id = $qid";
2310 2310
                                     Database::query($sql);
2311
-                                    $sql = "UPDATE $table_ans SET survey_id = $new_id
2311
+                                    $sql = "update $table_ans SET survey_id = $new_id
2312 2312
                                             WHERE  c_id = ".$this->destination_course_id." AND  question_id = $qid";
2313 2313
                                     Database::query($sql);
2314 2314
                                 }
@@ -2335,7 +2335,7 @@  discard block
 block discarded – undo
2335 2335
                             $new_id = Database::insert($table_sur, $params);
2336 2336
 
2337 2337
                             if ($new_id) {
2338
-                                $sql = "UPDATE $table_sur SET survey_id = iid WHERE iid = $new_id";
2338
+                                $sql = "update $table_sur SET survey_id = iid WHERE iid = $new_id";
2339 2339
                                 Database::query($sql);
2340 2340
 
2341 2341
                                 $this->course->resources[RESOURCE_SURVEY][$id]->destination_id = $new_id;
@@ -2344,10 +2344,10 @@  discard block
 block discarded – undo
2344 2344
                                         $question_id,
2345 2345
                                         $new_id
2346 2346
                                     );
2347
-                                    $sql = "UPDATE $table_que SET survey_id = $new_id
2347
+                                    $sql = "update $table_que SET survey_id = $new_id
2348 2348
                                             WHERE c_id = ".$this->destination_course_id." AND question_id = $qid";
2349 2349
                                     Database::query($sql);
2350
-                                    $sql = "UPDATE $table_ans SET survey_id = $new_id
2350
+                                    $sql = "update $table_ans SET survey_id = $new_id
2351 2351
                                             WHERE c_id = ".$this->destination_course_id." AND question_id = $qid";
2352 2352
                                     Database::query($sql);
2353 2353
                                 }
@@ -2361,7 +2361,7 @@  discard block
 block discarded – undo
2361 2361
                     $new_id = Database::insert($table_sur, $params);
2362 2362
 
2363 2363
                     if ($new_id) {
2364
-                        $sql = "UPDATE $table_sur SET survey_id = iid WHERE iid = $new_id";
2364
+                        $sql = "update $table_sur SET survey_id = iid WHERE iid = $new_id";
2365 2365
                         Database::query($sql);
2366 2366
 
2367 2367
                         $this->course->resources[RESOURCE_SURVEY][$id]->destination_id = $new_id;
@@ -2370,10 +2370,10 @@  discard block
 block discarded – undo
2370 2370
                                 $question_id,
2371 2371
                                 $new_id
2372 2372
                             );
2373
-                            $sql = "UPDATE $table_que SET survey_id = $new_id
2373
+                            $sql = "update $table_que SET survey_id = $new_id
2374 2374
                                     WHERE c_id = ".$this->destination_course_id." AND question_id = $qid";
2375 2375
                             Database::query($sql);
2376
-                            $sql = "UPDATE $table_ans SET survey_id = $new_id
2376
+                            $sql = "update $table_ans SET survey_id = $new_id
2377 2377
                                     WHERE c_id = ".$this->destination_course_id." AND question_id = $qid";
2378 2378
                             Database::query($sql);
2379 2379
                         }
@@ -2445,7 +2445,7 @@  discard block
 block discarded – undo
2445 2445
             $new_id = Database::insert($table_que, $params);
2446 2446
             if ($new_id) {
2447 2447
 
2448
-                $sql = "UPDATE $table_que SET question_id = iid WHERE iid = $new_id";
2448
+                $sql = "update $table_que SET question_id = iid WHERE iid = $new_id";
2449 2449
                 Database::query($sql);
2450 2450
 
2451 2451
                 foreach ($question->answers as $index => $answer) {
@@ -2468,7 +2468,7 @@  discard block
 block discarded – undo
2468 2468
                     ];
2469 2469
                     $answerId = Database::insert($table_ans, $params);
2470 2470
                     if ($answerId) {
2471
-                        $sql = "UPDATE $table_ans SET question_option_id = iid
2471
+                        $sql = "update $table_ans SET question_option_id = iid
2472 2472
                                 WHERE iid = $answerId";
2473 2473
                         Database::query($sql);
2474 2474
                     }
@@ -2590,7 +2590,7 @@  discard block
 block discarded – undo
2590 2590
                     // The following only makes sense if a new LP was
2591 2591
                     // created in the destination course
2592 2592
 
2593
-                    $sql = "UPDATE $table_main SET id = iid WHERE iid = $new_lp_id";
2593
+                    $sql = "update $table_main SET id = iid WHERE iid = $new_lp_id";
2594 2594
                     Database::query($sql);
2595 2595
 
2596 2596
                     if ($lp->visibility) {
@@ -2606,7 +2606,7 @@  discard block
 block discarded – undo
2606 2606
                         ];
2607 2607
                         $insertId = Database::insert($table_tool, $params);
2608 2608
                         if ($insertId) {
2609
-                            $sql = "UPDATE $table_tool SET id = iid WHERE iid = $insertId";
2609
+                            $sql = "update $table_tool SET id = iid WHERE iid = $insertId";
2610 2610
                             Database::query($sql);
2611 2611
                         }
2612 2612
                     }
@@ -2685,7 +2685,7 @@  discard block
 block discarded – undo
2685 2685
 
2686 2686
                         $new_item_id = Database::insert($table_item, $params);
2687 2687
 
2688
-                        $sql = "UPDATE $table_item SET id = iid WHERE iid = $new_item_id";
2688
+                        $sql = "update $table_item SET id = iid WHERE iid = $new_item_id";
2689 2689
                         Database::query($sql);
2690 2690
 
2691 2691
                         //save a link between old and new item IDs
@@ -2838,7 +2838,7 @@  discard block
 block discarded – undo
2838 2838
                     $sub_folder['session_id'] = $sessionId ? $sessionId : null;
2839 2839
                     $new_item_id = Database::insert($item_property_table, $sub_folder);
2840 2840
                     if ($new_item_id) {
2841
-                        $sql = "UPDATE $item_property_table SET id = iid WHERE iid = $new_item_id";
2841
+                        $sql = "update $item_property_table SET id = iid WHERE iid = $new_item_id";
2842 2842
                         Database::query($sql);
2843 2843
                     }
2844 2844
                 }
@@ -2859,7 +2859,7 @@  discard block
 block discarded – undo
2859 2859
                     $assignmentId = Database::insert($work_assignment_table, $assign);
2860 2860
 
2861 2861
                     if ($assignmentId) {
2862
-                        $sql = "UPDATE $work_assignment_table SET id = iid WHERE iid = $assignmentId";
2862
+                        $sql = "update $work_assignment_table SET id = iid WHERE iid = $assignmentId";
2863 2863
                         Database::query($sql);
2864 2864
                     }
2865 2865
                 }
@@ -2971,7 +2971,7 @@  discard block
 block discarded – undo
2971 2971
                 $my_id = Database::insert($table_glossary, $params);
2972 2972
                 if ($my_id) {
2973 2973
 
2974
-                    $sql = "UPDATE $table_glossary SET glossary_id = iid WHERE iid = $my_id";
2974
+                    $sql = "update $table_glossary SET glossary_id = iid WHERE iid = $my_id";
2975 2975
                     Database::query($sql);
2976 2976
 
2977 2977
                     api_item_property_update(
@@ -3046,7 +3046,7 @@  discard block
 block discarded – undo
3046 3046
                 $new_id = Database::insert($table_wiki, $params);
3047 3047
 
3048 3048
                 if ($new_id) {
3049
-                    $sql = "UPDATE $table_wiki SET page_id = '$new_id', id = iid
3049
+                    $sql = "update $table_wiki SET page_id = '$new_id', id = iid
3050 3050
                             WHERE c_id = ".$this->destination_course_id." AND iid = '$new_id'";
3051 3051
                     Database::query($sql);
3052 3052
 
@@ -3107,7 +3107,7 @@  discard block
 block discarded – undo
3107 3107
 
3108 3108
                 if ($last_id) {
3109 3109
 
3110
-                    $sql = "UPDATE $table_thematic SET id = iid WHERE iid = $last_id";
3110
+                    $sql = "update $table_thematic SET id = iid WHERE iid = $last_id";
3111 3111
                     Database::query($sql);
3112 3112
 
3113 3113
                     api_item_property_update(
@@ -3132,7 +3132,7 @@  discard block
 block discarded – undo
3132 3132
                         );
3133 3133
 
3134 3134
                         if ($my_id) {
3135
-                            $sql = "UPDATE $table_thematic_advance SET id = iid WHERE iid = $my_id";
3135
+                            $sql = "update $table_thematic_advance SET id = iid WHERE iid = $my_id";
3136 3136
                             Database::query($sql);
3137 3137
 
3138 3138
                             api_item_property_update(
@@ -3153,7 +3153,7 @@  discard block
 block discarded – undo
3153 3153
                         $my_id = Database::insert($table_thematic_plan, $thematic_plan, false);
3154 3154
 
3155 3155
                         if ($my_id) {
3156
-                            $sql = "UPDATE $table_thematic_plan SET id = iid WHERE iid = $my_id";
3156
+                            $sql = "update $table_thematic_plan SET id = iid WHERE iid = $my_id";
3157 3157
                             Database::query($sql);
3158 3158
 
3159 3159
                             api_item_property_update(
@@ -3197,7 +3197,7 @@  discard block
 block discarded – undo
3197 3197
                 $last_id = Database::insert($table_attendance, $obj->params);
3198 3198
 
3199 3199
                 if (is_numeric($last_id)) {
3200
-                    $sql = "UPDATE $table_attendance SET id = iid WHERE iid = $last_id";
3200
+                    $sql = "update $table_attendance SET id = iid WHERE iid = $last_id";
3201 3201
                     Database::query($sql);
3202 3202
 
3203 3203
                     $this->course->resources[RESOURCE_ATTENDANCE][$id]->destination_id = $last_id;
@@ -3221,7 +3221,7 @@  discard block
 block discarded – undo
3221 3221
                             $attendance_calendar
3222 3222
                         );
3223 3223
 
3224
-                        $sql = "UPDATE $table_attendance_calendar SET id = iid WHERE iid = $attendanceCalendarId";
3224
+                        $sql = "update $table_attendance_calendar SET id = iid WHERE iid = $attendanceCalendarId";
3225 3225
                         Database::query($sql);
3226 3226
                     }
3227 3227
                 }
Please login to merge, or discard this patch.
main/install/update-configuration.inc.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
         if (stripos($line, '$_configuration[\'system_version\']') !== false) {
39 39
             $found_version = true;
40 40
             $line = '$_configuration[\'system_version\'] = \''.$GLOBALS['new_version'].'\';'."\r\n";
41
-       } elseif (stripos($line, '$_configuration[\'system_stable\']') !== false) {
41
+        } elseif (stripos($line, '$_configuration[\'system_stable\']') !== false) {
42 42
             $found_stable = true;
43 43
             $line = '$_configuration[\'system_stable\'] = '.($GLOBALS['new_version_stable'] ? 'true' : 'false').';'."\r\n";
44 44
         } elseif (stripos($line, '$_configuration[\'software_name\']') !== false) {
Please login to merge, or discard this patch.
main/admin/ldap_form_add_users_group.php 2 patches
Indentation   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -29,35 +29,35 @@
 block discarded – undo
29 29
 echo '<input type="hidden" name="confirmed" value="yes">';
30 30
 echo '<table border="0" cellspacing="0" width="100%">';
31 31
 echo '<tr align="center" id="header3">'.
32
-		'<td width="15%"><input type="button" value="'.get_lang('AllSlashNone').'" onClick="checkAll();"></td>'.
33
-		'<td width="40%"><b>'.get_lang('Email').'</b></td>'.
34
-		($is_western_name_order
35
-			? '<td width="15%"><b>'.get_lang('FirstName').'</b></td>'.
36
-			'<td width="15%"><b>'.get_lang('Name').'</b></td>'
37
-			: '<td width="15%"><b>'.get_lang('Name').'</b></td>'.
38
-			'<td width="15%"><b>'.get_lang('FirstName').'</b></td>').
39
-		'<td width="15%"><b>'.get_lang('Login').'</b></td>'.
40
-	  '</tr>'."\n";
32
+        '<td width="15%"><input type="button" value="'.get_lang('AllSlashNone').'" onClick="checkAll();"></td>'.
33
+        '<td width="40%"><b>'.get_lang('Email').'</b></td>'.
34
+        ($is_western_name_order
35
+            ? '<td width="15%"><b>'.get_lang('FirstName').'</b></td>'.
36
+            '<td width="15%"><b>'.get_lang('Name').'</b></td>'
37
+            : '<td width="15%"><b>'.get_lang('Name').'</b></td>'.
38
+            '<td width="15%"><b>'.get_lang('FirstName').'</b></td>').
39
+        '<td width="15%"><b>'.get_lang('Login').'</b></td>'.
40
+        '</tr>'."\n";
41 41
 while (list ($key, $val) = each($nom_form)) {
42
-	$nbre = $nbre + 1;
43
-	if ($nbre & 1) $ndiv = 2; else $ndiv = 3;
44
-	echo '<tr align="center" id="header'.$ndiv.'">';
45
-	echo '<td><input type="checkbox" name="checkboxes[]" value="'.$key.'" checked="checked"></td>';
46
-	echo '<td>'.$email_form[$key].'<input type="hidden" name="email_form['.$key.']" size="40" value="'.$email_form[$key].'"></td>';
47
-	if ($is_western_name_order) {
48
-		echo '<td>'.$prenom_form[$key].'<input type="hidden" name="prenom_form['.$key.']" size="20" value="'.$prenom_form[$key].'"></td>';
49
-		echo '<td>'.$nom_form[$key].'<input type="hidden" name="nom_form['.$key.']" size="20" value="'.$nom_form[$key].'"></td>';
50
-	} else {
51
-		echo '<td>'.$nom_form[$key].'<input type="hidden" name="nom_form['.$key.']" size="20" value="'.$nom_form[$key].'"></td>';
52
-		echo '<td>'.$prenom_form[$key].'<input type="hidden" name="prenom_form['.$key.']" size="20" value="'.$prenom_form[$key].'"></td>';
53
-	}
54
-	echo '<td>'.$username_form[$key].'<input type="hidden" name="username_form['.$key.']" size="10" value="'.$username_form[$key].'">';
55
-	echo '<input type="hidden" name="tutor_form['.$key.']" value="0">';
56
-	echo '<input type="hidden" name="admin_form['.$key.']" value="1">';
57
-	echo '<input type="hidden" name="password_form['.$key.']"  value="'.$password_form[$key].'">';
58
-	echo '<input type="hidden" name="statut['.$key.']"  value="'.$statut.'">';
59
-	echo '</td>';
60
-	echo '</tr>';
42
+    $nbre = $nbre + 1;
43
+    if ($nbre & 1) $ndiv = 2; else $ndiv = 3;
44
+    echo '<tr align="center" id="header'.$ndiv.'">';
45
+    echo '<td><input type="checkbox" name="checkboxes[]" value="'.$key.'" checked="checked"></td>';
46
+    echo '<td>'.$email_form[$key].'<input type="hidden" name="email_form['.$key.']" size="40" value="'.$email_form[$key].'"></td>';
47
+    if ($is_western_name_order) {
48
+        echo '<td>'.$prenom_form[$key].'<input type="hidden" name="prenom_form['.$key.']" size="20" value="'.$prenom_form[$key].'"></td>';
49
+        echo '<td>'.$nom_form[$key].'<input type="hidden" name="nom_form['.$key.']" size="20" value="'.$nom_form[$key].'"></td>';
50
+    } else {
51
+        echo '<td>'.$nom_form[$key].'<input type="hidden" name="nom_form['.$key.']" size="20" value="'.$nom_form[$key].'"></td>';
52
+        echo '<td>'.$prenom_form[$key].'<input type="hidden" name="prenom_form['.$key.']" size="20" value="'.$prenom_form[$key].'"></td>';
53
+    }
54
+    echo '<td>'.$username_form[$key].'<input type="hidden" name="username_form['.$key.']" size="10" value="'.$username_form[$key].'">';
55
+    echo '<input type="hidden" name="tutor_form['.$key.']" value="0">';
56
+    echo '<input type="hidden" name="admin_form['.$key.']" value="1">';
57
+    echo '<input type="hidden" name="password_form['.$key.']"  value="'.$password_form[$key].'">';
58
+    echo '<input type="hidden" name="statut['.$key.']"  value="'.$statut.'">';
59
+    echo '</td>';
60
+    echo '</tr>';
61 61
 }
62 62
 echo '</table>';
63 63
 echo '<br />';
Please login to merge, or discard this patch.
Braces   +5 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,11 @@
 block discarded – undo
40 40
 	  '</tr>'."\n";
41 41
 while (list ($key, $val) = each($nom_form)) {
42 42
 	$nbre = $nbre + 1;
43
-	if ($nbre & 1) $ndiv = 2; else $ndiv = 3;
43
+	if ($nbre & 1) {
44
+	    $ndiv = 2;
45
+	} else {
46
+	    $ndiv = 3;
47
+	}
44 48
 	echo '<tr align="center" id="header'.$ndiv.'">';
45 49
 	echo '<td><input type="checkbox" name="checkboxes[]" value="'.$key.'" checked="checked"></td>';
46 50
 	echo '<td>'.$email_form[$key].'<input type="hidden" name="email_form['.$key.']" size="40" value="'.$email_form[$key].'"></td>';
Please login to merge, or discard this patch.
main/inc/lib/add_course.lib.inc.php 2 patches
Upper-Lower-Casing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -872,7 +872,7 @@  discard block
 block discarded – undo
872 872
                                     $image_id = Database:: insert_id();
873 873
                                     if ($image_id) {
874 874
 
875
-                                        $sql = "UPDATE $TABLETOOLDOCUMENT SET id = iid WHERE iid = $image_id";
875
+                                        $sql = "update $TABLETOOLDOCUMENT SET id = iid WHERE iid = $image_id";
876 876
                                         Database::query($sql);
877 877
 
878 878
                                         if ($path_documents.$value['file'] == '/certificates/default.html') {
@@ -895,7 +895,7 @@  discard block
 block discarded – undo
895 895
                                             ]
896 896
                                         );
897 897
                                         if ($docId) {
898
-                                            $sql = "UPDATE $TABLEITEMPROPERTY SET id = iid WHERE iid = $docId";
898
+                                            $sql = "update $TABLEITEMPROPERTY SET id = iid WHERE iid = $docId";
899 899
                                             Database::query($sql);
900 900
                                         }
901 901
                                     }
@@ -1111,7 +1111,7 @@  discard block
 block discarded – undo
1111 1111
         $authorId = empty($authorId) ? api_get_user_id() : (int) $authorId;
1112 1112
 
1113 1113
         if ($docId) {
1114
-            $sql = "UPDATE $tableDocument SET id = iid WHERE iid = $docId";
1114
+            $sql = "update $tableDocument SET id = iid WHERE iid = $docId";
1115 1115
             Database::query($sql);
1116 1116
 
1117 1117
             $id = Database::insert(
@@ -1133,7 +1133,7 @@  discard block
 block discarded – undo
1133 1133
             );
1134 1134
 
1135 1135
             if ($id) {
1136
-                $sql = "UPDATE $tableItem SET id = iid WHERE iid = $id";
1136
+                $sql = "update $tableItem SET id = iid WHERE iid = $id";
1137 1137
                 Database::query($sql);
1138 1138
             }
1139 1139
         }
@@ -1279,7 +1279,7 @@  discard block
 block discarded – undo
1279 1279
                     'creation_date' => $time,
1280 1280
                     'expiration_date' => $expiration_date,
1281 1281
                     'last_edit' => $time,
1282
-                    'last_visit' => NULL,
1282
+                    'last_visit' => null,
1283 1283
                     'tutor_name' => $tutor_name,
1284 1284
                     'department_name' => $department_name,
1285 1285
                     'department_url' => $department_url,
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1132,7 +1132,7 @@
 block discarded – undo
1132 1132
      * and the api_get_setting('course_create_active_tools') should be 0 or 1 (used for
1133 1133
      * the visibility of the tool)
1134 1134
      * @param string $variable
1135
-     * @return bool
1135
+     * @return boolean|null
1136 1136
      * @author Patrick Cool, [email protected]
1137 1137
      * @assert ('true') === true
1138 1138
      * @assert ('false') === false
Please login to merge, or discard this patch.
main/lp/lp_move_item.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -43,10 +43,10 @@
 block discarded – undo
43 43
 " .
44 44
 "\n".
45 45
 '$().ready(function() {'."\n".
46
-  'if ($(\'#previous\')) {'."\n".
46
+    'if ($(\'#previous\')) {'."\n".
47 47
     'if(\'parent is\'+$(\'#idParent\').val()) {'.
48
-      'load_cbo($(\'#idParent\').val());'."\n".
49
-  '}}'."\n".
48
+        'load_cbo($(\'#idParent\').val());'."\n".
49
+    '}}'."\n".
50 50
 '});</script>'."\n";
51 51
 
52 52
 /* Constants and variables */
Please login to merge, or discard this patch.
main/document/save_pixlr.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -72,8 +72,8 @@
 block discarded – undo
72 72
 $filename = disable_dangerous_file($filename);
73 73
 
74 74
 if (strlen(trim($filename)) == 0) {
75
-     echo "The title is empty"; //if title is empty, headers Content-Type = application/octet-stream, then not create a new title here please
76
-     exit;
75
+        echo "The title is empty"; //if title is empty, headers Content-Type = application/octet-stream, then not create a new title here please
76
+        exit;
77 77
 }
78 78
 
79 79
 //check file_get_contents
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -124,7 +124,9 @@
 block discarded – undo
124 124
 
125 125
     if (file_exists($saveDir.'/'.$filename.'.'.$extension)) {
126 126
         $i = 1;
127
-        while (file_exists($saveDir.'/'.$filename.'_'.$i.'.'.$extension)) $i++;
127
+        while (file_exists($saveDir.'/'.$filename.'_'.$i.'.'.$extension)) {
128
+            $i++;
129
+        }
128 130
         $paintFileName = $filename.'_'.$i.'.'.$extension;
129 131
         $title = $filename.'_'.$i.'.'.$extension;
130 132
     }
Please login to merge, or discard this patch.
main/document/webcam_receiver.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,8 +17,7 @@
 block discarded – undo
17 17
     $webcamname = $params['webcamname'];
18 18
     $webcamdir = $params['webcamdir'];
19 19
     $webcamuserid = $params['webcamuserid'];
20
-}
21
-else {
20
+} else {
22 21
     api_not_allowed();
23 22
     die();
24 23
 }
Please login to merge, or discard this patch.