public function SmartyTranslate($params, &$smarty) { //TODO: make these more pluggable so theyre not copied if (!isset($params['args'])) { return $this->Resources->GetString($params['key'], ''); } return $this->Resources->GetString($params['key'], explode(',', $params['args'])); }
public function DisplayFullName($params, &$smarty) { $config = Configuration::Instance(); $ignorePrivacy = false; if (isset($params['ignorePrivacy']) && strtolower($params['ignorePrivacy'] == 'true')) { $ignorePrivacy = true; } if (!$ignorePrivacy && $config->GetSectionKey(ConfigSection::PRIVACY, ConfigKeys::PRIVACY_HIDE_USER_DETAILS, new BooleanConverter()) && !ServiceLocator::GetServer()->GetUserSession()->IsAdmin) { return $this->Resources->GetString('Private'); } $fullName = new FullName($params['first'], $params['last']); return htmlspecialchars($fullName->__toString()); }