[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: setup applications.php,1.21.2.4,1.21.2.5
From: |
Dave Hall <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: setup applications.php,1.21.2.4,1.21.2.5 |
Date: |
Fri, 18 Jul 2003 19:42:22 -0400 |
Update of /cvsroot/phpgroupware/setup
In directory subversions:/tmp/cvs-serv31820
Modified Files:
Tag: Version-0_9_16-branch
applications.php
Log Message:
fixed foreach() args error - I think
Index: applications.php
===================================================================
RCS file: /cvsroot/phpgroupware/setup/applications.php,v
retrieving revision 1.21.2.4
retrieving revision 1.21.2.5
diff -C2 -r1.21.2.4 -r1.21.2.5
*** applications.php 17 Jul 2003 02:02:49 -0000 1.21.2.4
--- applications.php 18 Jul 2003 23:42:19 -0000 1.21.2.5
***************
*** 122,212 ****
$setup_tpl->pparse('out','header');
! $appname = get_var('appname',Array('POST'), array());
! $remove = get_var('remove',Array('POST'), array());
! $install = get_var('install',Array('POST'), array());
! $upgrade = get_var('upgrade',Array('POST'), array());
! foreach($remove as $appname => $key)
! {
! $terror = array();
! $terror[] = $setup_info[$appname];
! if ($setup_info[$appname]['tables'])
! {
!
$GLOBALS['phpgw_setup']->process->droptables($terror,$DEBUG);
! echo '<br>' . $setup_info[$appname]['title'] .
' ' . lang('tables dropped') . '.';
! }
!
$GLOBALS['phpgw_setup']->deregister_app($setup_info[$appname]['name']);
! echo '<br>' . $setup_info[$appname]['title'] . ' ' .
lang('deregistered') . '.';
! if ($setup_info[$appname]['hooks'])
! {
!
$GLOBALS['phpgw_setup']->deregister_hooks($setup_info[$appname]['name']);
! echo '<br>' . $setup_info[$appname]['title'] .
' ' . lang('hooks deregistered') . '.';
}
! $terror =
$GLOBALS['phpgw_setup']->process->drop_langs($terror,$DEBUG);
! echo '<br>' . $setup_info[$appname]['title'] . ' ' .
lang('Translations removed') . '.';
! }
!
! foreach($install as $appname => $key)
! {
! $terror = array();
! $terror[] = $setup_info[$appname];
!
! if ($setup_info[$appname]['tables'])
! {
! $terror =
$GLOBALS['phpgw_setup']->process->current($terror,$DEBUG);
! $terror =
$GLOBALS['phpgw_setup']->process->default_records($terror,$DEBUG);
! echo '<br>' . $setup_info[$appname]['title'] .
' '
! . lang('tables installed, unless there
are errors printed above') . '.';
! }
! else
{
! if
($GLOBALS['phpgw_setup']->app_registered($setup_info[$appname]['name']))
{
!
$GLOBALS['phpgw_setup']->update_app($setup_info[$appname]['name']);
}
else
{
!
$GLOBALS['phpgw_setup']->register_app($setup_info[$appname]['name']);
}
! echo '<br>' . $setup_info[$appname]['title'] .
' ' . lang('registered') . '.';
!
! if ($setup_info[$appname]['hooks'])
{
!
$GLOBALS['phpgw_setup']->register_hooks($setup_info[$appname]['name']);
! echo '<br>' .
$setup_info[$appname]['title'] . ' ' . lang('hooks registered') . '.';
}
}
! $force_en = False;
! if($appname == 'phpgwapi')
! {
! $force_en = True;
! }
! $terror =
$GLOBALS['phpgw_setup']->process->add_langs($terror,$DEBUG,$force_en);
! echo '<br>' . $setup_info[$appname]['title'] . ' ' .
lang('Translations added') . '.';
! }
! foreach($upgrade as $appname => $key)
{
! $terror = array();
! $terror[] = $setup_info[$appname];
!
$GLOBALS['phpgw_setup']->process->upgrade($terror,$DEBUG);
! if ($setup_info[$appname]['tables'])
! {
! echo '<br>' . $setup_info[$appname]['title'] .
' ' . lang('tables upgraded') . '.';
! // The process_upgrade() function also handles
registration
! }
! else
! {
! echo '<br>' . $setup_info[$appname]['title'] .
' ' . lang('upgraded') . '.';
! }
! $terror =
$GLOBALS['phpgw_setup']->process->upgrade_langs($terror,$DEBUG);
! echo '<br>' . $setup_info[$appname]['title'] . ' ' .
lang('Translations upgraded') . '.';
! }
//$setup_tpl->set_var('goback',
--- 122,221 ----
$setup_tpl->pparse('out','header');
! $appname = get_var('appname',Array('POST'));
! $remove = get_var('remove',Array('POST'));
! $install = get_var('install',Array('POST'));
! $upgrade = get_var('upgrade',Array('POST'));
!
! if(!empty($remove) && is_array($remove))
! {
! foreach($remove as $appname => $key)
! {
! $terror = array();
! $terror[] = $setup_info[$appname];
! if ($setup_info[$appname]['tables'])
! {
!
$GLOBALS['phpgw_setup']->process->droptables($terror,$DEBUG);
! echo '<br>' .
$setup_info[$appname]['title'] . ' ' . lang('tables dropped') . '.';
! }
!
$GLOBALS['phpgw_setup']->deregister_app($setup_info[$appname]['name']);
! echo '<br>' . $setup_info[$appname]['title'] .
' ' . lang('deregistered') . '.';
! if ($setup_info[$appname]['hooks'])
! {
!
$GLOBALS['phpgw_setup']->deregister_hooks($setup_info[$appname]['name']);
! echo '<br>' .
$setup_info[$appname]['title'] . ' ' . lang('hooks deregistered') . '.';
! }
! $terror =
$GLOBALS['phpgw_setup']->process->drop_langs($terror,$DEBUG);
! echo '<br>' . $setup_info[$appname]['title'] .
' ' . lang('Translations removed') . '.';
}
+ }
! if(!empty($remove) && is_array($remove))
! {
! foreach($install as $appname => $key)
{
! $terror = array();
! $terror[] = $setup_info[$appname];
!
! if ($setup_info[$appname]['tables'])
{
! $terror =
$GLOBALS['phpgw_setup']->process->current($terror,$DEBUG);
! $terror =
$GLOBALS['phpgw_setup']->process->default_records($terror,$DEBUG);
! echo '<br>' .
$setup_info[$appname]['title'] . ' '
! . lang('tables installed,
unless there are errors printed above') . '.';
}
else
{
! if
($GLOBALS['phpgw_setup']->app_registered($setup_info[$appname]['name']))
! {
!
$GLOBALS['phpgw_setup']->update_app($setup_info[$appname]['name']);
! }
! else
! {
!
$GLOBALS['phpgw_setup']->register_app($setup_info[$appname]['name']);
! }
! echo '<br>' .
$setup_info[$appname]['title'] . ' ' . lang('registered') . '.';
!
! if ($setup_info[$appname]['hooks'])
! {
!
$GLOBALS['phpgw_setup']->register_hooks($setup_info[$appname]['name']);
! echo '<br>' .
$setup_info[$appname]['title'] . ' ' . lang('hooks registered') . '.';
! }
}
! $force_en = False;
! if($appname == 'phpgwapi')
{
! $force_en = True;
}
+ $terror =
$GLOBALS['phpgw_setup']->process->add_langs($terror,$DEBUG,$force_en);
+ echo '<br>' . $setup_info[$appname]['title'] .
' ' . lang('Translations added') . '.';
}
! }
! if(!empty($upgrade) && is_array($upgrade))
{
! foreach($upgrade as $appname => $key)
! {
! $terror = array();
! $terror[] = $setup_info[$appname];
!
$GLOBALS['phpgw_setup']->process->upgrade($terror,$DEBUG);
! if ($setup_info[$appname]['tables'])
! {
! echo '<br>' .
$setup_info[$appname]['title'] . ' ' . lang('tables upgraded') . '.';
! // The process_upgrade() function also
handles registration
! }
! else
! {
! echo '<br>' . $setup_info[$appname]['title'] . ' ' .
lang('upgraded') . '.';
! }
! $terror =
$GLOBALS['phpgw_setup']->process->upgrade_langs($terror,$DEBUG);
! echo '<br>' . $setup_info[$appname]['title'] .
' ' . lang('Translations upgraded') . '.';
! }
! }
//$setup_tpl->set_var('goback',
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: setup applications.php,1.21.2.4,1.21.2.5,
Dave Hall <address@hidden> <=