Add a check to setup to be able to exclude apps from the mass upgrade process.

WCM will be the first to use this, others may follow...
This commit is contained in:
Miles Lott 2002-02-03 17:02:56 +00:00
parent 03358f1bfa
commit 6735cc4d5d
2 changed files with 19 additions and 1 deletions

View File

@ -188,6 +188,23 @@
return $setup_info; return $setup_info;
} }
/*
Called during the mass upgrade routine (Stage 1) to check for apps
that wish to be excluded from this process.
*/
function upgrade_exclude($setup_info)
{
@reset ($setup_info);
while(list($key,$value) = @each($setup_info))
{
if(isset($value['no_mass_update']))
{
unset($setup_info[$key]);
}
}
return $setup_info;
}
function check_header() function check_header()
{ {
if(!file_exists('../header.inc.php')) if(!file_exists('../header.inc.php'))

View File

@ -241,7 +241,8 @@
$setup_info = $phpgw_setup->process_droptables($setup_info); $setup_info = $phpgw_setup->process_droptables($setup_info);
break; break;
case 'new': case 'new':
/* process all apps and langs(last param True) */ /* process all apps and langs(last param True), excluding apps with the no_mass_update flag set. */
$setup_info = $phpgw_setup->upgrade_exclude($setup_info);
$setup_info = $phpgw_setup->process_pass($setup_info,'new',$DEBUG,True); $setup_info = $phpgw_setup->process_pass($setup_info,'new',$DEBUG,True);
$included = True; $included = True;
include('lang.php'); include('lang.php');