Пример #1
0
 /**
  * @see	\wcf\system\option\TextOptionType::getContent()
  */
 protected function getContent(Option $option, $newValue)
 {
     if ($newValue && !preg_match('~^https?://~i', $newValue)) {
         $newValue = 'http://' . $newValue;
     }
     return parent::getContent($option, $newValue);
 }
Пример #2
0
 /**
  * @see	\wcf\system\option\IOptionType::getData()
  */
 public function getData(Option $option, $newValue)
 {
     $newValue = StringUtil::unifyNewlines(parent::getData($option, $newValue));
     // check for wildcard
     if ($option->wildcard) {
         $values = explode("\n", $newValue);
         if (in_array($option->wildcard, $values)) {
             $newValue = $option->wildcard;
         }
     }
     return $newValue;
 }
Пример #3
0
 /**
  * @see	\wcf\system\option\IOptionType::getFormElement()
  */
 public function getFormElement(Option $option, $value)
 {
     $value = FileUtil::formatFileSize($value);
     return parent::getFormElement($option, $value);
 }
Пример #4
0
 /**
  * @see	\wcf\system\option\IOptionType::getFormElement()
  */
 public function getFormElement(Option $option, $value)
 {
     $value = str_replace('.', WCF::getLanguage()->get('wcf.global.decimalPoint'), $value);
     return parent::getFormElement($option, $value);
 }
Пример #5
0
	/**
	 * @see	wcf\system\option\IOptionType::getData()
	 */
	public function getData(Option $option, $newValue) {
		return StringUtil::unifyNewlines(parent::getData($option, $newValue));
	}