Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

Commit

Permalink
Always convert the old tl_files path
Browse files Browse the repository at this point in the history
  • Loading branch information
leofeyer committed Nov 24, 2014
1 parent dba9ab7 commit 36eeac0
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions system/modules/core/classes/Theme.php
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ protected function extractThemeFiles($arrFiles, $arrDbFields)
}

// Adjust the file paths in style sheets
elseif (\Config::get('uploadPath') != 'files' && ($table == 'tl_style_sheet' || $table == 'tl_style') && strpos($value, 'files') !== false)
elseif (($table == 'tl_style_sheet' || $table == 'tl_style') && strpos($value, 'files') !== false)
{
$tmp = deserialize($value);

Expand Down Expand Up @@ -979,7 +979,7 @@ protected function addDataRow(\DOMDocument $xml, \DOMElement $table, \Database\R
}
}
}
elseif (\Config::get('uploadPath') != 'files' && $t == 'tl_style' && ($k == 'bgimage' || $k == 'liststyleimage'))
elseif ($t == 'tl_style' && ($k == 'bgimage' || $k == 'liststyleimage'))
{
$v = $this->standardizeUploadPath($v);
}
Expand Down Expand Up @@ -1102,12 +1102,6 @@ protected function customizeUploadPath($strPath)
return '';
}

// Using the default path already
if (\Config::get('uploadPath') == 'files')
{
return $strPath;
}

return preg_replace('@^(tl_)?files/@', \Config::get('uploadPath') . '/', $strPath);
}

Expand All @@ -1124,12 +1118,6 @@ protected function standardizeUploadPath($strPath)
return '';
}

// Using the default path already
if (\Config::get('uploadPath') == 'files')
{
return $strPath;
}

return preg_replace('@^' . preg_quote(\Config::get('uploadPath'), '@') . '/@', 'files/', $strPath);
}
}

0 comments on commit 36eeac0

Please sign in to comment.