Skip to content
Snippets Groups Projects
Commit 3c9391da authored by sgalinsk's avatar sgalinsk
Browse files

[TASK] Small cleanup, Update version constraints

git-svn-id: https://svn.typo3.org/TYPO3v4/Extensions/tinymce/trunk@76629 735d13b6-9817-0410-8766-e36946ffe9aa
parent f0f9dc3f
No related branches found
No related tags found
No related merge requests found
<?php <?php
/*************************************************************** /***************************************************************
* Copyright notice * Copyright notice
* *
* (c) 2005-2012 Stefan Galinski (stefan.galinski@gmail.com) * (c) Stefan Galinski (stefan.galinski@gmail.com)
* All rights reserved * All rights reserved
* *
* This script is part of the TYPO3 project. The TYPO3 project is * This script is part of the TYPO3 project. The TYPO3 project is
...@@ -29,22 +30,18 @@ ...@@ -29,22 +30,18 @@
* $tinyMCE = t3lib_div::makeInstance('tinyMCE'); * $tinyMCE = t3lib_div::makeInstance('tinyMCE');
* $tinyMCE->loadConfiguration($configuration); * $tinyMCE->loadConfiguration($configuration);
* $javascript = $tinyMCE->getJS(); * $javascript = $tinyMCE->getJS();
*
* @author Stefan Galinski <stefan.galinski@gmail.com>
* @package TYPO3
* @subpackage tx_tinymce
*/ */
class tinyMCE { class tinyMCE {
/** /**
* Internal extension configuration array * Internal extension configuration array
* *
* @var array * @var array
*/ */
protected $extensionConfiguration = array(); protected $extensionConfiguration = array();
/** /**
* TinyMCE configuration * TinyMCE configuration
* *
* @var array * @var array
*/ */
protected $tinymceConfiguration = array(); protected $tinymceConfiguration = array();
...@@ -82,8 +79,8 @@ class tinyMCE { ...@@ -82,8 +79,8 @@ class tinyMCE {
} }
/** /**
* Calculates and sets the current language * Calculates and sets the current language
* *
* @return void * @return void
*/ */
protected function setLanguage() { protected function setLanguage() {
...@@ -96,7 +93,7 @@ class tinyMCE { ...@@ -96,7 +93,7 @@ class tinyMCE {
$languageKey = $groupOrUserProps['properties']['prefLang']; $languageKey = $groupOrUserProps['properties']['prefLang'];
} }
// language conversion from TLD to iso631 // language conversion from TLD to iso631
if (class_exists('t3lib_l10n_Locales')) { if (class_exists('t3lib_l10n_Locales')) {
/** @var $locales t3lib_l10n_Locales */ /** @var $locales t3lib_l10n_Locales */
$locales = t3lib_div::makeInstance('t3lib_l10n_Locales'); $locales = t3lib_div::makeInstance('t3lib_l10n_Locales');
...@@ -186,18 +183,18 @@ class tinyMCE { ...@@ -186,18 +183,18 @@ class tinyMCE {
$configuration = file_get_contents($configuration); $configuration = file_get_contents($configuration);
} }
// split config into first and last javascript parts (applied later again into the config variables) // split config into first and last javascript parts (applied later again into the config variables)
// additionally the config part is matched to get the options // additionally the config part is matched to get the options
$start = '(.*)((tinyMCE|tinyMCE_GZ)\.init.*?\(.*?\{.*?'; $start = '(.*)((tinyMCE|tinyMCE_GZ)\.init.*?\(.*?\{.*?';
$end = '.*?\}.*?\).*?;)(.*)'; $end = '.*?\}.*?\).*?;)(.*)';
$pattern = '/' . $start . $end . '/is'; $pattern = '/' . $start . $end . '/is';
preg_match($pattern, $configuration, $matches); preg_match($pattern, $configuration, $matches);
// add preJS and postJS // add preJS and postJS
$configurationArray['preJS'] = $matches[1]; $configurationArray['preJS'] = $matches[1];
$configurationArray['postJS'] = $matches[4]; $configurationArray['postJS'] = $matches[4];
// split options into an array (first time strings and the second call splits bool values) // split options into an array (first time strings and the second call splits bool values)
$pattern = '([[:print:]]+?)[\s]*?:[\s]*["|\']{1}(.*?)["|\']{1}[,|\n|}]{1}.*?'; $pattern = '([[:print:]]+?)[\s]*?:[\s]*["|\']{1}(.*?)["|\']{1}[,|\n|}]{1}.*?';
preg_match_all('/' . $pattern . '/i', $matches[2], $options); preg_match_all('/' . $pattern . '/i', $matches[2], $options);
for ($i = 0; $i < count($options[1]); ++$i) { for ($i = 0; $i < count($options[1]); ++$i) {
......
No preview for this file type
# cat=basic/enable; type=boolean; label= Use Compressed Script: Serverside GZip compresses TinyMCE to reduce overall download size. Makes TinyMCE 75% smaller and a lot faster to load. # cat=basic/enable; type=boolean; label= Use Compressed Script: Server-side GZip compresses TinyMCE to reduce the overall download size.
compressed = 1 compressed = 1
# cat=basic/enable; type=boolean; label= Use Disk Cache: Enables Disk Cache if serverside GZip compression activated to increase the performance. # cat=basic/enable; type=boolean; label= Use Disk Cache: Enables Disk Cache if server-side GZip compression is activated to increase the performance.
diskCache = 1 diskCache = 1
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment