$mainframe->getUserStateFromRequest in Joomla 1.6 ?

For Joomla! 1.5 Coding related discussions, please use: http://groups.google.com/group/joomla-dev-general
Forum rules
Please use the mailing list here: http://groups.google.com/group/joomla-dev-general rather than this forum.
Locked
pedmajungne
Joomla! Intern
Joomla! Intern
Posts: 63
Joined: Fri Feb 13, 2009 6:20 am

$mainframe->getUserStateFromRequest in Joomla 1.6 ?

Post by pedmajungne » Fri Nov 06, 2009 9:10 am

Hi ,

Joomla 1.6 doesn't know this :
$mainframe->getUserStateFromRequest();

which is used by some multilingual components in Joomla 1.5.
How to convert it to Joomla 1.6 ?

Thanks.
Best Regards,
- pedma -

User avatar
Drapichrust
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Wed Aug 15, 2007 8:26 pm
Location: Silesia

Re: $mainframe->getUserStateFromRequest in Joomla 1.6 ?

Post by Drapichrust » Mon Nov 23, 2009 12:20 pm

The problem is probably here:

Code: Select all

global $mainframe;
PHP probably cannot find $mainframe in global context so the variable is null. Instead you should use JFactory to get the object. So:

Code: Select all

$mainframe = JFactory::getApplication();

User avatar
infograf768
Joomla! Master
Joomla! Master
Posts: 18833
Joined: Fri Aug 12, 2005 3:47 pm
Location: **Translation Matters**

Re: $mainframe->getUserStateFromRequest in Joomla 1.6 ?

Post by infograf768 » Mon Nov 23, 2009 5:02 pm

Out of pure curiosity, which 1.5 multilingual component uses
$mainframe->getUserStateFromRequest();
?
Jean-Marie Simonet / infograf · http://www.info-graf.fr
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group

pedmajungne
Joomla! Intern
Joomla! Intern
Posts: 63
Joined: Fri Feb 13, 2009 6:20 am

Re: $mainframe->getUserStateFromRequest in Joomla 1.6 ?

Post by pedmajungne » Mon Nov 23, 2009 11:37 pm

infograf768 wrote:Out of pure curiosity, which 1.5 multilingual component uses
$mainframe->getUserStateFromRequest();
?
Hi,

@Drapichrust,

Thanks.

@ Infograf768,

They are JoomFish, JCC multilingual support .

Thanks.
- pedma -


Locked

Return to “Joomla! 1.5 Coding”