Formatting

This commit is contained in:
Miles Lott 2005-11-24 11:52:14 +00:00
parent 93d581dbbe
commit 63ce5878da
3 changed files with 350 additions and 360 deletions

View File

@ -13,39 +13,38 @@
* option) any later version. *
\**************************************************************************/
/* $Id$ */
/*
** Provides the status of the eGroupware installation.
*/
class updates {
class updates
{
/*
** @return boolean: are there updates or not
*/
function hasUpdates()
{
if(count($this->showUpdates()) > 0) {
if(count($this->showUpdates()) > 0)
{
return false;
}
else
{
return false;
}
}
/*
** @return array with string-message about status of eGroupware and status of all application
*/
function showUpdates() {
function showUpdates()
{
$updates = array();
if (isset($GLOBALS['egw_info']['user']['apps']['admin']) && $GLOBALS['egw_info']['user']['apps']['admin'] &&
isset($GLOBALS['egw_info']['server']['checkfornewversion']) && $GLOBALS['egw_info']['server']['checkfornewversion'])
{
$GLOBALS['egw']->network =& CreateObject('phpgwapi.network');
$GLOBALS['egw']->network->set_addcrlf(False);

View File

@ -24,8 +24,8 @@ $GLOBALS['egw_info'] = array(
'currentapp' => 'home',
'enable_network_class' => False,
'enable_contacts_class' => False,
'enable_nextmatchs_class' => False,
),
'enable_nextmatchs_class' => False
)
);
include('../header.inc.php');
@ -50,9 +50,6 @@ $GLOBALS['tpl']->set_block('home','begin_row','begin_row');
$GLOBALS['tpl']->set_block('home','end_row','end_row');
$GLOBALS['tpl']->set_block('home','cell','cell');
// Commented by alpeb: The following prevented anonymous users to get a home page. Perhaps it was done with anonymous users such as the ones
// used by wiki and sitemgr in mind. However, if you mark a normal user as anonymous just to avoid being shown in sessions and access log (like you would for an admin that doesn't want to be noticed), the user won't be able to login anymore. That's why I commented the code.
/*if ($GLOBALS['egw']->session->session_flags == 'A')
@ -69,13 +66,11 @@ $GLOBALS['tpl']->set_block('home','cell','cell');
exit;
}*/
/*
** Show the updates
*/
$GLOBALS['egw']->hooks->single('showUpdates','home');
/*
** Display the notification window
*/
@ -87,7 +82,6 @@ if (isset($GLOBALS['egw_info']['user']['apps']['notifywindow']) && $GLOBALS['egw
$GLOBALS['tpl']->pfp('out','notify_window');
}
/* This initializes the users portal_order preference if it does not exist. */
if(!is_array($GLOBALS['egw_info']['user']['preferences']['portal_order']) && $GLOBALS['egw_info']['apps'])
{
@ -134,7 +128,6 @@ foreach($GLOBALS['egw_info']['user']['apps'] as $app)
}
//$GLOBALS['egw']->hooks->process('home',$sorted_apps);
/*
** Migrate preferences
** @param $appname, $var_old, $var_new, $type='user'
@ -194,7 +187,6 @@ if($migrate_oldvarnames)
$neworder = array();
$done = array();
/*
** Display application hooks
**
@ -278,7 +270,6 @@ foreach($sorted_apps as $appname)
$done[$appname] = 1;
}
$GLOBALS['tpl']->pfp('out','end_table');
// Update stored value of order

View File

@ -9,6 +9,7 @@
* option) any later version. *
\**************************************************************************/
/* $Id$ */
/* Basic information about this app */
$setup_info['home']['name'] = 'home';
@ -28,5 +29,4 @@
/* The hooks this app includes, needed for hooks registration */
$setup_info['home']['hooks']['hasUpdates'] = 'home.updates.hasUpdates';
$setup_info['home']['hooks']['showUpdates'] = 'home.updates.showUpdates';
?>