@@ -563,8 +563,9 @@ discard block |
||
| 563 | 563 | $new_relation_type[] = "'$rel'"; |
| 564 | 564 | } |
| 565 | 565 | $relation_type = implode(',', $new_relation_type); |
| 566 | - if (!empty($relation_type)) |
|
| 567 | - $where_relation_condition = "AND gu.relation_type IN ($relation_type) "; |
|
| 566 | + if (!empty($relation_type)) { |
|
| 567 | + $where_relation_condition = "AND gu.relation_type IN ($relation_type) "; |
|
| 568 | + } |
|
| 568 | 569 | } |
| 569 | 570 | |
| 570 | 571 | $sql = "SELECT |
@@ -1086,8 +1087,9 @@ discard block |
||
| 1086 | 1087 | $thumbwidth = $max_size_for_picture; |
| 1087 | 1088 | } |
| 1088 | 1089 | $new_height = round(($thumbwidth / $picture_infos['width']) * $picture_infos['height']); |
| 1089 | - if ($new_height > $max_size_for_picture) |
|
| 1090 | - $new_height = $thumbwidth; |
|
| 1090 | + if ($new_height > $max_size_for_picture) { |
|
| 1091 | + $new_height = $thumbwidth; |
|
| 1092 | + } |
|
| 1091 | 1093 | $temp->resize($thumbwidth, $new_height, 0); |
| 1092 | 1094 | } |
| 1093 | 1095 | |
@@ -158,8 +158,9 @@ discard block |
||
| 158 | 158 | $array[] = $this->build_setting($status, '[INI]', 'display_errors', 'http://www.php.net/manual/en/ini.core.php#ini.display_errors', $setting, $req_setting, 'on_off', get_lang('DisplayErrorsInfo')); |
| 159 | 159 | |
| 160 | 160 | $setting = ini_get('default_charset'); |
| 161 | - if ($setting == '') |
|
| 162 | - $setting = null; |
|
| 161 | + if ($setting == '') { |
|
| 162 | + $setting = null; |
|
| 163 | + } |
|
| 163 | 164 | $req_setting = null; |
| 164 | 165 | $status = $setting == $req_setting ? self :: STATUS_OK : self :: STATUS_ERROR; |
| 165 | 166 | $array[] = $this->build_setting($status, '[INI]', 'default_charset', 'http://www.php.net/manual/en/ini.core.php#ini.default-charset', $setting, $req_setting, null, get_lang('DefaultCharsetInfo')); |
@@ -177,22 +178,25 @@ discard block |
||
| 177 | 178 | $setting = ini_get('memory_limit'); |
| 178 | 179 | $req_setting = '>= '.REQUIRED_MIN_MEMORY_LIMIT.'M'; |
| 179 | 180 | $status = self :: STATUS_ERROR; |
| 180 | - if ((float)$setting >= REQUIRED_MIN_MEMORY_LIMIT) |
|
| 181 | - $status = self :: STATUS_OK; |
|
| 181 | + if ((float)$setting >= REQUIRED_MIN_MEMORY_LIMIT) { |
|
| 182 | + $status = self :: STATUS_OK; |
|
| 183 | + } |
|
| 182 | 184 | $array[] = $this->build_setting($status, '[INI]', 'memory_limit', 'http://www.php.net/manual/en/ini.core.php#ini.memory-limit', $setting, $req_setting, null, get_lang('MemoryLimitInfo')); |
| 183 | 185 | |
| 184 | 186 | $setting = ini_get('post_max_size'); |
| 185 | 187 | $req_setting = '>= '.REQUIRED_MIN_POST_MAX_SIZE.'M'; |
| 186 | 188 | $status = self :: STATUS_ERROR; |
| 187 | - if ((float)$setting >= REQUIRED_MIN_POST_MAX_SIZE) |
|
| 188 | - $status = self :: STATUS_OK; |
|
| 189 | + if ((float)$setting >= REQUIRED_MIN_POST_MAX_SIZE) { |
|
| 190 | + $status = self :: STATUS_OK; |
|
| 191 | + } |
|
| 189 | 192 | $array[] = $this->build_setting($status, '[INI]', 'post_max_size', 'http://www.php.net/manual/en/ini.core.php#ini.post-max-size', $setting, $req_setting, null, get_lang('PostMaxSizeInfo')); |
| 190 | 193 | |
| 191 | 194 | $setting = ini_get('upload_max_filesize'); |
| 192 | 195 | $req_setting = '>= '.REQUIRED_MIN_UPLOAD_MAX_FILESIZE.'M'; |
| 193 | 196 | $status = self :: STATUS_ERROR; |
| 194 | - if ((float)$setting >= REQUIRED_MIN_UPLOAD_MAX_FILESIZE) |
|
| 195 | - $status = self :: STATUS_OK; |
|
| 197 | + if ((float)$setting >= REQUIRED_MIN_UPLOAD_MAX_FILESIZE) { |
|
| 198 | + $status = self :: STATUS_OK; |
|
| 199 | + } |
|
| 196 | 200 | $array[] = $this->build_setting($status, '[INI]', 'upload_max_filesize', 'http://www.php.net/manual/en/ini.core.php#ini.upload_max_filesize', $setting, $req_setting, null, get_lang('UploadMaxFilesizeInfo')); |
| 197 | 201 | |
| 198 | 202 | $setting = ini_get('variables_order'); |
@@ -205,7 +209,7 @@ discard block |
||
| 205 | 209 | $status = $setting == $req_setting ? self :: STATUS_OK : self :: STATUS_WARNING; |
| 206 | 210 | $array[] = $this->build_setting($status, '[SESSION]', 'session.gc_maxlifetime', 'http://www.php.net/manual/en/ini.core.php#session.gc-maxlifetime', $setting, $req_setting, null, get_lang('SessionGCMaxLifetimeInfo')); |
| 207 | 211 | |
| 208 | - if (api_check_browscap()){$setting = true;}else{$setting=false;} |
|
| 212 | + if (api_check_browscap()){$setting = true;} else{$setting=false;} |
|
| 209 | 213 | $req_setting = true; |
| 210 | 214 | $status = $setting == $req_setting ? self :: STATUS_OK : self :: STATUS_WARNING; |
| 211 | 215 | $array[] = $this->build_setting($status, '[INI]', 'browscap', 'http://www.php.net/manual/en/misc.configuration.php#ini.browscap', $setting, $req_setting, 'on_off', get_lang('BrowscapInfo')); |
@@ -143,8 +143,9 @@ |
||
| 143 | 143 | |
| 144 | 144 | // SMTP server can take longer to respond, give longer timeout for first read |
| 145 | 145 | // Windows does not have support for this timeout function |
| 146 | - if(substr(PHP_OS, 0, 3) != "WIN") |
|
| 147 | - socket_set_timeout($this->smtp_conn, $tval, 0); |
|
| 146 | + if(substr(PHP_OS, 0, 3) != "WIN") { |
|
| 147 | + socket_set_timeout($this->smtp_conn, $tval, 0); |
|
| 148 | + } |
|
| 148 | 149 | |
| 149 | 150 | // get any announcement |
| 150 | 151 | $announce = $this->get_lines(); |
@@ -38,7 +38,9 @@ discard block |
||
| 38 | 38 | * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License |
| 39 | 39 | */ |
| 40 | 40 | |
| 41 | -if (version_compare(PHP_VERSION, '5.0.0', '<') ) exit("Sorry, this version of PHPMailer will only run on PHP version 5 or greater!\n"); |
|
| 41 | +if (version_compare(PHP_VERSION, '5.0.0', '<') ) { |
|
| 42 | + exit("Sorry, this version of PHPMailer will only run on PHP version 5 or greater!\n"); |
|
| 43 | +} |
|
| 42 | 44 | |
| 43 | 45 | class PHPMailer { |
| 44 | 46 | |
@@ -1502,8 +1504,9 @@ discard block |
||
| 1502 | 1504 | case '8bit': |
| 1503 | 1505 | $encoded = $this->FixEOL($str); |
| 1504 | 1506 | //Make sure it ends with a line break |
| 1505 | - if (substr($encoded, -(strlen($this->LE))) != $this->LE) |
|
| 1506 | - $encoded .= $this->LE; |
|
| 1507 | + if (substr($encoded, -(strlen($this->LE))) != $this->LE) { |
|
| 1508 | + $encoded .= $this->LE; |
|
| 1509 | + } |
|
| 1507 | 1510 | break; |
| 1508 | 1511 | case 'binary': |
| 1509 | 1512 | $encoded = $str; |
@@ -2264,7 +2267,9 @@ discard block |
||
| 2264 | 2267 | * @param string $body Message Body |
| 2265 | 2268 | */ |
| 2266 | 2269 | public function DKIM_BodyC($body) { |
| 2267 | - if ($body == '') return "\r\n"; |
|
| 2270 | + if ($body == '') { |
|
| 2271 | + return "\r\n"; |
|
| 2272 | + } |
|
| 2268 | 2273 | // stabilize line endings |
| 2269 | 2274 | $body=str_replace("\r\n","\n",$body); |
| 2270 | 2275 | $body=str_replace("\n","\r\n",$body); |
@@ -219,10 +219,10 @@ |
||
| 219 | 219 | // action links |
| 220 | 220 | echo '<div class="actions">'; |
| 221 | 221 | if (!api_is_anonymous()) { |
| 222 | - if (api_get_session_id() == 0) |
|
| 223 | - echo '<a href="index.php?' . api_get_cidreq() . '&action=addnote">' . |
|
| 222 | + if (api_get_session_id() == 0) { |
|
| 223 | + echo '<a href="index.php?' . api_get_cidreq() . '&action=addnote">' . |
|
| 224 | 224 | Display::return_icon('new_note.png', get_lang('NoteAddNew'), '', '32') . '</a>'; |
| 225 | - elseif (api_is_allowed_to_session_edit(false, true)) { |
|
| 225 | + } elseif (api_is_allowed_to_session_edit(false, true)) { |
|
| 226 | 226 | echo '<a href="index.php?' . api_get_cidreq() . '&action=addnote">' . |
| 227 | 227 | Display::return_icon('new_note.png', get_lang('NoteAddNew'), '', '32') . '</a>'; |
| 228 | 228 | } |
@@ -198,12 +198,14 @@ |
||
| 198 | 198 | //echo strlen($legal[1]); echo '<br>'; |
| 199 | 199 | $versions[]=$legal[0]; |
| 200 | 200 | $languages[]=$legal[1]; |
| 201 | - if (strlen($legal[2])>2000) |
|
| 202 | - $legal[2]= substr($legal[2],0,2000).' ... '; |
|
| 203 | - if ($legal[4]==0) |
|
| 204 | - $legal[4]= get_lang('HTMLText'); |
|
| 205 | - elseif($legal[4]==1) |
|
| 206 | - $legal[4]=get_lang('PageLink'); |
|
| 201 | + if (strlen($legal[2])>2000) { |
|
| 202 | + $legal[2]= substr($legal[2],0,2000).' ... '; |
|
| 203 | + } |
|
| 204 | + if ($legal[4]==0) { |
|
| 205 | + $legal[4]= get_lang('HTMLText'); |
|
| 206 | + } elseif($legal[4]==1) { |
|
| 207 | + $legal[4]=get_lang('PageLink'); |
|
| 208 | + } |
|
| 207 | 209 | $legals[] = $legal; |
| 208 | 210 | } |
| 209 | 211 | return $legals; |
@@ -666,9 +666,10 @@ |
||
| 666 | 666 | $result = ''; |
| 667 | 667 | for ($i = $min; $i <= $max; $i ++) { |
| 668 | 668 | $result .= '<option value="'.$i.'"'; |
| 669 | - if (is_int($selected_num)) |
|
| 670 | - if ($selected_num == $i) { |
|
| 669 | + if (is_int($selected_num)) { |
|
| 670 | + if ($selected_num == $i) { |
|
| 671 | 671 | $result .= ' selected="selected"'; |
| 672 | + } |
|
| 672 | 673 | } |
| 673 | 674 | $result .= '>'.$i.'</option>'; |
| 674 | 675 | } |
@@ -333,8 +333,12 @@ discard block |
||
| 333 | 333 | ) { |
| 334 | 334 | global $debug; |
| 335 | 335 | |
| 336 | - if ($debug) error_log('Called to update_event_exercice'); |
|
| 337 | - if ($debug) error_log('duration:' . $duration); |
|
| 336 | + if ($debug) { |
|
| 337 | + error_log('Called to update_event_exercice'); |
|
| 338 | + } |
|
| 339 | + if ($debug) { |
|
| 340 | + error_log('duration:' . $duration); |
|
| 341 | + } |
|
| 338 | 342 | |
| 339 | 343 | if ($exeid != '') { |
| 340 | 344 | /* |
@@ -386,8 +390,12 @@ discard block |
||
| 386 | 390 | WHERE exe_id = '".Database::escape_string($exeid)."'"; |
| 387 | 391 | $res = Database::query($sql); |
| 388 | 392 | |
| 389 | - if ($debug) error_log('update_event_exercice called'); |
|
| 390 | - if ($debug) error_log("$sql"); |
|
| 393 | + if ($debug) { |
|
| 394 | + error_log('update_event_exercice called'); |
|
| 395 | + } |
|
| 396 | + if ($debug) { |
|
| 397 | + error_log("$sql"); |
|
| 398 | + } |
|
| 391 | 399 | |
| 392 | 400 | //Deleting control time session track |
| 393 | 401 | //ExerciseLib::exercise_time_control_delete($exo_id); |
@@ -1880,7 +1880,7 @@ discard block |
||
| 1880 | 1880 | $html .= Display::tag('li', Display::return_icon('teacher.png', $teacher, null, ICON_SIZE_TINY) . ' ' . $teacher); |
| 1881 | 1881 | } |
| 1882 | 1882 | $html .= '</ul>'; |
| 1883 | - }else{ |
|
| 1883 | + } else{ |
|
| 1884 | 1884 | $html .= array_to_string($list, $separator); |
| 1885 | 1885 | } |
| 1886 | 1886 | } |
@@ -3236,7 +3236,7 @@ discard block |
||
| 3236 | 3236 | $html .= '<a class="thumbnail" href="'.$params['link'].'">'; |
| 3237 | 3237 | $html .= $params['icon']; |
| 3238 | 3238 | $html .= '</a>'; |
| 3239 | - }else{ |
|
| 3239 | + } else{ |
|
| 3240 | 3240 | $html .= $params['icon']; |
| 3241 | 3241 | } |
| 3242 | 3242 | $html .= '</div>'; |