[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] phpgwapi/inc class.setup_process.inc.php,1.12
From: |
skwashd |
Subject: |
[Phpgroupware-cvs] phpgwapi/inc class.setup_process.inc.php,1.12 |
Date: |
Sun, 15 May 2005 16:28:00 +0200 |
Update of phpgwapi/inc
Modified Files:
Branch: MAIN
class.setup_process.inc.php lines: +44 -26
Log Message:
more cleanups and tweaks
====================================================
Index: phpgwapi/inc/class.setup_process.inc.php
diff -u phpgwapi/inc/class.setup_process.inc.php:1.11
phpgwapi/inc/class.setup_process.inc.php:1.12
--- phpgwapi/inc/class.setup_process.inc.php:1.11 Sun Jan 9 01:46:39 2005
+++ phpgwapi/inc/class.setup_process.inc.php Sun May 15 14:28:09 2005
@@ -189,7 +189,7 @@
*/
function droptables($setup_info,$DEBUG=False)
{
- if(address@hidden'phpgw_setup']->oProc)
+ if( !isset($GLOBALS['phpgw_setup']->oProc) ||
!$GLOBALS['phpgw_setup']->oProc )
{
$this->init_process();
}
@@ -197,13 +197,17 @@
/* The following is built so below we won't try to drop
a table that isn't there. */
$tablenames =
$GLOBALS['phpgw_setup']->db->table_names();
- while(list($key,$val) = @each($tablenames))
+ if ( !is_array($tablenames) )
{
- $tables[] = $val;
+ $tablenames = array();
}
+ $tables = array_values($tablenames);
- @reset($setup_info);
- while(list($key,$null) = @each($setup_info))
+ if ( !is_array($setup_info) )
+ {
+ $setup_info = array();
+ }
+ foreach($setup_info as $key => $ignored)
{
if($setup_info[$key]['tables'])
{
@@ -231,16 +235,19 @@
@param $appinfo array of application info from setup.inc.php
files, etc.
@discussion This duplicates the old newtables behavior, using
schema_proc
*/
- function current($setup_info,$DEBUG=False)
+ function current($setup_info, $DEBUG=False)
{
- if(address@hidden'phpgw_setup']->oProc)
+ if( !isset($GLOBALS['phpgw_setup']->oProc) ||
!$GLOBALS['phpgw_setup']->oProc )
{
$this->init_process();
}
$GLOBALS['phpgw_setup']->oProc->m_bDeltaOnly = False;
- @reset($setup_info);
- while(list($key,$null) = @each($setup_info))
+ if ( !is_array($setup_info) )
+ {
+ $setup_info = array();
+ }
+ foreach($setup_info as $key => $ignored)
{
$enabled = False;
$appname = $setup_info[$key]['name'];
@@ -315,15 +322,17 @@
*/
function default_records($setup_info,$DEBUG=False)
{
- if(address@hidden'phpgw_setup']->oProc)
+ if( !isset($GLOBALS['phpgw_setup']->oProc) ||
!$GLOBALS['phpgw_setup']->oProc)
{
$this->init_process();
}
$GLOBALS['phpgw_setup']->oProc->m_bDeltaOnly = False;
-// $oProc = $GLOBALS['phpgw_setup']->oProc;
- @reset($setup_info);
- while(list($key,$null) = @each($setup_info))
+ if ( !is_array($setup_info) )
+ {
+ $setup_info = array();
+ }
+ foreach($setup_info as $key => $ignored)
{
$appname = $setup_info[$key]['name'];
$appdir = PHPGW_SERVER_ROOT . SEP . $appname .
SEP . 'setup' . SEP;
@@ -423,15 +432,17 @@
*/
function test_data($setup_info,$DEBUG=False)
{
- if(address@hidden'phpgw_setup']->oProc)
+ if( !isset($GLOBALS['phpgw_setup']->oProc) ||
!$GLOBALS['phpgw_setup']->oProc)
{
$this->init_process();
}
$GLOBALS['phpgw_setup']->oProc->m_bDeltaOnly = False;
-// $oProc = $GLOBALS['phpgw_setup']->oProc;
- @reset($setup_info);
- while(list($key,$null) = @each($setup_info))
+ if ( !is_array($setup_info) )
+ {
+ $setup_info = array();
+ }
+ foreach($setup_info as $key => $ignored)
{
$appname = $setup_info[$key]['name'];
$appdir = PHPGW_SERVER_ROOT . SEP . $appname .
SEP . 'setup' . SEP;
@@ -459,13 +470,16 @@
*/
function baseline($setup_info,$DEBUG=False)
{
- if(address@hidden'phpgw_setup']->oProc)
+ if ( !isset($GLOBALS['phpgw_setup']->oProc) ||
!$GLOBALS['phpgw_setup'] )
{
$this->init_process();
}
- @reset($setup_info);
- while(list($key,$null) = @each($setup_info))
+ if ( !is_array($setup_info) )
+ {
+ $setup_info = array();
+ }
+ foreach($setup_info as $key => $ignored)
{
$appname = $setup_info[$key]['name'];
$appdir = PHPGW_SERVER_ROOT . SEP . $appname .
SEP . 'setup' . SEP;
@@ -504,15 +518,19 @@
*/
function upgrade($setup_info,$DEBUG=False)
{
- if(address@hidden'phpgw_setup']->oProc)
+ 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_bDeltaOnly = True;
- @reset($setup_info);
- while(list($key,$null) = @each($setup_info))
+ if ( !is_array($setup_info) )
+ {
+ $setup_info = array();
+ }
+
+ foreach($setup_info as $key => $ignored)
{
/* Don't try to upgrade an app that is not
installed */
if(!$GLOBALS['phpgw_setup']->app_registered($setup_info[$key]['name']))
@@ -558,7 +576,7 @@
{
echo
'<br>process->baseline(): Including baseline tables for ' . $appname . "\n";
}
- include
($appdir.'tables_baseline.inc.php');
+
include_once($appdir.'tables_baseline.inc.php');
$GLOBALS['phpgw_setup']->oProc->m_aTables = $phpgw_baseline;
/*
$GLOBALS['phpgw_setup']->oProc->GenerateScripts($phpgw_baseline, $DEBUG); */
}
@@ -574,7 +592,7 @@
}
if(file_exists($appdir .
'tables_update.inc.php') && address@hidden>updateincluded[$appname])
{
- include ($appdir .
'tables_update.inc.php');
+ include_once($appdir .
'tables_update.inc.php');
$this->updateincluded[$appname]
= True;
/* $test array comes from
update file. It is a list of available upgrade functions */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] phpgwapi/inc class.setup_process.inc.php,1.12,
skwashd <=
- Prev by Date:
[Phpgroupware-cvs] calendar/help/JA calendar.php, 1.4 add.php, 1.4 edit_delete.php, 1.4 view.php, 1.4
- Next by Date:
[Phpgroupware-cvs] calendar/templates/verdilak header.inc.php,1.24
- Previous by thread:
[Phpgroupware-cvs] calendar/help/EN add.php, 1.3 edit_delete.php, 1.3 calendar.php, 1.3 view.php, 1.4
- Next by thread:
[Phpgroupware-cvs] todo/templates/base/images pix.gif, 1.1 navbar.gif, 1.1 navbar.png, 1.1 pix.png, 1.1
- Index(es):