// Are we in installation phase?
if ((!isInstaller()) && (isInstalled())) {
- // Load configuration file(s) here
- loadIncludeOnce('inc/load_config.php');
-
- // Load database layer here
- loadIncludeOnce('inc/db/lib.php');
-
- // Init message system
- initMessages();
-
- // CSS array
- initExtensionCssFiles();
-
- // Initialize SQL link
- initSqlLink();
+ // Regular bootstrap
+ doNormalBootstrap();
} else {
// Default output is 'direct' for HTML output
setConfigEntry('OUTPUT_MODE', 'direct');
// Then take it from session
/* DEBUG: */ logDebugMessage(__FILE__, __LINE__, 'Setting _DB_TYPE from session;database_extension=' . getSession('database_extension'));
setConfigEntry('_DB_TYPE', getSession('database_extension'));
- } elseif (isPhpExtensionLoaded('mysql')) {
- // Debug message
- /* DEBUG: */ logDebugMessage(__FILE__, __LINE__, 'Setting _DB_TYPE to default (mysql) ...');
-
- // Set (old) default
- setConfigEntry('_DB_TYPE', 'mysql');
} elseif (isPhpExtensionLoaded('mysqli')) {
// Debug message
/* DEBUG: */ logDebugMessage(__FILE__, __LINE__, 'Setting _DB_TYPE to MySQLi ...');
// Set (old) default
setConfigEntry('_DB_TYPE', 'mysqli');
+ } elseif (isPhpExtensionLoaded('mysql')) {
+ // Debug message
+ /* DEBUG: */ logDebugMessage(__FILE__, __LINE__, 'Setting _DB_TYPE to default (mysql) ...');
+
+ // Set (old) default
+ setConfigEntry('_DB_TYPE', 'mysql');
} else {
// Opps, cannot detect it?
reportBug(__FILE__, __LINE__, 'Cannot detect mysql/mysqli. Please fix your setup.');
`{?_MYSQL_PREFIX?}_task_system`
WHERE
`status`='DELETED' AND
- (UNIX_TIMESTAMP() - `task_created`) >= {?ap_tasks_time?}", __FILE__, __LINE__);
+ (UNIX_TIMESTAMP() - `task_created`) >= {?ap_tasks_time?}
+ORDER BY
+ `id` ASC", __FILE__, __LINE__);
// Send out a notification?
if (!ifSqlHasZeroNumRows($result)) {
return setSession($key, $value);
}
+// Does normal bootstrap
+function doNormalBootstrap () {
+ // Load configuration file(s) here
+ loadIncludeOnce('inc/load_config.php');
+
+ // Load database layer here
+ loadIncludeOnce('inc/db/lib.php');
+
+ // Init message system
+ initMessages();
+
+ // CSS array
+ initExtensionCssFiles();
+
+ // Initialize SQL link
+ initSqlLink();
+}
+
// [EOF]
?>