[TYPO3-dev] Web- address + returnUrl
Steffen Kamper
steffen at dislabs.de
Sat Jan 13 21:43:29 CET 2007
Hi Tapio,
"Tapio Markula" <tapio.markula at atwebteam.com> schrieb im Newsbeitrag
news:mailman.1.1168719432.16720.typo3-dev at lists.netfielders.de...
> Martin Kutschker kirjoitti:
>> Tapio Markula schrieb:
>>> Hi
>>>
>>> How to define returnUrl correctly
>>>
>>> I would make some specific returnUrl for page
>>> modules, which has some extra parameters
>>>
>>> $returnUrl='&returnUrl='.htmlspecialchars(t3lib_extMgm::siteRelPath('templavoila').'mod1/index.php?id='.$id.$thisUser.$languagePar);
>>
>>
>> You should use rawurlencode() on the query parts instead of
>> htmlspecialchars(). Use htmlspecialchars only one of the whole URL.
>>
>> Masi
>
> ok seems to work
> I put also
> $myGET=t3lib_div::_GET();
> ...
>
> also get param through that - ok?
> $returnUrl='&returnUrl='.rawurlencode($myGET['returnUrl']);
you can use it, also
$returnUrl='&returnUrl='.rawurlencode(t3lib_div::_GP('returnUrl'));
>
> BTW. I have still one problem. SQL-queries should in priciple work also
> with other database as mysql
>
> I have currenlty used mysql_query and mysql_fetch_array for new queries
> but Stefan Galinky said that I should ask Typo3 database functions,
> which would make queries to work also with other database than just mysql
> Can you give exact answer
> how to replace
> $pageMaxItem = mysql_query("SELECT MAX(uid) FROM
> pages;",$GLOBALS['TYPO3_DB']->link);
> $pageMaxItem=mysql_fetch_array($pageMaxItem);
> with functions, which are not depending of mysql database.
>
no problem, use
$res=$GLOBALS['TYPO3_DB']->exec_SELECTquery(
'MAX(uid)',
'pages',
'', #where
'', #group
'', #order
'' #limit
);
$row=$GLOBALS['TYPO3_DB']->sql_fetch_row($res);
vg Steffen
>
More information about the TYPO3-dev
mailing list