} // Tiki Database schema version include_once 'lib/setup/twversion.class.php'; $TWV = new TWVersion(); $smarty->assign('tiki_version_name', preg_replace('/^(\\d+\\.\\d+)([^\\d])/', '\\1 \\2', $TWV->version)); // Available DB Servers $dbservers = array(); if (function_exists('mysqli_connect')) { $dbservers['mysqli'] = tra('MySQL Improved (mysqli)'); } if (function_exists('mysql_connect')) { $dbservers['mysql'] = tra('MySQL classic (mysql)'); } $smarty->assignByRef('dbservers', $dbservers); $errors = ''; check_session_save_path(); get_webserver_uid(); $errors .= create_dirs($multi); if ($errors) { error_and_exit(); } // Second check try to connect to the database // if no local.php => no con // if local then build dsn and try to connect // then get con or nocon //adodb settings if (!defined('ADODB_FORCE_NULLS')) { define('ADODB_FORCE_NULLS', 1); } if (!defined('ADODB_ASSOC_CASE')) { define('ADODB_ASSOC_CASE', 2);
/** * @param Registry $registry * @param string $mode * @return array */ function run_critical_system_check($registry, $mode = 'log') { $mlog = array(); $mlog[] = check_session_save_path(); $output = array(); foreach ($mlog as $message) { if ($message['body']) { if ($mode == 'log') { //only save errors to the log $error = new AError($message['body']); $error->toLog()->toDebug(); $registry->get('messages')->saveError($message['title'], $message['body']); } $output[] = $message; } } return $output; }