summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorspiderr <spiderr@bitweaver.org>2022-11-12 07:12:24 -0500
committerspiderr <spiderr@bitweaver.org>2022-11-12 07:12:24 -0500
commitac92606afa5c4b422018818162d87425b50e483a (patch)
tree1fed7a644824d0f3d7af2641706212c6b1faa66c
parent35d6f822b1af462ff62685a0507047bf412dc414 (diff)
downloadinstall-ac92606afa5c4b422018818162d87425b50e483a.tar.gz
install-ac92606afa5c4b422018818162d87425b50e483a.tar.bz2
install-ac92606afa5c4b422018818162d87425b50e483a.zip
major cleanup to install of new installation testing
-rw-r--r--includes/install_beta1_beta2.php (renamed from install_beta1_beta2.php)0
-rw-r--r--includes/install_bit_settings.php (renamed from install_bit_settings.php)0
-rw-r--r--includes/install_checks.php (renamed from install_checks.php)0
-rw-r--r--includes/install_cleanup.php (renamed from install_cleanup.php)0
-rw-r--r--includes/install_database.php (renamed from install_database.php)2
-rw-r--r--includes/install_database_reset.php (renamed from install_database_reset.php)0
-rw-r--r--includes/install_datapump.php (renamed from install_datapump.php)0
-rw-r--r--includes/install_final.php (renamed from install_final.php)0
-rw-r--r--includes/install_inc.php18
-rw-r--r--includes/install_options.php (renamed from install_options.php)0
-rw-r--r--includes/install_packages.php (renamed from install_packages.php)8
-rw-r--r--includes/install_upgrade.php (renamed from install_upgrade.php)0
-rw-r--r--includes/install_version.php (renamed from install_version.php)0
-rw-r--r--includes/install_welcome.php (renamed from install_welcome.php)0
-rw-r--r--install.php15
-rw-r--r--templates/install.tpl17
-rw-r--r--templates/install_admin_inc_done.tpl4
-rw-r--r--templates/install_upgrade.tpl2
-rw-r--r--templates/install_welcome.tpl6
19 files changed, 35 insertions, 37 deletions
diff --git a/install_beta1_beta2.php b/includes/install_beta1_beta2.php
index 163fd0b..163fd0b 100644
--- a/install_beta1_beta2.php
+++ b/includes/install_beta1_beta2.php
diff --git a/install_bit_settings.php b/includes/install_bit_settings.php
index fa7d8eb..fa7d8eb 100644
--- a/install_bit_settings.php
+++ b/includes/install_bit_settings.php
diff --git a/install_checks.php b/includes/install_checks.php
index 3a3ea11..3a3ea11 100644
--- a/install_checks.php
+++ b/includes/install_checks.php
diff --git a/install_cleanup.php b/includes/install_cleanup.php
index e7e9085..e7e9085 100644
--- a/install_cleanup.php
+++ b/includes/install_cleanup.php
diff --git a/install_database.php b/includes/install_database.php
index 31a94b9..5dd7838 100644
--- a/install_database.php
+++ b/includes/install_database.php
@@ -27,7 +27,7 @@ if( isset( $_REQUEST['submit_db_info'] )) {
$error = TRUE;
} else {
- $gBitDb = &ADONewConnection( $gBitDbType );
+ $gBitDb = ADONewConnection( $gBitDbType );
if( $gBitDb->Connect( $gBitDbHost, $gBitDbUser, $gBitDbPassword, $gBitDbName )) {
// display success page when done
diff --git a/install_database_reset.php b/includes/install_database_reset.php
index fbbc383..fbbc383 100644
--- a/install_database_reset.php
+++ b/includes/install_database_reset.php
diff --git a/install_datapump.php b/includes/install_datapump.php
index 70f3dab..70f3dab 100644
--- a/install_datapump.php
+++ b/includes/install_datapump.php
diff --git a/install_final.php b/includes/install_final.php
index 315bfd5..315bfd5 100644
--- a/install_final.php
+++ b/includes/install_final.php
diff --git a/includes/install_inc.php b/includes/install_inc.php
index 12706c3..b51ee7c 100644
--- a/includes/install_inc.php
+++ b/includes/install_inc.php
@@ -18,33 +18,32 @@ function set_menu( $pInstallFiles, $pStep ) {
// here we set up the menu
for( $done = 0; $done < $pStep; $done++ ) {
$pInstallFiles[$done]['state'] = 'complete';
- $pInstallFiles[$done]['icon'] = 'icon-ok';
+ $pInstallFiles[$done]['icon'] = 'fa-check';
}
// if the page is done, we can display the menu item as done and increase the progress bar
if( $failedcommands || !empty( $error ) ) {
$pInstallFiles[$pStep]['state'] = 'error';
- $pInstallFiles[$pStep]['icon'] = 'dialog-error';
+ $pInstallFiles[$pStep]['icon'] = 'fa-octagon-exclamation';
} elseif( !empty( $warning ) ) {
$pInstallFiles[$pStep]['state'] = 'warning';
- $pInstallFiles[$pStep]['icon'] = 'dialog-warning';
+ $pInstallFiles[$pStep]['icon'] = 'fa-triangle-exclamation';
} elseif( $app == "_done" ) {
$pInstallFiles[$pStep]['state'] = 'complete';
- $pInstallFiles[$pStep]['icon'] = 'icon-ok';
+ $pInstallFiles[$pStep]['icon'] = 'fa-check';
$done++;
} else {
$pInstallFiles[$pStep]['state'] = 'current';
- $pInstallFiles[$pStep]['icon'] = 'media-playback-start';
+ $pInstallFiles[$pStep]['icon'] = 'fa-angle-right';
}
foreach( $pInstallFiles as $key => $menu_step ) {
if( !isset( $menu_step['state'] ) ) {
if( !empty( $gBitDbType ) && $gBitUser->isAdmin() && !$_SESSION['first_install'] ) {
$pInstallFiles[$key]['state'] = 'complete';
- $pInstallFiles[$key]['icon'] = 'icon-ok';
+ $pInstallFiles[$key]['icon'] = 'fa-check';
} else {
$pInstallFiles[$key]['state'] = 'uncompleted';
- $pInstallFiles[$key]['icon'] = 'spacer';
}
}
}
@@ -52,7 +51,6 @@ function set_menu( $pInstallFiles, $pStep ) {
// assign all this work to the template
$gBitSmarty->assign( 'step', $pStep );
$gBitSmarty->assign( 'menu_steps', $pInstallFiles );
- $gBitSmarty->assign( 'progress', ( ceil( 100 / ( count( $pInstallFiles ) ) * $done ) ) );
return $pInstallFiles;
}
@@ -148,7 +146,7 @@ global $gBitUser;
if( !empty( $_POST['signin'] ) ) {
$gBitInstaller->login( $_REQUEST['user'], $_REQUEST['pass'] );
-} elseif( !empty( $_COOKIE[$gBitUser->getSiteCookieName()] ) && ( $gBitUser->mUserId = $gBitUser->getUserIdFromCookieHash( $_COOKIE[$gBitUser->getSiteCookieName()] ))) {
+} elseif( is_object( $gBitUser ) && !empty( $_COOKIE[$gBitUser->getSiteCookieName()] ) && ( $gBitUser->mUserId = $gBitUser->getUserIdFromCookieHash( $_COOKIE[$gBitUser->getSiteCookieName()] ))) {
$userInfo = $gBitUser->getUserInfo( array( 'user_id' => $gBitUser->mUserId ) );
if( $userInfo['user_id'] != ANONYMOUS_USER_ID ) {
@@ -170,7 +168,7 @@ if(
&& ( !strpos( $_SERVER['HTTP_REFERER'],'install/migrate.php' ))
)
) {
- if( !$gBitUser->isAdmin() ) {
+ if( empty( $gBitUser ) || !$gBitUser->isAdmin() ) {
$_SESSION = NULL;
}
unset( $_SESSION['upgrade'] );
diff --git a/install_options.php b/includes/install_options.php
index aab0529..aab0529 100644
--- a/install_options.php
+++ b/includes/install_options.php
diff --git a/install_packages.php b/includes/install_packages.php
index f1ebaff..e8e63c7 100644
--- a/install_packages.php
+++ b/includes/install_packages.php
@@ -501,10 +501,9 @@ if( !empty( $_REQUEST['cancel'] ) ) {
$plugin_file = LIBERTY_PKG_PATH.'plugins/format.tikiwiki.php';
if( is_readable( $plugin_file ) ) {
require_once( $plugin_file );
- // manually set the config settings to avoid problems
- $gBitSystem->mDb->query( "INSERT INTO `".BIT_DB_PREFIX."kernel_config` ( `config_name`, `package`, `config_value` ) VALUES ( 'liberty_plugin_file_".PLUGIN_GUID_TIKIWIKI."', '$plugin_file', '".LIBERTY_PKG_NAME."' )" );
- $gBitSystem->mDb->query( "INSERT INTO `".BIT_DB_PREFIX."kernel_config` ( `config_name`, `package`, `config_value` ) VALUES ( 'liberty_plugin_status_".PLUGIN_GUID_TIKIWIKI."', 'y', '".LIBERTY_PKG_NAME."' )" );
- // it appear default_format is already set.
+ // manually set the config format to avoid problems
+ $gBitSystem->storeConfig( 'liberty_plugin_file_'.PLUGIN_GUID_TIKIWIKI, $plugin_file, LIBERTY_PKG_NAME );
+ $gBitSystem->storeConfig( 'liberty_plugin_status_'.PLUGIN_GUID_TIKIWIKI, 'y', LIBERTY_PKG_NAME );
$gBitSystem->storeConfig( 'default_format', PLUGIN_GUID_TIKIWIKI, LIBERTY_PKG_NAME );
}
@@ -534,6 +533,7 @@ if( !empty( $_REQUEST['cancel'] ) ) {
$gBitUser->mDb->query( "INSERT INTO `".BIT_DB_PREFIX."users_roles` (`user_id`, `role_id`, `role_name`,`role_desc`) VALUES ( ".ROOT_USER_ID.", 2, 'Editors','Site Editors')" );
$gBitUser->mDb->query( "INSERT INTO `".BIT_DB_PREFIX."users_roles` (`user_id`, `role_id`, `role_name`,`role_desc`,`is_default`) VALUES ( ".ROOT_USER_ID.", 3, 'Registered', 'Users logged into the system', 'y')" );
} else {
+// $tempUser = new BitUser(); // for BitUser::registerContentType
$rootUser = new BitPermUser();
if( $rootUser->store( $storeHash ) ) {
$gBitUser->mDb->query( "INSERT INTO `".BIT_DB_PREFIX."users_groups` (`user_id`, `group_id`, `group_name`,`group_desc`) VALUES ( ".ROOT_USER_ID.", 1, 'Administrators','Site operators')" );
diff --git a/install_upgrade.php b/includes/install_upgrade.php
index 6243aef..6243aef 100644
--- a/install_upgrade.php
+++ b/includes/install_upgrade.php
diff --git a/install_version.php b/includes/install_version.php
index caf9708..caf9708 100644
--- a/install_version.php
+++ b/includes/install_version.php
diff --git a/install_welcome.php b/includes/install_welcome.php
index 7736563..7736563 100644
--- a/install_welcome.php
+++ b/includes/install_welcome.php
diff --git a/install.php b/install.php
index 7377095..44e83c1 100644
--- a/install.php
+++ b/install.php
@@ -62,6 +62,16 @@ die;
*/
require_once( 'includes/install_inc.php' );
+if( $gBitInstaller->isInstalled() && is_object( $gBitUser ) ) {
+ //$gBitUser->verifyAdmin();
+} else {
+ require_once( THEMES_PKG_CLASS_PATH.'BitThemes.php' );
+ BitThemes::loadSingleton();
+ $gBitThemes->setStyle( 'basic' );
+ require_once( LANGUAGES_PKG_CLASS_PATH.'BitLanguage.php' );
+ BitLanguage::loadSingleton();
+}
+
// this variable will be appended to the template file called - useful for displaying messages after data input
$app = '';
@@ -78,6 +88,7 @@ if( !empty( $_REQUEST['reload'] )) {
// for pages that should only be shown during a first install
if( ( empty( $gBitDbType ) || !$gBitUser->isAdmin() ) || ( $_SESSION['first_install'] ) ) {
$onlyDuringFirstInstall = TRUE;
+ $_SESSION['first_install'] = TRUE;
} else {
$onlyDuringFirstInstall = FALSE;
}
@@ -152,7 +163,6 @@ if( !empty( $_POST['signin'] ) ) {
if( !empty( $gBitDbType ) && !empty( $gBitInstaller->mPackages['users']['installed'] ) && !$gBitUser->isAdmin() && !$_SESSION['first_install'] ) {
$install_file = 'login';
$gBitSmarty->assign( 'install_file', INSTALL_PKG_PATH."templates/install_".$install_file.".tpl" );
- $gBitSmarty->assign( 'progress', 0 );
$gBitSmarty->display( INSTALL_PKG_PATH.'templates/install.tpl' );
die;
}
@@ -164,10 +174,11 @@ if( !strpos( $_SERVER['SCRIPT_NAME'],'install/install.php' ) ) {
}
// finally we are ready to include the actual php file
-include_once( 'install_'.$install_file[$step]['file'].'.php' );
+include_once( INSTALL_PKG_INCLUDE_PATH.'install_'.$install_file[$step]['file'].'.php' );
$install_file = set_menu( $install_file, $step );
+$gBitSmarty->assign_by_ref( 'gBitInstaller', $gBitInstaller );
$gBitSmarty->assign( 'install_file', INSTALL_PKG_PATH."templates/install_".$install_file[$step]['file'].$app.".tpl" );
$gBitInstaller->in_display( $install_file[$step]['name'], INSTALL_PKG_PATH.'templates/install.tpl' );
?>
diff --git a/templates/install.tpl b/templates/install.tpl
index 14a17d0..812b8d8 100644
--- a/templates/install.tpl
+++ b/templates/install.tpl
@@ -47,16 +47,7 @@
<nav class="pull-right width60p" style="padding:10px 20px 0 0;">
<div class="pull-right">
- <a href="http://www.bitweaver.org/wiki/index.php?page={$section|default:"Install"}bitweaverDoc"><i class="icon-question-sign"></i> Help</a>
- </div>
-
- <div class="pull-right width50p" style="padding:0 10px;">
- <div class="progress">
- <div class="bar bar-success" style="width: {$progress|default:0}%;"></div>
- </div>
- </div>
- <div class="pull-right">
- <em>{$section|default:"Install"} Progress</em>
+ <a href="http://www.bitweaver.org/wiki/index.php?page={$section|default:"Install"}bitweaverDoc">{booticon iname="fa-question-circle"} Help</a>
</div>
</nav>
</div>
@@ -65,7 +56,7 @@
{foreach from=$menu_steps item=step key=key}
<li class="{if $smarty.request.step == $key}active{/if}">
<a href="{$menu_path|default:$smarty.const.INSTALL_PKG_URL}{$menu_file|default:"install.php"}?step={$key}" {if $step.state eq 'uncompleted'}onclick="return false;"{/if}>
- {if $step.icon}<i class="{$step.icon}"></i> {/if} {$step.name}
+ {if $step.icon}{booticon iname=$step.icon} {/if}{$step.name}
</a>
</li>
{/foreach}
@@ -83,7 +74,9 @@
</div>
<footer class="container content-center">
- {include file="bitpackage:kernel/bot_bar.tpl"}
+ {if $gBitInstaller->isInstalled()}
+ {include file="bitpackage:kernel/bot_bar.tpl"}
+ {/if}
</footer>
</body>
</html>
diff --git a/templates/install_admin_inc_done.tpl b/templates/install_admin_inc_done.tpl
index 579f2bc..94605d9 100644
--- a/templates/install_admin_inc_done.tpl
+++ b/templates/install_admin_inc_done.tpl
@@ -10,9 +10,7 @@
<ul class="result">
{foreach from=$warning item=warn}
<li class="warning">
- {booticon iname="icon-warning-sign" ipackage="icons" iexplain=warning}
- &nbsp;
- {$warn}
+ {booticon iname="fa-triangle-exclamation"} {$warn}
</li>
{/foreach}
</div>
diff --git a/templates/install_upgrade.tpl b/templates/install_upgrade.tpl
index bb3d75d..861f4c8 100644
--- a/templates/install_upgrade.tpl
+++ b/templates/install_upgrade.tpl
@@ -7,7 +7,7 @@
{if $packageUpgrades}
<h2>Packages and their upgrades</h2>
- <div class="alert alert-danger"><div class="pull-left"><i class="icon-warning-sign" style="font-size:3em;padding-right:20px;"></i></div> You are about to run an upgrade which might make changes to your database. We <strong>strongly</strong> recommend that you back up your database (preferably carry out the entire <a class="external" href="http://www.bitweaver.org/wiki/bitweaverUpgrade#Generalproceduretoupgrade">backup procedure</a>).</div>
+ <div class="alert alert-danger"><div class="pull-left">{booticon iname="fa-triangle-exclamation" style="font-size:3em;padding-right:20px;"}</div> You are about to run an upgrade which might make changes to your database. We <strong>strongly</strong> recommend that you back up your database (preferably carry out the entire <a class="external" href="http://www.bitweaver.org/wiki/bitweaverUpgrade#Generalproceduretoupgrade">backup procedure</a>).</div>
{foreach from=$packageUpgrades item=upgrade key=package}
{* users don't have the option to select what packages to upgrade since the code of the package is dependent on this upgrade
<h3>{forminput label="checkbox"}<input type="checkbox" name="packages[]" value="{$package}" checked="checked" /> {$package}{/forminput}</h3> *}
diff --git a/templates/install_welcome.tpl b/templates/install_welcome.tpl
index 1ba0b44..89bc382 100644
--- a/templates/install_welcome.tpl
+++ b/templates/install_welcome.tpl
@@ -3,9 +3,7 @@
<div class="col-md-8">
<h1>Welcome to the Bitweaver Installer</h1>
- {if $gBitUser->isAdmin()}
- <p class="alert alert-block">Since this does not appear to be your first install, you can access various pages of the installer. To install new packages, please visit <strong><a href="install.php?step=3">Packages</a></strong>.</p>
- {/if}
+ <p class="alert alert-block">Since this does not appear to be your first install, you can access various pages of the installer. To install new packages, please visit <strong><a href="install.php?step=3">Packages</a></strong>.</p>
<p>Thank you for choosing Bitweaver. This web content management system offers an unparalleled consonance of simplicity, performance, and flexibility. For questions, comments, and support, please visit <a class="external" href="http://www.bitweaver.org">bitweaver.org</a>. Help is available via <a class="external" href="http://www.bitweaver.org/">the forum</a> and via <a title="#bitweaver IRC Channel on freenode.net" class="external" href="http://www.bitweaver.org/wiki/Live+Support">#bitweaver chat</a>. Click to begin the install process:</p>
@@ -13,7 +11,7 @@
<div class="form-group">
{forminput}
- {if $gBitUser->isAdmin()}
+ {if $gBitInstaller->isInstalled()}
<a class="btn btn-default" href="{$smart.const.INSTALL_PKG_URL}?step=4">Upgrade</a> <a class="btn" href="{$smart.const.INSTALL_PKG_URL}?step=3">Install Packages</a>
<a class="btn btn-danger pull-right" href="{$smart.const.INSTALL_PKG_URL}?step=1">Restart Installation</a>
{else}