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

Home » FUDforum Development » FUDforum 3.0+ » Get rid of __autoload() and global settings (Lazy practice, messes up other frameworks' code)
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Get rid of __autoload() and global settings [message #166598] Fri, 27 January 2012 14:52 Go to next message
NeXuS is currently offline  NeXuS
Messages: 121
Registered: July 2010
Location: South Korea
Karma: 5
Senior Member
Contributing Core Developer
Hi,
in my infinite struggle to have FUDforum and CodeIgniter get along well, I came across an instance where the presence of __autoload() in core.inc causes problems (it tries to load one of CI's classes, which obviously is not in FUD's path).

I had to resort to a ugly hack checking the classname, but it would just be much better to get rid of __autoload in the first place and include the necessary files when needed (I will have to redo the hack every time I update FUD).

Also the use of tons of globals may lead to name conflicts. It would be much better to have only one global variable which is an object of options (or array of options).
Re: Get rid of __autoload() and global settings [message #166610 is a reply to message #166598] Sat, 28 January 2012 04:27 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
The autoloader was fixed to only look of and load exiting FUDforum libraries.
Details @ http://fudforum.svn.sourceforge.net/viewvc/fudforum/trunk/install/forum_dat a/include/core.inc?r1=5376&r2=5388
Re: Get rid of __autoload() and global settings [message #166612 is a reply to message #166610] Sat, 28 January 2012 05:14 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
Changing all settings to one global variable will be a lot of work. You are welcome to implement it, provided you do all the work yourself and leave the code in a working state. Let me know if you need SVN commit access.
Re: Get rid of __autoload() and global settings [message #166613 is a reply to message #166612] Sat, 28 January 2012 13:34 Go to previous message
NeXuS is currently offline  NeXuS
Messages: 121
Registered: July 2010
Location: South Korea
Karma: 5
Senior Member
Contributing Core Developer
I'll first work on a local tree, if I can get everything in order I will then ask for SVN access.

Thanks
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: 3.0.4 and php
Next Topic: Props to Frank
Goto Forum:
  

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

Current Time: Mon Nov 25 03:43:03 GMT 2024

Total time taken to generate the page: 0.02541 seconds