Topic: Strange issue using forum globals in included file.
In an extension I am working on, I have the following in manifest.xml:
<hook id="hd_head">
<![CDATA[
if ( FORUM_PAGE == 'index' )
{
require_once $ext_info['path'].'/include/functions.php';
checkForUpdate();
}
]]>
</hook>
At the very top of the functions.php file, I have the following:
global $forum_config;
echo '<div style="display:none;">';
print_r($forum_config);
echo '</div>';
When I view the output of the print_r statement, the values in the array are always the values of the config table at the time the extension was installed. That is to say, if I change a value in the config table (from the ACP or directly through phpMyAdmin), the values of $forum_config in functions.php do not change until I reinstall the extension.
If I use $forum_config in the actual manifest.xml though, it works fine.
Any idea why this is?