@param array $data.- Data to be validated
public static validateInstallationData ( $data ) : boolean | ||
return | boolean | True on success, false otherwise |
require_once Pommo::$_baseDir . 'classes/Pommo_Template.php'; $view = new Pommo_Template(); // Check to make sure poMMo is not already installed. if (Pommo_Install::verify()) { $logger->addErr(Pommo::_T('poMMo is already installed.')); $view->assign('installed', TRUE); $view->display('install'); Pommo::kill(); } if (isset($_REQUEST['disableDebug'])) { unset($_REQUEST['debugInstall']); } elseif (isset($_REQUEST['debugInstall'])) { $view->assign('debug', TRUE); } if (!empty($_POST)) { if (isset($_POST['installerooni']) && Pommo_Install::validateInstallationData($_POST)) { // FORM IS VALID // drop existing poMMo tables foreach (array_keys($dbo->table) as $key) { $table = $dbo->table[$key]; $sql = 'DROP TABLE IF EXISTS ' . $table; $dbo->query($sql); } if (isset($_REQUEST['debugInstall'])) { $dbo->debug(TRUE); } $install = Pommo_Install::parseSQL(); if ($install) { // installation of DB went OK, set configuration values to user // supplied ones require_once Pommo::$_baseDir . 'classes/Pommo_User.php';