[TYPO3-core] RFC: media/ path fixes

Ingmar Schlecht ingmar at typo3.org
Wed Apr 12 09:29:12 CEST 2006


Hi Bernhard,

Bernhard Kraft wrote:
> Ingmar Schlecht wrote:
>>> Hi guys,
>>>
>>> in some places, the old path to media/ is still used, this patch fixes
>>> this. Some of the fixes are fixes of fixes actually.
> 
> Question:
> 
> Did you test all those afterwards ?

No, I didn't test any of them.

But all except for the one you picked out are no-brainers.

> Because this one:
> 
>>> @@ -3414,7 +3414,6 @@
>>>  	 */
>>>  	function setAbsRefPrefix()	{
>>>  		if ($this->absRefPrefix)	{
>>> -			$this->content = str_replace('"media/', '"'.$this->absRefPrefix.'media/', $this->content);
>>>  			$this->content = str_replace('"fileadmin/', '"'.$this->absRefPrefix.'fileadmin/', $this->content);
>>>  		}
>>>  	}
> 
> 
> Looks not correct for me ... you just remove the line for media but do not add a replacement.
> 
> Is this correct ?

Yes, I intended it to be so, because normally $this->content shouldn't
contain any references to media/ anymore. (I wonder why the feature
absRefPrefix exists anyway, why not just <base href> like it's used for
realUrl, but that's another story.)

Anyway, thanks for pointing this one out, after thinking about it again,
I'd modify my patch like that:

 - $this->content = str_replace('"media/',
  '"'.$this->absRefPrefix.'media/', $this->content);

 + $this->content = str_replace('"media/',
  '"'.t3lib_extMgm::siteRelPath('cms').'tslib/media/', $this->content);

cheers
Ingmar



More information about the TYPO3-team-core mailing list