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

Home » FUDforum Development » Bug Reports » $INCLUDE and FUD API
Show: Today's Messages :: Unread Messages :: Show Polls :: Message Navigator
| Subscribe to topic | Bookmark topic 
Switch to threaded view of this topic Create a new topic Submit Reply
$INCLUDE and FUD API [message #187768] Fri, 20 September 2019 09:54 Go to next message
BugLaden is currently offline  BugLaden   South Africa
Messages: 216
Registered: February 2002
Location: Westminster, MD
Karma: 0
Senior Member
add to buddy list
ignore all messages by this user

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 10:22]

Report message to a moderator

Re: $INCLUDE and FUD API [message #187769 is a reply to message #187768] Fri, 20 September 2019 13: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
add to buddy list
ignore all messages by this user

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 17:06 Go to previous messageGo to next message
naudefj is currently offline  naudefj   United States
Messages: 3712
Registered: December 2004
Karma: 26
Senior Member
Administrator
Core Developer
remove from buddy list
ignore all messages by this user
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 17:07 Go to previous message
BugLaden is currently offline  BugLaden   Canada
Messages: 216
Registered: February 2002
Location: Westminster, MD
Karma: 0
Senior Member
add to buddy list
ignore all messages by this user

I'm already in the process of submitting a patch.

-=BugLaden
Quick Reply
Formatting Tools:   
  Switch to threaded view of this topic Create a new topic
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: Thu Feb 20 04:39:29 EST 2020

Total time taken to generate the page: 0.00632 seconds