[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] phpgwapi/inc class.setup_process.inc.php
From: |
Dave Hall |
Subject: |
[Phpgroupware-cvs] phpgwapi/inc class.setup_process.inc.php |
Date: |
Wed, 19 Jul 2006 04:17:51 +0000 |
CVSROOT: /cvsroot/phpgwapi
Module name: phpgwapi
Changes by: Dave Hall <skwashd> 06/07/19 04:17:51
Modified files:
inc : class.setup_process.inc.php
Log message:
make setup work again
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/phpgwapi/inc/class.setup_process.inc.php?cvsroot=phpgwapi&r1=1.14&r2=1.15
Patches:
Index: class.setup_process.inc.php
===================================================================
RCS file: /cvsroot/phpgwapi/phpgwapi/inc/class.setup_process.inc.php,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- class.setup_process.inc.php 15 May 2006 08:01:26 -0000 1.14
+++ class.setup_process.inc.php 19 Jul 2006 04:17:51 -0000 1.15
@@ -6,7 +6,7 @@
* @license http://www.fsf.org/licenses/gpl.html GNU General Public
License
* @package phpgwapi
* @subpackage application
- * @version $Id: class.setup_process.inc.php,v 1.14 2006/05/15 08:01:26
sigurdne Exp $
+ * @version $Id: class.setup_process.inc.php,v 1.15 2006/07/19 04:17:51
skwashd Exp $
*/
/**
@@ -73,19 +73,21 @@
$pass['phpgwapi'] =
$setup_info['phpgwapi'];
$pass['admin'] = $setup_info['admin'];
$pass['preferences'] = $setup_info['preferences'];
+ $setup_info =
$GLOBALS['phpgw_setup']->detection->get_versions($setup_info);
@reset($setup_info);
- // $setup_info =
$GLOBALS['phpgw_setup']->detection->get_versions($setup_info);
- // @reset($setup_info);
$i = 1;
$passed = array();
$passing = array();
$pass_string = implode (':', $pass);
$passing_string = implode (':', $passing);
- while($pass_string != $passing_string)
+ while(count($pass) && $pass_string != $passing_string)
{
$passing = array();
- if($DEBUG) { echo '<br>process->pass(): #' . $i
. ' for ' . $method . ' processing' . "\n"; }
+ if($DEBUG)
+ {
+ echo '<br>process->pass(): #' . $i . '
for ' . $method . ' processing' . "\n";
+ }
/* Check current versions and dependencies */
$setup_info =
$GLOBALS['phpgw_setup']->detection->get_db_versions($setup_info);
$setup_info =
$GLOBALS['phpgw_setup']->detection->compare_versions($setup_info);
@@ -122,7 +124,7 @@
break;
case 'upgrade':
/* Run upgrade scripts on each
app in the list */
- $passing =
$this->upgrade($pass,$DEBUG);
+ $passing =
$this->upgrade($pass, $DEBUG);
$passing =
$this->upgrade_langs($passing,$DEBUG);
//_debug_array($pass);exit;
break;
@@ -158,7 +160,7 @@
}
}
- $i++;
+ ++$i;
if($i == 20) /* Then oops it broke */
{
echo '<br>Setup failure: excess looping
in process->pass():'."\n";
@@ -516,13 +518,13 @@
@abstract process available upgrades in each application/setup
dir
@param $appinfo array of application info from setup.inc.php
files, etc.
*/
- function upgrade($setup_info,$DEBUG=False)
+ function upgrade($setup_info, $DEBUG = false)
{
if( !isset($GLOBALS['phpgw_setup']->oProc) ||
!$GLOBALS['phpgw_setup']->oProc )
{
$this->init_process();
}
- $GLOBALS['phpgw_setup']->oProc->m_odb->HaltOnError =
'no';
+ $GLOBALS['phpgw_setup']->oProc->m_odb->HaltOnError =
'report';
$GLOBALS['phpgw_setup']->oProc->m_bDeltaOnly = True;
if ( !is_array($setup_info) )
@@ -590,16 +592,16 @@
break;
*/
}
- if(file_exists($appdir .
'tables_update.inc.php') && address@hidden>updateincluded[$appname])
+ if ( file_exists($appdir .
'tables_update.inc.php') )
{
include_once($appdir .
'tables_update.inc.php');
- $this->updateincluded[$appname]
= True;
+ if ( isset($test) &&
is_array($test) && count($test) )
+ {
/* $test array comes from
update file. It is a list of available upgrade functions */
- @reset($test);
- while(list($x,$value) =
@each($test))
+ foreach ( $test as $x
=> $value )
{
- $currentver =
$setup_info[$key]['currentver'];
+ $currentver =
$setup_info[$appname]['currentver'];
/* build upgrade
function name */
$function = $appname .
'_upgrade' . ereg_replace("\.", '_', $value);
@@ -637,14 +639,15 @@
}
//break;
}
- elseif(($value ==
$currentver) || !$currentver)
+ elseif (
($value == $currentver) || !$currentver)
{
- /* start
upgrading db in addition to baseline */
+ echo
"$app, val: $value cur: $currentver <br />";
+ /*
start upgrading db in addition to bas eline */
$GLOBALS['phpgw_setup']->oProc->m_bDeltaOnly = False;
if($DEBUG) {
echo '<br>process->upgrade(): running ' . $function; }
/* run upgrade
function */
$success =
$function();
- if($success !=
False)
+ if (
$success )
{
$setup_info[$key]['currentver'] = $success;
if($DEBUG)
@@ -688,15 +691,18 @@
break;
}
}
- elseif
($GLOBALS['phpgw_setup']->alessthanb($value,$currentver))
+ elseif (
$GLOBALS['phpgw_setup']->alessthanb($value, $currentver) )
{
- // if($DEBUG) {
echo '<br>process->upgrade(): running baseline delta only: ' . $function .
'...'; }
- //
$GLOBALS['phpgw_setup']->oProc->m_bDeltaOnly = True;
- // $success =
$function();
+ /*
+
if($DEBUG) { echo '<br>process->upgrade(): running baseline delta only: ' .
$function . '...'; }
+
$GLOBALS['phpgw_setup']->oProc->m_bDeltaOnly = True;
+
$success = $function();
+ */
}
else
{
- break;
+ //break;
+ }
}
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] phpgwapi/inc class.setup_process.inc.php,
Dave Hall <=