From ed99654d2e139a847a63e9295bf976d17462ee34 Mon Sep 17 00:00:00 2001 From: Malf Furious Date: Sat, 22 Oct 2016 00:29:30 -0400 Subject: Deprecate application code Setup to perform an iteration of development focused on a simpler implementation and eliminating redundancy in design. --- app/model/sysconf.mod.php | 93 ----------------------------------------------- 1 file changed, 93 deletions(-) delete mode 100644 app/model/sysconf.mod.php (limited to 'app/model/sysconf.mod.php') diff --git a/app/model/sysconf.mod.php b/app/model/sysconf.mod.php deleted file mode 100644 index cfbed42..0000000 --- a/app/model/sysconf.mod.php +++ /dev/null @@ -1,93 +0,0 @@ -field_text("dbAddress"); - $form->field_text("dbName"); - $form->field_text("dbUser"); - $form->field_text("dbPass", null, false); - $form->field_enum("settSSL", array("force", "neither", "forbid")); - - if (!$form->populate($input)) - { - $this->logFormErrors($form); - return; - } - - /* test database connection (set global vars and try to get a db object) */ - $_SCROTT['conf'] = 'conf'; - $_SCROTT['dbEngine'] = 'mysql'; - $_SCROTT['dbAddress'] = $form->dbAddress; - $_SCROTT['dbName'] = $form->dbName; - $_SCROTT['dbUser'] = $form->dbUser; - $_SCROTT['dbPass'] = $form->dbPass; - - try - { - $db = $this->getDbConnection(); - } - catch (Exception $e) - { - $this->logError($e->getMessage()); - return; - } - - /* write file */ - $f = fopen($this->CONF_FILE, "w"); - - if (!$f) - { - $this->logError("Can not create configuration file"); - return; - } - - fwrite($f, "dbAddress . "';\n"); - fwrite($f, "\$_SCROTT['dbName'] = '" . $form->dbName . "';\n"); - fwrite($f, "\$_SCROTT['dbUser'] = '" . $form->dbUser . "';\n"); - fwrite($f, "\$_SCROTT['dbPass'] = '" . $form->dbPass . "';\n"); - fwrite($f, "\$_SCROTT['settSSL'] = '" . $form->settSSL . "';\n"); - fwrite($f, "?>\n"); - - fclose($f); - $this->redirectTo($this->ar() . "/"); - } -} - -?> -- cgit v1.2.3