summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Kremmel <xing@synapse.plus.com>2005-07-17 17:36:05 +0000
committerMax Kremmel <xing@synapse.plus.com>2005-07-17 17:36:05 +0000
commit303cb7200c2ef868b25113af4d524122807dc2d5 (patch)
tree8fa6131147fd80c04fd1cc1a964d64b1da15a0ea
parent54937494744116492a4392f0cfb7fb9b625b124c (diff)
downloadinstall-303cb7200c2ef868b25113af4d524122807dc2d5.tar.gz
install-303cb7200c2ef868b25113af4d524122807dc2d5.tar.bz2
install-303cb7200c2ef868b25113af4d524122807dc2d5.zip
Merge recent changes from R1 to HEAD - never doing this again.
-rw-r--r--BitInstaller.php6
-rw-r--r--install.php9
-rw-r--r--install_checks.php4
-rw-r--r--install_database.php18
-rw-r--r--install_inc.php21
-rw-r--r--install_packages.php9
-rw-r--r--style/install.css4
-rw-r--r--templates/install_admin_inc_done.tpl2
-rw-r--r--templates/install_bit_settings.tpl2
-rw-r--r--templates/install_bit_settings_done.tpl14
-rw-r--r--templates/install_checks.tpl8
-rw-r--r--templates/install_database.tpl25
-rw-r--r--templates/install_login.tpl75
-rw-r--r--templates/install_packages.tpl12
14 files changed, 74 insertions, 135 deletions
diff --git a/BitInstaller.php b/BitInstaller.php
index 15e9926..76261f6 100644
--- a/BitInstaller.php
+++ b/BitInstaller.php
@@ -1,6 +1,6 @@
<?php
/**
- * @version $Header: /cvsroot/bitweaver/_bit_install/BitInstaller.php,v 1.4 2005/06/28 07:45:45 spiderr Exp $
+ * @version $Header: /cvsroot/bitweaver/_bit_install/BitInstaller.php,v 1.5 2005/07/17 17:36:04 squareing Exp $
* @package install
*/
@@ -43,6 +43,10 @@ class BitInstaller extends BitSystem {
$smarty->display( $pTemplate );
}
+ function isInstalled() {
+ return ( !empty( $this->mPackages['kernel']['installed'] ) );
+ }
+
function getWebServerUid() {
global $wwwuser;
global $wwwgroup;
diff --git a/install.php b/install.php
index 4631957..8fbb3fe 100644
--- a/install.php
+++ b/install.php
@@ -1,6 +1,6 @@
<?php
/**
- * @version $Header: /cvsroot/bitweaver/_bit_install/install.php,v 1.2 2005/06/28 07:45:45 spiderr Exp $
+ * @version $Header: /cvsroot/bitweaver/_bit_install/install.php,v 1.3 2005/07/17 17:36:04 squareing Exp $
* @package install
* @subpackage functions
*/
@@ -69,9 +69,6 @@ if( $onlyDuringFirstInstall ) {
$install_file[$i]['file'] = 'data';
$install_file[$i++]['name'] = 'Database Population';
}
-} else {
- $install_file[$i]['file'] = 'beta1_beta2';
- $install_file[$i++]['name'] = 'Beta 1 --&gt; Beta 2';
}
$install_file[$i]['file'] = 'final';
$install_file[$i]['name'] = 'Installation Complete';
@@ -103,10 +100,10 @@ for( $done = 0; $done < $step; $done++ ) {
if( $app == "_done" ) {
$install_file[$step]['state'] = 'success';
$done++;
-} elseif( $failedcommands || isset( $warning ) ) {
- $install_file[$step]['state'] = 'warning';
} elseif( isset( $error ) ) {
$install_file[$step]['state'] = 'error';
+} elseif( $failedcommands || isset( $warning ) ) {
+ $install_file[$step]['state'] = 'warning';
} else {
$install_file[$step]['state'] = 'current';
}
diff --git a/install_checks.php b/install_checks.php
index b90f207..aa368b5 100644
--- a/install_checks.php
+++ b/install_checks.php
@@ -1,6 +1,6 @@
<?php
/**
- * @version $Header: /cvsroot/bitweaver/_bit_install/install_checks.php,v 1.3 2005/06/28 07:45:45 spiderr Exp $
+ * @version $Header: /cvsroot/bitweaver/_bit_install/install_checks.php,v 1.4 2005/07/17 17:36:04 squareing Exp $
* @package install
* @subpackage functions
*/
@@ -119,6 +119,7 @@ function check_settings() {
$recommended[$i]['passed'] = TRUE;
} else {
$recommended[$i]['passed'] = FALSE;
+ $smarty->assign( 'memory_warning', TRUE );
}
$i++;
// now continue with easy toggle checks
@@ -148,6 +149,7 @@ function check_settings() {
$php_ini_gets = array(
array( '<strong>Maximum post size</strong> will restrict the size of files when you upload a file using a form.','post_max_size' ),
array( '<strong>Upload max filesize</strong> is related to maximim post size and will also limit the size of uploads.','upload_max_filesize' ),
+ array( '<strong>Maximum execution time</strong> is related to time outs in PHP - affects database upgrades and backups.','max_execution_time' ),
);
foreach( $php_ini_gets as $php_ini_get ) {
$show[] = $php_ini_get[0].'<br />This value is set to <strong>'.ini_get( $php_ini_get[1] ).'</strong>';
diff --git a/install_database.php b/install_database.php
index 91f9fdc..e5e6492 100644
--- a/install_database.php
+++ b/install_database.php
@@ -1,6 +1,6 @@
<?php
/**
- * @version $Header: /cvsroot/bitweaver/_bit_install/install_database.php,v 1.4 2005/06/28 07:45:45 spiderr Exp $
+ * @version $Header: /cvsroot/bitweaver/_bit_install/install_database.php,v 1.5 2005/07/17 17:36:04 squareing Exp $
* @package install
* @subpackage functions
*/
@@ -92,20 +92,8 @@ if( isset( $_REQUEST['fSubmitDbInfo'] ) ) {
$_SESSION['first_install'] = FALSE;
}
} else {
- $smarty->assign( 'error', 'Database connection could not be established.
- <ul>
- <li>Perhaps your database is not available</li>
- <li>or the server cannot connect to it</li>
- <li>or you have made a typo</li>
- <li>Please double check the following settings:
- <ul>
- <li><strong>database name</strong></li>
- <li><strong>database username</strong></li>
- <li><strong>database password</strong></li>
- </ul>
- </li>
- </ul>' );
- $error = 1;
+ $smarty->assign( 'error', TRUE );
+ $error = TRUE;
}
}
?>
diff --git a/install_inc.php b/install_inc.php
index 8b1643d..9615536 100644
--- a/install_inc.php
+++ b/install_inc.php
@@ -1,6 +1,6 @@
<?php
/**
- * @version $Header: /cvsroot/bitweaver/_bit_install/install_inc.php,v 1.3 2005/06/28 07:45:45 spiderr Exp $
+ * @version $Header: /cvsroot/bitweaver/_bit_install/install_inc.php,v 1.4 2005/07/17 17:36:04 squareing Exp $
* @package install
* @subpackage functions
*/
@@ -16,7 +16,7 @@ define( 'BIT_INSTALL', 'TRUE' );
global $smarty;
// use relative path if no CONFIG_INC path specified - we know we are in installer here...
-$config_file = empty($_SERVER['CONFIG_INC']) ? '../kernel/config_inc.php' : $_SERVER['CONFIG_INC'];
+$config_file = empty($_SERVER['CONFIG_INC']) ? '../kernel/config_inc.php' : $_SERVER['CONFIG_INC'];
// We can't call clean_file_path here even though we would like to.
$config_file = (strpos($_SERVER["SERVER_SOFTWARE"],"IIS") ? str_replace( "/", "\\", $config_file) : $config_file);
@@ -36,17 +36,21 @@ if( isset( $_REQUEST['fSubmitDbInfo'] ) ) {
}
}
-include("../bit_setup_inc.php");
+require_once("../bit_setup_inc.php");
require_once( 'BitInstaller.php' );
require_once( USERS_PKG_PATH.'BitUser.php' );
// set some preferences during installation
-global $gBitInstaller;
+global $gBitInstaller, $gBitSystem;
$gBitInstaller = new BitInstaller();
$gBitInstaller->setStyle( DEFAULT_THEME );
-$gBitInstaller->scanPackages();
-
+// this is important! since bit_setup_inc's are only included_once, and $gBitSystem has already scanned them, we need to make a copy - spiderr
+if( !empty( $gBitSystem->mPackages ) ) {
+ $gBitInstaller->mPackages = $gBitSystem->mPackages;
+} else {
+ $gBitInstaller->scanPackages();
+}
// we need this massive array available during install to work out if bitweaver has already been installed
$gBitInstaller->verifyInstalledPackages();
@@ -73,8 +77,6 @@ if( empty( $_REQUEST['baseurl'] ) ) {
}
$errors = '';
-$path = $_SERVER['SCRIPT_FILENAME'];
-$docroot = dirname($path);
// do some session stuff
check_session_save_path();
@@ -82,8 +84,6 @@ if( !isset($_SESSION) ) {
session_start();
}
-//vd($_SESSION);
-
// if we came from anywhere appart from some installer page, nuke all settings in the _SESSION and set first_install FALSE
if( ( !isset( $_SESSION['first_install'] ) || $_SESSION['first_install'] != TRUE ) ||
( isset( $_SESSION['upgrade'] ) && $_SESSION['upgrade'] != TRUE ) ||
@@ -99,5 +99,4 @@ if( ( !isset( $_SESSION['first_install'] ) || $_SESSION['first_install'] != TRUE
}
// this is needed because some pages display some additional information during a first install
$smarty->assign( 'first_install',$_SESSION['first_install'] );
-//vd($_SESSION);
?>
diff --git a/install_packages.php b/install_packages.php
index 05b27be..1a1200e 100644
--- a/install_packages.php
+++ b/install_packages.php
@@ -1,6 +1,6 @@
<?php
/**
- * @version $Header: /cvsroot/bitweaver/_bit_install/install_packages.php,v 1.4 2005/06/28 07:45:45 spiderr Exp $
+ * @version $Header: /cvsroot/bitweaver/_bit_install/install_packages.php,v 1.5 2005/07/17 17:36:04 squareing Exp $
* @package install
* @subpackage functions
*/
@@ -26,7 +26,7 @@ ksort( $schema );
$smarty->assign_by_ref( 'schema', $schema );
// confirm that we have all the admin data in the session before proceeding
-if( empty( $_SESSION['login'] ) || empty( $_SESSION['password'] ) || empty( $_SESSION['email'] ) ) {
+if( !$gBitInstaller && (empty( $_SESSION['login'] ) || empty( $_SESSION['password'] ) || empty( $_SESSION['email'] )) ) {
$smarty->assign( 'error', $error = TRUE );
}
@@ -136,11 +136,6 @@ if( isset( $_REQUEST['fSubmitDbCreate'] ) ) {
$gBitInstaller->storePreference( 'package_phpbb', 'y' );
}
- // and let's turn OFF tinymce cause it is annoying if you want to use the wiki
- if( defined( 'TINYMCE_PKG_NAME' ) ) {
- $gBitInstaller->storePreference( 'package_tinymce', 'n' );
- }
-
// 4. run the defaults through afterwards so we can be sure all tables needed have been created
foreach( array_keys( $gBitInstaller->mPackages ) as $package ) {
if( in_array( $package, $_REQUEST['PACKAGE'] ) || ( empty( $gBitInstaller->mPackages[$package]['installed'] ) && !empty( $gBitInstaller->mPackages[$package]['required'] ) ) ) {
diff --git a/style/install.css b/style/install.css
index 76cb326..bc25fe9 100644
--- a/style/install.css
+++ b/style/install.css
@@ -50,6 +50,10 @@ li.error,li.warning,li.success {list-style:none;padding:4px;margin:0;}
.submit {text-align:center;margin:10px 0 0 0;}
input[type="submit"] {border:1px solid black;background:#2c4268;color:#fff;padding:5px 10px;}
input[type="submit"]:hover, input[type="submit"]:focus {background:#fc0;color:#000;}
+
+dl {padding:0; margin:0.5em 0; line-height:1.3em;}
+dt {padding:0; margin:0; width:30%; text-align:right; font-weight:bold;}
+dd {padding:0; margin:-1.3em 0 0.5em 32%;}
/*navigation and status */
.nav {background:#fff;font-size:10px;border:1px solid #2c4268;}
.nav ul,.nav li,ul.result,.result li{padding:0;margin:0;}
diff --git a/templates/install_admin_inc_done.tpl b/templates/install_admin_inc_done.tpl
index 077e795..d7b06b1 100644
--- a/templates/install_admin_inc_done.tpl
+++ b/templates/install_admin_inc_done.tpl
@@ -17,7 +17,7 @@
{else}
<li class="success">
{biticon ipackage=liberty iname=success iexplain=success}
- Administrator configured succesfully
+ Administrator configured successfully
</li>
{/if}
</ul>
diff --git a/templates/install_bit_settings.tpl b/templates/install_bit_settings.tpl
index 69425fc..d8c170d 100644
--- a/templates/install_bit_settings.tpl
+++ b/templates/install_bit_settings.tpl
@@ -49,7 +49,7 @@
<option {if $package.name=='wiki'}selected="selected"{/if} value="{$package.name}">{$package.name}</option>
{/if}
{/foreach}
- {if $gBitSystemPrefs.feature_custom_home eq 'y'}
+ {if $gBitSystem->isFeatureActive( 'feature_custom_home' )}
<option value="custom_home"{if $bitIndex eq $urlIndex} selected="selected"{/if}>{tr}Custom home{/tr}</option>
{/if}
</select>
diff --git a/templates/install_bit_settings_done.tpl b/templates/install_bit_settings_done.tpl
index e05b557..5d1e1dc 100644
--- a/templates/install_bit_settings_done.tpl
+++ b/templates/install_bit_settings_done.tpl
@@ -54,12 +54,14 @@
{/forminput}
</div>
- <div class="row">
- {formlabel label="Image Processor"}
- {forminput}
- {formfeedback note=`$gBitSystemPrefs.image_processor`}
- {/forminput}
- </div>
+ {if $gBitSystemPrefs.image_processor}
+ <div class="row">
+ {formlabel label="Image Processor"}
+ {forminput}
+ {formfeedback note=`$gBitSystemPrefs.image_processor`}
+ {/forminput}
+ </div>
+ {/if}
<div class="row submit">
<input type="submit" value="Continue Install Process" />
diff --git a/templates/install_checks.tpl b/templates/install_checks.tpl
index b0a148f..d7afd55 100644
--- a/templates/install_checks.tpl
+++ b/templates/install_checks.tpl
@@ -75,7 +75,7 @@
{if $warning}
<li class="warning">
{biticon ipackage=liberty iname=warning iexplain=warning}
- Before you continue, we suggest that you try and install the mentioned extensions. This will avoid any unnecessary grievances later on.
+ Before you continue, we suggest that you try and install the mentioned extensions. If you can not do so, please bear in mind that these extensions can be installed at any time and might enhance your bitweaver experience.
</li>
{else}
<li class="success">
@@ -126,6 +126,12 @@
<div class="row">
<ul class="result">
+ {if $memory_warning}
+ <li class="warning">
+ {biticon ipackage=liberty iname=warning iexplain=warning}
+ Your memory limit settings are rather low. bitweaver requires at least 8MB memory to run, even having a limit of 8MB might cause undesired results. If you end up laoding blank pages, it might be the <strong>memory_limit</strong> setting in your <strong>php.ini</strong> file. if possible, please get your host to increase the limit to <strong>16MB</strong>.
+ </li>
+ {/if}
{if $rec_warning}
<li class="warning">
{biticon ipackage=liberty iname=warning iexplain=warning}
diff --git a/templates/install_database.tpl b/templates/install_database.tpl
index 0222946..00adcfc 100644
--- a/templates/install_database.tpl
+++ b/templates/install_database.tpl
@@ -15,7 +15,19 @@
{elseif $error}
<li class="error">
{biticon ipackage=liberty iname=error iexplain=error}
- {$error}
+ Database connection could not be established.
+ <ul>
+ <li>Perhaps your database is not available</li>
+ <li>or the server cannot connect to it</li>
+ <li>or you have made a typo</li>
+ <li>Please double check the following settings:
+ <ul>
+ <li><strong>database name</strong></li>
+ <li><strong>database username</strong></li>
+ <li><strong>database password</strong></li>
+ </ul>
+ </li>
+ </ul>
</li>
{/if}
</ul>
@@ -34,6 +46,7 @@
{formfeedback warning='You currently have no Database installed that works here. If you feel this is wrong, please contact the <a class="external" href="http://www.bitweaver.org/">bitweaver Team</a>.'}
{/if}
{formhelp note="The type of database you intend to use."}
+ {formfeedback warning="If the database you wish to use is not listed above, the version of PHP on this server does not have support for that database installed or compiled in."}
{/forminput}
</div>
@@ -74,7 +87,7 @@
create a Firebird alias for the bitweaver database in aliases.conf and then use that
aliase as the database name, or provide a full path and file name to create
the database in an existing directory."}
- {else}
+ {else}
{formhelp note="The name of the database where bitweaver will create tables. You can
create the database using mysqladmin, or PHPMyAdmin or ask your
hosting service to create a MySQL database.
@@ -88,9 +101,9 @@
{forminput}
<input type="text" size="25" name="prefix" id="prefix" value="{$db_prefix_bit}" />
{formhelp note="This prefix will be prepended to the begining of every table name to allow multiple
- independent install to share a single database. All bitweaver tables begin with 'bit_' or 'users_',
- so you rarely need to enter a prefix. If you are NOT running MySQL (i.e. Postgres, Oracle, etc.)
- you can end the prefix string with a '.' (period) to use a schema in systems that support it.
+ independent install to share a single database. All bitweaver tables begin with 'bit_' or 'users_',
+ so you rarely need to enter a prefix. If you are NOT running MySQL (i.e. Postgres, Oracle, etc.)
+ you can end the prefix string with a '.' (period) to use a schema in systems that support it.
<strong>MySQL does NOT support schemas.</strong>"}
{/forminput}
</div>
@@ -99,7 +112,7 @@
<div class="row">
{formlabel label="Firebird Installation Path" for="fbpath"}
{forminput}
- <input type="text" size="64" name="fbpath" id="fbpath" value="{$fbpath}" />
+ <input type="text" size="50" name="fbpath" id="fbpath" value="{$fbpath}" />
{formhelp note="If you have modified your Firebird installation from the default please enter the correct
path to the base firebird directory. This is used to find isql in order to create the initial blank
database and should be maintained in the correct format for your OS."}
diff --git a/templates/install_login.tpl b/templates/install_login.tpl
index 1354c68..e929d2d 100644
--- a/templates/install_login.tpl
+++ b/templates/install_login.tpl
@@ -1,76 +1,5 @@
-{* $Header: /cvsroot/bitweaver/_bit_install/templates/install_login.tpl,v 1.1 2005/06/19 04:51:19 bitweaver Exp $ *}
+{* $Header: /cvsroot/bitweaver/_bit_install/templates/install_login.tpl,v 1.2 2005/07/17 17:36:05 squareing Exp $ *}
<h1>You must be logged in as an administrator to run the installer.</h1>
-<form name="loginbox" action="{$login_url}" method="post" {if $gBitSystemPrefs.feature_challenge eq 'y'}onsubmit="doChallengeResponse()"{/if}>
- {if $gBitSystemPrefs.feature_challenge eq 'y'}
- <script language="javascript" type="text/javascript" src="lib/md5.js"></script>
- {literal}
- <script language="Javascript" type="text/javascript">
- <!--
- function doChallengeResponse() {
- hashstr = document.loginbox.user.value +
- document.loginbox.pass.value +
- document.loginbox.email.value;
- str = document.loginbox.user.value +
- MD5(hashstr) +
- document.loginbox.challenge.value;
- document.loginbox.response.value = MD5(str);
- document.loginbox.pass.value='';
- /*
- document.login.password.value = "";
- document.logintrue.username.value = document.login.username.value;
- document.logintrue.response.value = MD5(str);
- document.logintrue.submit();
- */
- document.loginbox.submit();
- return false;
- }
- // -->
- </script>
- {/literal}
- <input type="hidden" name="challenge" value="{$challenge|escape}" />
- <input type="hidden" name="response" value="" />
- {/if}
-
- {legend legend="Please log in"}
- <div class="row">
- {formlabel label="Username" for="login-user"}
- {forminput}
- <input type="text" name="user" id="login-user" size="15" />
- {/forminput}
- </div>
-
- {if $gBitSystemPrefs.feature_challenge eq 'y'}
- <div class="row">
- {formlabel label="email" for="login-email"}
- {forminput}
- <input type="text" name="email" id="login-email" size="15" />
- {/forminput}
- </div>
- {/if}
-
- <div class="row">
- {formlabel label="Password" for="login-pass"}
- {forminput}
- <input type="password" name="pass" id="login-pass" size="15" />
- {/forminput}
- </div>
-
- <div class="row submit">
- <input type="submit" name="login" value="{tr}login{/tr}" />
- </div>
-
- {if $http_login_url ne '' or $https_login_url ne ''}
- <a href="{$http_login_url}" title="{tr}Click here to login using the default security protocol{/tr}">{tr}standard{/tr}</a> |
- <a href="{$https_login_url}" title="{tr}Click here to login using a secure protocol{/tr}">{tr}secure{/tr}</a>
- {/if}
- {if $show_stay_in_ssl_mode eq 'y'}
- <label for="login-stayssl">{tr}stay in ssl mode{/tr}:</label>
- <input type="checkbox" name="stay_in_ssl_mode" id="login-stayssl" {if $stay_in_ssl_mode eq 'y'}checked="checked"{/if} />
- {/if}
- {if $show_stay_in_ssl_mode ne 'y'}
- <input type="hidden" name="stay_in_ssl_mode" value="{$stay_in_ssl_mode|escape}" />
- {/if}
- {/legend}
-</form>
+{include file="bitpackage:users/login_inc.tpl"}
diff --git a/templates/install_packages.tpl b/templates/install_packages.tpl
index 31bd35d..2653912 100644
--- a/templates/install_packages.tpl
+++ b/templates/install_packages.tpl
@@ -34,10 +34,10 @@
{if !$item.installed and !$item.required}
<div class="row">
<div class="formlabel">
- <label for="{$package}">{biticon ipackage=$package iname="pkg_$package" iexplain=`$item.name`}</label>
+ <label for="{$package}">{biticon ipackage=$package iname="pkg_$package" iexplain=`$package`}</label>
</div>
{forminput}
- <label><input type="checkbox" name="PACKAGE[]" value="{$package}" id="{$package}" checked="checked" /> {$item.name|capitalize}</label>
+ <label><input type="checkbox" name="PACKAGE[]" value="{$package}" id="{$package}" checked="checked" /> {$package|capitalize}</label>
{formhelp note=`$item.info`}
{formhelp note="<strong>Location</strong>: `$item.url`"}
{formhelp package=$package}
@@ -60,10 +60,10 @@
{if $item.installed and !$item.required}
<div class="row">
<div class="formlabel">
- <label for="{$package}">{biticon ipackage=$package iname="pkg_$package" iexplain=`$item.name`}</label>
+ <label for="{$package}">{biticon ipackage=$package iname="pkg_$package" iexplain=`$package`}</label>
</div>
{forminput}
- <label><input type="checkbox" name="PACKAGE[]" value="{$package}" id="{$package}" /> {$item.name|capitalize}</label>
+ <label><input type="checkbox" name="PACKAGE[]" value="{$package}" id="{$package}" /> {$package|capitalize}</label>
{formhelp note=`$item.info`}
{formhelp note="<strong>Location</strong>: `$item.url`"}
{formhelp package=$package}
@@ -94,13 +94,13 @@
{if $item.required}
<div class="row">
<div class="formlabel">
- {biticon ipackage=$package iname="pkg_$package" iexplain=`$item.name`}
+ {biticon ipackage=$package iname="pkg_$package" iexplain=`$package`}
</div>
{forminput}
{if !$item.installed}
<input type="hidden" name="PACKAGE[]" value="{$package}" />
{/if}
- {$item.name|capitalize}
+ {$package|capitalize}
{formhelp note=`$item.info`}
{formhelp note="<strong>Location</strong>: `$item.url`"}
{formhelp package=$package}