The $gCms variable is provided in scope for module actions, and the install, uninstall, and upgrade methods. However, $gCms no longer exists as a global for any internal lib functions.
This global was long deprecated.
The best replacement is to change:
Code: Select all
global $gCms;
Code: Select all
$gCms = cmsms();
This internal variable was long deprecated, and a long time ago we prevented anybody from actually writing to that array. In 2.0 the array is gone.
Anybody using $gCms->variables stuff will need to find the appropriate replacement.
Replacements are:
Code: Select all
$gCms->variables['admintheme']
Code: Select all
cms_utils::get_theme_object();
Code: Select all
<a href="{cms_action_url module='MyModule' action='something'}">{admin_icon icon='newobject.gif'} {$mod->Lang('new_item')}</a>
Somewhere in the 1.10.x or 1.11.x series (I don't wanna look it up), the $module->StartTabContent() and $module->EndTabContent() became smarter, and remembered some state variables. That means you can't do things like:
Code: Select all
$smarty->assign('endtab',$this->EndTab());
The replacement is to use:
Code: Select all
{tab_header name='tab1' label='Tab 1'}
{tab_header name='tab2' label='Tab 2'}
{tab_start name='tab1'}
SOME CONTENT
{tab_start name='tab2'}
MORE CONTENT
{tab_end}