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$ */
$GLOBALS['phpgw_info'] = array();
$GLOBALS['egw_info'] = array();
$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 {
$GLOBALS['phpgw_info']['flags']['currentapp'] = 'about';
else
{
$GLOBALS['egw_info']['flags']['currentapp'] = 'about';
}
$GLOBALS['phpgw_info']['flags']['disable_Template_class'] = True;
$GLOBALS['phpgw_info']['flags']['noheader'] = True;
$GLOBALS['egw_info']['flags']['disable_Template_class'] = True;
$GLOBALS['egw_info']['flags']['noheader'] = True;
include('header.inc.php');
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
@ -37,20 +38,19 @@
$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(
'phpgw_about' => 'about.tpl',
'phpgw_about_unknown' => 'about_unknown.tpl'
));
$title = isset($GLOBALS['phpgw_info']['apps'][$app]) ? $GLOBALS['phpgw_info']['apps'][$app]['title'] : 'eGroupWare';
$GLOBALS['phpgw_info']['flags']['app_header'] = lang('About %1',$title);
$GLOBALS['phpgw']->common->phpgw_header();
$title = isset($GLOBALS['egw_info']['apps'][$app]) ? $GLOBALS['egw_info']['apps'][$app]['title'] : 'eGroupWare';
$GLOBALS['egw_info']['flags']['app_header'] = lang('About %1',$title);
$GLOBALS['egw']->common->phpgw_header();
$tpl->set_block('phpgw_about', 'egroupware','egroupware');
$tpl->set_block('phpgw_about', 'application','application');
if ($included)
{
$tpl->set_var('phpgw_app_about', about_app());
@ -60,15 +60,14 @@
{
if ($api_only)
{
$tpl->set_var('phpgw_logo',$GLOBALS['phpgw']->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_logo',$GLOBALS['egw']->common->image('phpgwapi','logo.gif'));
$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.',
'<a href="http://www.eGroupWare.org" target="_blank">','</a>','<a href="http://www.php.net" target="_blank">','</a>'));
$tpl->pparse('out', 'egroupware');
$tpl->set_var('phpgw_app_about',about_template());
$tpl->pparse('phpgw_about', 'application', True);
}
else
{
@ -78,35 +77,34 @@
}
}
$GLOBALS['phpgw']->common->phpgw_footer();
$GLOBALS['egw']->common->phpgw_footer();
function about_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['icon'] = $GLOBALS['phpgw']->common->image($app,array('navbar','nonav'));
$info['title'] = $GLOBALS['phpgw_info']['apps'][$app]['title'];
$info['icon'] = $GLOBALS['egw']->common->image($app,array('navbar','nonav'));
$info['title'] = $GLOBALS['egw_info']['apps'][$app]['title'];
return about_display($info);
}
function about_template()
{
$template = $GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi');
function about_template()
{
$template = $GLOBALS['egw']->common->get_tpl_dir('phpgwapi');
include ($template . "/setup/setup.inc.php");
$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)
{
$s .= about_display($info);
}
return $s;
}
}
function about_display($info)
{
function about_display($info)
{
$other_infos = array(
'author' => lang('Author'),
'maintainer' => lang('Maintainer'),
@ -179,10 +177,10 @@ function about_display($info)
$img = $info[$key.'_img'];
if ($img)
{
$img_url = $GLOBALS['phpgw']->common->image('phpgwapi',$img);
$img_url = $GLOBALS['egw']->common->image('phpgwapi',$img);
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>';
}
@ -206,5 +204,5 @@ function about_display($info)
$s .= "</table>\n";
return $s;
}
}
?>

View File

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

View File

@ -1,7 +1,7 @@
<?php
/**************************************************************************\
* phpGroupWare *
* http://www.phpgroupware.org *
* eGroupWare *
* http://www.egroupware.org *
* -------------------------------------------- *
* 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 *
@ -11,7 +11,7 @@
/* $Id$ */
$phpgw_info = array();
$egw_info = array();
if(!file_exists('header.inc.php'))
{
Header('Location: setup/index.php');
@ -27,8 +27,8 @@
exit;
}
if(isset($_GET['hasupdates']) && $_GET['hasupdates'] == "yes") {
if(isset($_GET['hasupdates']) && $_GET['hasupdates'] == 'yes')
{
$hasupdates = True;
}
@ -45,22 +45,20 @@
}
else
{
//$phpgw->log->message('W-BadmenuactionVariable, menuaction missing or corrupt: %1',$menuaction);
//$phpgw->log->commit();
//$egw->log->message('W-BadmenuactionVariable, menuaction missing or corrupt: %1',$menuaction);
//$egw->log->commit();
$app = 'home';
$invalid_data = True;
}
if($app == 'phpgwapi')
{
$app = 'home';
$api_requested = True;
}
$GLOBALS['phpgw_info']['flags'] = array(
$GLOBALS['egw_info']['flags'] = array(
'noheader' => True,
'nonavbar' => True,
'enable_network_class' => True,
@ -72,42 +70,39 @@
// Check if we are using windows or normal webpage
$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))
{
include_once($tpl_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;
}
// }
}
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) {
$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")
if($GLOBALS['egw_info']['user']['preferences']['common']['default_app'] && !$hasupdates)
{
$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,
'nonavbar' => False,
'enable_network_class' => True,
@ -115,14 +110,14 @@
'enable_nextmatchs_class' => True,
'currentapp' => 'eGroupWare'
);
$GLOBALS['phpgw']->common->phpgw_header();
$GLOBALS['phpgw']->common->phpgw_footer();
$GLOBALS['egw']->common->phpgw_header();
$GLOBALS['egw']->common->phpgw_footer();
}
else {
else
{
if($api_requested)
{
$app = 'phpgwapi';
}
@ -140,9 +135,9 @@
{
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',
'p1' => $menuaction,
'line' => __LINE__,
@ -153,9 +148,9 @@
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',
'p1' => $method,
'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;
}
}
}
# Apache + mod_ssl style SSL certificate authentication
@ -203,7 +202,7 @@
if(getenv('REQUEST_METHOD') != 'POST' && $_SERVER['REQUEST_METHOD'] != 'POST' &&
!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'));
}
#if(!isset($_COOKIE['eGroupWareLoginTime']))
@ -245,7 +244,7 @@
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);
}
else

View File

@ -12,8 +12,8 @@
/* $Id$ */
$phpgw_info = array();
$GLOBALS['phpgw_info']['flags'] = array(
$egw_info = array();
$GLOBALS['egw_info']['flags'] = array(
'disable_Template_class' => True,
'currentapp' => 'logout',
'noheader' => True,
@ -25,44 +25,44 @@
$GLOBALS['sessionid'] = get_var('sessionid',array('GET','COOKIE'));
$GLOBALS['kp3'] = get_var('kp3',array('GET','COOKIE'));
$verified = $GLOBALS['phpgw']->session->verify();
$verified = $GLOBALS['egw']->session->verify();
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))
{
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);
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['phpgw']->session->destroy($GLOBALS['sessionid'],$GLOBALS['kp3']);
$GLOBALS['egw']->hooks->process('logout');
$GLOBALS['egw']->session->destroy($GLOBALS['sessionid'],$GLOBALS['kp3']);
}
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',
'line' => __LINE__,
'file' => __FILE__
));
}
}
$GLOBALS['phpgw']->session->phpgw_setcookie('eGW_remember');
$GLOBALS['phpgw']->session->phpgw_setcookie('sessionid');
$GLOBALS['phpgw']->session->phpgw_setcookie('kp3');
$GLOBALS['phpgw']->session->phpgw_setcookie('domain');
if($GLOBALS['phpgw_info']['server']['sessions_type'] == 'php4')
$GLOBALS['egw']->session->phpgw_setcookie('eGW_remember');
$GLOBALS['egw']->session->phpgw_setcookie('sessionid');
$GLOBALS['egw']->session->phpgw_setcookie('kp3');
$GLOBALS['egw']->session->phpgw_setcookie('domain');
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$ */
$phpgw_info = array();
$GLOBALS['phpgw_info']['flags'] = array(
$egw_info = array();
$GLOBALS['egw_info']['flags'] = array(
'noheader' => True,
'nonavbar' => True,
'disable_Template_class' => True,
'currentapp' => 'notifywindow'
);
include('header.inc.php');
$charSet = $GLOBALS['phpgw']->translation->charset();
$charSet = $GLOBALS['egw']->translation->charset();
?>
<html>
<head>
@ -29,11 +29,11 @@
?>
<title>Notify Window</title>
</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>
<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
$GLOBALS['phpgw']->hooks->process('notifywindow');
$GLOBALS['egw']->hooks->process('notifywindow');
?>
</table>
</body>

View File

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

View File

@ -12,8 +12,8 @@
/* $Id$ */
$phpgw_info = array();
$GLOBALS['phpgw_info']['flags'] = array(
$egw_info = array();
$GLOBALS['egw_info']['flags'] = array(
'noheader' => True,
'nonavbar' => True,
'disable_Template_class' => True,
@ -22,28 +22,25 @@
include('header.inc.php');
header("Content-type: text/xml");
header( "Expires: Mon, 26 Jul 1997 05:00:00 GMT" );
header( "Last-Modified: " . gmdate( "D, d M Y H:i:s" ) . "GMT" );
header( "Cache-Control: no-cache, must-revalidate" );
header( "Pragma: no-cache" );
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: " . gmdate( "D, d M Y H:i:s") . "GMT");
header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");
echo '<?xml version="1.0" encoding="UTF-8"
standalone="yes"?>';
$apps = $GLOBALS['phpgw']->hooks->process('notify');
standalone="yes"?>';
$apps = $GLOBALS['egw']->hooks->process('notify');
echo "\r\n<response>\r\n";
foreach($apps as $app => $message) {
if($message != "")
foreach($apps as $app => $message)
{
$title = $GLOBALS['phpgw_info']['apps'][$app]['title'];
if($message != '')
{
$title = $GLOBALS['egw_info']['apps'][$app]['title'];
echo " <title>".$title."</title>
<url>".$GLOBALS['phpgw']->link("/".$app."/index.php")."</url>
<message>".$message." </message>\r\n";
<url>".$GLOBALS['egw']->link("/".$app."/index.php")."</url>
<message>".$message." </message>\r\n";
}
}
echo "</response>";
?>

View File

@ -12,7 +12,7 @@
/* $Id$ */
$GLOBALS['phpgw_info']['flags'] = Array(
$GLOBALS['egw_info']['flags'] = Array(
'noheader' => True,
'nofooter' => True,
'currentapp' => 'home'
@ -21,60 +21,60 @@
// if(basename($HTTP_REFERER) != 'home.php')
// {
// Header('Location: '.$GLOBALS['phpgw']->link('/home.php'));
// $GLOBALS['phpgw']->common->phpgw_exit();
// Header('Location: '.$GLOBALS['egw']->link('/home.php'));
// $GLOBALS['egw']->common->phpgw_exit();
// }
@reset($GLOBALS['phpgw_info']['user']['preferences']);
//_debug_array($GLOBALS['phpgw_info']['user']['preferences']['portal_order']);
// $GLOBALS['phpgw']->preferences->delete('portal_order');
// unset($GLOBALS['phpgw_info']['user']['preferences']['portal_order']);
// $GLOBALS['phpgw']->preferences->save_repository();
@reset($GLOBALS['egw_info']['user']['preferences']);
//_debug_array($GLOBALS['egw_info']['user']['preferences']['portal_order']);
// $GLOBALS['egw']->preferences->delete('portal_order');
// unset($GLOBALS['egw_info']['user']['preferences']['portal_order']);
// $GLOBALS['egw']->preferences->save_repository();
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>";
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($offset < 0)
{
@ksort($GLOBALS['phpgw_info']['user']['preferences']['portal_order']);
@ksort($GLOBALS['egw_info']['user']['preferences']['portal_order']);
}
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)
{
$prev_seq = $seq_order + $offset;
$GLOBALS['phpgw']->preferences->delete('portal_order',$prev_seq);
$GLOBALS['phpgw']->preferences->add('portal_order',$prev_seq,$appid);
$GLOBALS['egw']->preferences->delete('portal_order',$prev_seq);
$GLOBALS['egw']->preferences->add('portal_order',$prev_seq,$appid);
}
}
}
else
{
$GLOBALS['phpgw']->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->delete('portal_order',$curr_position);
$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['phpgw']->preferences->add('portal_order',$new_order,(int)$_GET['app']);
$GLOBALS['egw']->preferences->delete('portal_order',$new_order);
$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);
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':
$curr_position = $GLOBALS['phpgw']->common->find_portal_order((int)$_GET['app']);
$max_count = count($GLOBALS['phpgw_info']['user']['preferences']['portal_order']) - 1;
$curr_position = $GLOBALS['egw']->common->find_portal_order((int)$_GET['app']);
$max_count = count($GLOBALS['egw_info']['user']['preferences']['portal_order']) - 1;
$offset = -1;
if($curr_position <= 0)
{
@ -87,8 +87,8 @@
move_boxes($curr_position,$new_order,$offset,0,$max_count);
break;
case 'down':
$curr_position = $GLOBALS['phpgw']->common->find_portal_order((int)$_GET['app']);
$max_count = count($GLOBALS['phpgw_info']['user']['preferences']['portal_order']) - 1;
$curr_position = $GLOBALS['egw']->common->find_portal_order((int)$_GET['app']);
$max_count = count($GLOBALS['egw_info']['user']['preferences']['portal_order']) - 1;
$offset = 1;
if($curr_position >= $max_count)
{
@ -106,7 +106,6 @@
default:
}
header('Location: '.$GLOBALS['phpgw']->link('/home.php'));
$GLOBALS['phpgw']->common->phpgw_exit();
header('Location: '.$GLOBALS['egw']->link('/home.php'));
$GLOBALS['egw']->common->phpgw_exit();
?>

View File

@ -12,8 +12,8 @@
/* $Id$ */
$phpgw_info = array();
$GLOBALS['phpgw_info']['flags'] = array(
$egw_info = array();
$GLOBALS['egw_info']['flags'] = array(
'disable_Template_class' => True,
'currentapp' => 'login',
'noheader' => True,
@ -23,7 +23,7 @@
$GLOBALS['server'] = CreateObject('phpgwapi.soap_server');
/* _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 */
$headers = getallheaders();
@ -36,11 +36,11 @@
$auth = base64_decode(trim($tmp));
list($sessionid,$kp3) = split(':',$auth);
if($GLOBALS['phpgw']->session->verify($sessionid,$kp3))
if($GLOBALS['egw']->session->verify($sessionid,$kp3))
{
$GLOBALS['server']->authed = True;
}
elseif($GLOBALS['phpgw']->session->verify_server($sessionid,$kp3))
elseif($GLOBALS['egw']->session->verify_server($sessionid,$kp3))
{
$GLOBALS['server']->authed = True;
}

View File

@ -15,8 +15,8 @@
/*list($usec, $sec) = explode(" ", microtime());
$GLOBALS['concisus']['script_start'] = ((float)$usec + (float)$sec);*/
$GLOBALS['phpgw_info'] = array();
$GLOBALS['phpgw_info']['flags'] = array(
$GLOBALS['egw_info'] = array();
$GLOBALS['egw_info']['flags'] = array(
'currentapp' => 'login',
'noheader' => True,
'disable_Template_class' => True
@ -24,12 +24,12 @@
include('header.inc.php');
//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');
/* 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 */
$headers = getallheaders();
@ -49,11 +49,11 @@
$sessionid = get_var('sessionid',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']))
{
$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)
{