FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » Bug Reports » $INCLUDE and FUD API
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
$INCLUDE and FUD API [message #187768] Fri, 20 September 2019 13:54 Go to next message
BugLaden is currently offline  BugLaden   South Africa
Messages: 216
Registered: February 2002
Location: Westminster, MD
Karma: 0
Senior Member
I'm trying to implement some FUD API calls into my site. The first instruction the the API documentation is to include GLOBALS.php into my code.

But immediately I'm getting a
Notice (8): Undefined variable: INCLUDE [ROOT/FUDforum/include/GLOBALS.php, line 117]

I did a find -name and couldn't find where $INCLUDE is defined. Can someone point me in the right direction so I can include that file as well?


-=BugLaden

[Updated on: Fri, 20 September 2019 14:22]

Report message to a moderator

Re: $INCLUDE and FUD API [message #187769 is a reply to message #187768] Fri, 20 September 2019 17:45 Go to previous messageGo to next message
BugLaden is currently offline  BugLaden   South Africa
Messages: 216
Registered: February 2002
Location: Westminster, MD
Karma: 0
Senior Member
Line 12 in GLOBALS.php is:
$GLOBALS['INCLUDE']             = '/home2/bugladen/cake/tobacconerd/FUDforum/include/';

but line 117 is
require($INCLUDE .'core.inc');

It seems like 117 should be changed to
require($GLOBALS['INCLUDE'] .'core.inc');

and this gets rid of the error I reported in the OP.

There are two other instances of $INCLUDE found using grep
./include/glob.inc:     $stripped_globals = str_replace('require($INCLUDE .\'core.inc\');', '', $globals);
./src/post.php.t:                               $data = file_get_contents($INCLUDE .'theme/'. $usr->theme_name .'/usercp.inc');


-=BugLaden
Re: $INCLUDE and FUD API [message #187770 is a reply to message #187769] Fri, 20 September 2019 21:06 Go to previous messageGo to next message
naudefj is currently offline  naudefj   United States
Messages: 3772
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
Thanks for reporting this.
I guess we need to change them all to GLOBALS['INCLUDE'].
Re: $INCLUDE and FUD API [message #187771 is a reply to message #187770] Fri, 20 September 2019 21:07 Go to previous message
BugLaden is currently offline  BugLaden   Canada
Messages: 216
Registered: February 2002
Location: Westminster, MD
Karma: 0
Senior Member
I'm already in the process of submitting a patch.

-=BugLaden
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: How to Convert EML to MSG?
Next Topic: Defunct messengers are still referenced in the UCP
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Dec 22 06:28:17 GMT 2024

Total time taken to generate the page: 0.02561 seconds