Formatting cleanup; Removed stray whitespace, especially from the end of some files; Convert api arrays to egw/egw_info

This commit is contained in:
Miles Lott 2005-07-08 05:00:14 +00:00
parent 7d720dc5ea
commit a1e8f71b22
12 changed files with 331 additions and 343 deletions

View File

@ -11,25 +11,26 @@
/* $Id$ */ /* $Id$ */
$GLOBALS['phpgw_info'] = array(); $GLOBALS['egw_info'] = array();
$app = $_GET['app']; $app = $_GET['app'];
if(isset($app) && $_GET['app'] != "eGroupWare") if(isset($app) && $_GET['app'] != 'eGroupWare')
{ {
$GLOBALS['phpgw_info']['flags']['currentapp'] = $app; $GLOBALS['egw_info']['flags']['currentapp'] = $app;
} }
else { else
$GLOBALS['phpgw_info']['flags']['currentapp'] = 'about'; {
$GLOBALS['egw_info']['flags']['currentapp'] = 'about';
} }
$GLOBALS['phpgw_info']['flags']['disable_Template_class'] = True; $GLOBALS['egw_info']['flags']['disable_Template_class'] = True;
$GLOBALS['phpgw_info']['flags']['noheader'] = True; $GLOBALS['egw_info']['flags']['noheader'] = True;
include('header.inc.php'); include('header.inc.php');
if ($app) if ($app)
{ {
if (!($included = $GLOBALS['phpgw']->hooks->single('about',$app))) if (!($included = $GLOBALS['egw']->hooks->single('about',$app)))
{ {
$api_only = !($included = file_exists(PHPGW_INCLUDE_ROOT . "/$app/setup/setup.inc.php")); $api_only = !($included = file_exists(EGW_INCLUDE_ROOT . "/$app/setup/setup.inc.php"));
} }
} }
else else
@ -37,20 +38,19 @@
$api_only = True; $api_only = True;
} }
$tpl = CreateObject('phpgwapi.Template',$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi')); $tpl = CreateObject('phpgwapi.Template',$GLOBALS['egw']->common->get_tpl_dir('phpgwapi'));
$tpl->set_file(array( $tpl->set_file(array(
'phpgw_about' => 'about.tpl', 'phpgw_about' => 'about.tpl',
'phpgw_about_unknown' => 'about_unknown.tpl' 'phpgw_about_unknown' => 'about_unknown.tpl'
)); ));
$title = isset($GLOBALS['phpgw_info']['apps'][$app]) ? $GLOBALS['phpgw_info']['apps'][$app]['title'] : 'eGroupWare'; $title = isset($GLOBALS['egw_info']['apps'][$app]) ? $GLOBALS['egw_info']['apps'][$app]['title'] : 'eGroupWare';
$GLOBALS['phpgw_info']['flags']['app_header'] = lang('About %1',$title); $GLOBALS['egw_info']['flags']['app_header'] = lang('About %1',$title);
$GLOBALS['phpgw']->common->phpgw_header(); $GLOBALS['egw']->common->phpgw_header();
$tpl->set_block('phpgw_about', 'egroupware','egroupware'); $tpl->set_block('phpgw_about', 'egroupware','egroupware');
$tpl->set_block('phpgw_about', 'application','application'); $tpl->set_block('phpgw_about', 'application','application');
if ($included) if ($included)
{ {
$tpl->set_var('phpgw_app_about', about_app()); $tpl->set_var('phpgw_app_about', about_app());
@ -60,15 +60,14 @@
{ {
if ($api_only) if ($api_only)
{ {
$tpl->set_var('phpgw_logo',$GLOBALS['phpgw']->common->image('phpgwapi','logo.gif')); $tpl->set_var('phpgw_logo',$GLOBALS['egw']->common->image('phpgwapi','logo.gif'));
$tpl->set_var('phpgw_version',lang('eGroupWare API version %1',$GLOBALS['phpgw_info']['server']['versions']['phpgwapi'])); $tpl->set_var('phpgw_version',lang('eGroupWare API version %1',$GLOBALS['egw_info']['server']['versions']['phpgwapi']));
$tpl->set_var('phpgw_message',lang('%1eGroupWare%2 is a multi-user, web-based groupware suite written in %3PHP%4.', $tpl->set_var('phpgw_message',lang('%1eGroupWare%2 is a multi-user, web-based groupware suite written in %3PHP%4.',
'<a href="http://www.eGroupWare.org" target="_blank">','</a>','<a href="http://www.php.net" target="_blank">','</a>')); '<a href="http://www.eGroupWare.org" target="_blank">','</a>','<a href="http://www.php.net" target="_blank">','</a>'));
$tpl->pparse('out', 'egroupware'); $tpl->pparse('out', 'egroupware');
$tpl->set_var('phpgw_app_about',about_template()); $tpl->set_var('phpgw_app_about',about_template());
$tpl->pparse('phpgw_about', 'application', True); $tpl->pparse('phpgw_about', 'application', True);
} }
else else
{ {
@ -78,25 +77,25 @@
} }
} }
$GLOBALS['phpgw']->common->phpgw_footer(); $GLOBALS['egw']->common->phpgw_footer();
function about_app() function about_app()
{ {
global $app; global $app;
include (PHPGW_INCLUDE_ROOT . "/$app/setup/setup.inc.php"); include(EGW_INCLUDE_ROOT . "/$app/setup/setup.inc.php");
$info = $setup_info[$app]; $info = $setup_info[$app];
$info['icon'] = $GLOBALS['phpgw']->common->image($app,array('navbar','nonav')); $info['icon'] = $GLOBALS['egw']->common->image($app,array('navbar','nonav'));
$info['title'] = $GLOBALS['phpgw_info']['apps'][$app]['title']; $info['title'] = $GLOBALS['egw_info']['apps'][$app]['title'];
return about_display($info); return about_display($info);
} }
function about_template() function about_template()
{ {
$template = $GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi'); $template = $GLOBALS['egw']->common->get_tpl_dir('phpgwapi');
include ($template . "/setup/setup.inc.php"); include ($template . "/setup/setup.inc.php");
$s = ""; $s = "";
$template_info[] = $GLOBALS['egw_info']['template'][$GLOBALS['phpgw_info']['user']['preferences']['common']['template_set']]; $template_info[] = $GLOBALS['egw_info']['template'][$GLOBALS['egw_info']['user']['preferences']['common']['template_set']];
foreach($template_info as $info) foreach($template_info as $info)
{ {
$s .= about_display($info); $s .= about_display($info);
@ -104,7 +103,6 @@ function about_template()
return $s; return $s;
} }
function about_display($info) function about_display($info)
{ {
$other_infos = array( $other_infos = array(
@ -179,10 +177,10 @@ function about_display($info)
$img = $info[$key.'_img']; $img = $info[$key.'_img'];
if ($img) if ($img)
{ {
$img_url = $GLOBALS['phpgw']->common->image('phpgwapi',$img); $img_url = $GLOBALS['egw']->common->image('phpgwapi',$img);
if (!$img_url) if (!$img_url)
{ {
$img_url = $GLOBALS['phpgw']->common->image($info['name'],$img); $img_url = $GLOBALS['egw']->common->image($info['name'],$img);
} }
$infos = '<table border="0"><tr><td style="text-align:center;"><a href="'.$infos['url'].'"><img src="'.$img_url.'" border="0"><br>'.$infos['name'].'</a></td></tr></table>'; $infos = '<table border="0"><tr><td style="text-align:center;"><a href="'.$infos['url'].'"><img src="'.$img_url.'" border="0"><br>'.$infos['name'].'</a></td></tr></table>';
} }

View File

@ -21,7 +21,7 @@
$login = 'anonymous'; $login = 'anonymous';
$passwd = 'anonymous'; $passwd = 'anonymous';
$GLOBALS['phpgw_info']['flags'] = array( $GLOBALS['egw_info']['flags'] = array(
'disable_Template_class' => True, 'disable_Template_class' => True,
'login' => True, 'login' => True,
'currentapp' => 'login', 'currentapp' => 'login',
@ -35,6 +35,6 @@
$login = 'anonymous'; $login = 'anonymous';
$passwd = 'anonymous'; $passwd = 'anonymous';
$sessionid = $GLOBALS['phpgw']->session->create($login,$passwd,'text'); $sessionid = $GLOBALS['egw']->session->create($login,$passwd,'text');
$GLOBALS['phpgw']->redirect($GLOBALS['phpgw']->link('/index.php')); $GLOBALS['egw']->redirect($GLOBALS['egw']->link('/index.php'));
?> ?>

View File

@ -1,7 +1,7 @@
<?php <?php
/**************************************************************************\ /**************************************************************************\
* phpGroupWare * * eGroupWare *
* http://www.phpgroupware.org * * http://www.egroupware.org *
* -------------------------------------------- * * -------------------------------------------- *
* This program is free software; you can redistribute it and/or modify it * * This program is free software; you can redistribute it and/or modify it *
* under the terms of the GNU General Public License as published by the * * under the terms of the GNU General Public License as published by the *
@ -11,7 +11,7 @@
/* $Id$ */ /* $Id$ */
$phpgw_info = array(); $egw_info = array();
if(!file_exists('header.inc.php')) if(!file_exists('header.inc.php'))
{ {
Header('Location: setup/index.php'); Header('Location: setup/index.php');
@ -27,8 +27,8 @@
exit; exit;
} }
if(isset($_GET['hasupdates']) && $_GET['hasupdates'] == 'yes')
if(isset($_GET['hasupdates']) && $_GET['hasupdates'] == "yes") { {
$hasupdates = True; $hasupdates = True;
} }
@ -45,22 +45,20 @@
} }
else else
{ {
//$phpgw->log->message('W-BadmenuactionVariable, menuaction missing or corrupt: %1',$menuaction); //$egw->log->message('W-BadmenuactionVariable, menuaction missing or corrupt: %1',$menuaction);
//$phpgw->log->commit(); //$egw->log->commit();
$app = 'home'; $app = 'home';
$invalid_data = True; $invalid_data = True;
} }
if($app == 'phpgwapi') if($app == 'phpgwapi')
{ {
$app = 'home'; $app = 'home';
$api_requested = True; $api_requested = True;
} }
$GLOBALS['egw_info']['flags'] = array(
$GLOBALS['phpgw_info']['flags'] = array(
'noheader' => True, 'noheader' => True,
'nonavbar' => True, 'nonavbar' => True,
'enable_network_class' => True, 'enable_network_class' => True,
@ -72,42 +70,39 @@
// Check if we are using windows or normal webpage // Check if we are using windows or normal webpage
$windowed = false; $windowed = false;
$tpl_info = PHPGW_SERVER_ROOT . '/phpgwapi/templates/' . $GLOBALS['phpgw_info']['user']['preferences']['common']['template_set'] . '/setup/setup.inc.php'; $tpl_info = EGW_SERVER_ROOT . '/phpgwapi/templates/' . $GLOBALS['egw_info']['user']['preferences']['common']['template_set'] . '/setup/setup.inc.php';
if(@file_exists($tpl_info)) if(@file_exists($tpl_info))
{ {
include_once($tpl_info); include_once($tpl_info);
// if(isset($template_info)) // if(isset($template_info))
// { // {
if($GLOBALS['egw_info']['template'][$GLOBALS['phpgw_info']['user']['preferences']['common']['template_set']]['windowed']) if($GLOBALS['egw_info']['template'][$GLOBALS['egw_info']['user']['preferences']['common']['template_set']]['windowed'])
{ {
$windowed = true; $windowed = true;
} }
// } // }
} }
if($app == 'home' && !$api_requested && !$windowed) if($app == 'home' && !$api_requested && !$windowed)
{ {
if ($GLOBALS['phpgw_info']['server']['force_default_app'] && $GLOBALS['phpgw_info']['server']['force_default_app'] != 'user_choice') if ($GLOBALS['egw_info']['server']['force_default_app'] && $GLOBALS['egw_info']['server']['force_default_app'] != 'user_choice')
{ {
$GLOBALS['phpgw_info']['user']['preferences']['common']['default_app'] = $GLOBALS['phpgw_info']['server']['force_default_app']; $GLOBALS['egw_info']['user']['preferences']['common']['default_app'] = $GLOBALS['egw_info']['server']['force_default_app'];
} }
if($GLOBALS['phpgw_info']['user']['preferences']['common']['default_app'] && !$hasupdates) { if($GLOBALS['egw_info']['user']['preferences']['common']['default_app'] && !$hasupdates)
$GLOBALS['phpgw']->redirect_link('/'.$GLOBALS['phpgw_info']['user']['preferences']['common']['default_app'].'/index.php');
}
else {
$GLOBALS['phpgw']->redirect_link('/home/index.php');
}
}
if($windowed && $_GET['cd'] == "yes")
{ {
$GLOBALS['egw']->redirect_link('/'.$GLOBALS['egw_info']['user']['preferences']['common']['default_app'].'/index.php');
}
else
{
$GLOBALS['egw']->redirect_link('/home/index.php');
}
}
$GLOBALS['phpgw_info']['flags'] = array( if($windowed && $_GET['cd'] == 'yes')
{
$GLOBALS['egw_info']['flags'] = array(
'noheader' => False, 'noheader' => False,
'nonavbar' => False, 'nonavbar' => False,
'enable_network_class' => True, 'enable_network_class' => True,
@ -115,14 +110,14 @@
'enable_nextmatchs_class' => True, 'enable_nextmatchs_class' => True,
'currentapp' => 'eGroupWare' 'currentapp' => 'eGroupWare'
); );
$GLOBALS['phpgw']->common->phpgw_header(); $GLOBALS['egw']->common->phpgw_header();
$GLOBALS['phpgw']->common->phpgw_footer(); $GLOBALS['egw']->common->phpgw_footer();
} }
else { else
{
if($api_requested) if($api_requested)
{ {
$app = 'phpgwapi'; $app = 'phpgwapi';
} }
@ -140,9 +135,9 @@
{ {
if(!$app || !$class || !$method) if(!$app || !$class || !$method)
{ {
if(@is_object($GLOBALS['phpgw']->log)) if(@is_object($GLOBALS['egw']->log))
{ {
$GLOBALS['phpgw']->log->message(array( $GLOBALS['egw']->log->message(array(
'text' => 'W-BadmenuactionVariable, menuaction missing or corrupt: %1', 'text' => 'W-BadmenuactionVariable, menuaction missing or corrupt: %1',
'p1' => $menuaction, 'p1' => $menuaction,
'line' => __LINE__, 'line' => __LINE__,
@ -153,9 +148,9 @@
if(!is_array($GLOBALS[$class]->public_functions) || ! $$GLOBALS[$class]->public_functions[$method] && $method) if(!is_array($GLOBALS[$class]->public_functions) || ! $$GLOBALS[$class]->public_functions[$method] && $method)
{ {
if(@is_object($GLOBALS['phpgw']->log)) if(@is_object($GLOBALS['egw']->log))
{ {
$GLOBALS['phpgw']->log->message(array( $GLOBALS['egw']->log->message(array(
'text' => 'W-BadmenuactionVariable, attempted to access private method: %1', 'text' => 'W-BadmenuactionVariable, attempted to access private method: %1',
'p1' => $method, 'p1' => $method,
'line' => __LINE__, 'line' => __LINE__,
@ -163,17 +158,17 @@
)); ));
} }
} }
if(@is_object($GLOBALS['phpgw']->log)) if(@is_object($GLOBALS['egw']->log))
{ {
$GLOBALS['phpgw']->log->commit(); $GLOBALS['egw']->log->commit();
} }
$GLOBALS['phpgw']->redirect_link('/home/index.php'); $GLOBALS['egw']->redirect_link('/home/index.php');
} }
if(!isset($GLOBALS['phpgw_info']['nofooter'])) if(!isset($GLOBALS['egw_info']['nofooter']))
{ {
$GLOBALS['phpgw']->common->phpgw_footer(); $GLOBALS['egw']->common->phpgw_footer();
} }
} }
?> ?>

View File

@ -161,7 +161,6 @@
$submit = True; $submit = True;
} }
} }
} }
# Apache + mod_ssl style SSL certificate authentication # Apache + mod_ssl style SSL certificate authentication
@ -203,7 +202,7 @@
if(getenv('REQUEST_METHOD') != 'POST' && $_SERVER['REQUEST_METHOD'] != 'POST' && if(getenv('REQUEST_METHOD') != 'POST' && $_SERVER['REQUEST_METHOD'] != 'POST' &&
!isset($_SERVER['PHP_AUTH_USER']) && !isset($_SERVER['SSL_CLIENT_S_DN'])) !isset($_SERVER['PHP_AUTH_USER']) && !isset($_SERVER['SSL_CLIENT_S_DN']))
{ {
$GLOBALS['phpgw']->session->phpgw_setcookie('eGW_remember'); $GLOBALS['egw']->session->phpgw_setcookie('eGW_remember');
$GLOBALS['egw']->redirect($GLOBALS['egw']->link('/login.php','cd=5')); $GLOBALS['egw']->redirect($GLOBALS['egw']->link('/login.php','cd=5'));
} }
#if(!isset($_COOKIE['eGroupWareLoginTime'])) #if(!isset($_COOKIE['eGroupWareLoginTime']))
@ -245,7 +244,7 @@
if(!isset($GLOBALS['sessionid']) || ! $GLOBALS['sessionid']) if(!isset($GLOBALS['sessionid']) || ! $GLOBALS['sessionid'])
{ {
$GLOBALS['phpgw']->session->phpgw_setcookie('eGW_remember'); $GLOBALS['egw']->session->phpgw_setcookie('eGW_remember');
$GLOBALS['egw']->redirect($GLOBALS['egw_info']['server']['webserver_url'] . '/login.php?cd=' . $GLOBALS['egw']->session->cd_reason); $GLOBALS['egw']->redirect($GLOBALS['egw_info']['server']['webserver_url'] . '/login.php?cd=' . $GLOBALS['egw']->session->cd_reason);
} }
else else

View File

@ -12,8 +12,8 @@
/* $Id$ */ /* $Id$ */
$phpgw_info = array(); $egw_info = array();
$GLOBALS['phpgw_info']['flags'] = array( $GLOBALS['egw_info']['flags'] = array(
'disable_Template_class' => True, 'disable_Template_class' => True,
'currentapp' => 'logout', 'currentapp' => 'logout',
'noheader' => True, 'noheader' => True,
@ -25,44 +25,44 @@
$GLOBALS['sessionid'] = get_var('sessionid',array('GET','COOKIE')); $GLOBALS['sessionid'] = get_var('sessionid',array('GET','COOKIE'));
$GLOBALS['kp3'] = get_var('kp3',array('GET','COOKIE')); $GLOBALS['kp3'] = get_var('kp3',array('GET','COOKIE'));
$verified = $GLOBALS['phpgw']->session->verify(); $verified = $GLOBALS['egw']->session->verify();
if ($verified) if ($verified)
{ {
if (file_exists($GLOBALS['phpgw_info']['server']['temp_dir'] . SEP . $GLOBALS['sessionid'])) if (file_exists($GLOBALS['egw_info']['server']['temp_dir'] . SEP . $GLOBALS['sessionid']))
{ {
$dh = opendir($GLOBALS['phpgw_info']['server']['temp_dir'] . SEP . $GLOBALS['sessionid']); $dh = opendir($GLOBALS['egw_info']['server']['temp_dir'] . SEP . $GLOBALS['sessionid']);
while ($file = readdir($dh)) while ($file = readdir($dh))
{ {
if ($file != '.' && $file != '..') if ($file != '.' && $file != '..')
{ {
unlink($GLOBALS['phpgw_info']['server']['temp_dir'] . SEP . $GLOBALS['sessionid'] . SEP . $file); unlink($GLOBALS['egw_info']['server']['temp_dir'] . SEP . $GLOBALS['sessionid'] . SEP . $file);
} }
} }
closedir($dh); closedir($dh);
rmdir($GLOBALS['phpgw_info']['server']['temp_dir'] . SEP . $GLOBALS['sessionid']); rmdir($GLOBALS['egw_info']['server']['temp_dir'] . SEP . $GLOBALS['sessionid']);
} }
$GLOBALS['phpgw']->hooks->process('logout'); $GLOBALS['egw']->hooks->process('logout');
$GLOBALS['phpgw']->session->destroy($GLOBALS['sessionid'],$GLOBALS['kp3']); $GLOBALS['egw']->session->destroy($GLOBALS['sessionid'],$GLOBALS['kp3']);
} }
else else
{ {
if(is_object($GLOBALS['phpgw']->log)) if(is_object($GLOBALS['egw']->log))
{ {
$GLOBALS['phpgw']->log->write(array( $GLOBALS['egw']->log->write(array(
'text' => 'W-VerifySession, could not verify session during logout', 'text' => 'W-VerifySession, could not verify session during logout',
'line' => __LINE__, 'line' => __LINE__,
'file' => __FILE__ 'file' => __FILE__
)); ));
} }
} }
$GLOBALS['phpgw']->session->phpgw_setcookie('eGW_remember'); $GLOBALS['egw']->session->phpgw_setcookie('eGW_remember');
$GLOBALS['phpgw']->session->phpgw_setcookie('sessionid'); $GLOBALS['egw']->session->phpgw_setcookie('sessionid');
$GLOBALS['phpgw']->session->phpgw_setcookie('kp3'); $GLOBALS['egw']->session->phpgw_setcookie('kp3');
$GLOBALS['phpgw']->session->phpgw_setcookie('domain'); $GLOBALS['egw']->session->phpgw_setcookie('domain');
if($GLOBALS['phpgw_info']['server']['sessions_type'] == 'php4') if($GLOBALS['egw_info']['server']['sessions_type'] == 'php4')
{ {
$GLOBALS['phpgw']->session->phpgw_setcookie(PHPGW_PHPSESSID); $GLOBALS['egw']->session->phpgw_setcookie(EGW_PHPSESSID);
} }
$GLOBALS['phpgw']->redirect($GLOBALS['phpgw_info']['server']['webserver_url'].'/login.php?cd=1'); $GLOBALS['egw']->redirect($GLOBALS['egw_info']['server']['webserver_url'].'/login.php?cd=1');
?> ?>

View File

@ -11,15 +11,15 @@
/* $Id$ */ /* $Id$ */
$phpgw_info = array(); $egw_info = array();
$GLOBALS['phpgw_info']['flags'] = array( $GLOBALS['egw_info']['flags'] = array(
'noheader' => True, 'noheader' => True,
'nonavbar' => True, 'nonavbar' => True,
'disable_Template_class' => True, 'disable_Template_class' => True,
'currentapp' => 'notifywindow' 'currentapp' => 'notifywindow'
); );
include('header.inc.php'); include('header.inc.php');
$charSet = $GLOBALS['phpgw']->translation->charset(); $charSet = $GLOBALS['egw']->translation->charset();
?> ?>
<html> <html>
<head> <head>
@ -29,11 +29,11 @@
?> ?>
<title>Notify Window</title> <title>Notify Window</title>
</head> </head>
<body bgcolor="<?php echo $GLOBALS['phpgw_info']['theme']['bg_color']; ?>" alink="blue" vlink="blue" link="blue"> <body bgcolor="<?php echo $GLOBALS['egw_info']['theme']['bg_color']; ?>" alink="blue" vlink="blue" link="blue">
<table> <table>
<tr><td><a href="<?php echo $GLOBALS['phpgw']->link('/notify.php'); ?>"><?php print lang('Check Now'); ?></a></td></tr> <tr><td><a href="<?php echo $GLOBALS['egw']->link('/notify.php'); ?>"><?php print lang('Check Now'); ?></a></td></tr>
<?php <?php
$GLOBALS['phpgw']->hooks->process('notifywindow'); $GLOBALS['egw']->hooks->process('notifywindow');
?> ?>
</table> </table>
</body> </body>

View File

@ -11,8 +11,8 @@
/* $Id$ */ /* $Id$ */
$phpgw_info = array(); $egw_info = array();
$GLOBALS['phpgw_info']['flags'] = array( $GLOBALS['egw_info']['flags'] = array(
'noheader' => True, 'noheader' => True,
'nonavbar' => True, 'nonavbar' => True,
'disable_Template_class' => True, 'disable_Template_class' => True,
@ -21,6 +21,6 @@
include('./header.inc.php'); include('./header.inc.php');
echo '<html><body>'; echo '<html><body>';
$GLOBALS['phpgw']->hooks->process('notifywindow_simple',array('email')); $GLOBALS['egw']->hooks->process('notifywindow_simple',array('email'));
echo '</body></html>'; echo '</body></html>';
?> ?>

View File

@ -12,8 +12,8 @@
/* $Id$ */ /* $Id$ */
$phpgw_info = array(); $egw_info = array();
$GLOBALS['phpgw_info']['flags'] = array( $GLOBALS['egw_info']['flags'] = array(
'noheader' => True, 'noheader' => True,
'nonavbar' => True, 'nonavbar' => True,
'disable_Template_class' => True, 'disable_Template_class' => True,
@ -29,21 +29,18 @@
echo '<?xml version="1.0" encoding="UTF-8" echo '<?xml version="1.0" encoding="UTF-8"
standalone="yes"?>'; standalone="yes"?>';
$apps = $GLOBALS['phpgw']->hooks->process('notify'); $apps = $GLOBALS['egw']->hooks->process('notify');
echo "\r\n<response>\r\n"; echo "\r\n<response>\r\n";
foreach($apps as $app => $message) { foreach($apps as $app => $message)
if($message != "")
{ {
$title = $GLOBALS['phpgw_info']['apps'][$app]['title']; if($message != '')
{
$title = $GLOBALS['egw_info']['apps'][$app]['title'];
echo " <title>".$title."</title> echo " <title>".$title."</title>
<url>".$GLOBALS['phpgw']->link("/".$app."/index.php")."</url> <url>".$GLOBALS['egw']->link("/".$app."/index.php")."</url>
<message>".$message." </message>\r\n"; <message>".$message." </message>\r\n";
} }
} }
echo "</response>"; echo "</response>";
?> ?>

View File

@ -12,7 +12,7 @@
/* $Id$ */ /* $Id$ */
$GLOBALS['phpgw_info']['flags'] = Array( $GLOBALS['egw_info']['flags'] = Array(
'noheader' => True, 'noheader' => True,
'nofooter' => True, 'nofooter' => True,
'currentapp' => 'home' 'currentapp' => 'home'
@ -21,60 +21,60 @@
// if(basename($HTTP_REFERER) != 'home.php') // if(basename($HTTP_REFERER) != 'home.php')
// { // {
// Header('Location: '.$GLOBALS['phpgw']->link('/home.php')); // Header('Location: '.$GLOBALS['egw']->link('/home.php'));
// $GLOBALS['phpgw']->common->phpgw_exit(); // $GLOBALS['egw']->common->phpgw_exit();
// } // }
@reset($GLOBALS['phpgw_info']['user']['preferences']); @reset($GLOBALS['egw_info']['user']['preferences']);
//_debug_array($GLOBALS['phpgw_info']['user']['preferences']['portal_order']); //_debug_array($GLOBALS['egw_info']['user']['preferences']['portal_order']);
// $GLOBALS['phpgw']->preferences->delete('portal_order'); // $GLOBALS['egw']->preferences->delete('portal_order');
// unset($GLOBALS['phpgw_info']['user']['preferences']['portal_order']); // unset($GLOBALS['egw_info']['user']['preferences']['portal_order']);
// $GLOBALS['phpgw']->preferences->save_repository(); // $GLOBALS['egw']->preferences->save_repository();
function move_boxes($curr_position,$new_order,$offset,$value_to_check,$max_num) function move_boxes($curr_position,$new_order,$offset,$value_to_check,$max_num)
{ {
//echo "MOVE: $curr_position,$new_order,$offset,$value_to_check,$max_num<br>"; //echo "MOVE: $curr_position,$new_order,$offset,$value_to_check,$max_num<br>";
if(isset($GLOBALS['phpgw_info']['user']['preferences']['portal_order'][$new_order])) if(isset($GLOBALS['egw_info']['user']['preferences']['portal_order'][$new_order]))
{ {
if($new_order == $max_num) if($new_order == $max_num)
{ {
if($offset < 0) if($offset < 0)
{ {
@ksort($GLOBALS['phpgw_info']['user']['preferences']['portal_order']); @ksort($GLOBALS['egw_info']['user']['preferences']['portal_order']);
} }
else else
{ {
@krsort($GLOBALS['phpgw_info']['user']['preferences']['portal_order']); @krsort($GLOBALS['egw_info']['user']['preferences']['portal_order']);
} }
while(list($seq_order,$appid) = each($GLOBALS['phpgw_info']['user']['preferences']['portal_order'])) while(list($seq_order,$appid) = each($GLOBALS['egw_info']['user']['preferences']['portal_order']))
{ {
if($seq_order != $value_to_check) if($seq_order != $value_to_check)
{ {
$prev_seq = $seq_order + $offset; $prev_seq = $seq_order + $offset;
$GLOBALS['phpgw']->preferences->delete('portal_order',$prev_seq); $GLOBALS['egw']->preferences->delete('portal_order',$prev_seq);
$GLOBALS['phpgw']->preferences->add('portal_order',$prev_seq,$appid); $GLOBALS['egw']->preferences->add('portal_order',$prev_seq,$appid);
} }
} }
} }
else else
{ {
$GLOBALS['phpgw']->preferences->delete('portal_order',$curr_position); $GLOBALS['egw']->preferences->delete('portal_order',$curr_position);
$GLOBALS['phpgw']->preferences->add('portal_order',$curr_position,(int)$GLOBALS['phpgw_info']['user']['preferences']['portal_order'][$new_order]); $GLOBALS['egw']->preferences->add('portal_order',$curr_position,(int)$GLOBALS['egw_info']['user']['preferences']['portal_order'][$new_order]);
} }
} }
$GLOBALS['phpgw']->preferences->delete('portal_order',$new_order); $GLOBALS['egw']->preferences->delete('portal_order',$new_order);
$GLOBALS['phpgw']->preferences->add('portal_order',$new_order,(int)$_GET['app']); $GLOBALS['egw']->preferences->add('portal_order',$new_order,(int)$_GET['app']);
$GLOBALS['phpgw']->preferences->save_repository(); $GLOBALS['egw']->preferences->save_repository();
} }
//error_reporting(E_ALL); //error_reporting(E_ALL);
switch($_GET['control']) switch($_GET['control'])
{ {
//print_debug('set_box', $GLOBALS['phpgw_info']['user']['preferences']['portal_order']),'app',5); //print_debug('set_box', $GLOBALS['egw_info']['user']['preferences']['portal_order']),'app',5);
case 'up': case 'up':
$curr_position = $GLOBALS['phpgw']->common->find_portal_order((int)$_GET['app']); $curr_position = $GLOBALS['egw']->common->find_portal_order((int)$_GET['app']);
$max_count = count($GLOBALS['phpgw_info']['user']['preferences']['portal_order']) - 1; $max_count = count($GLOBALS['egw_info']['user']['preferences']['portal_order']) - 1;
$offset = -1; $offset = -1;
if($curr_position <= 0) if($curr_position <= 0)
{ {
@ -87,8 +87,8 @@
move_boxes($curr_position,$new_order,$offset,0,$max_count); move_boxes($curr_position,$new_order,$offset,0,$max_count);
break; break;
case 'down': case 'down':
$curr_position = $GLOBALS['phpgw']->common->find_portal_order((int)$_GET['app']); $curr_position = $GLOBALS['egw']->common->find_portal_order((int)$_GET['app']);
$max_count = count($GLOBALS['phpgw_info']['user']['preferences']['portal_order']) - 1; $max_count = count($GLOBALS['egw_info']['user']['preferences']['portal_order']) - 1;
$offset = 1; $offset = 1;
if($curr_position >= $max_count) if($curr_position >= $max_count)
{ {
@ -106,7 +106,6 @@
default: default:
} }
header('Location: '.$GLOBALS['phpgw']->link('/home.php')); header('Location: '.$GLOBALS['egw']->link('/home.php'));
$GLOBALS['phpgw']->common->phpgw_exit(); $GLOBALS['egw']->common->phpgw_exit();
?> ?>

View File

@ -12,8 +12,8 @@
/* $Id$ */ /* $Id$ */
$phpgw_info = array(); $egw_info = array();
$GLOBALS['phpgw_info']['flags'] = array( $GLOBALS['egw_info']['flags'] = array(
'disable_Template_class' => True, 'disable_Template_class' => True,
'currentapp' => 'login', 'currentapp' => 'login',
'noheader' => True, 'noheader' => True,
@ -23,7 +23,7 @@
$GLOBALS['server'] = CreateObject('phpgwapi.soap_server'); $GLOBALS['server'] = CreateObject('phpgwapi.soap_server');
/* _debug_array($GLOBALS['server']);exit; */ /* _debug_array($GLOBALS['server']);exit; */
/* include(PHPGW_API_INC . '/soaplib.soapinterop.php'); */ /* include(EGW_API_INC . '/soaplib.soapinterop.php'); */
/* Note: this command only available under Apache */ /* Note: this command only available under Apache */
$headers = getallheaders(); $headers = getallheaders();
@ -36,11 +36,11 @@
$auth = base64_decode(trim($tmp)); $auth = base64_decode(trim($tmp));
list($sessionid,$kp3) = split(':',$auth); list($sessionid,$kp3) = split(':',$auth);
if($GLOBALS['phpgw']->session->verify($sessionid,$kp3)) if($GLOBALS['egw']->session->verify($sessionid,$kp3))
{ {
$GLOBALS['server']->authed = True; $GLOBALS['server']->authed = True;
} }
elseif($GLOBALS['phpgw']->session->verify_server($sessionid,$kp3)) elseif($GLOBALS['egw']->session->verify_server($sessionid,$kp3))
{ {
$GLOBALS['server']->authed = True; $GLOBALS['server']->authed = True;
} }

View File

@ -15,8 +15,8 @@
/*list($usec, $sec) = explode(" ", microtime()); /*list($usec, $sec) = explode(" ", microtime());
$GLOBALS['concisus']['script_start'] = ((float)$usec + (float)$sec);*/ $GLOBALS['concisus']['script_start'] = ((float)$usec + (float)$sec);*/
$GLOBALS['phpgw_info'] = array(); $GLOBALS['egw_info'] = array();
$GLOBALS['phpgw_info']['flags'] = array( $GLOBALS['egw_info']['flags'] = array(
'currentapp' => 'login', 'currentapp' => 'login',
'noheader' => True, 'noheader' => True,
'disable_Template_class' => True 'disable_Template_class' => True
@ -24,12 +24,12 @@
include('header.inc.php'); include('header.inc.php');
//viniciuscb: a secure way to know if we're in a xmlrpc call... //viniciuscb: a secure way to know if we're in a xmlrpc call...
$GLOBALS['phpgw_info']['server']['xmlrpc'] = true; $GLOBALS['egw_info']['server']['xmlrpc'] = true;
$server = CreateObject('phpgwapi.xmlrpc_server'); $server = CreateObject('phpgwapi.xmlrpc_server');
/* uncomment here if you want to show all of the testing functions for compatibility */ /* uncomment here if you want to show all of the testing functions for compatibility */
//include(PHPGW_API_INC . '/xmlrpc.interop.php'); //include(EGW_API_INC . '/xmlrpc.interop.php');
/* Note: this command only available under Apache */ /* Note: this command only available under Apache */
$headers = getallheaders(); $headers = getallheaders();
@ -49,11 +49,11 @@
$sessionid = get_var('sessionid',array('COOKIE','GET')); $sessionid = get_var('sessionid',array('COOKIE','GET'));
$kp3 = get_var('kp3',array('COOKIE','GET')); $kp3 = get_var('kp3',array('COOKIE','GET'));
} }
$server->authed = $GLOBALS['phpgw']->session->verify($sessionid,$kp3); $server->authed = $GLOBALS['egw']->session->verify($sessionid,$kp3);
if (!$server->authed and isset($_SERVER['PHP_AUTH_USER']) and isset($_SERVER['PHP_AUTH_PW'])) if (!$server->authed and isset($_SERVER['PHP_AUTH_USER']) and isset($_SERVER['PHP_AUTH_PW']))
{ {
$authed = $GLOBALS['phpgw']->session->create($login.'@'.$domain, $_SERVER['PHP_AUTH_PW'], 'text'); $authed = $GLOBALS['egw']->session->create($login.'@'.$domain, $_SERVER['PHP_AUTH_PW'], 'text');
if ($authed) if ($authed)
{ {