Exemplo n.º 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);
 }
Exemplo n.º 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;
 }
Exemplo n.º 3
0
 /**
  * @see	\wcf\system\option\IOptionType::getFormElement()
  */
 public function getFormElement(Option $option, $value)
 {
     $value = FileUtil::formatFileSize($value);
     return parent::getFormElement($option, $value);
 }
Exemplo n.º 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);
 }
Exemplo n.º 5
0
	/**
	 * @see	wcf\system\option\IOptionType::getData()
	 */
	public function getData(Option $option, $newValue) {
		return StringUtil::unifyNewlines(parent::getData($option, $newValue));
	}