phpgw --> egw

This commit is contained in:
Ralf Becker 2005-10-14 14:31:35 +00:00
parent 250d3d9408
commit 3d4049d873
10 changed files with 71 additions and 70 deletions

View File

@ -20,11 +20,11 @@
function uiaclprefs()
{
$GLOBALS['egw']->nextmatchs = CreateObject('phpgwapi.nextmatchs');
$GLOBALS['egw']->nextmatchs =& CreateObject('phpgwapi.nextmatchs');
if (!is_object($GLOBALS['egw']->html))
{
$GLOBALS['egw']->html = CreateObject('phpgwapi.html');
$GLOBALS['egw']->html =& CreateObject('phpgwapi.html');
}
}
@ -63,10 +63,10 @@
if (($GLOBALS['egw_info']['server']['deny_user_grants_access'] || $owner != $GLOBALS['egw_info']['user']['account_id'])
&& !isset($GLOBALS['egw_info']['user']['apps']['admin']) || $acl_app_not_passed)
{
$GLOBALS['egw']->common->phpgw_header();
$GLOBALS['egw']->common->egw_header();
echo parse_navbar();
echo '<center><b>' . lang('Access not permitted') . '</b></center>';
$GLOBALS['egw']->common->phpgw_footer();
$GLOBALS['egw']->common->egw_footer();
return;
}
@ -79,7 +79,7 @@
{
$no_privat_grants = $owner != $GLOBALS['egw_info']['user']['account_id'];
}
$this->acl = CreateObject('phpgwapi.acl',(int)$owner);
$this->acl =& CreateObject('phpgwapi.acl',(int)$owner);
$this->acl->read_repository();
if ($_POST['submit'])
@ -140,10 +140,10 @@
$this->acl->save_repository();
}
$GLOBALS['egw_info']['flags']['app_header'] = lang('%1 - Preferences',$GLOBALS['egw_info']['apps'][$acl_app]['title']).' - '.lang('acl').': '.$owner_name;
$GLOBALS['egw']->common->phpgw_header();
$GLOBALS['egw']->common->egw_header();
echo parse_navbar();
$this->template = CreateObject('phpgwapi.Template',$GLOBALS['egw']->common->get_tpl_dir($acl_app));
$this->template =& CreateObject('phpgwapi.Template',$GLOBALS['egw']->common->get_tpl_dir($acl_app));
$templates = Array (
'preferences' => 'preference_acl.tpl',
'row_colspan' => 'preference_colspan.tpl',

View File

@ -37,8 +37,8 @@
{
$cats_app = get_var('cats_app',array('GET','POST'));
$this->bo = CreateObject('preferences.bocategories',$cats_app);
$this->nextmatchs = CreateObject('phpgwapi.nextmatchs');
$this->bo =& CreateObject('preferences.bocategories',$cats_app);
$this->nextmatchs =& CreateObject('phpgwapi.nextmatchs');
$this->account = $GLOBALS['egw_info']['user']['account_id'];
$this->user = $GLOBALS['egw_info']['user']['fullname'];
@ -127,7 +127,7 @@
}
$GLOBALS['egw_info']['flags']['app_header'] = $GLOBALS['egw_info']['apps'][$cats_app]['title'].
'&nbsp;'.lang('categories for').':&nbsp;'.$this->user;
$GLOBALS['egw']->common->phpgw_header();
$GLOBALS['egw']->common->egw_header();
echo parse_navbar();
$GLOBALS['egw']->template->set_file(array(
@ -417,7 +417,7 @@
if (!is_object($GLOBALS['egw']->html))
{
$GLOBALS['egw']->html = CreateObject('phpgwapi.html');
$GLOBALS['egw']->html =& CreateObject('phpgwapi.html');
}
$GLOBALS['egw']->template->set_var('color',$GLOBALS['egw']->html->inputColor('cat_data[color]',$cat['data']['color'],lang('Click to select a color')));
@ -469,7 +469,7 @@
$GLOBALS['egw_info']['flags']['app_header'] = lang($cat_id ? 'Edit %1 category for' : 'Add %1 category for',
$GLOBALS['egw_info']['apps'][$cats_app]['title']).':&nbsp;'.$this->user;
$GLOBALS['egw']->common->phpgw_header();
$GLOBALS['egw']->common->egw_header();
echo parse_navbar();
$GLOBALS['egw']->template->set_var('edithandle','');
@ -518,7 +518,7 @@
$GLOBALS['egw']->template->set_file(array('category_delete' => 'delete.tpl'));
$GLOBALS['egw_info']['flags']['app_header'] = lang('Delete Categories');
$GLOBALS['egw']->common->phpgw_header();
$GLOBALS['egw']->common->egw_header();
echo parse_navbar();
$GLOBALS['egw']->template->set_var('deleteheader',lang('Are you sure you want to delete this category ?'));

View File

@ -20,7 +20,7 @@
function uipassword()
{
$this->bo = CreateObject('preferences.bopassword');
$this->bo =& CreateObject('preferences.bopassword');
}
@ -33,7 +33,7 @@
if(!$GLOBALS['egw']->acl->check('changepassword', 1) || $_POST['cancel'])
{
$GLOBALS['egw']->redirect_link('/preferences/index.php');
$GLOBALS['egw']->common->phpgw_exit();
$GLOBALS['egw']->common->egw_exit();
}
$GLOBALS['egw']->template->set_file(array(
@ -73,22 +73,22 @@
if(is_array($errors))
{
$GLOBALS['egw']->common->phpgw_header();
$GLOBALS['egw']->common->egw_header();
echo parse_navbar();
$GLOBALS['egw']->template->set_var('messages',$GLOBALS['egw']->common->error_list($errors));
$GLOBALS['egw']->template->pfp('out','form');
$GLOBALS['egw']->common->phpgw_exit(True);
$GLOBALS['egw']->common->egw_exit(True);
}
$passwd_changed = $this->bo->changepass($o_passwd, $n_passwd);
if(!$passwd_changed)
{
$errors[] = lang('Failed to change password. Please contact your administrator.');
$GLOBALS['egw']->common->phpgw_header();
$GLOBALS['egw']->common->egw_header();
echo parse_navbar();
$GLOBALS['egw']->template->set_var('messages',$GLOBALS['egw']->common->error_list($errors));
$GLOBALS['egw']->template->pfp('out','form');
$GLOBALS['egw']->common->phpgw_exit(True);
$GLOBALS['egw']->common->egw_exit(True);
}
else
{
@ -108,11 +108,11 @@
else
{
$GLOBALS['egw_info']['flags']['app_header'] = lang('Change your password');
$GLOBALS['egw']->common->phpgw_header();
$GLOBALS['egw']->common->egw_header();
echo parse_navbar();
$GLOBALS['egw']->template->pfp('out','form');
$GLOBALS['egw']->common->phpgw_footer();
$GLOBALS['egw']->common->egw_footer();
}
}
}

View File

@ -67,7 +67,7 @@
'24' => lang('24 hour')
);
$sbox = createobject('phpgwapi.sbox');
$sbox =& CreateObject('phpgwapi.sbox');
$langs = $GLOBALS['egw']->translation->get_installed_langs();
$user_apps = array();

View File

@ -12,14 +12,15 @@
/* $Id$ */
$egw_info = array();
$GLOBALS['egw_info']['flags'] = array(
$GLOBALS['egw_info'] = array(
'flags' => array(
'currentapp' => 'preferences',
'disable_Template_class' => True
'disable_Template_class' => True,
),
);
include('../header.inc.php');
$pref_tpl = CreateObject('phpgwapi.Template',EGW_APP_TPL);
$pref_tpl =& CreateObject('phpgwapi.Template',EGW_APP_TPL);
$templates = Array(
'pref' => 'index.tpl'
);
@ -44,13 +45,13 @@
$GLOBALS['egw']->session->appsession('session_data','preferences',$session_data);
}
if (! $GLOBALS['HTTP_GET_VARS']['type'])
if (! $_GET['type'])
{
$type = $session_data['type'];
}
else
{
$type = $GLOBALS['HTTP_GET_VARS']['type'];
$type = $_GET['type'];
$session_data = array('type' => $type);
$GLOBALS['egw']->session->appsession('session_data','preferences',$session_data);
}
@ -137,5 +138,5 @@
$GLOBALS['egw']->hooks->process('preferences',array('preferences'));
$pref_tpl->pfp('out','list');
$GLOBALS['egw']->common->phpgw_footer();
$GLOBALS['egw']->common->egw_footer();
?>