ILIAS
Release_5_0_x_branch Revision 61816
|
Setup class. More...
Public Member Functions | |
ilSetup ($a_auth, $a_auth_type) | |
constructor | |
setClient ($a_cl) | |
getClient () | |
init () | |
init setup load settings from ilias.ini if exists and sets some constants | |
saveNewClient () | |
saves client.ini & updates client list in ilias.ini | |
updateNewClient ($a_old_client_id) | |
update client.ini & move data dirs does not work correctly at this time - DISABLED | |
createDatabase ($a_collation="") | |
create client database | |
installDatabase () | |
set the database data | |
getline ($fp, $delim) | |
readDump ($db, $file) | |
execute a query | |
checkIniFileExists () | |
check if inifile exists | |
checkWritable () | |
check for writable directory | |
checkCreatable ($a_dir=".") | |
check for permission to create new folders in specified directory | |
checkCookiesEnabled () | |
check cookies enabled | |
checkPHPVersion () | |
check for PHP version | |
checkMySQL () | |
Check MySQL. | |
checkAuth () | |
check authentication status | |
checkDom () | |
Check MySQL. | |
checkXsl () | |
Check MySQL. | |
checkGd () | |
Check MySQL. | |
checkMemoryLimit () | |
Check Memory Limit. | |
queryPreliminaries () | |
preliminaries | |
checkPreliminaries () | |
check all prliminaries | |
getPassword () | |
get setup master password | |
setPassword ($a_password) | |
set setup master password | |
loginAsClient ($a_auth_data) | |
process client login | |
loginAsAdmin ($a_password) | |
process setup admin login | |
newClient ($a_client_id=0) | |
creates a client object in $this->client | |
getStatus ($client=0) | |
coumpute client status | |
checkFinish (&$client) | |
check if client setup was finished | |
checkAccess (&$client) | |
check client access status | |
checkClientIni (&$client) | |
check client ini status | |
checkClientDatabase (&$client) | |
check client db status | |
checkClientSessionSettings (&$client, $a_as_bool=false) | |
check client session config status | |
checkClientProxySettings (&$client) | |
check client session config status | |
checkClientLanguages (&$client) | |
check client installed languages status | |
checkClientContact (&$client) | |
check client contact data status | |
checkClientNIC (&$client) | |
check client nic status | |
isInstalled () | |
check if client's db is installed | |
isAuthenticated () | |
check if current user is authenticated | |
isAdmin () | |
check if current user is admin | |
saveMasterSetup ($a_formdata) | |
saves intial settings | |
updateMasterSettings ($a_formdata) | |
updates settings | |
checkToolsSetup ($a_formdata) | |
check pathes to 3rd party software | |
checkDataDirSetup ($a_formdata) | |
check datadir path | |
checkPasswordSetup ($a_formdata) | |
check setup password | |
checkLogSetup ($a_formdata) | |
check log path | |
getError () | |
get Error message | |
_ilSetup () | |
destructor | |
testConvert ($a_convert_path) | |
Check convert program. | |
testGhostscript ($a_ghostscript_path) | |
Check ghostscript program. | |
testJava ($a_java_path) | |
Check JVM. | |
testLatex ($a_latex_url) | |
Check latex cgi script. | |
testZip ($a_zip_path) | |
Check zip program. | |
testUnzip ($a_unzip_path) | |
Check unzip program. | |
testHtmldoc ($a_htmldoc_path) | |
Check htmldoc program. | |
unzip ($a_file, $overwrite=false) | |
unzip file | |
setSessionSettings ($session_settings) | |
saves session settings to db | |
getSessionSettings () | |
reads session settings from db | |
cloneFromSource ($source_id) | |
Clone source client into current client. | |
printProxyStatus ($client) | |
Print proxy settings. | |
saveProxySettings ($proxy_settings) | |
savePasswordSettings (array $passwd_settings) | |
getPasswordSettings () | |
Reads password settings from persitance layer. | |
checkClientPasswordSettings (ilClient $client) | |
hasOpCacheEnabled () | |
Public Member Functions inherited from PEAR | |
PEAR ($error_class=null) | |
Constructor. | |
_PEAR () | |
Destructor (the emulated type of...). | |
& | getStaticProperty ($class, $var) |
If you have a class that's mostly/entirely static, and you need static properties, you can use this method to simulate them. | |
registerShutdownFunc ($func, $args=array()) | |
Use this function to register a shutdown method for static classes. | |
isError ($data, $code=null) | |
Tell whether a value is a PEAR error. | |
setErrorHandling ($mode=null, $options=null) | |
Sets how errors generated by this object should be handled. | |
expectError ($code= '*') | |
This method is used to tell which errors you expect to get. | |
popExpect () | |
This method pops one element off the expected error codes stack. | |
_checkDelExpect ($error_code) | |
This method checks unsets an error code if available. | |
delExpect ($error_code) | |
This method deletes all occurences of the specified element from the expected error codes stack. | |
& | raiseError ($message=null, $code=null, $mode=null, $options=null, $userinfo=null, $error_class=null, $skipmsg=false) |
This method is a wrapper that returns an instance of the configured error class with this object's default error handling applied. | |
& | throwError ($message=null, $code=null, $userinfo=null) |
Simpler form of raiseError with fewer options. | |
staticPushErrorHandling ($mode, $options=null) | |
staticPopErrorHandling () | |
pushErrorHandling ($mode, $options=null) | |
Push a new error handler on top of the error handler options stack. | |
popErrorHandling () | |
Pop the last error handler used. | |
loadExtension ($ext) | |
OS independant PHP extension load. |
Data Fields | |
$ini | |
$ini_file_path | |
$error = "" | |
$ini_ilias_exists = false | |
$ini_client_exists = false | |
$setup_defaults | |
$ilias_nic_server = "http://www.ilias.de/ilias-nic/index.php" | |
$preliminaries_result = array() | |
$preliminaries = true | |
$SQL_FILE = "./setup/sql/ilias3.sql" | |
$dsn = "" | |
$db | |
$setup_password | |
$default_client | |
$safe_mode | |
$safe_mode_exec_dir | |
$auth | |
$access_mode | |
$client | |
Data Fields inherited from PEAR | |
$_debug = false | |
$_default_error_mode = null | |
$_default_error_options = null | |
$_default_error_handler = '' | |
$_error_class = 'PEAR_Error' | |
$_expected_errors = array() |
Protected Member Functions | |
checkOpcacheSettings () |
Setup class.
class to setup ILIAS first and maintain the ini-settings and the database
Definition at line 15 of file class.ilSetup.php.
ilSetup::_ilSetup | ( | ) |
destructor
Definition at line 1676 of file class.ilSetup.php.
ilSetup::checkAccess | ( | & | $client | ) |
check client access status
object | client |
Definition at line 948 of file class.ilSetup.php.
References $client.
Referenced by getStatus().
ilSetup::checkAuth | ( | ) |
ilSetup::checkClientContact | ( | & | $client | ) |
check client contact data status
object | client |
Definition at line 1163 of file class.ilSetup.php.
References $client, and ilUtil\is_email().
Referenced by getStatus().
ilSetup::checkClientDatabase | ( | & | $client | ) |
check client db status
object | client |
Definition at line 988 of file class.ilSetup.php.
References $client, and $ilDB.
Referenced by getStatus().
ilSetup::checkClientIni | ( | & | $client | ) |
check client ini status
object | client |
Definition at line 969 of file class.ilSetup.php.
References $client.
Referenced by getStatus().
ilSetup::checkClientLanguages | ( | & | $client | ) |
check client installed languages status
object | client |
Definition at line 1138 of file class.ilSetup.php.
Referenced by getStatus().
ilSetup::checkClientNIC | ( | & | $client | ) |
check client nic status
object | client |
Definition at line 1194 of file class.ilSetup.php.
References $client.
Referenced by getStatus().
ilSetup::checkClientPasswordSettings | ( | ilClient | $client | ) |
$client | ilClient |
Definition at line 2347 of file class.ilSetup.php.
Referenced by getStatus().
ilSetup::checkClientProxySettings | ( | & | $client | ) |
check client session config status
object | client |
Definition at line 1093 of file class.ilSetup.php.
References $db, $ilDB, $query, $res, and $row.
Referenced by getStatus().
ilSetup::checkClientSessionSettings | ( | & | $client, |
$a_as_bool = false |
|||
) |
check client session config status
object | client |
Definition at line 1053 of file class.ilSetup.php.
References $db, $ilDB, $query, $res, $row, DB_FETCHMODE_ASSOC, and ilSessionControl\getSettingFields().
ilSetup::checkCookiesEnabled | ( | ) |
check cookies enabled
Definition at line 453 of file class.ilSetup.php.
References $sess.
Referenced by queryPreliminaries().
ilSetup::checkCreatable | ( | $a_dir = "." | ) |
check for permission to create new folders in specified directory
string | directory |
Definition at line 427 of file class.ilSetup.php.
Referenced by queryPreliminaries().
ilSetup::checkDataDirSetup | ( | $a_formdata | ) |
check datadir path
array | form data |
Definition at line 1553 of file class.ilSetup.php.
References ilFile\deleteTrailingSlash(), ILIAS_ABSOLUTE_PATH, and ilUtil\stripSlashes().
ilSetup::checkDom | ( | ) |
Check MySQL.
Definition at line 531 of file class.ilSetup.php.
References $ilDB.
Referenced by queryPreliminaries().
ilSetup::checkFinish | ( | & | $client | ) |
check if client setup was finished
object | client |
Definition at line 927 of file class.ilSetup.php.
References $client.
Referenced by getStatus().
ilSetup::checkGd | ( | ) |
Check MySQL.
Definition at line 574 of file class.ilSetup.php.
References $ilDB.
Referenced by queryPreliminaries().
ilSetup::checkIniFileExists | ( | ) |
check if inifile exists
Definition at line 387 of file class.ilSetup.php.
ilSetup::checkLogSetup | ( | $a_formdata | ) |
check log path
array | form data |
Definition at line 1630 of file class.ilSetup.php.
References ilFile\deleteTrailingSlash(), and ilUtil\stripSlashes().
ilSetup::checkMemoryLimit | ( | ) |
Check Memory Limit.
Definition at line 596 of file class.ilSetup.php.
References $ilDB.
Referenced by queryPreliminaries().
ilSetup::checkMySQL | ( | ) |
Check MySQL.
Definition at line 494 of file class.ilSetup.php.
References $ilDB.
|
protected |
Definition at line 630 of file class.ilSetup.php.
Referenced by queryPreliminaries().
ilSetup::checkPasswordSetup | ( | $a_formdata | ) |
check setup password
array | form data |
Definition at line 1608 of file class.ilSetup.php.
ilSetup::checkPHPVersion | ( | ) |
check for PHP version
Definition at line 475 of file class.ilSetup.php.
Referenced by queryPreliminaries().
ilSetup::checkPreliminaries | ( | ) |
check all prliminaries
Definition at line 674 of file class.ilSetup.php.
References queryPreliminaries().
ilSetup::checkToolsSetup | ( | $a_formdata | ) |
check pathes to 3rd party software
array | form data |
Definition at line 1389 of file class.ilSetup.php.
References ilUtil\stripSlashes(), testConvert(), testGhostscript(), testHtmldoc(), testJava(), testLatex(), testUnzip(), and testZip().
ilSetup::checkWritable | ( | ) |
check for writable directory
string | directory |
Definition at line 398 of file class.ilSetup.php.
Referenced by queryPreliminaries().
ilSetup::checkXsl | ( | ) |
Check MySQL.
Definition at line 552 of file class.ilSetup.php.
References $ilDB.
Referenced by queryPreliminaries().
ilSetup::cloneFromSource | ( | $source_id | ) |
Clone source client into current client.
array | form data |
Definition at line 2139 of file class.ilSetup.php.
References $client, $error, ilUtil\delDir(), ilUtil\makeDir(), and ilUtil\rCopy().
ilSetup::createDatabase | ( | $a_collation = "" | ) |
create client database
Definition at line 224 of file class.ilSetup.php.
References $db, and MDB2\isError().
ilSetup::getClient | ( | ) |
Definition at line 135 of file class.ilSetup.php.
References $client.
Referenced by getPasswordSettings(), and savePasswordSettings().
ilSetup::getError | ( | ) |
get Error message
Definition at line 1658 of file class.ilSetup.php.
References $error.
ilSetup::getline | ( | $fp, | |
$delim | |||
) |
Definition at line 287 of file class.ilSetup.php.
References $result.
Referenced by readDump().
ilSetup::getPassword | ( | ) |
get setup master password
Definition at line 694 of file class.ilSetup.php.
ilSetup::getPasswordSettings | ( | ) |
Reads password settings from persitance layer.
Definition at line 2333 of file class.ilSetup.php.
References getClient().
ilSetup::getSessionSettings | ( | ) |
reads session settings from db
Definition at line 2074 of file class.ilSetup.php.
References $db, $query, $res, $row, DB_FETCHMODE_ASSOC, ilSessionControl\DEFAULT_ALLOW_CLIENT_MAINTENANCE, ilSessionControl\DEFAULT_MAX_COUNT, ilSessionControl\DEFAULT_MAX_IDLE, ilSessionControl\DEFAULT_MAX_IDLE_AFTER_FIRST_REQUEST, ilSessionControl\DEFAULT_MIN_IDLE, and ilSessionControl\getSettingFields().
ilSetup::getStatus | ( | $client = 0 | ) |
coumpute client status
string | client id |
Definition at line 871 of file class.ilSetup.php.
References $client, checkAccess(), checkClientContact(), checkClientDatabase(), checkClientIni(), checkClientLanguages(), checkClientNIC(), checkClientPasswordSettings(), checkClientProxySettings(), and checkFinish().
ilSetup::hasOpCacheEnabled | ( | ) |
Definition at line 2365 of file class.ilSetup.php.
Referenced by queryPreliminaries().
ilSetup::ilSetup | ( | $a_auth, | |
$a_auth_type | |||
) |
constructor
boolean | user is authenticated? (true) or not (false) |
string | user is admin or common user |
Definition at line 67 of file class.ilSetup.php.
References $lng, $log, checkAuth(), ilFile\deleteTrailingSlash(), ILIAS_ABSOLUTE_PATH, init(), PEAR\PEAR(), PEAR_ERROR_CALLBACK, and PEAR\setErrorHandling().
ilSetup::init | ( | ) |
init setup load settings from ilias.ini if exists and sets some constants
Definition at line 144 of file class.ilSetup.php.
Referenced by ilSetup().
ilSetup::installDatabase | ( | ) |
set the database data
Definition at line 262 of file class.ilSetup.php.
References readDump().
ilSetup::isAdmin | ( | ) |
check if current user is admin
Definition at line 1251 of file class.ilSetup.php.
ilSetup::isAuthenticated | ( | ) |
check if current user is authenticated
Definition at line 1242 of file class.ilSetup.php.
References $auth.
ilSetup::isInstalled | ( | ) |
check if client's db is installed
Definition at line 1233 of file class.ilSetup.php.
References $ini_ilias_exists.
Referenced by newClient().
ilSetup::loginAsAdmin | ( | $a_password | ) |
process setup admin login
string | password |
Definition at line 824 of file class.ilSetup.php.
References $_SESSION.
ilSetup::loginAsClient | ( | $a_auth_data | ) |
process client login
array |
Definition at line 722 of file class.ilSetup.php.
References $_SESSION, $ilDB, IL_PASSWD_CRYPTED, and newClient().
ilSetup::newClient | ( | $a_client_id = 0 | ) |
creates a client object in $this->client
string | client id |
Definition at line 844 of file class.ilSetup.php.
References $_SESSION, and isInstalled().
Referenced by loginAsClient().
ilSetup::printProxyStatus | ( | $client | ) |
Print proxy settings.
private
Verifies the proxy server connection
Definition at line 2240 of file class.ilSetup.php.
References $client, $lng, PEAR_ERROR_RETURN, ilUtil\sendFailure(), and ilUtil\sendSuccess().
ilSetup::queryPreliminaries | ( | ) |
preliminaries
check if different things are ok for setting up ilias private
Definition at line 650 of file class.ilSetup.php.
References checkCookiesEnabled(), checkCreatable(), checkDom(), checkGd(), checkMemoryLimit(), checkOpcacheSettings(), checkPHPVersion(), checkWritable(), checkXsl(), and hasOpCacheEnabled().
Referenced by checkPreliminaries().
ilSetup::readDump | ( | $db, | |
$file | |||
) |
execute a query
string | |
string |
Definition at line 306 of file class.ilSetup.php.
References $db, $file, $reader, and getline().
Referenced by installDatabase().
ilSetup::saveMasterSetup | ( | $a_formdata | ) |
saves intial settings
array | form data |
Definition at line 1261 of file class.ilSetup.php.
References $_SESSION, ilFile\deleteTrailingSlash(), ILIAS_ABSOLUTE_PATH, ilUtil\makeDir(), and ilUtil\stripSlashes().
ilSetup::saveNewClient | ( | ) |
saves client.ini & updates client list in ilias.ini
Definition at line 169 of file class.ilSetup.php.
References $_SESSION.
Referenced by updateNewClient().
ilSetup::savePasswordSettings | ( | array | $passwd_settings | ) |
array | $passwd_settings |
Definition at line 2323 of file class.ilSetup.php.
References getClient().
ilSetup::saveProxySettings | ( | $proxy_settings | ) |
Definition at line 2276 of file class.ilSetup.php.
References $db, $query, $res, and $row.
ilSetup::setClient | ( | $a_cl | ) |
ilSetup::setPassword | ( | $a_password | ) |
set setup master password
string | password |
Definition at line 704 of file class.ilSetup.php.
ilSetup::setSessionSettings | ( | $session_settings | ) |
saves session settings to db
array | $session_settings |
Definition at line 2014 of file class.ilSetup.php.
References $db, $query, $res, $row, DB_FETCHMODE_ASSOC, ilSessionControl\getSettingFields(), and ilUtil\sendInfo().
ilSetup::testConvert | ( | $a_convert_path | ) |
Check convert program.
string | convert path |
Definition at line 1691 of file class.ilSetup.php.
Referenced by checkToolsSetup().
ilSetup::testGhostscript | ( | $a_ghostscript_path | ) |
Check ghostscript program.
string | ghostscript path |
Definition at line 1712 of file class.ilSetup.php.
Referenced by checkToolsSetup().
ilSetup::testHtmldoc | ( | $a_htmldoc_path | ) |
Check htmldoc program.
string | htmldoc_path |
Definition at line 1888 of file class.ilSetup.php.
References ILIAS_ABSOLUTE_PATH.
Referenced by checkToolsSetup().
ilSetup::testJava | ( | $a_java_path | ) |
Check JVM.
string | java path |
Definition at line 1733 of file class.ilSetup.php.
Referenced by checkToolsSetup().
ilSetup::testLatex | ( | $a_latex_url | ) |
Check latex cgi script.
string | latex cgi url |
Definition at line 1762 of file class.ilSetup.php.
References $result, and ilUtil\stripSlashes().
Referenced by checkToolsSetup().
ilSetup::testUnzip | ( | $a_unzip_path | ) |
Check unzip program.
string | unzip_path |
Definition at line 1843 of file class.ilSetup.php.
Referenced by checkToolsSetup().
ilSetup::testZip | ( | $a_zip_path | ) |
Check zip program.
string | zip path |
Definition at line 1790 of file class.ilSetup.php.
Referenced by checkToolsSetup().
ilSetup::unzip | ( | $a_file, | |
$overwrite = false |
|||
) |
unzip file
string | $a_file | full path/filename |
boolean | $overwrite | pass true to overwrite existing files |
Definition at line 1955 of file class.ilSetup.php.
References $file, ilUtil\createDirectory(), and ilUtil\escapeShellArg().
ilSetup::updateMasterSettings | ( | $a_formdata | ) |
updates settings
array | form data |
Definition at line 1332 of file class.ilSetup.php.
References ilFile\deleteTrailingSlash(), and ilUtil\stripSlashes().
ilSetup::updateNewClient | ( | $a_old_client_id | ) |
update client.ini & move data dirs does not work correctly at this time - DISABLED
Definition at line 192 of file class.ilSetup.php.
References ilUtil\delDir(), ILIAS_ABSOLUTE_PATH, ILIAS_WEB_DIR, PEAR\raiseError(), and saveNewClient().
ilSetup::$access_mode |
Definition at line 58 of file class.ilSetup.php.
ilSetup::$auth |
Definition at line 57 of file class.ilSetup.php.
Referenced by isAuthenticated().
ilSetup::$client |
Definition at line 121 of file class.ilSetup.php.
Referenced by checkAccess(), checkClientContact(), checkClientDatabase(), checkClientIni(), checkClientNIC(), checkFinish(), cloneFromSource(), getClient(), getStatus(), and printProxyStatus().
ilSetup::$db |
Definition at line 49 of file class.ilSetup.php.
Referenced by checkClientProxySettings(), checkClientSessionSettings(), createDatabase(), getSessionSettings(), readDump(), saveProxySettings(), and setSessionSettings().
ilSetup::$default_client |
Definition at line 52 of file class.ilSetup.php.
ilSetup::$dsn = "" |
Definition at line 42 of file class.ilSetup.php.
ilSetup::$error = "" |
Definition at line 19 of file class.ilSetup.php.
Referenced by cloneFromSource(), and getError().
ilSetup::$ilias_nic_server = "http://www.ilias.de/ilias-nic/index.php" |
Definition at line 25 of file class.ilSetup.php.
ilSetup::$ini |
Definition at line 17 of file class.ilSetup.php.
ilSetup::$ini_client_exists = false |
Definition at line 22 of file class.ilSetup.php.
ilSetup::$ini_file_path |
Definition at line 18 of file class.ilSetup.php.
ilSetup::$ini_ilias_exists = false |
Definition at line 21 of file class.ilSetup.php.
Referenced by isInstalled().
ilSetup::$preliminaries = true |
Definition at line 28 of file class.ilSetup.php.
ilSetup::$preliminaries_result = array() |
Definition at line 27 of file class.ilSetup.php.
ilSetup::$safe_mode |
Definition at line 54 of file class.ilSetup.php.
ilSetup::$safe_mode_exec_dir |
Definition at line 55 of file class.ilSetup.php.
ilSetup::$setup_defaults |
Definition at line 24 of file class.ilSetup.php.
ilSetup::$setup_password |
Definition at line 51 of file class.ilSetup.php.
ilSetup::$SQL_FILE = "./setup/sql/ilias3.sql" |
Definition at line 35 of file class.ilSetup.php.