@@ -138,8 +138,8 @@ discard block |
||
138 | 138 | $isAdmin = api_is_platform_admin(); |
139 | 139 | |
140 | 140 | Display::display_header(get_lang('MyTickets')); |
141 | -if (!empty($projectId)) |
|
142 | -if ($isAdmin) { |
|
141 | +if (!empty($projectId)) { |
|
142 | + if ($isAdmin) { |
|
143 | 143 | $getParameters = [ |
144 | 144 | 'keyword', |
145 | 145 | 'keyword_status', |
@@ -151,6 +151,7 @@ discard block |
||
151 | 151 | 'Tickets_per_page', |
152 | 152 | 'Tickets_column' |
153 | 153 | ]; |
154 | +} |
|
154 | 155 | $get_parameter = ''; |
155 | 156 | foreach ($getParameters as $getParameter) { |
156 | 157 | if (isset($_GET[$getParameter])) { |
@@ -2801,8 +2801,9 @@ |
||
2801 | 2801 | echo '<font color="red">File ('.$path.') '.get_lang('NotHavePermission').'</font>'; |
2802 | 2802 | }*/ |
2803 | 2803 | } elseif(is_dir($path)) { |
2804 | - if (!is_dir($dest . '/' . $file)) |
|
2805 | - mkdir($dest . '/' . $file); |
|
2804 | + if (!is_dir($dest . '/' . $file)) { |
|
2805 | + mkdir($dest . '/' . $file); |
|
2806 | + } |
|
2806 | 2807 | self:: allow_create_all_directory($path, $dest . '/' . $file, $overwrite); |
2807 | 2808 | } |
2808 | 2809 | } |
@@ -1761,7 +1761,9 @@ |
||
1761 | 1761 | $friendHtml.= '<ul class="nav nav-list">'; |
1762 | 1762 | $j = 1; |
1763 | 1763 | for ($k=0; $k < $number_friends; $k++) { |
1764 | - if ($j > $number_of_images) break; |
|
1764 | + if ($j > $number_of_images) { |
|
1765 | + break; |
|
1766 | + } |
|
1765 | 1767 | |
1766 | 1768 | if (isset($friends[$k])) { |
1767 | 1769 | $friend = $friends[$k]; |
@@ -40,7 +40,11 @@ |
||
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>'; |
@@ -378,9 +378,10 @@ |
||
378 | 378 | $result = Database::query($sql); |
379 | 379 | $row = Database::fetch_array($result); |
380 | 380 | |
381 | - if ($row['number'] == 1) |
|
382 | - $user_task = true; |
|
383 | -} |
|
381 | + if ($row['number'] == 1) { |
|
382 | + $user_task = true; |
|
383 | + } |
|
384 | + } |
|
384 | 385 | |
385 | 386 | switch ($action) { |
386 | 387 | case 'new_post': |
@@ -32,8 +32,7 @@ |
||
32 | 32 | } |
33 | 33 | if ($this->form_type == self :: TYPE_USER_INFO) { |
34 | 34 | $this->build_user_info_form(); |
35 | - } |
|
36 | - elseif ($this->form_type == self :: TYPE_SIMPLE_SEARCH) { |
|
35 | + } elseif ($this->form_type == self :: TYPE_SIMPLE_SEARCH) { |
|
37 | 36 | $this->build_simple_search(); |
38 | 37 | } |
39 | 38 | $this->setDefaults(); |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | // sort users array |
96 | 96 | if ($sorting & self :: UDG_SORT_TYPE) { |
97 | 97 | usort($allitems, array('UserDataGenerator', 'sort_by_type')); |
98 | - }elseif ($sorting & self :: UDG_SORT_NAME) { |
|
98 | + } elseif ($sorting & self :: UDG_SORT_NAME) { |
|
99 | 99 | usort($allitems, array('UserDataGenerator', 'sort_by_name')); |
100 | 100 | } elseif ($sorting & self :: UDG_SORT_COURSE) { |
101 | 101 | usort($allitems, array('UserDataGenerator', 'sort_by_course')); |
@@ -148,8 +148,9 @@ discard block |
||
148 | 148 | $row[] = $this->build_category_name($item); |
149 | 149 | $row[] = $this->build_average_column($item, $ignore_score_color); |
150 | 150 | $row[] = $this->build_result_column($item, $ignore_score_color); |
151 | - if ($scoredisplay->is_custom()) |
|
152 | - $row[] = $this->build_mask_column($item, $ignore_score_color); |
|
151 | + if ($scoredisplay->is_custom()) { |
|
152 | + $row[] = $this->build_mask_column($item, $ignore_score_color); |
|
153 | + } |
|
153 | 154 | $data[] = $row; |
154 | 155 | } |
155 | 156 | return $data; |
@@ -496,13 +496,19 @@ |
||
496 | 496 | $id = intval($id); |
497 | 497 | $sql = "DELETE FROM ".$dropbox_cnf['tbl_file']." |
498 | 498 | WHERE c_id = $course_id AND cat_id = '".$id."' "; |
499 | - if (!Database::query($sql)) return false; |
|
499 | + if (!Database::query($sql)) { |
|
500 | + return false; |
|
501 | + } |
|
500 | 502 | $sql = "DELETE FROM ".$dropbox_cnf['tbl_category']." |
501 | 503 | WHERE c_id = $course_id AND cat_id = '".$id."' "; |
502 | - if (!Database::query($sql)) return false; |
|
504 | + if (!Database::query($sql)) { |
|
505 | + return false; |
|
506 | + } |
|
503 | 507 | $sql = "DELETE FROM ".$dropbox_cnf['tbl_post']." |
504 | 508 | WHERE c_id = $course_id AND cat_id = '".$id."' "; |
505 | - if (!Database::query($sql)) return false; |
|
509 | + if (!Database::query($sql)) { |
|
510 | + return false; |
|
511 | + } |
|
506 | 512 | return true; |
507 | 513 | } |
508 | 514 |
@@ -750,10 +750,15 @@ |
||
750 | 750 | "; |
751 | 751 | $result = Database::query($sql); |
752 | 752 | |
753 | - if (!($res = Database::fetch_array($result))) |
|
754 | - die(get_lang('GeneralError').' (code 901)'); |
|
755 | - if ($owner == 0) return $res['uploader_id']; |
|
756 | - if ($res['uploader_id'] == $owner) return true; |
|
753 | + if (!($res = Database::fetch_array($result))) { |
|
754 | + die(get_lang('GeneralError').' (code 901)'); |
|
755 | + } |
|
756 | + if ($owner == 0) { |
|
757 | + return $res['uploader_id']; |
|
758 | + } |
|
759 | + if ($res['uploader_id'] == $owner) { |
|
760 | + return true; |
|
761 | + } |
|
757 | 762 | die(get_lang('GeneralError').' (code '.$or_die.')'); |
758 | 763 | } |
759 | 764 |