[TYPO3-core] RFC: #8463: TYPO3_SITE_URL in t3lib_div::locationHeaderUrl to support TYPO3 installed in subfolders

Steffen Kamper steffen at sk-typo3.de
Tue May 20 09:43:06 CEST 2008


"Christoph Koehler" <christoph.koehler at gmail.com> schrieb im Newsbeitrag 
news:mailman.1.1211232079.3747.typo3-team-core at lists.netfielders.de...
>
> Hi,
>
> this is a SVN patch request.
>
> Type: Bugfix
>
> Branches: 4_2
>
> Bugtracker Reference:
> http://bugs.typo3.org/view.php?id=8463
>
> Problem:
> t3lib_div::locationHeaderUrl uses TYPO3_REQUEST_HOST, which doesn't
> support TYPO3 installed in subfolders.
>
> Solution:
> Instead of TYPO3_REQUEST_HOST, we use TYPO3_SITE_URL.
>
> Relations:
> Related to #8441, http://bugs.typo3.org/view.php?id=8463.
> Made this patch as requested by Steffen Kamper.
>
>

Hi,

+1 by testing and reading. Thx Christoph.
The patch was not against root, so i did this. I also cleaned the code with 
CGL and changed the comments.

This is the scenario how it works:

$link = '' . $this->pi_getPageLink(10);
$link2 = t3lib_div::locationHeaderUrl($link);

old
link1  index.php?id=10
link2  http://localhost/t3/trunk/index.php?id=10

new : the same

but if i use / at the beginning (simulated here)
$link = '/' . $this->pi_getPageLink(10);

old
link1  /index.php?id=10
link2  http://localhost/index.php?id=10

new
link1  /index.php?id=10
link2  http://localhost/t3/trunk/index.php?id=10

vg Steffen 


begin 666 locationheader_siteurl_2.diff
M26YD97 at Z('0S;&EB+V-L87-S+G0S;&EB7V1I=BYP:' -"CT]/3T]/3T]/3T]
M/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]
M/3T]/3T]/3T]/3T-"BTM+2!T,VQI8B]C;&%S<RYT,VQI8E]D:78N<&AP"2AR
M979I<VEO;B S-C4X*0T**RLK('0S;&EB+V-L87-S+G0S;&EB7V1I=BYP:' )
M*'=O<FMI;F<@8V]P>2D-"D! ("TR.3<Q+#<@*S(Y-S$L-R! 0 T*( DO*BH*
M( D@*B!0<F5F:7AE<R!A(%523"!U<V5D('=I=&@@)VAE861E<BUL;V-A=&EO
M;B<@=VET:" G:'1T<#HO+RXN+B<@9&5P96YD:6YG(&]N('=H971H97(@:70@
M:&%S(&ET(&%L<F5A9'DN"B )("H at +2!)9B!A;')E861Y(&AA=FEN9R!A('-C
M:&5M92P@;F]T:&EN9R!I<R!P<F5P96YD960*+0D@*B M($EF(&AA=FEN9R!2
M15%515-47U5222!S;&%S:" G+R<L('1H96X@<')E9FEX:6YG("=H='1P.B\O
M6VAO<W1=)R H<F5L871I=F4@=&\@:&]S="D**PD@*B M($EF(&AA=FEN9R!2
M15%515-47U5222!S;&%S:" G+R<L('1H96X@<')E9FEX:6YG("=H='1P.B\O
M6W-I=&5?=7)L72<@*')E;&%T:79E('1O('-I=&4@=7)L*0H@"2 J("T at 3W1H
M97)W:7-E('!R969I>&5D('=I=&@@5%E03S-?4D5154535%]$25(@*')E;&%T
M:79E('1O(&-U<G)E;G0 at 9&ER("\@5%E03S-?4D5154535%]$25(I"B )("H@
M57-A9V4Z(#,P"B )("H*0$ @+3(Y-SDL,3$@*S(Y-SDL,3, at 0$ -"B )("H@
M0')E='5R;@ES=')I;F<*( D@*B\*( EP=6)L:6,@<W1A=&EC(&9U;F-T:6]N
M(&QO8V%T:6]N2&5A9&5R57)L*"1P871H*0E["BT)"21U22 ]('!A<G-E7W5R
M;"@D<&%T:"D["BT)"6EF("AS=6)S='(H)'!A=&@L,"PQ*3T])R\G*0E[("\O
M(')E;&%T:79E('1O($A/4U0*+0D)"21P871H(#T@=#-L:6)?9&EV.CIG971)
M;F1P16YV*"=465!/,U]215%515-47TA/4U0G*2XD<&%T:#L*+0D)?2!E;'-E
M:68@*"$D=4E;)W-C:&5M92==*0E[("\O($YO('-C:&5M92!E:71H97(*+0D)
M"21P871H(#T@=#-L:6)?9&EV.CIG971);F1P16YV*"=465!/,U]215%515-4
M7T1)4B<I+B1P871H.PHK"0DD=7)L4&%R=',@/2!P87)S95]U<FPH)'!A=&@I
M.PHK"0EI9B H<W5B<W1R*"1P871H+# L,2D@/3T@)R\G*2![( HK"0D)"2\O
M(')E;&%T:79E('1O(%-I=&4**PD)"21P871H(#T@<W5B<W1R*'0S;&EB7V1I
M=CHZ9V5T26YD<$5N=B at G5%E03S-?4TE415]54DPG*2PP+"TQ*2 N("1P871H
M.PHK"0E](&5L<V5I9B H(21U<FQ087)T<ULG<V-H96UE)UTI('L@"BL)"0D)
M+R\@3F\@<V-H96UE(&5I=&AE<@HK"0D))'!A=&@@/2!T,VQI8E]D:78Z.F=E
M=$EN9'!%;G8H)U194$\S7U)%455%4U1?1$E2)RD at +B D<&%T:#L*( D)?0H@
M"0ER971U<FX@)'!A=&@["B )?0I 0" M-3$S."PT("LU,30P+#0 at 0$ -"B )
M?0H@?0H@"BT_/@T*7"!.;R!N97=L:6YE(&%T(&5N9"!O9B!F:6QE#0HK/SX*
`
end



More information about the TYPO3-team-core mailing list