[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-developers] Need a little help with timetrack/inc/header.i
From: |
Brian Johnson |
Subject: |
[Phpgroupware-developers] Need a little help with timetrack/inc/header.inc.php |
Date: |
Mon, 04 Nov 2002 19:36:55 +0000 |
I have the basic functionality of using the addbook module being the contact
storage system for timetrack working (enabled by a preference setting so it
doesn't
disrupt the default/current system users)
One thing I would like to do is change the link in header.inc.php for "List
Customers" to point to /addbook/index.php but I'm getting an error:
Fatal error: Call to a member function on a non-object
in /backup/piii_651/home/htdocs/phpgroupware/timetrack/inc/header.inc.php on
line 20
The problem seems to be where I try to get the preference settings - here are
the
first lines from my /timetrack/inc/header.inc.php if you can help me solve this
problem:
<?php
/**************************************************************************\
* phpgwtimetrack - phpGroupWare addon application *
* http://phpgwtimetrack.sourceforge.net *
* Written by Robert Schader <address@hidden> *
* -------------------------------------------- *
* 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 *
* Free Software Foundation; either version 2 of the License, or (at your *
* option) any later version. *
\**************************************************************************/
$GLOBALS['phpgw_info']["apps"]["timetrack"]["ismanager"] = 0;
$GLOBALS['phpgw_info']["apps"]["timetrack"]["ispayroll"] = 0;
// $GLOBALS['phpgw_info']["flags"]["enable_nextmatchs_class"] = "True";
// $GLOBALS['phpgw_info']["flags"]["currentapp"] = "timetrack";
$GLOBALS['phpgw_info']["flags"]["enable_config_class"] = "True";
$GLOBALS['phpgw']->config->read_repository(); // This is line 20
$userGroups = $phpgw->accounts->membership();
for ($i=0; $i<count($userGroups); $i++)
{
$gname = $userGroups[$i]['account_name'];
if ($gname == "TTrack_Managers")
{
$GLOBALS['phpgw_info']["apps"]["timetrack"]["ismanager"] = 1;
}
if ($gname == "TTrack_Payroll")
{
$GLOBALS['phpgw_info']["apps"]["timetrack"]["ispayroll"] = 1;
}
}
/*********** End of check groups code section ****************/
- [Phpgroupware-developers] Need a little help with timetrack/inc/header.inc.php,
Brian Johnson <=