Added optional param to check_writable() to show non applied suggestions in orange instead of red

skala
Yannick Warnier 16 years ago
parent 1f88a2180e
commit 7fbbdddb9e
  1. 10
      main/install/install_functions.inc.php

@ -76,13 +76,17 @@ function get_php_setting($val) {
/**
* This function checks if the given folder is writable
*/
function check_writable($folder) {
function check_writable($folder,$suggestion=false) {
if (is_writable('../'.$folder)) {
return '<strong><font color="green">'.get_lang('Writable').'</font></strong>';
} else {
if ($suggestion == true) {
return '<strong><font color="#ff9900">'.get_lang('NotWritable').'</font></strong>';
} else {
return '<strong><font color="red">'.get_lang('NotWritable').'</font></strong>';
}
}
}
/**
* This function returns a string "true" or "false" according to the passed parameter.
@ -531,11 +535,11 @@ function display_requirements($installType, $badUpdatePath, $updatePath = '', $u
</tr>
<tr>
<td class="requirements-item">chamilo/main/css/</td>
<td class="requirements-value">'.check_writable('css/').' ('.get_lang('SuggestionOnlyToEnableCSSUploadFeature').')</td>
<td class="requirements-value">'.check_writable('css/',true).' ('.get_lang('SuggestionOnlyToEnableCSSUploadFeature').')</td>
</tr>
<tr>
<td class="requirements-item">chamilo/main/lang/</td>
<td class="requirements-value">'.check_writable('lang/').' ('.get_lang('SuggestionOnlyToEnableSubLanguageFeature').')</td>
<td class="requirements-value">'.check_writable('lang/',true).' ('.get_lang('SuggestionOnlyToEnableSubLanguageFeature').')</td>
</tr>'.
//'<tr>
// <td class="requirements-item">dokeos/searchdb/</td>

Loading…
Cancel
Save