Procedural File: install_upgrade.lib.php
Source Location: /main/install/install_upgrade.lib.php
Page Details:
Tags:
COUNTRY_DATA_FILENAME [line 46]
COURSES_HTACCESS_FILENAME [line 49]
DOKEOS_CONFIG_FILENAME [line 50]
DOKEOS_MAIN_DATABASE_FILE [line 43]
LANGUAGE_DATA_FILENAME [line 45]
SETTING_CURRENT_DATA_FILENAME [line 48]
SETTING_OPTION_DATA_FILENAME [line 47]
directory_to_array [line 496]
void directory_to_array(
$directory)
|
|
Parameters
fill_current_settings_table [line 88]
void fill_current_settings_table(
$current_settings_table, $installation_settings)
|
|
Fills the current settings table with the Dokeos default settings. After using the LOAD DATA INFILE instruction, the database stores some variables literally as '$variable'. The instructions after that replace that literal by the actual value of the variable.
Parameters
| |
$current_settings_table |
|
| |
$installation_settings |
|
fill_language_table [line 75]
void fill_language_table(
$language_table)
|
|
Fills the language table with all available languages.
Parameters
fill_settings_options_table [line 121]
void fill_settings_options_table(
$settings_options_table)
|
|
Fills the table with the possible options for all settings.
Parameters
fill_track_countries_table [line 131]
void fill_track_countries_table(
$track_countries_table)
|
|
Fills the countries table with a list of countries.
Parameters
get_sql_file_contents [line 429]
void get_sql_file_contents(
string $file, string $section, [boolean $print_errors = true])
|
|
Get an SQL file's contents This function bases its parsing on the pre-set format of the specific SQL files in the install/upgrade procedure: Lines starting with "--" are comments (but need to be taken into account as they also hold sections names) Other lines are considered to be one-line-per-query lines (this is checked quickly by this function)
Parameters
| string |
$file |
File to parse (in the current directory) |
| string |
$section |
Section to return |
| boolean |
$print_errors |
Print (true) or hide (false) error texts when they occur |
load_database_script [line 276]
void load_database_script(
string $db_script)
|
|
Creates the structure of the stats database
Parameters
| string |
$db_script |
Name of the file containing the SQL script inside the install directory |
load_main_database [line 249]
void load_main_database(
array $installation_settings)
|
|
Creates the structure of the main database and fills it with data. Placeholder symbols in the main database file have to be replaced by the settings entered by the user during installation.
Parameters
| array |
$installation_settings |
list of settings entered by the user |
set_file_folder_permissions [line 62]
void set_file_folder_permissions(
)
|
|
We assume this function is called from install scripts that reside inside the install folder.
split_sql_file [line 309]
boolean split_sql_file(
array &$ret, string $sql, integer 2)
|
|
Function copied and adapted from phpMyAdmin 2.6.0 PMA_splitSqlFile (also GNU GPL) Removes comment lines and splits up large sql files into individual queries Last revision: September 23, 2001 - gandon
Tags:
Parameters
| integer |
2 |
the MySQL release number (because certains php3 versions can't get the value of a constant from within a function) |
| array |
&$ret |
the splitted sql commands |
| string |
$sql |
the sql commands |
write_courses_htaccess_file [line 141]
void write_courses_htaccess_file(
string $url_append)
|
|
Add's a .htaccess file to the courses directory
Parameters
| string |
$url_append |
The path from your webroot to your dokeos root |
write_dokeos_config_file [line 158]
void write_dokeos_config_file(
string $path)
|
|
Write the main Dokeos config file
Parameters
| string |
$path |
Path to the config file |
|