@@ -15,7 +15,7 @@ discard block |
||
| 15 | 15 | { |
| 16 | 16 | const STATUS_OK = 1; |
| 17 | 17 | const STATUS_WARNING = 2; |
| 18 | - const STATUS_ERROR = 3; |
|
| 18 | + const STATUS_ERROR = 3; |
|
| 19 | 19 | const STATUS_INFORMATION = 4; |
| 20 | 20 | |
| 21 | 21 | /** |
@@ -44,21 +44,21 @@ discard block |
||
| 44 | 44 | $html .= '<li>'; |
| 45 | 45 | } |
| 46 | 46 | $params['section'] = $section; |
| 47 | - $html .='<a href="system_status.php?section='.$section.'">'.get_lang($section).'</a></li>'; |
|
| 47 | + $html .= '<a href="system_status.php?section='.$section.'">'.get_lang($section).'</a></li>'; |
|
| 48 | 48 | } |
| 49 | 49 | |
| 50 | 50 | $html .= '</ul><div class="tab-pane">'; |
| 51 | 51 | |
| 52 | - $data = call_user_func(array($this, 'get_' . $current_section . '_data')); |
|
| 52 | + $data = call_user_func(array($this, 'get_'.$current_section.'_data')); |
|
| 53 | 53 | echo $html; |
| 54 | 54 | $table = new SortableTableFromArray($data, 1, 100); |
| 55 | 55 | |
| 56 | - $table->set_header(0,'', false); |
|
| 57 | - $table->set_header(1,get_lang('Section'), false); |
|
| 58 | - $table->set_header(2,get_lang('Setting'), false); |
|
| 59 | - $table->set_header(3,get_lang('Current'), false); |
|
| 60 | - $table->set_header(4,get_lang('Expected'), false); |
|
| 61 | - $table->set_header(5,get_lang('Comment'), false); |
|
| 56 | + $table->set_header(0, '', false); |
|
| 57 | + $table->set_header(1, get_lang('Section'), false); |
|
| 58 | + $table->set_header(2, get_lang('Setting'), false); |
|
| 59 | + $table->set_header(3, get_lang('Current'), false); |
|
| 60 | + $table->set_header(4, get_lang('Expected'), false); |
|
| 61 | + $table->set_header(5, get_lang('Comment'), false); |
|
| 62 | 62 | |
| 63 | 63 | $table->display(); |
| 64 | 64 | echo '</div></div>'; |
@@ -72,11 +72,11 @@ discard block |
||
| 72 | 72 | { |
| 73 | 73 | $array = array(); |
| 74 | 74 | $writable_folders = array( |
| 75 | - api_get_path(SYS_APP_PATH) .'cache', |
|
| 75 | + api_get_path(SYS_APP_PATH).'cache', |
|
| 76 | 76 | api_get_path(SYS_COURSE_PATH), |
| 77 | - api_get_path(SYS_APP_PATH) .'home', |
|
| 78 | - api_get_path(SYS_APP_PATH) .'upload/users/', |
|
| 79 | - api_get_path(SYS_PATH) .'main/default_course_document/images/', |
|
| 77 | + api_get_path(SYS_APP_PATH).'home', |
|
| 78 | + api_get_path(SYS_APP_PATH).'upload/users/', |
|
| 79 | + api_get_path(SYS_PATH).'main/default_course_document/images/', |
|
| 80 | 80 | ); |
| 81 | 81 | |
| 82 | 82 | foreach ($writable_folders as $index => $folder) { |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | $array[] = $this->build_setting( |
| 100 | 100 | $status, |
| 101 | 101 | '[FILES]', |
| 102 | - get_lang('DirectoryExists') . ': /install', |
|
| 102 | + get_lang('DirectoryExists').': /install', |
|
| 103 | 103 | 'http://be2.php.net/file_exists', |
| 104 | 104 | $exists, |
| 105 | 105 | 0, |
@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | $message2 .= get_lang('SpaceUsedOnSystemCannotBeMeasuredOnWindows'); |
| 130 | 130 | } else { |
| 131 | 131 | $dir = api_get_path(SYS_PATH); |
| 132 | - $du = exec('du -sh ' . $dir, $err); |
|
| 132 | + $du = exec('du -sh '.$dir, $err); |
|
| 133 | 133 | list($size, $none) = explode("\t", $du); |
| 134 | 134 | $limit = $_configuration[$access_url_id]['hosting_limit_disk_space']; |
| 135 | 135 | $message2 .= sprintf(get_lang('TotalSpaceUsedByPortalXLimitIsYMB'), $size, $limit); |
@@ -216,33 +216,33 @@ discard block |
||
| 216 | 216 | $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')); |
| 217 | 217 | |
| 218 | 218 | $setting = ini_get('max_execution_time'); |
| 219 | - $req_setting = '300 (' . get_lang('Minimum') . ')'; |
|
| 219 | + $req_setting = '300 ('.get_lang('Minimum').')'; |
|
| 220 | 220 | $status = $setting >= 300 ? self :: STATUS_OK : self :: STATUS_WARNING; |
| 221 | 221 | $array[] = $this->build_setting($status, '[INI]', 'max_execution_time', 'http://www.php.net/manual/en/ini.core.php#ini.max-execution-time', $setting, $req_setting, null, get_lang('MaxExecutionTimeInfo')); |
| 222 | 222 | |
| 223 | 223 | $setting = ini_get('max_input_time'); |
| 224 | - $req_setting = '300 (' . get_lang('Minimum') . ')'; |
|
| 224 | + $req_setting = '300 ('.get_lang('Minimum').')'; |
|
| 225 | 225 | $status = $setting >= 300 ? self :: STATUS_OK : self :: STATUS_WARNING; |
| 226 | 226 | $array[] = $this->build_setting($status, '[INI]', 'max_input_time', 'http://www.php.net/manual/en/ini.core.php#ini.max-input-time', $setting, $req_setting, null, get_lang('MaxInputTimeInfo')); |
| 227 | 227 | |
| 228 | 228 | $setting = ini_get('memory_limit'); |
| 229 | 229 | $req_setting = '>= '.REQUIRED_MIN_MEMORY_LIMIT.'M'; |
| 230 | 230 | $status = self :: STATUS_ERROR; |
| 231 | - if ((float)$setting >= REQUIRED_MIN_MEMORY_LIMIT) |
|
| 231 | + if ((float) $setting >= REQUIRED_MIN_MEMORY_LIMIT) |
|
| 232 | 232 | $status = self :: STATUS_OK; |
| 233 | 233 | $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')); |
| 234 | 234 | |
| 235 | 235 | $setting = ini_get('post_max_size'); |
| 236 | 236 | $req_setting = '>= '.REQUIRED_MIN_POST_MAX_SIZE.'M'; |
| 237 | 237 | $status = self :: STATUS_ERROR; |
| 238 | - if ((float)$setting >= REQUIRED_MIN_POST_MAX_SIZE) |
|
| 238 | + if ((float) $setting >= REQUIRED_MIN_POST_MAX_SIZE) |
|
| 239 | 239 | $status = self :: STATUS_OK; |
| 240 | 240 | $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')); |
| 241 | 241 | |
| 242 | 242 | $setting = ini_get('upload_max_filesize'); |
| 243 | 243 | $req_setting = '>= '.REQUIRED_MIN_UPLOAD_MAX_FILESIZE.'M'; |
| 244 | 244 | $status = self :: STATUS_ERROR; |
| 245 | - if ((float)$setting >= REQUIRED_MIN_UPLOAD_MAX_FILESIZE) |
|
| 245 | + if ((float) $setting >= REQUIRED_MIN_UPLOAD_MAX_FILESIZE) |
|
| 246 | 246 | $status = self :: STATUS_OK; |
| 247 | 247 | $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')); |
| 248 | 248 | |
@@ -256,7 +256,7 @@ discard block |
||
| 256 | 256 | $status = $setting == $req_setting ? self :: STATUS_OK : self :: STATUS_WARNING; |
| 257 | 257 | $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')); |
| 258 | 258 | |
| 259 | - if (api_check_browscap()){$setting = true;}else{$setting=false;} |
|
| 259 | + if (api_check_browscap()) {$setting = true; } else {$setting = false; } |
|
| 260 | 260 | $req_setting = true; |
| 261 | 261 | $status = $setting == $req_setting ? self :: STATUS_OK : self :: STATUS_WARNING; |
| 262 | 262 | $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')); |
@@ -312,7 +312,7 @@ discard block |
||
| 312 | 312 | |
| 313 | 313 | $loaded = extension_loaded($extension); |
| 314 | 314 | $status = $loaded ? self :: STATUS_OK : self :: STATUS_ERROR; |
| 315 | - $array[] = $this->build_setting($status, '[EXTENSION]', get_lang('LoadedExtension') . ': ' . $extension, $url, $loaded, $expected_value, 'yes_no_optional', $comment); |
|
| 315 | + $array[] = $this->build_setting($status, '[EXTENSION]', get_lang('LoadedExtension').': '.$extension, $url, $loaded, $expected_value, 'yes_no_optional', $comment); |
|
| 316 | 316 | } |
| 317 | 317 | |
| 318 | 318 | return $array; |
@@ -435,9 +435,9 @@ discard block |
||
| 435 | 435 | $formatted_expected_value = $expected_value; |
| 436 | 436 | |
| 437 | 437 | if ($formatter) { |
| 438 | - if (method_exists($this, 'format_' . $formatter)) { |
|
| 439 | - $formatted_current_value = call_user_func(array($this, 'format_' . $formatter), $current_value); |
|
| 440 | - $formatted_expected_value = call_user_func(array($this, 'format_' . $formatter), $expected_value); |
|
| 438 | + if (method_exists($this, 'format_'.$formatter)) { |
|
| 439 | + $formatted_current_value = call_user_func(array($this, 'format_'.$formatter), $current_value); |
|
| 440 | + $formatted_expected_value = call_user_func(array($this, 'format_'.$formatter), $expected_value); |
|
| 441 | 441 | } |
| 442 | 442 | } |
| 443 | 443 | |
@@ -452,13 +452,13 @@ discard block |
||
| 452 | 452 | */ |
| 453 | 453 | public function get_link($title, $url) |
| 454 | 454 | { |
| 455 | - return '<a href="' . $url . '" target="about:bank">' . $title . '</a>'; |
|
| 455 | + return '<a href="'.$url.'" target="about:bank">'.$title.'</a>'; |
|
| 456 | 456 | } |
| 457 | 457 | |
| 458 | 458 | public function format_yes_no_optional($value) |
| 459 | 459 | { |
| 460 | 460 | $return = ''; |
| 461 | - switch($value) { |
|
| 461 | + switch ($value) { |
|
| 462 | 462 | case 0: |
| 463 | 463 | $return = get_lang('No'); |
| 464 | 464 | break; |