Fixing and cleaning system_status, fatal error due sortable class not found, now we use boostrap tab style and we use the new MIN_PHP_VERSION constant see #4635

skala
Julio Montoya 13 years ago
parent 364e5cb105
commit 968f551a6f
  1. 63
      main/admin/system_status.php
  2. 23
      main/inc/lib/diagnoser.lib.php

@ -11,75 +11,12 @@ $cidReset = true;
require_once '../inc/global.inc.php';
require_once api_get_path(LIBRARY_PATH).'diagnoser.lib.php';
require_once api_get_path(LIBRARY_PATH).'sortabletable.class.php';
$this_section = SECTION_PLATFORM_ADMIN;
// User permissions
api_protect_admin_script();
$interbreadcrumb[] = array ('url' => 'index.php', 'name' => get_lang('PlatformAdmin'));
Display :: display_header(get_lang('SystemStatus'));
/* @todo this will be moved to default.css */
?>
<style>
.tabbed-pane {
clear: both;
}
.tabbed-pane-tabs {
list-style: none;
margin: 0;
padding: 0 0 0 1em;
height: 0; /* for IE */
}
.tabbed-pane-tabs li {
display: inline;
float: left;
margin: 0 0.5ex 0 0;
padding: 0;
}
.tabbed-pane-tabs li a {
display: block;
margin: 0.25em 0 -1px 0;
padding: 0.25em 1em;
background: #E5EDF9;
color: #4171b5;
text-decoration: none;
border: 1px solid #4271b5;
-moz-border-radius-topleft: 5px;
-moz-border-radius-topright: 5px;
-webkit-border-top-left-radius: 5px;
-webkit-border-top-right-radius: 5px;
}
.tabbed-pane-tabs li a:hover,.tabbed-pane-tabs li a.current {
background: white;
margin-top: 0;
padding-bottom: 0.5em;
border-bottom-color: white;
color: #4171b5;
}
.tabbed-pane-tabs li a:active,.tabbed-pane-tabs li a.current,.tabbed-pane-tabs li a.current:hover {
color: black;
}
.tabbed-pane-content {
clear: both;
border: 1px solid #4271b5;
margin: 0;
padding: 1em;
min-height: 15em;
-moz-border-radius-topright: 10px;
-moz-border-radius-bottomleft: 10px;
-webkit-border-top-right-radius: 10px;
-webkit-border-bottom-left-radius: 10px;
}
</style>
<?php
$diag = new Diagnoser();
$diag->show_html();
Display :: display_footer();

@ -38,20 +38,20 @@ class Diagnoser
$current_section = $_GET['section'];
}
$html = '<br /><div class="tabbed-pane"><ul class="tabbed-pane-tabs">';
$html = '<div class="tabbable"><ul class="nav nav-tabs">';
foreach ($sections as $section) {
$html .= '<li><a';
if ($current_section == $section) {
$html .= ' class="current"';
if ($current_section == $section) {
$html .= '<li class="active">';
} else {
$html .= '<li>';
}
//$params = $this->manager->get_parameters();
$params['section'] = $section;
$html .=' href="system_status.php?section='.$section.'">'.get_lang($section).'</a></li>';
//$html[] = ' href="' . $this->manager->get_url($params, true) . '">' . htmlentities(Translation :: get(ucfirst($section) . 'Title')) . '</a></li>';
$html .='<a href="system_status.php?section='.$section.'">'.get_lang($section).'</a></li>';
}
$html .= '</ul><div class="tabbed-pane-content">';
$html .= '</ul><div class="tab-pane">';
$data = call_user_func(array($this, 'get_' . $current_section . '_data'));
echo $html;
@ -75,8 +75,7 @@ class Diagnoser
function get_chamilo_data() {
$array = array();
$writable_folders = array('archive', 'courses', 'home', 'main/upload/users/', 'main/default_course_document/images/');
foreach ($writable_folders as $index => $folder) {
//echo api_get_path(SYS_PATH) . $folder;
foreach ($writable_folders as $index => $folder) {
$writable = is_writable(api_get_path(SYS_PATH) . $folder);
$status = $writable ? self :: STATUS_OK : self :: STATUS_ERROR;
$array[] = $this->build_setting($status, '[FILES]', get_lang('IsWritable') . ': ' . $folder, 'http://be2.php.net/manual/en/function.is-writable.php', $writable, 1, 'yes_no', get_lang('DirectoryMustBeWritable'));
@ -99,8 +98,8 @@ class Diagnoser
// General Functions
$version = phpversion();
$status = $version > '5.0' ? self :: STATUS_OK : self :: STATUS_ERROR;
$array[] = $this->build_setting($status, '[PHP]', 'phpversion()', 'http://www.php.net/manual/en/function.phpversion.php', phpversion(), '>= 5.0', null, get_lang('PHPVersionInfo'));
$status = $version > MIN_PHP_VERSION ? self :: STATUS_OK : self :: STATUS_ERROR;
$array[] = $this->build_setting($status, '[PHP]', 'phpversion()', 'http://www.php.net/manual/en/function.phpversion.php', phpversion(), '>= '.MIN_PHP_VERSION, null, get_lang('PHPVersionInfo'));
$setting = ini_get('output_buffering');
$req_setting = 1;

Loading…
Cancel
Save