summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLester Caine <lester@lsces.co.uk>2026-05-14 09:54:15 +0100
committerLester Caine <lester@lsces.co.uk>2026-05-14 09:54:15 +0100
commiteddcb429ad24572676fce289fcae645178a185ba (patch)
treede370ace1f2ad37cde7bd14f5180f942fed16ccf
parent70d2c5630264b09b8c5df8324b1895365ed74628 (diff)
downloadinstall-eddcb429ad24572676fce289fcae645178a185ba.tar.gz
install-eddcb429ad24572676fce289fcae645178a185ba.tar.bz2
install-eddcb429ad24572676fce289fcae645178a185ba.zip
php-cs-fixer tidies to php8.5 standards
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
-rwxr-xr-x[-rw-r--r--]convert_r1_to_r2.sh0
-rwxr-xr-xcreate_firebird_database.php2
-rwxr-xr-x[-rw-r--r--]css/images/bg_body.pngbin492 -> 492 bytes
-rwxr-xr-x[-rw-r--r--]css/images/bg_content.pngbin5779 -> 5779 bytes
-rwxr-xr-x[-rw-r--r--]css/images/bg_header.pngbin69456 -> 69456 bytes
-rwxr-xr-x[-rw-r--r--]css/images/bg_header_logo-trans.pngbin13158 -> 13158 bytes
-rwxr-xr-x[-rw-r--r--]css/images/bitweaver_logo-trans.pngbin4308 -> 4308 bytes
-rwxr-xr-x[-rw-r--r--]css/images/danger-trans.pngbin7722 -> 7722 bytes
-rwxr-xr-x[-rw-r--r--]css/images/dialog-error-trans.pngbin653 -> 653 bytes
-rwxr-xr-x[-rw-r--r--]css/images/dialog-ok-trans.pngbin619 -> 619 bytes
-rwxr-xr-x[-rw-r--r--]css/images/dialog-warning-trans.pngbin603 -> 603 bytes
-rwxr-xr-x[-rw-r--r--]css/images/external.gifbin66 -> 66 bytes
-rwxr-xr-x[-rw-r--r--]css/images/favicon.icobin318 -> 318 bytes
-rwxr-xr-x[-rw-r--r--]css/images/go-down-trans.pngbin683 -> 683 bytes
-rwxr-xr-x[-rw-r--r--]css/images/media-playback-start-trans.pngbin660 -> 660 bytes
-rwxr-xr-x[-rw-r--r--]css/images/software-update-available-trans.pngbin740 -> 740 bytes
-rwxr-xr-x[-rw-r--r--]css/images/start-here-trans.pngbin658 -> 658 bytes
-rwxr-xr-x[-rw-r--r--]css/images/tab_shade.pngbin148 -> 148 bytes
-rwxr-xr-x[-rw-r--r--]favicon.icobin318 -> 318 bytes
-rwxr-xr-x[-rw-r--r--]icons/pkg_install.gifbin1745 -> 1745 bytes
-rwxr-xr-x[-rw-r--r--]icons/pkg_install.pngbin3305 -> 3305 bytes
-rwxr-xr-xincludes/classes/BitInstaller.php16
-rwxr-xr-xincludes/get_databases_inc.php4
-rwxr-xr-xincludes/install_bit_settings.php2
-rwxr-xr-xincludes/install_checks.php1
-rwxr-xr-xincludes/install_cleanup.php10
-rwxr-xr-xincludes/install_database.php12
-rwxr-xr-xincludes/install_database_reset.php2
-rwxr-xr-xincludes/install_inc.php6
-rwxr-xr-xincludes/install_options.php4
-rwxr-xr-xincludes/install_packages.php5
-rwxr-xr-xincludes/install_version.php2
-rwxr-xr-xindex.php2
-rwxr-xr-xmigrate.php4
-rwxr-xr-xmigrate_database.php8
-rwxr-xr-xmigrate_final.php3
-rwxr-xr-xprocess_sql.php1
-rw-r--r--templates/index.php2
-rwxr-xr-x[-rw-r--r--]templates/install_beta1_beta2_done.tpl0
-rwxr-xr-x[-rw-r--r--]templates/install_bit_settings_done.tpl0
-rwxr-xr-x[-rw-r--r--]templates/install_cleanup_done.tpl0
-rwxr-xr-x[-rw-r--r--]templates/install_database_done.tpl0
-rwxr-xr-x[-rw-r--r--]templates/install_database_reset.tpl0
-rwxr-xr-x[-rw-r--r--]templates/install_datapump.tpl0
-rwxr-xr-x[-rw-r--r--]templates/install_datapump_done.tpl0
-rwxr-xr-x[-rw-r--r--]templates/install_options.tpl0
-rwxr-xr-x[-rw-r--r--]templates/install_upgrade_done.tpl0
-rwxr-xr-x[-rw-r--r--]templates/install_version_done.tpl0
-rwxr-xr-x[-rw-r--r--]templates/migrate_database_done.tpl0
-rwxr-xr-x[-rw-r--r--]templates/migrate_final_done.tpl0
-rwxr-xr-x[-rw-r--r--]templates/migrate_welcome.tpl0
-rwxr-xr-x[-rw-r--r--]templates/upgrade_database.tpl0
-rwxr-xr-x[-rw-r--r--]templates/upgrade_database_done.tpl0
-rwxr-xr-x[-rw-r--r--]templates/upgrade_final_done.tpl0
-rwxr-xr-x[-rw-r--r--]templates/upgrade_packages.tpl0
-rwxr-xr-x[-rw-r--r--]templates/upgrade_packages_done.tpl0
-rwxr-xr-x[-rw-r--r--]templates/upgrade_ready.tpl0
-rwxr-xr-x[-rw-r--r--]templates/upgrade_results.tpl0
-rwxr-xr-x[-rw-r--r--]testfiles/test.rarbin83 -> 83 bytes
-rwxr-xr-x[-rw-r--r--]testfiles/test.tarbin10240 -> 10240 bytes
-rwxr-xr-x[-rw-r--r--]testfiles/test.tar.bz2bin126 -> 126 bytes
-rwxr-xr-x[-rw-r--r--]testfiles/test.tar.gzbin130 -> 130 bytes
-rwxr-xr-x[-rw-r--r--]testfiles/test.zipbin153 -> 153 bytes
-rwxr-xr-xupgrade_packages.php22
64 files changed, 45 insertions, 63 deletions
diff --git a/convert_r1_to_r2.sh b/convert_r1_to_r2.sh
index 3ac582f..3ac582f 100644..100755
--- a/convert_r1_to_r2.sh
+++ b/convert_r1_to_r2.sh
diff --git a/create_firebird_database.php b/create_firebird_database.php
index fe7e91a..9cc7708 100755
--- a/create_firebird_database.php
+++ b/create_firebird_database.php
@@ -40,7 +40,7 @@
if ($fp = fopen ($tmp_name, 'a+')) {
fwrite($fp, $sql);
- fclose($fp);
+ fclose($fp);
}
$command = sprintf('"%s" -u $user -p $pass -i %s', $fbpath, $tmp_name );
diff --git a/css/images/bg_body.png b/css/images/bg_body.png
index 0113235..0113235 100644..100755
--- a/css/images/bg_body.png
+++ b/css/images/bg_body.png
Binary files differ
diff --git a/css/images/bg_content.png b/css/images/bg_content.png
index 7799e29..7799e29 100644..100755
--- a/css/images/bg_content.png
+++ b/css/images/bg_content.png
Binary files differ
diff --git a/css/images/bg_header.png b/css/images/bg_header.png
index 6afed6a..6afed6a 100644..100755
--- a/css/images/bg_header.png
+++ b/css/images/bg_header.png
Binary files differ
diff --git a/css/images/bg_header_logo-trans.png b/css/images/bg_header_logo-trans.png
index f0f8477..f0f8477 100644..100755
--- a/css/images/bg_header_logo-trans.png
+++ b/css/images/bg_header_logo-trans.png
Binary files differ
diff --git a/css/images/bitweaver_logo-trans.png b/css/images/bitweaver_logo-trans.png
index 4029bff..4029bff 100644..100755
--- a/css/images/bitweaver_logo-trans.png
+++ b/css/images/bitweaver_logo-trans.png
Binary files differ
diff --git a/css/images/danger-trans.png b/css/images/danger-trans.png
index 9b5d608..9b5d608 100644..100755
--- a/css/images/danger-trans.png
+++ b/css/images/danger-trans.png
Binary files differ
diff --git a/css/images/dialog-error-trans.png b/css/images/dialog-error-trans.png
index 3bbbb4a..3bbbb4a 100644..100755
--- a/css/images/dialog-error-trans.png
+++ b/css/images/dialog-error-trans.png
Binary files differ
diff --git a/css/images/dialog-ok-trans.png b/css/images/dialog-ok-trans.png
index 3a6e9e1..3a6e9e1 100644..100755
--- a/css/images/dialog-ok-trans.png
+++ b/css/images/dialog-ok-trans.png
Binary files differ
diff --git a/css/images/dialog-warning-trans.png b/css/images/dialog-warning-trans.png
index a9e4ff3..a9e4ff3 100644..100755
--- a/css/images/dialog-warning-trans.png
+++ b/css/images/dialog-warning-trans.png
Binary files differ
diff --git a/css/images/external.gif b/css/images/external.gif
index 899654e..899654e 100644..100755
--- a/css/images/external.gif
+++ b/css/images/external.gif
Binary files differ
diff --git a/css/images/favicon.ico b/css/images/favicon.ico
index f84fe26..f84fe26 100644..100755
--- a/css/images/favicon.ico
+++ b/css/images/favicon.ico
Binary files differ
diff --git a/css/images/go-down-trans.png b/css/images/go-down-trans.png
index 3dd7fcc..3dd7fcc 100644..100755
--- a/css/images/go-down-trans.png
+++ b/css/images/go-down-trans.png
Binary files differ
diff --git a/css/images/media-playback-start-trans.png b/css/images/media-playback-start-trans.png
index a7de0fe..a7de0fe 100644..100755
--- a/css/images/media-playback-start-trans.png
+++ b/css/images/media-playback-start-trans.png
Binary files differ
diff --git a/css/images/software-update-available-trans.png b/css/images/software-update-available-trans.png
index ab8d494..ab8d494 100644..100755
--- a/css/images/software-update-available-trans.png
+++ b/css/images/software-update-available-trans.png
Binary files differ
diff --git a/css/images/start-here-trans.png b/css/images/start-here-trans.png
index bd516a5..bd516a5 100644..100755
--- a/css/images/start-here-trans.png
+++ b/css/images/start-here-trans.png
Binary files differ
diff --git a/css/images/tab_shade.png b/css/images/tab_shade.png
index 2495206..2495206 100644..100755
--- a/css/images/tab_shade.png
+++ b/css/images/tab_shade.png
Binary files differ
diff --git a/favicon.ico b/favicon.ico
index f84fe26..f84fe26 100644..100755
--- a/favicon.ico
+++ b/favicon.ico
Binary files differ
diff --git a/icons/pkg_install.gif b/icons/pkg_install.gif
index d11db0c..d11db0c 100644..100755
--- a/icons/pkg_install.gif
+++ b/icons/pkg_install.gif
Binary files differ
diff --git a/icons/pkg_install.png b/icons/pkg_install.png
index 6fdad07..6fdad07 100644..100755
--- a/icons/pkg_install.png
+++ b/icons/pkg_install.png
Binary files differ
diff --git a/includes/classes/BitInstaller.php b/includes/classes/BitInstaller.php
index d183aaa..9574956 100755
--- a/includes/classes/BitInstaller.php
+++ b/includes/classes/BitInstaller.php
@@ -66,7 +66,7 @@ class BitInstaller extends BitSystem {
$loginCol = strpos( $pLogin, '@' ) ? 'email' : 'login';
if( $gBitUser->validate( $pLogin, $pPassword, $pChallenge, $pResponse ) ) {
- $userInfo = $gBitUser->getUserInfo( array( $loginCol => $pLogin ) );
+ $userInfo = $gBitUser->getUserInfo( [ $loginCol => $pLogin ] );
if( $userInfo['user_id'] != ANONYMOUS_USER_ID ) {
// User is valid and not due to change pass..
@@ -119,7 +119,7 @@ class BitInstaller extends BitSystem {
* @access public
* @return void
*/
- public function registerPackageUpgrade( $pParams, $pUpgradeHash = array() ) {
+ public function registerPackageUpgrade( $pParams, $pUpgradeHash = [] ) {
if( $this->verifyPackageUpgrade( $pParams )) {
$this->registerPackageVersion( $pParams['package'], $pParams['version'] );
$this->mPackageUpgrades[$pParams['package']][$pParams['version']] = $pParams;
@@ -319,11 +319,11 @@ class BitInstaller extends BitSystem {
$errors[$version] = $this->applyUpgrade( $pPackage, $this->mPackageUpgrades[$pPackage][$version]['upgrade'] );
if( !empty( $errors[$version] )) {
return $errors;
- } else {
+ }
// if the upgrade ended without incidence, we store the package version.
// this way any successfully applied upgrade can only be applied once.
$this->storeVersion( $pPackage, $version );
- }
+
}
}
@@ -385,8 +385,8 @@ class BitInstaller extends BitSystem {
$completeTableName = $tablePrefix.$tableName;
$this->mDb->convertQuery( $completeTableName );
foreach( $alter[$tableName] as $from => $flds ) {
- $sql = ( is_string( $flds ) )
- ? $dict->ChangeTableSQL( $completeTableName, $flds )
+ $sql = ( is_string( $flds ) )
+ ? $dict->ChangeTableSQL( $completeTableName, $flds )
: $dict->ChangeTableSQL( $completeTableName, [ $flds ] );
if( $sql ) {
@@ -702,7 +702,7 @@ function upgrade_query_sort( $a, $b ) {
return 1;
} elseif( $b == 'SQL92' ) {
return -1;
- } else {
- return 0;
}
+ return 0;
+
}
diff --git a/includes/get_databases_inc.php b/includes/get_databases_inc.php
index ffc8bc7..51eb6ed 100755
--- a/includes/get_databases_inc.php
+++ b/includes/get_databases_inc.php
@@ -44,7 +44,7 @@ if( function_exists( 'fbird_connect' ) ) {
$gBitDbUser = 'SYSDBA';
$gBitDbPassword = 'masterkey';
}
-}
+}
if( extension_loaded( 'pdo_firebird' ) ) {
$dbtodsn['pdo'] = 'PDO Firebird';
if ( !empty($_REQUEST['fbpath']) ) $fbpath = $_REQUEST['fbpath'];
@@ -58,7 +58,7 @@ if( extension_loaded( 'pdo_firebird' ) ) {
$gBitDbUser = 'SYSDBA';
$gBitDbPassword = 'masterkey';
}
-}
+}
if( function_exists( 'sqlite_open' ) ) {
$dbtodsn['sqlite'] = 'SQLLite';
}
diff --git a/includes/install_bit_settings.php b/includes/install_bit_settings.php
index 67feb9d..8856c0d 100755
--- a/includes/install_bit_settings.php
+++ b/includes/install_bit_settings.php
@@ -11,7 +11,7 @@
/**
* assign next step in installation process
- */
+ */
$gBitSmarty->assign( 'next_step',$step );
/**
diff --git a/includes/install_checks.php b/includes/install_checks.php
index 55e1348..6175f19 100755
--- a/includes/install_checks.php
+++ b/includes/install_checks.php
@@ -195,7 +195,6 @@ function check_settings() {
}
}
-
// PEAR checks
$pears = [
'PEAR' => [
diff --git a/includes/install_cleanup.php b/includes/install_cleanup.php
index f45a9ef..660e752 100755
--- a/includes/install_cleanup.php
+++ b/includes/install_cleanup.php
@@ -12,18 +12,14 @@ $schema = $gBitInstaller->mPackages;
ksort( $schema );
$gBitSmarty->assign( 'schema', $schema );
-
-
// ===================== Post install table check =====================
// $dbTables is the output of BitSystem::verifyInstalledPackages() in
// install_inc.php and contains all tables that are not present in the database
// - even tables of packages that are not installed
$dbIntegrity = install_check_database_integrity( $dbTables );
-
-
// ===================== Permissions =====================
-// check all permissions, compare them to each other and see if there are old
+// check all permissions, compare them to each other and see if there are old
// permissions and ones that need to be inserted
$query = "SELECT * FROM `".BIT_DB_PREFIX."users_permissions` ORDER BY `package` ASC";
$result = $gBitInstaller->mDb->query( $query );
@@ -106,7 +102,7 @@ if (!empty( $_REQUEST['create_tables'] ) && !empty( $dbIntegrity )) {
}
// If we use MySql check which storage engine to use
- $build = isset( $_SESSION['use_innodb'] )
+ $build = isset( $_SESSION['use_innodb'] )
? ( ( $_SESSION['use_innodb'] == true ) ? [ 'NEW', 'MYSQL' => 'ENGINE=INNODB' ] : [ 'NEW', 'MYSQL' => 'ENGINE=MYISAM' ] ) : 'NEW';
$tablePrefix = $gBitInstaller->getTablePrefix();
@@ -189,8 +185,6 @@ $gBitSmarty->assign( 'dbIntegrity', $dbIntegrity );
// $gBitSmarty->assign( 'serviceList', $serviceList );
-
-
/**
* function - install_check_database_integrity
*/
diff --git a/includes/install_database.php b/includes/install_database.php
index 07d24e2..28478ca 100755
--- a/includes/install_database.php
+++ b/includes/install_database.php
@@ -18,17 +18,17 @@ if( isset( $_REQUEST['submit_db_info'] )) {
// avoid database change messages
ini_set( 'sybct.min_server_severity', '11' );
}
-
+
// for Oracle force database name to use one from tnsnames
// this way we avoid further StartTrans errors that was often reported,
if( $gBitDbType == 'oci8po' && empty( $gBitDbName ) ) {
$gBitSmarty->assign( 'error', TRUE );
$gBitSmarty->assign( 'errorMsg', "Please fill Database Name field. If you don't know it and you're using Express Edition it's probably 'XE'. Otherwise check your \"tnsnames.ora\" file to get appropriate one." );
- $error = TRUE;
+ $error = TRUE;
} else {
-
+
$gBitDb = ADONewConnection( $gBitDbType );
-
+
if( $gBitDb->Connect( $gBitDbHost, $gBitDbUser, $gBitDbPassword, $gBitDbType != 'pdo' ? $gBitDbName : NULL )) {
// display success page when done
$app = '_done';
@@ -44,7 +44,7 @@ if( isset( $_REQUEST['submit_db_info'] )) {
} else {
$_SESSION['first_install'] = FALSE;
}
-
+
if( $_SESSION['first_install'] == TRUE ) {
// For MySql only, on first install check if server support
// InnoDB and set a smarty var for template to offer using
@@ -62,7 +62,7 @@ if( isset( $_REQUEST['submit_db_info'] )) {
break 2;
}
}
-
+
$rs->MoveNext();
}
$rs->Close();
diff --git a/includes/install_database_reset.php b/includes/install_database_reset.php
index 7a3f234..a219c3c 100755
--- a/includes/install_database_reset.php
+++ b/includes/install_database_reset.php
@@ -17,7 +17,7 @@ if( isset( $_REQUEST['continue_install'] ) ) {
} elseif( isset( $_REQUEST['reset_config_inc'] ) ) {
$fw = fopen($config_file, 'w' );
if( isset( $fw ) ) {
- fwrite( $fw, '');
+ fwrite( $fw, '');
fclose( $fw );
}
header( 'Location: '.INSTALL_PKG_URL.'install.php' );
diff --git a/includes/install_inc.php b/includes/install_inc.php
index 04e3dfa..a39e410 100755
--- a/includes/install_inc.php
+++ b/includes/install_inc.php
@@ -1,9 +1,5 @@
<?php
-use Bitweaver\BitSystem;
-use Bitweaver\Plugins\ResourceBitpackage;
-use Bitweaver\Themes\BitSmarty;
-use Bitweaver\Themes\BitweaverExtension;
/**
* @version $Header$
* @package install
@@ -153,7 +149,7 @@ $bit_root_url = empty( $_REQUEST['baseurl'] )
global $gBitUser;
if( !empty( $_POST['signin'] ) ) {
- $gBitInstaller->login( $_REQUEST['user'], $_REQUEST['pass'] );
+ $gBitInstaller->login( $_REQUEST['user'], $_REQUEST['pass'] );
} elseif( is_object( $gBitUser ) && !empty( $_COOKIE[$gBitUser->getSiteCookieName()] ) && ( $gBitUser->mUserId = $gBitUser->getUserIdFromCookie( $_COOKIE[$gBitUser->getSiteCookieName()] ))) {
$userInfo = $gBitUser->getUserInfo( [ 'user_id' => $gBitUser->mUserId ] );
diff --git a/includes/install_options.php b/includes/install_options.php
index f4a93d1..7306ea8 100755
--- a/includes/install_options.php
+++ b/includes/install_options.php
@@ -31,6 +31,6 @@ if( isset( $_REQUEST['upgrade'] ) ) {
// Added check for IIS $_SERVER['HTTPS'] uses 'off' value - wolff_borg
header( 'Location: http'.((!empty($_SERVER['HTTPS'])&&$_SERVER['HTTPS'] != 'off')?'s':'').'://'.$_SERVER['HTTP_HOST'].INSTALL_PKG_URL.'install.php?step='.( $step + 1 ) );
die;
-} else {
- $gBitSmarty->assign( 'next_step',$step );
}
+ $gBitSmarty->assign( 'next_step',$step );
+
diff --git a/includes/install_packages.php b/includes/install_packages.php
index 05bd353..6979b1d 100755
--- a/includes/install_packages.php
+++ b/includes/install_packages.php
@@ -425,7 +425,6 @@ if( !empty( $_REQUEST['cancel'] ) ) {
$gBitInstaller->mPrefs = '';
$gBitInstaller->loadConfig();
-
$gBitInstaller->mDb->query( "DELETE FROM `".BIT_DB_PREFIX."kernel_config` WHERE `package`=?", [ $package ] );
// ---------------------- 5. ----------------------
// run the defaults through afterwards so we can be sure all tables needed have been created
@@ -459,7 +458,6 @@ if( !empty( $_REQUEST['cancel'] ) ) {
}
$gBitInstaller->mDb->CompleteTrans();
-
// ---------------------- 6. ----------------------
// register all content types for installed packages
foreach( $gBitInstaller->mContentClasses as $package => $classes ){
@@ -471,7 +469,6 @@ if( !empty( $_REQUEST['cancel'] ) ) {
}
}
-
// ---------------------- 7. ----------------------
// Do stuff that only applies during the first install
$gBitInstaller->StartTrans();
@@ -610,8 +607,6 @@ if( !empty( $_REQUEST['cancel'] ) ) {
}
}
-
-
// ---------------------- 8. ----------------------
// woo! we're done with the installation bit - below here is some generic installer stuff
$gBitSmarty->assign( 'next_step', $step + 1 );
diff --git a/includes/install_version.php b/includes/install_version.php
index 5a97442..6004133 100755
--- a/includes/install_version.php
+++ b/includes/install_version.php
@@ -21,7 +21,7 @@ if( version_compare( '2.1.0-beta', $gBitSystem->getVersion(), '>' )) {
// get a list of all groups and their permissions
$listHash = [
'only_root_groups' => true,
- 'sort_mode' => !empty( $_REQUEST['sort_mode'] ) ? $_REQUEST['sort_mode'] : 'group_name_asc'
+ 'sort_mode' => !empty( $_REQUEST['sort_mode'] ) ? $_REQUEST['sort_mode'] : 'group_name_asc',
];
$allGroups = $gBitUser->getAllGroups( $listHash );
$allPerms = $gBitUser->getGroupPermissions( $_REQUEST );
diff --git a/index.php b/index.php
index ac3192f..01ad800 100755
--- a/index.php
+++ b/index.php
@@ -1,4 +1,4 @@
-<?php
+<?php
// This is not a package.
header ("location: ../index.php"); \ No newline at end of file
diff --git a/migrate.php b/migrate.php
index 3df2c8c..5faba1a 100755
--- a/migrate.php
+++ b/migrate.php
@@ -35,9 +35,9 @@ $install_file[$i]['name'] = 'Migration Complete';
// currently i can't think of a better way to secure the migrate pages
// redirect to the installer if we aren't sent here by the installer and the migrate session variable hasn't been set
if( !isset( $_SESSION['migrate'] ) || $_SESSION['migrate'] != true ||
- !isset( $_SERVER['HTTP_REFERER'] ) ||
+ !isset( $_SERVER['HTTP_REFERER'] ) ||
isset( $_SERVER['HTTP_REFERER'] ) &&
- ( ( !strpos( $_SERVER['HTTP_REFERER'],'install/install.php' ) ) && ( !strpos( $_SERVER['HTTP_REFERER'],'install/upgrade.php' ) ) && ( !strpos( $_SERVER['HTTP_REFERER'],'install/migrate.php' ) ) )
+ ( ( !strpos( $_SERVER['HTTP_REFERER'],'install/install.php' ) ) && ( !strpos( $_SERVER['HTTP_REFERER'],'install/upgrade.php' ) ) && ( !strpos( $_SERVER['HTTP_REFERER'],'install/migrate.php' ) ) )
) {
header( 'Location: '.INSTALL_PKG_URL.'install.php' );
die;
diff --git a/migrate_database.php b/migrate_database.php
index b03f176..df6f090 100755
--- a/migrate_database.php
+++ b/migrate_database.php
@@ -37,7 +37,7 @@ if( isset( $_REQUEST['db_src'] ) ) {
$gBitSmarty->assign( 'name_dst', $_REQUEST['name_dst'] );
$gBitSmarty->assign( 'prefix_dst', $_REQUEST['prefix_dst'] );
- $skip_tables = isset($_REQUEST['skip_tables']) ? $_REQUEST['skip_tables'] : [];
+ $skip_tables = $_REQUEST['skip_tables'] ?? [];
$gBitSmarty->assign( 'skip_tables_select', $skip_tables );
$empty_tables = isset($_REQUEST['empty_tables']);
$gBitSmarty->assign( 'empty_tables', $empty_tables );
@@ -66,9 +66,8 @@ if (isset($_REQUEST['fSubmitDatabase']) || isset($_REQUEST['fUpdateTables'])) {
if (testDatabase()) {
$gBitSmarty->assign( 'error_src', true );
return;
- } else {
- $gDb_src = new BitDb();
}
+ $gDb_src = new BitDb();
$tables_src = $gDb_src->MetaTables();
@@ -87,9 +86,8 @@ if (isset($_REQUEST['fSubmitDatabase']) || isset($_REQUEST['fUpdateTables'])) {
if (testDatabase()) {
$gBitSmarty->assign( 'error_dst', true );
return;
- } else {
- $gDb_dst = new BitDb();
}
+ $gDb_dst = new BitDb();
require_once 'create_config_inc.php';
$createHash = [
diff --git a/migrate_final.php b/migrate_final.php
index 62b35f1..e07aaa8 100755
--- a/migrate_final.php
+++ b/migrate_final.php
@@ -20,6 +20,5 @@ if( isset( $_REQUEST['enter_bitweaver'] ) ) {
} elseif( isset( $_REQUEST['continue_install'] ) ) {
header( 'Location: '.INSTALL_PKG_URL.'install.php?step=4' );
die;
-} else {
+}
$gBitSmarty->assign( 'next_step',$step );
-} \ No newline at end of file
diff --git a/process_sql.php b/process_sql.php
index cd08952..c78a09d 100755
--- a/process_sql.php
+++ b/process_sql.php
@@ -11,6 +11,7 @@
*/
namespace Bitweaver;
+
define( 'BIT_INSTALL', 'true' );
global $failedcommands;
// keep some crappy notices from spewing
diff --git a/templates/index.php b/templates/index.php
index 3e305fe..c0437d0 100644
--- a/templates/index.php
+++ b/templates/index.php
@@ -1,4 +1,4 @@
-<?php
+<?php
// This is not a package.
header ("location: ../index.php");
diff --git a/templates/install_beta1_beta2_done.tpl b/templates/install_beta1_beta2_done.tpl
index f464bd9..f464bd9 100644..100755
--- a/templates/install_beta1_beta2_done.tpl
+++ b/templates/install_beta1_beta2_done.tpl
diff --git a/templates/install_bit_settings_done.tpl b/templates/install_bit_settings_done.tpl
index 086e93a..086e93a 100644..100755
--- a/templates/install_bit_settings_done.tpl
+++ b/templates/install_bit_settings_done.tpl
diff --git a/templates/install_cleanup_done.tpl b/templates/install_cleanup_done.tpl
index 5ef3445..5ef3445 100644..100755
--- a/templates/install_cleanup_done.tpl
+++ b/templates/install_cleanup_done.tpl
diff --git a/templates/install_database_done.tpl b/templates/install_database_done.tpl
index ceca098..ceca098 100644..100755
--- a/templates/install_database_done.tpl
+++ b/templates/install_database_done.tpl
diff --git a/templates/install_database_reset.tpl b/templates/install_database_reset.tpl
index f5387f4..f5387f4 100644..100755
--- a/templates/install_database_reset.tpl
+++ b/templates/install_database_reset.tpl
diff --git a/templates/install_datapump.tpl b/templates/install_datapump.tpl
index 94e529d..94e529d 100644..100755
--- a/templates/install_datapump.tpl
+++ b/templates/install_datapump.tpl
diff --git a/templates/install_datapump_done.tpl b/templates/install_datapump_done.tpl
index 3a1d5d0..3a1d5d0 100644..100755
--- a/templates/install_datapump_done.tpl
+++ b/templates/install_datapump_done.tpl
diff --git a/templates/install_options.tpl b/templates/install_options.tpl
index 2d76c84..2d76c84 100644..100755
--- a/templates/install_options.tpl
+++ b/templates/install_options.tpl
diff --git a/templates/install_upgrade_done.tpl b/templates/install_upgrade_done.tpl
index 5016c22..5016c22 100644..100755
--- a/templates/install_upgrade_done.tpl
+++ b/templates/install_upgrade_done.tpl
diff --git a/templates/install_version_done.tpl b/templates/install_version_done.tpl
index 8f8e2d0..8f8e2d0 100644..100755
--- a/templates/install_version_done.tpl
+++ b/templates/install_version_done.tpl
diff --git a/templates/migrate_database_done.tpl b/templates/migrate_database_done.tpl
index fa1c003..fa1c003 100644..100755
--- a/templates/migrate_database_done.tpl
+++ b/templates/migrate_database_done.tpl
diff --git a/templates/migrate_final_done.tpl b/templates/migrate_final_done.tpl
index e0179b1..e0179b1 100644..100755
--- a/templates/migrate_final_done.tpl
+++ b/templates/migrate_final_done.tpl
diff --git a/templates/migrate_welcome.tpl b/templates/migrate_welcome.tpl
index 0a99d3e..0a99d3e 100644..100755
--- a/templates/migrate_welcome.tpl
+++ b/templates/migrate_welcome.tpl
diff --git a/templates/upgrade_database.tpl b/templates/upgrade_database.tpl
index 6f5c50a..6f5c50a 100644..100755
--- a/templates/upgrade_database.tpl
+++ b/templates/upgrade_database.tpl
diff --git a/templates/upgrade_database_done.tpl b/templates/upgrade_database_done.tpl
index 6f5c50a..6f5c50a 100644..100755
--- a/templates/upgrade_database_done.tpl
+++ b/templates/upgrade_database_done.tpl
diff --git a/templates/upgrade_final_done.tpl b/templates/upgrade_final_done.tpl
index e5f20de..e5f20de 100644..100755
--- a/templates/upgrade_final_done.tpl
+++ b/templates/upgrade_final_done.tpl
diff --git a/templates/upgrade_packages.tpl b/templates/upgrade_packages.tpl
index 9517a09..9517a09 100644..100755
--- a/templates/upgrade_packages.tpl
+++ b/templates/upgrade_packages.tpl
diff --git a/templates/upgrade_packages_done.tpl b/templates/upgrade_packages_done.tpl
index fe1adcb..fe1adcb 100644..100755
--- a/templates/upgrade_packages_done.tpl
+++ b/templates/upgrade_packages_done.tpl
diff --git a/templates/upgrade_ready.tpl b/templates/upgrade_ready.tpl
index f8a598c..f8a598c 100644..100755
--- a/templates/upgrade_ready.tpl
+++ b/templates/upgrade_ready.tpl
diff --git a/templates/upgrade_results.tpl b/templates/upgrade_results.tpl
index 0d54663..0d54663 100644..100755
--- a/templates/upgrade_results.tpl
+++ b/templates/upgrade_results.tpl
diff --git a/testfiles/test.rar b/testfiles/test.rar
index 05b59e6..05b59e6 100644..100755
--- a/testfiles/test.rar
+++ b/testfiles/test.rar
Binary files differ
diff --git a/testfiles/test.tar b/testfiles/test.tar
index 840a7ac..840a7ac 100644..100755
--- a/testfiles/test.tar
+++ b/testfiles/test.tar
Binary files differ
diff --git a/testfiles/test.tar.bz2 b/testfiles/test.tar.bz2
index 43f9b61..43f9b61 100644..100755
--- a/testfiles/test.tar.bz2
+++ b/testfiles/test.tar.bz2
Binary files differ
diff --git a/testfiles/test.tar.gz b/testfiles/test.tar.gz
index 70cf64e..70cf64e 100644..100755
--- a/testfiles/test.tar.gz
+++ b/testfiles/test.tar.gz
Binary files differ
diff --git a/testfiles/test.zip b/testfiles/test.zip
index d1f1f10..d1f1f10 100644..100755
--- a/testfiles/test.zip
+++ b/testfiles/test.zip
Binary files differ
diff --git a/upgrade_packages.php b/upgrade_packages.php
index 5098682..fac634c 100755
--- a/upgrade_packages.php
+++ b/upgrade_packages.php
@@ -37,26 +37,26 @@ if( !empty( $_SESSION['upgrade_r1'] ) ) {
$gBitSmarty->assign( 'upgrading', $upgrading );
}
-$upgradePath = array (
- 'TikiWiki 1.8' => array(
+$upgradePath = [
+ 'TikiWiki 1.8' => [
'TIKIWIKI18' => 'BONNIE',
'BONNIE' => 'BWR1',
'BWR1' => 'BWR2',
- ),
- 'TikiWiki 1.9' => array(
+ ],
+ 'TikiWiki 1.9' => [
'TIKIWIKI19' => 'TIKIWIKI18',
'TIKIWIKI18' => 'BONNIE',
'BONNIE' => 'BWR1',
'BWR1' => 'BWR2',
- ),
- 'BWR0' => array(
+ ],
+ 'BWR0' => [
'BONNIE' => 'BWR1',
'BWR1' => 'BWR2',
- ),
- 'BWR1' => array(
+ ],
+ 'BWR1' => [
'BWR1' => 'BWR2',
- ),
-);
+ ],
+];
$gBitSmarty->assign( 'upgradeFrom', $gUpgradeFrom );
$gBitSmarty->assign( 'upgradeTo', $gUpgradeTo );
@@ -75,7 +75,7 @@ if( !empty( $_REQUEST['upgrade'] ) ) {
$gUpgradeTo = $to;
$gBitInstaller->scanPackages( 'admin/upgrade_inc.php', false );
- $firstPackages = array_flip( array( 'kernel', 'users', 'categories', 'liberty', 'wiki', 'blogs' ) );
+ $firstPackages = array_flip( [ 'kernel', 'users', 'categories', 'liberty', 'wiki', 'blogs' ] );
$secondPackages = array_flip( $upgrading );
// upgrade the ones that are order critical first