Changing paths see #7522

1.10.x
Julio Montoya 10 years ago
parent e54fdb3bb0
commit 7e580a87ce
  1. 10
      .gitignore
  2. 4
      .scrutinizer.yml
  3. 2
      .travis.yml
  4. 2
      README.md
  5. 65
      main/inc/global.inc.php
  6. 91
      main/inc/lib/api.lib.php
  7. 12
      main/install/configuration.dist.php
  8. 36
      main/install/install.lib.php
  9. 2
      main/install/install_files.inc.php
  10. 7
      robots.txt
  11. 5
      tests/main/inc/lib/main_api.lib.test.php

10
.gitignore vendored

@ -5,6 +5,11 @@ main/inc/conf
archive/*
!archive/.htaccess
app/cache/*
!app/cache/.htaccess
app/logs/*
# Courses
courses/*
@ -53,8 +58,3 @@ composer.lock
vendor
web/assets/*
# Data directory (new directory for archive/)
data/*
!data/index.html
data/badges/*
!data/badges/index.html

@ -18,8 +18,8 @@ filter:
- tests/*
- main/img/*
- main/lang/*
- archive/*
- data/*
- app/cache/*
- app/logs/*
- web/*
checks:
php:

@ -40,7 +40,7 @@ before_script:
- cp chamilo-cli-install/chamilo-cli-installer.php main/install/
- mysql -u root -e 'create database chamilo'
# install Chamilo with Chash - see reference https://github.com/sonnym/travis-ci-drupal-module-example/blob/master/.travis.yml
- sudo chmod -R 0777 archive courses home main/upload/ main/default_course_document/images main/inc/conf searchdb main/lang main/css
- sudo chmod -R 0777 app/cache courses home main/upload/ main/default_course_document/images main/inc/conf searchdb main/lang main/css
- cd main/install/
- sudo php5 chamilo-cli-installer.php -l admin -p admin -U travis -u 'http://localhost/' -X travis -L english -z 'admin@example.com' -f 'John' -g 'Doe' -b '555-5555' -c 'Test campus' -y 'Chamilo' -x 'https://chamilo.org'
- cd ../..

@ -59,7 +59,7 @@ composer update
On a Debian-based system, launch:
```
sudo chown -R www-data:www-data archive course data home searchdb main/upload/users main/upload/sessions main/upload/courses main/default_course_document/images main/lang main/css main/inc/conf
sudo chown -R www-data:www-data app/cache course home searchdb main/upload/users main/upload/sessions main/upload/courses main/default_course_document/images main/lang main/css main/inc/conf
```
### Start the installer

@ -24,17 +24,20 @@
// Showing/hiding error codes in global error messages.
define('SHOW_ERROR_CODES', false);
require_once __DIR__.'/../../app/AppKernel.php';
$kernel = new AppKernel();
// Determine the directory path where this current file lies.
// This path will be useful to include the other initialisation files.
$includePath = __DIR__;
// @todo Isn't this file renamed to configuration.inc.php yet?
// Include the main Chamilo platform configuration file.
$main_configuration_file_path = $includePath.'/conf/configuration.php';
$already_installed = false;
if (file_exists($main_configuration_file_path)) {
require_once $main_configuration_file_path;
if (file_exists($kernel->getConfigurationFile())) {
require_once $kernel->getConfigurationFile();
$already_installed = true;
} else {
$_configuration = array();
@ -65,18 +68,15 @@ api_check_php_version($includePath.'/');
// 2. Empty username is formally valid, but it is reserved for the anonymous user.
// 3. Checking the login_is_email portal setting in order to accept 100 chars maximum
$default_username_length = 40;
$defaultUserNameLength = 40;
if (api_get_setting('login_is_email') == 'true') {
$default_username_length = 100;
$defaultUserNameLength = 100;
}
define('USERNAME_MAX_LENGTH', $default_username_length);
define('USERNAME_MAX_LENGTH', $defaultUserNameLength);
// Fix bug in IIS that doesn't fill the $_SERVER['REQUEST_URI'].
api_request_uri();
// Add the path to the pear packages to the include path
ini_set('include_path', api_create_include_path_setting());
// This is for compatibility with MAC computers.
ini_set('auto_detect_line_endings', '1');
@ -105,7 +105,7 @@ if (!is_dir(_MPDF_TEMP_PATH)) {
// Connect to the server database and select the main chamilo database.
// When $_configuration['db_persistent_connection'] is set, it is expected to be a boolean type.
$dbPersistConnection = api_get_configuration_value('db_persistent_connection');
/*$dbPersistConnection = api_get_configuration_value('db_persistent_connection');
// $_configuration['db_client_flags'] can be set in configuration.php to pass
// flags to the DB connection
$dbFlags = api_get_configuration_value('db_client_flags');
@ -116,7 +116,7 @@ $params = array(
'password' => $_configuration['db_password'],
'persistent' => $dbPersistConnection,
'client_flags' => $dbFlags,
);
);*/
// Doctrine ORM configuration
@ -181,18 +181,7 @@ if (!empty($_configuration['multiple_access_urls'])) {
$_configuration['access_url'] = 1;
}
/* Initialization of the default encodings */
// The platform's character set must be retrieved at this early moment.
$sql = "SELECT selected_value FROM settings_current WHERE variable = 'platform_charset';";
$result = Database::query($sql);
while ($row = Database::fetch_array($result)) {
$charset = $row[0];
}
if (empty($charset)) {
$charset = 'UTF-8';
}
// Preserving the value of the global variable $charset.
$charset_initial_value = $charset;
$charset = 'UTF-8';
// Enables the portablity layer and configures PHP for UTF-8
\Patchwork\Utf8\Bootup::initAll();
@ -520,10 +509,6 @@ if (is_array($language_files)) {
}
}
// The global variable $charset has been defined in a language file too (trad4all.inc.php), this is legacy situation.
// So, we have to reassign this variable again in order to keep its value right.
$charset = $charset_initial_value;
// The global variable $text_dir has been defined in the language file trad4all.inc.php.
// For determing text direction correspondent to the current language we use now information from the internationalization library.
$text_dir = api_get_text_direction();
@ -544,34 +529,40 @@ if (!isset($_SESSION['login_as']) && isset($_user)) {
// if $_SESSION['login_as'] is set, then the user is an admin logged as the user
$tbl_track_login = Database :: get_main_table(TABLE_STATISTIC_TRACK_E_LOGIN);
$sql_last_connection = "SELECT login_id, login_date FROM $tbl_track_login
WHERE login_user_id='".$_user["user_id"]."' ORDER BY login_date DESC LIMIT 0,1";
$q_last_connection = Database::query($sql_last_connection);
$sql = "SELECT login_id, login_date
FROM $tbl_track_login
WHERE
login_user_id='".$_user["user_id"]."'
ORDER BY login_date DESC
LIMIT 0,1";
$q_last_connection = Database::query($sql);
if (Database::num_rows($q_last_connection) > 0) {
$i_id_last_connection = Database::result($q_last_connection, 0, 'login_id');
// is the latest logout_date still relevant?
$sql_logout_date = "SELECT logout_date FROM $tbl_track_login WHERE login_id=$i_id_last_connection";
$q_logout_date = Database::query($sql_logout_date);
$sql = "SELECT logout_date FROM $tbl_track_login
WHERE login_id = $i_id_last_connection";
$q_logout_date = Database::query($sql);
$res_logout_date = convert_sql_date(Database::result($q_logout_date, 0, 'logout_date'));
if ($res_logout_date < time() - $_configuration['session_lifetime']) {
// it isn't, we should create a fresh entry
Event::event_login($_user['user_id']);
// now that it's created, we can get its ID and carry on
$q_last_connection = Database::query($sql_last_connection);
$i_id_last_connection = Database::result($q_last_connection, 0, 'login_id');
}
$now = api_get_utc_datetime(time());
$s_sql_update_logout_date = "UPDATE $tbl_track_login SET logout_date='$now' WHERE login_id='$i_id_last_connection'";
Database::query($s_sql_update_logout_date);
$sql = "UPDATE $tbl_track_login SET logout_date = '$now'
WHERE login_id='$i_id_last_connection'";
Database::query($sql);
// Saves the last login in the user table see BT#7297
if (isset($_configuration['save_user_last_login']) &&
$_configuration['save_user_last_login']
) {
$tableUser = Database::get_main_table(TABLE_MAIN_USER);
$sql = "UPDATE $tableUser SET last_login ='$now' WHERE user_id = ".$_user["user_id"];
$sql = "UPDATE $tableUser SET last_login = '$now'
WHERE user_id = ".$_user["user_id"];
Database::query($sql);
}
}

@ -272,6 +272,7 @@ define('VALID_WEB_SERVER_BASE', '/https?:\/\/[^\/]*/i'); // $new_path
// Constants for api_get_path() and api_get_path_type(), etc. - registered path types.
define('WEB_PATH', 'WEB_PATH');
define('SYS_PATH', 'SYS_PATH');
define('SYS_APP_PATH', 'SYS_APP_PATH');
define('REL_PATH', 'REL_PATH');
define('WEB_SERVER_ROOT_PATH', 'WEB_SERVER_ROOT_PATH');
define('SYS_SERVER_ROOT_PATH', 'SYS_SERVER_ROOT_PATH');
@ -576,8 +577,10 @@ require_once __DIR__.'/internationalization.lib.php';
* api_get_path(REL_CODE_PATH) /chamilo/main/
* api_get_path(SYS_SERVER_ROOT_PATH) /var/www/ - This is the physical folder where the system Chamilo has been placed. It is not always equal to $_SERVER['DOCUMENT_ROOT'].
* api_get_path(SYS_PATH) /var/www/chamilo/
* api_get_path(SYS_ARCHIVE_PATH) /var/www/chamilo/archive/
* api_get_path(SYS_COURSE_PATH) /var/www/chamilo/courses/
* api_get_path(SYS_APP_PATH) /var/www/chamilo/app
*
* api_get_path(SYS_ARCHIVE_PATH) /var/www/chamilo/app/cache
* api_get_path(SYS_COURSE_PATH) /var/www/chamilo/app/courses/
* api_get_path(SYS_CODE_PATH) /var/www/chamilo/main/
* api_get_path(SYS_DATA_PATH) /var/www/chamilo/data/
* api_get_path(INCLUDE_PATH) /var/www/chamilo/main/inc/
@ -591,11 +594,11 @@ require_once __DIR__.'/internationalization.lib.php';
*
* api_get_path(WEB_SERVER_ROOT_PATH) http://www.mychamilo.org/
* api_get_path(WEB_PATH) http://www.mychamilo.org/chamilo/
* api_get_path(WEB_COURSE_PATH) http://www.mychamilo.org/chamilo/courses/
* api_get_path(WEB_COURSE_PATH) http://www.mychamilo.org/chamilo/app/courses/
* api_get_path(WEB_CODE_PATH) http://www.mychamilo.org/chamilo/main/
* api_get_path(WEB_DATA_PATH) http://www.mychamilo.org/chamilo/data/
* api_get_path(WEB_PLUGIN_PATH) http://www.mychamilo.org/chamilo/plugin/
* api_get_path(WEB_ARCHIVE_PATH) http://www.mychamilo.org/chamilo/archive/
* api_get_path(WEB_ARCHIVE_PATH) http://www.mychamilo.org/chamilo/app/cache/
* api_get_path(WEB_IMG_PATH) http://www.mychamilo.org/chamilo/main/img/
* api_get_path(WEB_CSS_PATH) http://www.mychamilo.org/chamilo/main/css/
* api_get_path(WEB_LIBRARY_PATH) http://www.mychamilo.org/chamilo/main/inc/lib/
@ -640,11 +643,12 @@ function api_get_path($path_type, $path = null)
SYS_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/',
SYS_APP_PATH => 'app/',
INCLUDE_PATH => 'inc/',
LIBRARY_PATH => 'inc/lib/',
CONFIGURATION_PATH => 'inc/conf/',
CONFIGURATION_PATH => 'app/config/',
WEB_LIBRARY_PATH => 'inc/lib/',
WEB_LIBRARY_JS_PATH => 'inc/lib/javascript/',
WEB_AJAX_PATH => 'inc/ajax/',
@ -669,15 +673,17 @@ function api_get_path($path_type, $path = null)
static $root_web;
static $root_sys;
static $root_rel;
static $code_folder;
static $course_folder;
// Always load root_web modifications for multiple url features
global $_configuration;
//default $_configuration['root_web'] configuration
$root_web = $_configuration['root_web'];
$data_folder = 'data/';
$data_folder = 'data/';
$code_folder = 'main/';
$course_folder = 'courses/';
// Configuration data for already installed system.
$root_sys = $_configuration['root_sys'];
@ -696,9 +702,8 @@ function api_get_path($path_type, $path = null)
if (!$is_this_function_initialized) {
global $_configuration;
$root_rel = $_configuration['url_append'];
$code_folder = $_configuration['code_append'];
$course_folder = $_configuration['course_folder'];
$root_rel = $_configuration['url_append'];
// Support for the installation process.
// Developers might use the function api_get_path() directly or indirectly (this is difficult to be traced), at the moment when
@ -723,7 +728,6 @@ function api_get_path($path_type, $path = null)
$root_web = $server_protocol.'://'.$server_name.$root_rel;
$root_sys = str_replace('\\', '/', realpath(__DIR__.'/../../../')).'/';
$code_folder = 'main/';
$course_folder = 'courses/';
}
// Here we give up, so we don't touch anything.
}
@ -745,8 +749,9 @@ function api_get_path($path_type, $path = null)
$paths[REL_PATH] = $root_rel;
$paths[WEB_SERVER_ROOT_PATH] = $server_base_web.'/';
$paths[SYS_SERVER_ROOT_PATH] = $server_base_sys.'/';
$paths[WEB_COURSE_PATH] = $root_web.$course_folder;
$paths[SYS_COURSE_PATH] = $root_sys.$course_folder;
$paths[WEB_COURSE_PATH] = $root_web.'app/'.$course_folder;
$paths[REL_COURSE_PATH] = $root_rel.$course_folder;
$paths[REL_CODE_PATH] = $root_rel.$code_folder;
$paths[WEB_CODE_PATH] = $root_web.$code_folder;
@ -760,6 +765,8 @@ function api_get_path($path_type, $path = null)
// Now we can switch into api_get_path() "terminology".
$paths[SYS_LANG_PATH] = $paths[SYS_CODE_PATH].$paths[SYS_LANG_PATH];
$paths[SYS_APP_PATH] = $paths[SYS_PATH].$paths[SYS_APP_PATH];
$paths[SYS_PLUGIN_PATH] = $paths[SYS_PATH].$paths[SYS_PLUGIN_PATH];
$paths[SYS_ARCHIVE_PATH] = $paths[SYS_PATH].$paths[SYS_ARCHIVE_PATH];
$paths[SYS_TEST_PATH] = $paths[SYS_PATH].$paths[SYS_TEST_PATH];
@ -782,7 +789,8 @@ function api_get_path($path_type, $path = null)
$paths[INCLUDE_PATH] = $paths[SYS_CODE_PATH].$paths[INCLUDE_PATH];
$paths[LIBRARY_PATH] = $paths[SYS_CODE_PATH].$paths[LIBRARY_PATH];
$paths[CONFIGURATION_PATH] = $paths[SYS_CODE_PATH].$paths[CONFIGURATION_PATH];
$paths[CONFIGURATION_PATH] = $paths[SYS_PATH].$paths[CONFIGURATION_PATH];
$paths[SYS_COURSE_PATH] = $paths[SYS_APP_PATH].$course_folder;
$is_this_function_initialized = true;
} else {
@ -5665,34 +5673,6 @@ function api_request_uri() {
return $uri;
}
/**
* Creates the "include_path" php-setting, following the rule that
* PEAR packages of Chamilo should be read before other external packages.
* To be used in global.inc.php only.
* @author Ivan Tcholakov, 06-NOV-2008.
*/
function api_create_include_path_setting() {
$include_path = ini_get('include_path');
if (!empty($include_path)) {
$include_path_array = explode(PATH_SEPARATOR, $include_path);
$dot_found = array_search('.', $include_path_array);
if ($dot_found !== false) {
$result = array();
foreach ($include_path_array as $path) {
$result[] = $path;
if ($path == '.') {
// The path of Chamilo PEAR packages is to be inserted after the current directory path.
$result[] = api_get_path(LIBRARY_PATH).'pear';
}
}
return implode(PATH_SEPARATOR, $result);
}
// Current directory is not listed in the include_path setting, low probability is here.
return api_get_path(LIBRARY_PATH).'pear'.PATH_SEPARATOR.$include_path;
}
// The include_path setting is empty, low probability is here.
return api_get_path(LIBRARY_PATH).'pear';
}
/** Gets the current access_url id of the Chamilo Platform
* @author Julio Montoya <gugli100@gmail.com>
@ -7974,27 +7954,6 @@ function api_protect_course_group($tool, $showHeader = true)
}
}
/**
* Check if Chmailo is installed correctly. If so, return the version
* @return array ('installed' => 0/1, 'message' => error/db version)
*/
function apiIsSystemInstalled()
{
$root = __DIR__.'/../../../';
$configFile = $root.'main/inc/conf/configuration.php';
if (!is_readable($configFile)) {
return array ('installed' => 0, 'message' => 'No config file');
}
$result = Database::query(
"SELECT selected _value FROM settings_current WHERE variable = 'chamilo_database_version'"
);
if ($result == false) {
return array ('installed' => 0, 'message' => 'No way to recover version');
}
$settingsRow = Database::fetch_assoc($result);
$version = $settingsRow['selected_value'];
return array('installed' => 1, 'message' => $version);
}
/**
* Limit the access to Session Admins wheen the limit_session_admin_role

@ -50,14 +50,6 @@ $_configuration['root_sys'] = '{ROOT_SYS}';
// example: chamilo (this means chamilo is installed in /var/www/chamilo/
$_configuration['url_append'] = '{URL_APPEND_PATH}';
// Directory of the Chamilo code.
// You could change this but it is not advised since this has not been tested yet.
$_configuration['code_append'] = "main/";
// Directory to store all course-related files.
// You could change this but it is not advised since this has not been tested yet.
$_configuration['course_folder'] = "courses/";
// URL to your phpMyAdmin installation.
// If not empty, a link will be available in the Platform Administration
$_configuration['db_admin_path'] = '';
@ -68,8 +60,8 @@ $_configuration['db_admin_path'] = '';
// CAS IMPLEMENTATION
// -> Go to your portal Chamilo > Administration > CAS to activate CAS
// You can leave these lines uncommented even if you don't use CAS authentification
$extAuthSource["cas"]["login"] = $_configuration['root_sys'].$_configuration['code_append']."auth/cas/login.php";
$extAuthSource["cas"]["newUser"] = $_configuration['root_sys'].$_configuration['code_append']."auth/cas/newUser.php";
//$extAuthSource["cas"]["login"] = $_configuration['root_sys'].$_configuration['code_append']."auth/cas/login.php";
//$extAuthSource["cas"]["newUser"] = $_configuration['root_sys'].$_configuration['code_append']."auth/cas/newUser.php";
// NEW LDAP IMPLEMENTATION BASED ON external_login info
// -> Uncomment the two lines bellow to activate LDAP AND edit main/auth/external_login/ldap.conf.php for configuration

@ -895,20 +895,20 @@ function display_requirements(
echo '<table class="table">
<tr>
<td class="requirements-item">'.api_get_path(SYS_CODE_PATH).'inc/conf/</td>
<td class="requirements-value">'.check_writable(api_get_path(SYS_CODE_PATH).'inc/conf/').'</td>
<td class="requirements-item">'.api_get_path(CONFIGURATION_PATH).'</td>
<td class="requirements-value">'.check_writable(api_get_path(CONFIGURATION_PATH)).'</td>
</tr>
<tr>
<td class="requirements-item">'.api_get_path(SYS_CODE_PATH).'upload/users/</td>
<td class="requirements-item">'.api_get_path(SYS_APP_PATH).'upload/users/</td>
<td class="requirements-value">'.check_writable(api_get_path(SYS_CODE_PATH).'upload/users/').'</td>
</tr>
<tr>
<td class="requirements-item">'.api_get_path(SYS_CODE_PATH).'upload/sessions/</td>
<td class="requirements-value">'.check_writable(api_get_path(SYS_CODE_PATH).'upload/sessions/').'</td>
<td class="requirements-item">'.api_get_path(SYS_APP_PATH).'upload/sessions/</td>
<td class="requirements-value">'.check_writable(api_get_path(SYS_APP_PATH).'upload/sessions/').'</td>
</tr>
<tr>
<td class="requirements-item">'.api_get_path(SYS_CODE_PATH).'upload/courses/</td>
<td class="requirements-value">'.check_writable(api_get_path(SYS_CODE_PATH).'upload/courses/').'</td>
<td class="requirements-item">'.api_get_path(SYS_APP_PATH).'upload/courses/</td>
<td class="requirements-value">'.check_writable(api_get_path(SYS_APP_PATH).'upload/courses/').'</td>
</tr>
<tr>
<td class="requirements-item">'.api_get_path(SYS_CODE_PATH).'default_course_document/images/</td>
@ -918,10 +918,6 @@ function display_requirements(
<td class="requirements-item">'.api_get_path(SYS_ARCHIVE_PATH).'</td>
<td class="requirements-value">'.check_writable(api_get_path(SYS_ARCHIVE_PATH)).'</td>
</tr>
<tr>
<td class="requirements-item">'.api_get_path(SYS_DATA_PATH).'</td>
<td class="requirements-value">'.check_writable(api_get_path(SYS_DATA_PATH)).'</td>
</tr>
<tr>
<td class="requirements-item">'.api_get_path(SYS_COURSE_PATH).'</td>
<td class="requirements-value">'.check_writable(api_get_path(SYS_COURSE_PATH)).' </td>
@ -939,8 +935,8 @@ function display_requirements(
<td class="requirements-value">'.$file_perm.' </td>
</tr>
<tr>
<td class="requirements-item">'.api_get_path(SYS_PATH).'home/</td>
<td class="requirements-value">'.check_writable(api_get_path(SYS_PATH).'home/').'</td>
<td class="requirements-item">'.api_get_path(SYS_APP_PATH).'home/</td>
<td class="requirements-value">'.check_writable(api_get_path(SYS_APP_PATH).'home/').'</td>
</tr>
<tr>
<td class="requirements-item">'.api_get_path(SYS_CODE_PATH).'css/</td>
@ -1011,19 +1007,19 @@ function display_requirements(
@chmod($checked_writable, $perm);
}
$checked_writable = api_get_path(SYS_CODE_PATH).'upload/users/';
$checked_writable = api_get_path(SYS_APP_PATH).'upload/users/';
if (!is_writable($checked_writable)) {
$notWritable[] = $checked_writable;
@chmod($checked_writable, $perm);
}
$checkedWritable = api_get_path(SYS_CODE_PATH).'upload/sessions/';
$checkedWritable = api_get_path(SYS_APP_PATH).'upload/sessions/';
if (!is_writable($checkedWritable)) {
$notWritable[] = $checkedWritable;
@chmod($checkedWritable, $perm);
}
$checkedWritable = api_get_path(SYS_CODE_PATH).'upload/courses/';
$checkedWritable = api_get_path(SYS_APP_PATH).'upload/courses/';
if (!is_writable($checkedWritable)) {
$notWritable[] = $checkedWritable;
@chmod($checkedWritable, $perm);
@ -1041,12 +1037,6 @@ function display_requirements(
@chmod($checked_writable, $perm);
}
$checked_writable = api_get_path(SYS_DATA_PATH);
if (!is_writable($checked_writable)) {
$notWritable[] = $checked_writable;
@chmod($checked_writable, $perm);
}
$checked_writable = api_get_path(SYS_COURSE_PATH);
if (!is_writable($checked_writable)) {
$notWritable[] = $checked_writable;
@ -1057,7 +1047,7 @@ function display_requirements(
$error = true;
}
$checked_writable = api_get_path(SYS_PATH).'home/';
$checked_writable = api_get_path(SYS_APP_PATH).'home/';
if (!is_writable($checked_writable)) {
$notWritable[] = realpath($checked_writable);
@chmod($checked_writable, $perm);

@ -20,7 +20,7 @@ if (defined('SYSTEM_INSTALLATION')) {
write_system_config_file(api_get_path(CONFIGURATION_PATH) . 'configuration.php');
// Write a distribution file with the config as a backup for the admin
write_system_config_file(api_get_path(CONFIGURATION_PATH) . 'configuration.dist.php');
//write_system_config_file(api_get_path(CONFIGURATION_PATH) . 'configuration.dist.php');
// Write a .htaccess file in the course repository
write_courses_htaccess_file($urlAppendPath);

@ -16,7 +16,8 @@
User-Agent: *
# Directories
Disallow: /archive/
Disallow: /app/cache/
Disallow: /app/logs/
Disallow: /courses/
Disallow: /documentation/
Disallow: /home/
@ -24,10 +25,10 @@ Disallow: /main/
Disallow: /plugin/
Disallow: /searchdb/
Disallow: /tests/
# Files
Disallow: /license.txt
Disallow: /README.txt
Disallow: /webchatdeny.php
Disallow: /whoisonline.php
Disallow: /whoisonlinesession.php
Disallow: /whoisonlinesession.php

@ -709,11 +709,6 @@ class TestMainApi extends UnitTestCase {
$this->assertTrue($res);
}
function testApiCreateIncludePathSetting(){
$res=api_create_include_path_setting();
$this->assertTrue($res);
}
function testApiGetCurrentAccessUrlId(){
$res=api_get_current_access_url_id();
$this->assertTrue($res);

Loading…
Cancel
Save