phpgw->egw

This commit is contained in:
Miles Lott 2005-11-25 00:20:34 +00:00
parent 98bb88f545
commit bcb682ed9d
3 changed files with 125 additions and 127 deletions

View File

@ -4,7 +4,7 @@
* Written by Ralf Becker <RalfBecker@outdoor-training.de> *
* Class for creating select boxes for addresse, projects, array items, ... *
* Copyright (C) 2000, 2001 Dan Kuykendall *
* -------------------------------------------------------------------------*
* ------------------------------------------------------------------------ *
* This library is part of the eGroupWare API *
* http://www.egroupware.org/api *
* ------------------------------------------------------------------------ *
@ -23,10 +23,10 @@
/* $Id$ */
if(!isset($GLOBALS['phpgw_info']['flags']['included_classes']['sbox']))
if(!isset($GLOBALS['egw_info']['flags']['included_classes']['sbox']))
{
include(PHPGW_API_INC . '/class.sbox.inc.php');
$GLOBALS['phpgw_info']['flags']['included_classes']['sbox'] = True;
include(EGW_API_INC . '/class.sbox.inc.php');
$GLOBALS['egw_info']['flags']['included_classes']['sbox'] = True;
}
class sbox2 extends sbox
@ -102,7 +102,7 @@
}
while (list($id,$text) = each($content))
{
$ret[$name] .= "<option value=\"$id\">" . $GLOBALS['phpgw']->strip_html($text) . "\n";
$ret[$name] .= "<option value=\"$id\">" . $GLOBALS['egw']->strip_html($text) . "\n";
}
$ret[$name] .= '<option value="0">'.lang('none')."\n";
$ret[$name] .= '</select>';
@ -143,11 +143,11 @@
{
return 'not an event !!!';
}
$name = $GLOBALS['phpgw']->common->show_date($this->bocal->maketime($event['start']) - $this->bocal->datetime->tz_offset);
$name .= ' -- ' . $GLOBALS['phpgw']->common->show_date($this->bocal->maketime($event['end']) - $this->bocal->datetime->tz_offset);
$name = $GLOBALS['egw']->common->show_date($this->bocal->maketime($event['start']) - $this->bocal->datetime->tz_offset);
$name .= ' -- ' . $GLOBALS['egw']->common->show_date($this->bocal->maketime($event['end']) - $this->bocal->datetime->tz_offset);
$name .= ': ' . $event['title'];
return $GLOBALS['phpgw']->strip_html($name);
return $GLOBALS['egw']->strip_html($name);
}
/*
@ -167,7 +167,7 @@
// echo "<p>getEvent('$name',$id_name,'$query_name','$title')</p>";
// fallback if calendar is not installed or not enabled for user
if (!file_exists(PHPGW_SERVER_ROOT.'/calendar') || !$GLOBALS['phpgw_info']['user']['apps']['calendar']['enabled'])
if (!file_exists(EGW_SERVER_ROOT.'/calendar') || !$GLOBALS['egw_info']['user']['apps']['calendar']['enabled'])
{
return array(
$name => "<input type=\"hidden\" name=\"id_$name\" value=\"$id_name\">\n",
@ -224,7 +224,7 @@
{
$name = $addr['org_name'].': '.$name;
}
return $GLOBALS['phpgw']->strip_html($name);
return $GLOBALS['egw']->strip_html($name);
}
/*
@ -357,7 +357,7 @@
// echo "<p>getProject('$name',$id_name,'$query_name','$title')</p>";
// fallback if projects is not installed or not enabled for user
if (!file_exists(PHPGW_SERVER_ROOT.'/projects') || !$GLOBALS['phpgw_info']['user']['apps']['projects']['enabled'])
if (!file_exists(EGW_SERVER_ROOT.'/projects') || !$GLOBALS['egw_info']['user']['apps']['projects']['enabled'])
{
return array(
$name => "<input type=\"hidden\" name=\"id_$name\" value=\"$id_name\">\n",
@ -500,7 +500,7 @@
if (!is_array($account_data))
{
$accounts = createobject('phpgwapi.accounts',$id);
$accounts->db = $GLOBALS['phpgw']->db;
$accounts->db = $GLOBALS['egw']->db;
$accounts->read_repository();
$account_data = $accounts->data;
}
@ -523,7 +523,7 @@
*/
function getAccount($name,$id,$longnames=-1,$type='accounts',$multiple=0,$options='')
{
$accs = $GLOBALS['phpgw']->accounts->get_list($type);
$accs = $GLOBALS['egw']->accounts->get_list($type);
if ($multiple < 0)
{
@ -532,7 +532,7 @@
while ($a = current($accs))
{
$aarr[$a['account_id']] = $longnames == -1 ?
$GLOBALS['phpgw']->common->display_fullname($a['account_lid'],$a['account_firstname'],$a['account_lastname']) :
$GLOBALS['egw']->common->display_fullname($a['account_lid'],$a['account_firstname'],$a['account_lastname']) :
$this->accountInfo($a['account_id'],$a,$longnames,$type=='both');
next($accs);
@ -556,7 +556,7 @@
$month = date('m',$date);
$year = date('Y',$date);
}
return $GLOBALS['phpgw']->common->dateformatorder(
return $GLOBALS['egw']->common->dateformatorder(
$this->getYears($n_year,$year),
$this->getMonthText($n_month,$month),
$this->getDays($n_day,$day)

View File

@ -3,7 +3,7 @@
* eGroupWare API - Validator *
* This file written by Dave Hall <skwashd@phpgroupware.org> *
* Copyright (C) 2003 Free Software Foundation *
* -------------------------------------------------------------------------*
* ------------------------------------------------------------------------ *
* This library is part of the eGroupWare API *
* http://www.egroupware.org/api *
* ------------------------------------------------------------------------ *
@ -127,7 +127,7 @@
$uris = array(
'ftp' => True,
'https' => True,
'http' => True,
'http' => True
);
$url_elements = parse_url($url);
@ -160,7 +160,6 @@
//echo ' is invalid<br>';
return $false;
}
}
//the url may be valid, but this method can't test all types
@ -227,7 +226,6 @@
{
return false;
}
}
function is_ipaddress($ip='')
@ -296,11 +294,11 @@
echo '<a href="http://sourceforge.net/projects/egroupwaregroup">';
echo 'our project page at sourceforge.net</a>. Please copy and paste ';
echo 'the following information into the bug report:<br>';
echo '<b>Summary<b>: ' . $GLOBALS['phpgw_info']['flags']['currentapp'];
echo '<b>Summary<b>: ' . $GLOBALS['egw_info']['flags']['currentapp'];
echo 'calls class.validator.inc.php';
echo 'Information:<br> The call was found when calling: ' . $_SERVER['QUERY_STRING'];
echo '<br><br>This application will now halt!<br><br>';
echo '<a href="'. $GLOBALS['phpgw']->link('/home.php') .'">Return to Home Screen</a>';
echo '<a href="'. $GLOBALS['egw']->link('/home.php') .'">Return to Home Screen</a>';
exit;
}
}

View File

@ -13,7 +13,7 @@
/* $Id$ */
$GLOBALS['phpgw_info']['flags'] = Array(
$GLOBALS['egw_info']['flags'] = Array(
'currentapp' => 'home', // can't be phpgwapi, nor htmlarea (no own directory)
'noheader' => True,
'nonavbar' => True,
@ -24,8 +24,8 @@ $GLOBALS['phpgw_info']['flags'] = Array(
);
include('../../header.inc.php');
header('Content-type: text/javascript; charset='.$GLOBALS['phpgw']->translation->charset());
$GLOBALS['phpgw']->translation->add_app('htmlarea');
header('Content-type: text/javascript; charset='.$GLOBALS['egw']->translation->charset());
$GLOBALS['egw']->translation->add_app('htmlarea');
// I18N constants
@ -45,7 +45,7 @@ HTMLArea.I18N = {
// the following should be the filename without .js extension
// it will be used for automatically load plugin language.
lang: "<?php echo $GLOBALS['phpgw_info']['user']['preferences']['common']['lang']; ?>",
lang: "<?php echo $GLOBALS['egw_info']['user']['preferences']['common']['lang']; ?>",
tooltips: {
bold: "<?php echo lang('Bold'); ?>",