dokeos
[ class tree: dokeos ] [ index: dokeos ] [ all elements ]

Procedural File: install_upgrade.lib.php

Source Location: /main/install/install_upgrade.lib.php



Page Details:



Tags:

filesource:  Source Code for this file







COUNTRY_DATA_FILENAME [line 46]

COUNTRY_DATA_FILENAME = "country_data.csv"

[ Top ]



COURSES_HTACCESS_FILENAME [line 49]

COURSES_HTACCESS_FILENAME = "htaccess.dist"

[ Top ]



DOKEOS_CONFIG_FILENAME [line 50]

DOKEOS_CONFIG_FILENAME = "configuration.dist.php"

[ Top ]



DOKEOS_MAIN_DATABASE_FILE [line 43]

DOKEOS_MAIN_DATABASE_FILE = "dokeos_main.sql"
This file contains functions used by the install and upgrade scripts.

The current functions are used to

  • fill existing tables with data;
  • write a .htaccess file in the courses folder for extra security;
  • write the Dokeos config file containing important settings like database names
and paswords and other options.

Ideas for future additions:

  • a function get_old_version_settings to retrieve the config file settings of older versions before upgrading.



[ Top ]



LANGUAGE_DATA_FILENAME [line 45]

LANGUAGE_DATA_FILENAME = "language_data.csv"

[ Top ]



SETTING_CURRENT_DATA_FILENAME [line 48]

SETTING_CURRENT_DATA_FILENAME = "setting_current_data.csv"

[ Top ]



SETTING_OPTION_DATA_FILENAME [line 47]

SETTING_OPTION_DATA_FILENAME = "setting_option_data.csv"

[ Top ]




directory_to_array [line 496]

void directory_to_array( $directory)



Parameters

   $directory  
[ Top ]



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  
[ Top ]



fill_language_table [line 75]

void fill_language_table( $language_table)

Fills the language table with all available languages.



Parameters

   $language_table  
[ Top ]



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

   $settings_options_table  
[ Top ]



fill_track_countries_table [line 131]

void fill_track_countries_table( $track_countries_table)

Fills the countries table with a list of countries.



Parameters

   $track_countries_table  
[ Top ]



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
[ Top ]



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
[ Top ]



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
[ Top ]



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.



[ Top ]



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:

return:  always true
access:  public


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
[ Top ]



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
[ Top ]



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
[ Top ]



Documentation generated on Thu, 12 Jun 2008 13:53:04 -0500 by phpDocumentor 1.4.1