function instDBAnswer(&$session) { $session->trace(TC_Init, 'instDBAnswer'); $message = null; if (isset($_POST['inst_populate'])) { $message = InstPopulateDB($session, instGetSqlFile($session), instGetSkinSqlFile($session)); } else { foreach ($_POST as $name => $value) { # $session->trace (TC_X, 'instDBAnswer-2: ' . $name); if (preg_match('/^db_install(\\d+)/', $name, $match)) { $var = 'db_file' . $match[1]; $name = $_POST[$var]; if (($pos = strpos($name, '.sql')) > 0) { if (!($message = executeSqlFile($session, $name, &$line_count, &$comments))) { $message = "Ausgeführt: {$name}: {$line_count} Zeilen ({$comments} Kommentare)"; if (getPos($name, 'base_skin.sql') >= 0) { instAdaptPathInDB($session, $message); } } } elseif (($pos = strpos($name, '.wiki')) > 0) { if (!($message = instImportPages($session, $name, true))) { $message = "Importiert: {$name}"; } } else { $message = "unbekannter Dateityp: {$name}"; } break; } } } instDB($session, $message); }
function instDBAnswer(&$session) { global $inst_populate; $session->trace(TC_Init, 'instDBAnswer'); $message = ''; if (isset($inst_populate)) { $message = populate($session, instGetSqlFile($session)); } instDB($session, $message); }