summaryrefslogtreecommitdiff
path: root/install_packages.php
diff options
context:
space:
mode:
authorMax Kremmel <xing@synapse.plus.com>2006-09-15 21:43:14 +0000
committerMax Kremmel <xing@synapse.plus.com>2006-09-15 21:43:14 +0000
commit0da99c81406710f794c8b4d28b94963538003e72 (patch)
tree3ba6ff99ef46424c38d6ce2eb4ee0c9e57a686c1 /install_packages.php
parent493123827709a3444ce8c0a86bffda76f5bf612d (diff)
downloadinstall-0da99c81406710f794c8b4d28b94963538003e72.tar.gz
install-0da99c81406710f794c8b4d28b94963538003e72.tar.bz2
install-0da99c81406710f794c8b4d28b94963538003e72.zip
add basic logging to liberty, clean up liberty_action_log table and enable some generic content loggin
Diffstat (limited to 'install_packages.php')
-rw-r--r--install_packages.php31
1 files changed, 29 insertions, 2 deletions
diff --git a/install_packages.php b/install_packages.php
index c4bbead..eccbf97 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.42 2006/09/02 15:33:15 wolff_borg Exp $
+ * @version $Header: /cvsroot/bitweaver/_bit_install/install_packages.php,v 1.43 2006/09/15 21:43:14 squareing Exp $
* @package install
* @subpackage functions
*/
@@ -286,9 +286,36 @@ if( !empty( $_REQUEST['cancel'] ) ) {
}
$gBitSmarty->assign( 'next_step', $step + 1 );
+
+ // display list of installed packages
asort( $packageList );
$gBitSmarty->assign( 'packageList', $packageList );
- $gBitSmarty->assign( 'failedcommands', !empty( $failedcommands ) ? $failedcommands : NULL );
+
+ // enter some log information to say we've initialised the system
+ if( empty( $failedcommands ) ) {
+ $logHash['action_log'] = array(
+ 'user_id' => ROOT_USER_ID,
+ 'title' => 'System Installation',
+ 'log_message' => 'Packages were installed and bitweaver is ready for use.',
+ // error message can't be blank if called statically
+ // if called statically, $this->mErrors is checked when this is empty
+ 'error_message' => ' ',
+ );
+
+ if( empty( $_SESSION['first_install'] ) ) {
+ $list = '';
+ foreach( $packageList as $method ) {
+ $list .= implode( ", ", $method );
+ }
+ $logHash['action_log']['title'] = "Package installation";
+ $logHash['action_log']['log_message'] = "The following package(s) were installed: $list";
+ }
+
+ LibertyContent::storeActionLog( $logHash );
+ } else {
+ $gBitSmarty->assign( 'failedcommands', !empty( $failedcommands ) ? $failedcommands : NULL );
+ }
+
// display the confirmation page
$app = '_done';
} else {