Get rid of __autoload() and global settings [message #166598] |
Fri, 27 January 2012 14:52 |
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).
|
|
|
|
|
|