aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Setup.php
diff options
context:
space:
mode:
authorredmatrix <git@macgirvin.com>2016-05-24 17:54:45 -0700
committerredmatrix <git@macgirvin.com>2016-05-24 17:54:45 -0700
commit516c43ba154dc43ec0ef6135fb0a9732d0185a6f (patch)
tree9e8fcfbd22f6ad8013fd48ec60090be7ccf73d11 /Zotlabs/Module/Setup.php
parent84ba6393ad32406a9875044aef2d031c7d0d7a46 (diff)
downloadvolse-hubzilla-516c43ba154dc43ec0ef6135fb0a9732d0185a6f.tar.gz
volse-hubzilla-516c43ba154dc43ec0ef6135fb0a9732d0185a6f.tar.bz2
volse-hubzilla-516c43ba154dc43ec0ef6135fb0a9732d0185a6f.zip
more work associated with DBA and index.php shuffle
Diffstat (limited to 'Zotlabs/Module/Setup.php')
-rw-r--r--Zotlabs/Module/Setup.php41
1 files changed, 8 insertions, 33 deletions
diff --git a/Zotlabs/Module/Setup.php b/Zotlabs/Module/Setup.php
index b913190b1..447f46ed6 100644
--- a/Zotlabs/Module/Setup.php
+++ b/Zotlabs/Module/Setup.php
@@ -12,7 +12,6 @@ namespace Zotlabs\Module;
/**
* @brief Initialisation for the setup module.
*
- * @param[in,out] App &$a
*/
class Setup extends \Zotlabs\Web\Controller {
@@ -54,16 +53,15 @@ class Setup extends \Zotlabs\Web\Controller {
/**
* @brief Handle the actions of the different setup steps.
*
- * @param[in,out] App &$a
*/
- function post() {
- global $db;
+
+ function post() {
switch($this->install_wizard_pass) {
case 1:
case 2:
return;
- break; // just in case return don't return :)
+ // implied break;
case 3:
$urlpath = \App::get_path();
$dbhost = trim($_POST['dbhost']);
@@ -88,33 +86,9 @@ class Setup extends \Zotlabs\Web\Controller {
if(! \DBA::$dba->connected) {
echo 'Database Connect failed: ' . DBA::$dba->error;
killme();
- \App::$data['db_conn_failed']=true;
}
- /*if(get_db_errno()) {
- unset($db);
- $db = dba_factory($dbhost, $dbport, $dbuser, $dbpass, '', true);
-
- if(! get_db_errno()) {
- $r = q("CREATE DATABASE '%s'",
- dbesc($dbdata)
- );
- if($r) {
- unset($db);
- $db = new dba($dbhost, $dbport, $dbuser, $dbpass, $dbdata, true);
- } else {
- \App::$data['db_create_failed']=true;
- }
- } else {
- \App::$data['db_conn_failed']=true;
- return;
- }
- }*/
- //if(get_db_errno()) {
-
- //}
-
return;
- break;
+ // implied break;
case 4:
$urlpath = \App::get_path();
$dbhost = notags(trim($_POST['dbhost']));
@@ -177,6 +151,8 @@ class Setup extends \Zotlabs\Web\Controller {
\App::$data['db_installed'] = true;
return;
+ // implied break;
+ default:
break;
}
}
@@ -193,11 +169,10 @@ class Setup extends \Zotlabs\Web\Controller {
*
* Depending on the state we are currently in it returns different content.
*
- * @param App &$a
* @return string parsed HTML output
*/
- function get() {
- global $db;
+
+ function get() {
$o = '';
$wizard_status = '';