[TASK] Remove t3lib_superadmin
[Packages/TYPO3.CMS.git] / t3lib / class.t3lib_tcemain.php
index dfcdbb3..2367eef 100644 (file)
@@ -2042,6 +2042,15 @@ class t3lib_TCEmain {
                                case 'alphanum_x':
                                        $value = preg_replace('/[^a-zA-Z0-9_-]/', '', $value);
                                break;
+                               case 'domainname':
+                                       if (!preg_match('/^[a-z0-9\.\-]*$/i', $value)) {
+                                               t3lib_div::requireOnce(PATH_typo3 . 'contrib/idna/idna_convert.class.php');
+                                               $idnaConvert = new idna_convert();
+                                               $idnaConvert->set_parameter('idn_version', '2008');
+                                               $value = $idnaConvert->encode($value);
+                                               unset($idnaConvert);
+                                       }
+                               break;
                                default:
                                        if (t3lib_div::hasValidClassPrefix($func)) {
                                                $evalObj = t3lib_div::getUserObj($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tce']['formevals'][$func] . ':&' . $func);
@@ -6649,11 +6658,8 @@ class t3lib_TCEmain {
                        break;
                        case 'all':
                                if ($this->admin || $this->BE_USER->getTSConfigVal('options.clearCache.all')) {
-
                                                // Clear all caching framework caches
-                                       if (t3lib_cache::isCachingFrameworkInitialized()) {
-                                               $GLOBALS['typo3CacheManager']->flushCaches();
-                                       }
+                                       $GLOBALS['typo3CacheManager']->flushCaches();
 
                                        if (t3lib_extMgm::isLoaded('cms')) {
                                                $GLOBALS['TYPO3_DB']->exec_TRUNCATEquery('cache_treelist');
@@ -7081,4 +7087,4 @@ if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLA
        include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_tcemain.php']);
 }
 
-?>
+?>
\ No newline at end of file