summaryrefslogtreecommitdiff
path: root/install.php
diff options
context:
space:
mode:
authorlsces <lester@lsces.co.uk>2026-04-05 15:29:16 +0100
committerlsces <lester@lsces.co.uk>2026-04-05 15:29:16 +0100
commit516dfc95fcd3558e4dc205f2a2b87b44bf47c4a8 (patch)
tree4e5bff0c166142bcd0f1841a3ad6ff14bcd1c260 /install.php
parenta285cd4a2b73315a874627faa9d28ddb538f26da (diff)
downloadinstall-516dfc95fcd3558e4dc205f2a2b87b44bf47c4a8.tar.gz
install-516dfc95fcd3558e4dc205f2a2b87b44bf47c4a8.tar.bz2
install-516dfc95fcd3558e4dc205f2a2b87b44bf47c4a8.zip
It does help if you stage changes from the right machine. This is the rework of the installer for namespace and php8.4
Diffstat (limited to 'install.php')
-rwxr-xr-x[-rw-r--r--]install.php17
1 files changed, 9 insertions, 8 deletions
diff --git a/install.php b/install.php
index fd901c4..be27b22 100644..100755
--- a/install.php
+++ b/install.php
@@ -1,4 +1,7 @@
<?php
+
+use Bitweaver\Languages\BitLanguage;
+use Bitweaver\Themes\BitThemes;
/**
* @version $Header$
* @package install
@@ -24,7 +27,7 @@ if( !empty( $_REQUEST['step'] ) && $_REQUEST['step'] == 0 ) {
if( get_cfg_var( 'memory_limit' ) !== FALSE && preg_replace( '/M/i','',get_cfg_var( 'memory_limit' )) < 15 ) {
$dir = dirname( $_SERVER['SCRIPT_NAME'] );
// We don't use smarty to avoid using any memory since we already know there is a problem.
- echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
+ echo '<!DOCTYPE HTML>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
@@ -65,10 +68,8 @@ 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();
}
@@ -150,12 +151,12 @@ $install_file[$i]['name'] = 'Done';
//don't increment last $i since it's used later on
// Needed for version number
-$gBitSmarty->assignByRef( 'gBitSystem', $gBitSystem );
+$gBitSmarty->assign( 'gBitSystem', $gBitSystem );
if( !empty( $_POST['signin'] ) ) {
$gBitUser->login( $_POST['user'], $_POST['pass'] );
if( !$gBitUser->isRegistered() ) {
- $gBitSmarty->assign( 'error', current( $gBitUser->mErrors ) );
+// $gBitSmarty->assign( 'error', current( $gBitUser->mErrors ) );
}
}
@@ -163,6 +164,7 @@ 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;
}
@@ -174,11 +176,10 @@ if( !strpos( $_SERVER['SCRIPT_NAME'],'install/install.php' ) ) {
}
// finally we are ready to include the actual php file
-include_once( INSTALL_PKG_INCLUDE_PATH.'install_'.$install_file[$step]['file'].'.php' );
+include_once 'includes/install_'.$install_file[$step]['file'].'.php';
$install_file = set_menu( $install_file, $step );
-$gBitSmarty->assignByRef( 'gBitInstaller', $gBitInstaller );
+$gBitSmarty->assign( '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' );
-?>