phpgroupware-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Phpgroupware-developers] Need a little help with timetrack/inc/head


From: Brian Johnson
Subject: Re: [Phpgroupware-developers] Need a little help with timetrack/inc/header.inc.php
Date: Mon, 04 Nov 2002 20:36:45 +0000

A little more strangeness:

If I disable line 20 - the page loads without erros but doesn't link to addbook 
(it
links to the default timetrack/customers.php)

If I then enable line 20 and reload the page - IT WORKS!

What the heck is going on?



Brian Johnson (address@hidden) wrote*:
>
>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 mailing list
>address@hidden
>http://mail.gnu.org/mailman/listinfo/phpgroupware-developers
>





reply via email to

[Prev in Thread] Current Thread [Next in Thread]