Archive folder removed, the new location is app/cache see #5754

skala
Julio Montoya 12 years ago
parent 3f9ab12f1a
commit 4e968dded4
  1. 0
      app/cache/.htaccess
  2. 17
      main/inc/lib/main_api.lib.php
  3. 56
      main/install/install.lib.php
  4. 2
      src/ChamiloLMS/Resources/config/prod.php

@ -223,6 +223,7 @@ define('VALID_WEB_SERVER_BASE', '/https?:\/\/[^\/]*/i'); // $new_path
define('WEB_PATH', 'WEB_PATH');
define('WEB_PUBLIC_PATH', 'WEB_PUBLIC_PATH');
define('SYS_PATH', 'SYS_PATH');
define('SYS_PATH_APP', 'SYS_PATH_APP');
define('REL_PATH', 'REL_PATH');
define('WEB_SERVER_ROOT_PATH', 'WEB_SERVER_ROOT_PATH');
define('SYS_SERVER_ROOT_PATH', 'SYS_SERVER_ROOT_PATH');
@ -466,6 +467,7 @@ function api_get_path($path_type, $path = null) {
static $paths = array(
WEB_PATH => '',
SYS_PATH => '',
SYS_PATH_APP => 'app/',
REL_PATH => '',
WEB_SERVER_ROOT_PATH => '',
SYS_SERVER_ROOT_PATH => '',
@ -481,8 +483,8 @@ function api_get_path($path_type, $path = null) {
WEB_CSS_PATH => 'css/',
SYS_PLUGIN_PATH => 'plugin/',
WEB_PLUGIN_PATH => 'plugin/',
SYS_ARCHIVE_PATH => 'archive/',
WEB_ARCHIVE_PATH => 'archive/',
SYS_ARCHIVE_PATH => 'app/cache/',
WEB_ARCHIVE_PATH => 'app/cache/',
INCLUDE_PATH => 'inc/',
LIBRARY_PATH => 'inc/lib/',
CONFIGURATION_PATH => 'inc/conf/',
@ -6806,6 +6808,17 @@ function api_get_language_interface() {
return $language_interface;
}
function api_get_default_course_document()
{
return api_get_path(SYS_PATH).'app/data/default_course_document/';
}
function api_get_web_default_course_document()
{
return api_get_path(WEB_PATH).'app/data/default_course_document/';
}
function load_translations($app) {
}

@ -240,6 +240,22 @@ function check_writable($folder, $suggestion = false)
}
}
/**
* This function checks if the given folder is writable
*/
function check_writable_root_path($folder, $suggestion = false)
{
if (is_writable(api_get_path(SYS_PATH).$folder)) {
return Display::label(get_lang('Writable'), 'success');
} else {
if ($suggestion) {
return Display::label(get_lang('NotWritable'), 'info');
} else {
return Display::label(get_lang('NotWritable'), 'important');
}
}
}
/**
* This function is similar to the core file() function, except that it
* works with line endings in Windows (which is not the case of file())
@ -1393,25 +1409,27 @@ function display_requirements(
echo '<table class="table">
<tr>
<td class="requirements-item">chamilo/main/inc/conf/</td>
<td class="requirements-value">'.check_writable('inc/conf/').'</td>
<td class="requirements-item">chamilo/app/config</td>
<td class="requirements-value">'.check_writable_root_path('app/config/').'</td>
</tr>
<tr>
<td class="requirements-item">chamilo/main/upload/users/</td>
<td class="requirements-value">'.check_writable('upload/users/').'</td>
<td class="requirements-item">chamilo/app/data</td>
<td class="requirements-value">'.check_writable_root_path('app/data').'</td>
</tr>
<tr>
<td class="requirements-item">chamilo/main/default_course_document/images/</td>
<td class="requirements-value">'.check_writable('default_course_document/images/').'</td>
<td class="requirements-item">chamilo/app/logs</td>
<td class="requirements-value">'.check_writable_root_path('app/logs').'</td>
</tr>
<tr>
<td class="requirements-item">chamilo/archive/</td>
<td class="requirements-value">'.check_writable('../archive/').'</td>
<td class="requirements-item">chamilo/app/cache</td>
<td class="requirements-value">'.check_writable_root_path('app/cache').'</td>
</tr>
<tr>
<td class="requirements-item">chamilo/courses/</td>
<td class="requirements-value">'.check_writable('../courses/').' </td>
<td class="requirements-item">chamilo/main/default_course_document/images/</td>
<td class="requirements-value">'.check_writable('default_course_document/images/').'</td>
</tr>
<tr>
<td class="requirements-item">'.get_lang('CourseTestWasCreated').'</td>
<td class="requirements-value">'.$course_test_was_created.' </td>
@ -1424,10 +1442,6 @@ function display_requirements(
<td class="requirements-item">'.get_lang('PermissionsForNewFiles').'</td>
<td class="requirements-value">'.$file_perm.' </td>
</tr>
<tr>
<td class="requirements-item">chamilo/home/</td>
<td class="requirements-value">'.check_writable('../home/').'</td>
</tr>
<tr>
<td class="requirements-item">chamilo/main/css/</td>
<td class="requirements-value">'.check_writable('css/', true).' ('.get_lang(
@ -1439,18 +1453,8 @@ function display_requirements(
<td class="requirements-value">'.check_writable('lang/', true).' ('.get_lang(
'SuggestionOnlyToEnableSubLanguageFeature'
).')</td>
</tr>'.
//'<tr>
// <td class="requirements-item">chamilo/searchdb/</td>
// <td class="requirements-value">'.check_writable('../searchdb/').'</td>
//</tr>'.
//'<tr>
// <td class="requirements-item">'.session_save_path().'</td>
// <td class="requirements-value">'.(is_writable(session_save_path())
// ? '<strong><font color="green">'.get_lang('Writable').'</font></strong>'
// : '<strong><font color="red">'.get_lang('NotWritable').'</font></strong>').'</td>
//</tr>'.
'';
</tr>';
echo ' </table>';
echo ' </div>';
echo '</div>';

@ -8,6 +8,8 @@ $app['jquery_ui_theme'] = 'smoothness';
// Cache
$app['cache.path'] = api_get_path(SYS_ARCHIVE_PATH);
$app['log.path'] = api_get_path(SYS_PATH_APP).'logs/';
//Twig cache
$app['twig.cache.path'] = $app['cache.path'].'twig';

Loading…
Cancel
Save