Changeset View
Changeset View
Standalone View
Standalone View
core/units/helpers/filenames_helper.php
Show All 38 Lines | |||||
public function __construct() | public function __construct() | ||||
{ | { | ||||
parent::__construct(); | parent::__construct(); | ||||
$this->_escapeChar = $this->Application->ConfigValue('FilenameSpecialCharReplacement'); | $this->_escapeChar = $this->Application->ConfigValue('FilenameSpecialCharReplacement'); | ||||
/** @var kDBItem $language */ | |||||
$language = $this->Application->recallObject('lang.primary'); | $language = $this->Application->recallObject('lang.primary'); | ||||
/* @var $language kDBItem */ | |||||
$replacements = $language->GetDBField('FilenameReplacements'); | $replacements = $language->GetDBField('FilenameReplacements'); | ||||
if ($replacements) { | if ($replacements) { | ||||
$replacements = explode("\r\n", $replacements); | $replacements = explode("\r\n", $replacements); | ||||
foreach ($replacements as $replacement) { | foreach ($replacements as $replacement) { | ||||
list ($replace_from, $replace_to) = explode('=', $replacement); | list ($replace_from, $replace_to) = explode('=', $replacement); | ||||
$this->_filenameReplaceFrom[] = trim($replace_from); | $this->_filenameReplaceFrom[] = trim($replace_from); | ||||
$this->_filenameReplaceTo[] = trim($replace_to); | $this->_filenameReplaceTo[] = trim($replace_to); | ||||
▲ Show 20 Lines • Show All 122 Lines • ▼ Show 20 Line(s) | |||||
} | } | ||||
return $filename.$append; | return $filename.$append; | ||||
} | } | ||||
return $filename; | return $filename; | ||||
} | } | ||||
} | } | ||||
No newline at end of file | No newline at end of file |