Overview

Packages

  • Core
    • Authentication
    • Backend
    • Cache
    • CEC
    • Chain
    • ContentType
    • Database
    • Datatype
    • Debug
    • Exception
    • Frontend
      • Search
      • URI
      • Util
    • GenericDB
      • Model
    • GUI
      • HTML
    • I18N
    • LayoutHandler
    • Log
    • Security
    • Session
    • Util
    • Validation
    • Versioning
    • XML
  • Module
    • ContentSitemapHtml
    • ContentSitemapXml
    • ContentUserForum
    • NavigationTop
  • mpAutoloaderClassMap
  • None
  • Plugin
    • ContentAllocation
    • CronjobOverview
    • FormAssistant
    • FrontendLogic
    • FrontendUsers
    • Linkchecker
    • ModRewrite
    • Newsletter
    • Repository
      • FrontendNavigation
      • KeywordDensity
    • SearchSolr
    • SmartyWrapper
    • UrlShortener
    • UserForum
    • Workflow
  • PluginManager
  • Setup
    • Form
    • GUI
    • Helper
      • Environment
      • Filesystem
      • MySQL
      • PHP
    • UpgradeJob

Classes

  • cAjaxRequest
  • cAutoload
  • cBackend
  • cEffectiveSetting
  • cGuiScrollListAlltranslations
  • cHTMLValidator
  • cMailer
  • cModuleFileTranslation
  • cModuleHandler
  • cModuleSearch
  • cModuleSynchronizer
  • cModuleTemplateHandler
  • CodeMirror
  • cPasswordRequest
  • cPermission
  • cRegistry
  • cSystemPurge
  • cSystemtest
  • cTinyMCEEditor
  • cWYSIWYGEditor
  • FrontendList
  • HtmlParser
  • SimpleXMLExtended
  • TreeItem
  • UploadList
  • UploadSearchResultList

Functions

  • _getCurrentTypes
  • _processCmsTags
  • addArtspec
  • addslashes_deep
  • addSortImages
  • backToMainArea
  • buildArticleSelect
  • buildCategorySelect
  • buildCategorySelectRights
  • buildHeapTable
  • buildStackString
  • buildTree
  • buildUserOrGroupPermsFromRequest
  • callPluginStore
  • cApiCatGetLevelNode
  • cApiImageCheckCachedImageValidity
  • cApiImageCheckImageEditingPosibility
  • cApiImageGetCacheFileName
  • cApiImageGetTargetDimensions
  • cApiImageIsAnimGif
  • cApiImgScale
  • cApiImgScaleGetMD5CacheFile
  • cApiImgScaleHQ
  • cApiImgScaleImageMagick
  • cApiImgScaleLQ
  • cApiIsImageMagickAvailable
  • cApiStrCleanURLCharacters
  • cApiStrNormalizeLineEndings
  • cApiStrRecodeString
  • cApiStrReplaceDiacritics
  • cApiStrTrimAfterWord
  • cApiStrTrimHard
  • cApiStrTrimSentence
  • cDeprecated
  • cDie
  • cError
  • checkLangInClients
  • checkPathInformation
  • cInclude
  • compareUrlStrings
  • conChangeTemplateForCat
  • conCopyArticle
  • conCopyArtLang
  • conCopyContainerConf
  • conCopyContent
  • conCopyMetaTags
  • conCopyTemplateConfiguration
  • conCreateLocationString
  • conDeeperCategoriesArray
  • conDeleteart
  • conEditArt
  • conEditFirstTime
  • conFetchCategoryTree
  • conFlagOnOffline
  • conGenerateCode
  • conGenerateCodeForAllArts
  • conGenerateCodeForAllArtsInCategory
  • conGenerateCodeForAllartsUsingLayout
  • conGenerateCodeForAllartsUsingMod
  • conGenerateCodeForAllArtsUsingTemplate
  • conGenerateCodeForArtInAllCategories
  • conGenerateCodeForClient
  • conGenerateKeywords
  • conGetAvailableMetaTagTypes
  • conGetCategoryArticleId
  • conGetCategoryAssignments
  • conGetContainerConfiguration
  • conGetContentFromArticle
  • conGetHtmlTranslationTable
  • conGetMetaValue
  • conGetTemplateConfigurationIdForArticle
  • conGetTemplateConfigurationIdForCategory
  • conGetTopmostCat
  • conGetUsedModules
  • conHtmlentities
  • conHtmlEntityDecode
  • conHtmlSpecialChars
  • conIsLocked
  • conLock
  • conLockBulkEditing
  • conMakeArticleIndex
  • conMakeCatOnline
  • conMakeInlineScript
  • conMakeOnline
  • conMakeOnlineBulkEditing
  • conMakePublic
  • conMakeStart
  • conMoveArticles
  • conPhp54Check
  • conRemoveOldCategoryArticle
  • conSaveContentEntry
  • conSetCodeFlag
  • conSetCodeFlagBulkEditing
  • conSetMetaValue
  • conSyncArticle
  • copyRightsForElement
  • createBulkEditingFunction
  • createRandomName
  • createRightsForElement
  • cWarning
  • dbGetColumns
  • dbGetIndexes
  • dbGetPrimaryKeyName
  • dbTableExists
  • dbUpgradeTable
  • defineIfNotDefined
  • deleteArtspec
  • deleteRightsForElement
  • deleteSystemProperty
  • displayDatetime
  • emptyLogFile
  • endAndLogTiming
  • endsWith
  • extractNumber
  • generateDisplayFilePath
  • generateJs
  • getAllClientsAndLanguages
  • getArtLang
  • getArtspec
  • getAvailableContentTypes
  • getCanonicalDay
  • getCanonicalMonth
  • getDirectorySize
  • getEffectiveSetting
  • getEffectiveSettingsByType
  • getEncodingByLanguage
  • getFileContents
  • getFileInformation
  • getFileType
  • getGroupOrUserName
  • getIDForArea
  • getJsHelpContext
  • getLanguageNamesByClient
  • getLanguagesByClient
  • getmicrotime
  • getNamedFrame
  • getParam
  • getParentAreaId
  • getSearchResults
  • getStrExpandCollapseButton
  • getSystemProperties
  • getSystemPropertiesByType
  • getSystemProperty
  • getTemplateSelect
  • getUplExpandCollapseButton
  • htmldecode
  • htmlentities_iso88592
  • humanReadableSize
  • includePlugins
  • insertEmptyStrRow
  • ipMatch
  • isAlphanumeric
  • isArchive
  • isArtInMultipleUse
  • isFunctionDisabled
  • isGroup
  • isIPv4
  • isRunningFromWeb
  • isStartArticle
  • isUtf8
  • isValidMail
  • langActivateDeactivateLanguage
  • langDeleteLanguage
  • langEditLanguage
  • langGetTextDirection
  • langNewLanguage
  • langRenameLanguage
  • layDeleteLayout
  • layEditLayout
  • machineReadableSize
  • mailLogBulkEditingFunctions
  • mailLogDecodeAddresses
  • markSubMenuItem
  • mask
  • modDeleteModule
  • modEditModule
  • modTestModule
  • phpInfoToHtml
  • plugin_include
  • prCreateURLNameLocationString
  • prDeleteCacheFileContent
  • prGetCacheFileContent
  • prResolvePathViaCategoryNames
  • prResolvePathViaURLNames
  • prWriteCacheFileContent
  • putFileContents
  • recursiveCopy
  • removeFileInformation
  • renderBackendBreadcrumb
  • renderLabel
  • renderSelectProperty
  • renderTextProperty
  • saveGroupRights
  • saveRights
  • scanDirectory
  • scanPlugins
  • sendEncodingHeader
  • set_magic_quotes_gpc
  • setArtspecDefault
  • setArtspecOnline
  • setHelpContext
  • setSystemProperty
  • showTree
  • startTiming
  • statCreateLocationString
  • statDisplayTopChooser
  • statDisplayYearlyTopChooser
  • statGetAvailableMonths
  • statGetAvailableYears
  • statResetStatistic
  • statsArchive
  • statsDisplayInfo
  • statsOverviewAll
  • statsOverviewTop
  • statsOverviewTopYear
  • statsOverviewYear
  • strAssignTemplate
  • strBuildSqlValues
  • strCheckTreeForErrors
  • strCopyCategory
  • strCopyTree
  • strDeeperCategoriesArray
  • strDeleteCategory
  • strHasArticles
  • strHasStartArticle
  • stripslashes_deep
  • strMakePublic
  • strMakeVisible
  • strMoveCatTargetallowed
  • strMoveDownCategory
  • strMoveSubtree
  • strMoveUpCategory
  • strNewCategory
  • strNewTree
  • strNextBackwards
  • strNextDeeper
  • strNextDeeperAll
  • strNextPost
  • strOrderedPostTreeList
  • strRemakeTreeTable
  • strRenameCategory
  • strRenameCategoryAlias
  • strSortPrePost
  • strSyncCategory
  • systemHavePerm
  • tplAutoFillModules
  • tplBrowseLayoutForContainers
  • tplcfgDuplicate
  • tplDeleteTemplate
  • tplDuplicateTemplate
  • tplEditTemplate
  • tplGetContainerDefault
  • tplGetContainerMode
  • tplGetContainerName
  • tplGetContainerNumbersInLayout
  • tplGetContainerTypes
  • tplGetInUsedData
  • tplIsTemplateInUse
  • tplPreparseLayout
  • tplProcessSendContainerConfiguration
  • updateClientCache
  • updateFileInformation
  • uplCreateFriendlyName
  • uplDirectoryListRecursive
  • uplGetDirectoriesToExclude
  • uplGetFileExtension
  • uplGetFileIcon
  • uplGetFileTypeDescription
  • uplGetThumbnail
  • uplHasFiles
  • uplHasSubdirs
  • uplmkdir
  • uplRecursiveDBDirectoryList
  • uplRecursiveDirectoryList
  • uplRenameDirectory
  • uplSearch
  • uplSyncDirectory
  • uplSyncDirectoryDBFS
  • Overview
  • Package
  • Function
  • Tree
  • Deprecated
  • Todo
  1: <?php
  2: /**
  3:  * This file compresses the TinyMCE JavaScript using GZip and
  4:  * enables the browser to do two requests instead of one for each .js file.
  5:  * Notice: This script defaults the button_tile_map option to true for extra performance.
  6:  *
  7:  * @package    Core
  8:  * @subpackage Backend
  9:  * @version    SVN Revision $Rev:$
 10:  *
 11:  * @author     Martin Horwath, horwath@dayside.net
 12:  * @copyright  four for business AG <www.4fb.de>
 13:  * @license    http://www.contenido.org/license/LIZENZ.txt
 14:  * @link       http://www.4fb.de
 15:  * @link       http://www.contenido.org
 16:  */
 17: 
 18: defined('CON_FRAMEWORK') || die('Illegal call: Missing framework initialization - request aborted.');
 19: 
 20:     // Set the error reporting to minimal.
 21:     @error_reporting(E_ERROR | E_WARNING | E_PARSE);
 22: 
 23:     // Get input
 24:     $plugins = explode(',', getParam("plugins", ""));
 25:     $languages = explode(',', getParam("languages", ""));
 26:     $themes = explode(',', getParam("themes", ""));
 27:     $diskCache = getParam("diskcache", "") == "true";
 28:     $isJS = getParam("js", "") == "true";
 29:     $compress = getParam("compress", "true") == "true";
 30:     $core = getParam("core", "true") == "true";
 31:     $suffix = getParam("suffix", "_src") == "_src" ? "_src" : "";
 32:     $cachePath = realpath("."); // Cache path, this is where the .gz files will be stored
 33:     $expiresOffset = 3600 * 24 * 10; // Cache for 10 days in browser cache
 34:     $content = "";
 35:     $encodings = array();
 36:     $supportsGzip = false;
 37:     $enc = "";
 38:     $cacheKey = "";
 39: 
 40:     // Custom extra javascripts to pack
 41:     $custom = array(/*
 42:         "some custom .js file",
 43:         "some custom .js file"
 44:     */);
 45: 
 46:     // Headers
 47:     header("Content-type: text/javascript");
 48:     header("Vary: Accept-Encoding");  // Handle proxies
 49:     header("Expires: " . gmdate("D, d M Y H:i:s", time() + $expiresOffset) . " GMT");
 50: 
 51:     // Is called directly then auto init with default settings
 52:     if (!$isJS) {
 53:         echo getFileContents("tiny_mce_gzip.js");
 54:         echo "tinyMCE_GZ.init({});";
 55:         die();
 56:     }
 57: 
 58:     // Setup cache info
 59:     if ($diskCache) {
 60:         if (!$cachePath)
 61:             die("alert('Real path failed.');");
 62: 
 63:         $cacheKey = getParam("plugins", "") . getParam("languages", "") . getParam("themes", "") . $suffix;
 64: 
 65:         foreach ($custom as $file)
 66:             $cacheKey .= $file;
 67: 
 68:         $cacheKey = md5($cacheKey);
 69: 
 70:         if ($compress)
 71:             $cacheFile = $cachePath . "/tiny_mce_" . $cacheKey . ".gz";
 72:         else
 73:             $cacheFile = $cachePath . "/tiny_mce_" . $cacheKey . ".js";
 74:     }
 75: 
 76:     // Check if it supports gzip
 77:     if (isset($_SERVER['HTTP_ACCEPT_ENCODING']))
 78:         $encodings = explode(',', strtolower(preg_replace("/\s+/", "", $_SERVER['HTTP_ACCEPT_ENCODING'])));
 79: 
 80:     if ((in_array('gzip', $encodings) || in_array('x-gzip', $encodings) || isset($_SERVER['---------------'])) && function_exists('ob_gzhandler') && !ini_get('zlib.output_compression')) {
 81:         $enc = in_array('x-gzip', $encodings) ? "x-gzip" : "gzip";
 82:         $supportsGzip = true;
 83:     }
 84: 
 85:     // Use cached file disk cache
 86:     if ($diskCache && $supportsGzip && file_exists($cacheFile)) {
 87:         if ($compress)
 88:             header("Content-Encoding: " . $enc);
 89: 
 90:         echo getFileContents($cacheFile);
 91:         die();
 92:     }
 93: 
 94:     // Add core
 95:     if ($core == "true") {
 96:         $content .= getFileContents("tiny_mce" . $suffix . ".js");
 97: 
 98:         // Patch loading functions
 99:         $content .= "tinyMCE_GZ.start();";
100:     }
101: 
102:     // Add core languages
103:     foreach ($languages as $lang)
104:         $content .= getFileContents("langs/" . $lang . ".js");
105: 
106:     // Add themes
107:     foreach ($themes as $theme) {
108:         $content .= getFileContents( "themes/" . $theme . "/editor_template" . $suffix . ".js");
109: 
110:         foreach ($languages as $lang)
111:             $content .= getFileContents("themes/" . $theme . "/langs/" . $lang . ".js");
112:     }
113: 
114:     // Add plugins
115:     foreach ($plugins as $plugin) {
116:         $content .= getFileContents("plugins/" . $plugin . "/editor_plugin" . $suffix . ".js");
117: 
118:         foreach ($languages as $lang)
119:             $content .= getFileContents("plugins/" . $plugin . "/langs/" . $lang . ".js");
120:     }
121: 
122:     // Add custom files
123:     foreach ($custom as $file)
124:         $content .= getFileContents($file);
125: 
126:     // Restore loading functions
127:     if ($core == "true")
128:         $content .= "tinyMCE_GZ.end();";
129: 
130:     // Generate GZIP'd content
131:     if ($supportsGzip) {
132:         if ($compress) {
133:             header("Content-Encoding: " . $enc);
134:             $cacheData = gzencode($content, 9, FORCE_GZIP);
135:         } else
136:             $cacheData = $content;
137: 
138:         // Write gz file
139:         if ($diskCache && $cacheKey != "")
140:             putFileContents($cacheFile, $cacheData);
141: 
142:         // Stream to client
143:         echo $cacheData;
144:     } else {
145:         // Stream uncompressed content
146:         echo $content;
147:     }
148: 
149:     /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
150: 
151:     function getParam($name, $def = false) {
152:         if (!isset($_GET[$name]))
153:             return $def;
154: 
155:         return preg_replace("/[^0-9a-z\-_,]+/i", "", $_GET[$name]); // Remove anything but 0-9,a-z,-_
156:     }
157: 
158:     function getFileContents($path) {
159:         $path = realpath($path);
160: 
161:         if (!$path || !@is_file($path))
162:             return "";
163: 
164:         if (function_exists("file_get_contents"))
165:             return @file_get_contents($path);
166: 
167:         $content = "";
168:         $fp = @fopen($path, "r");
169:         if (!$fp)
170:             return "";
171: 
172:         while (!feof($fp))
173:             $content .= fgets($fp);
174: 
175:         fclose($fp);
176: 
177:         return $content;
178:     }
179: 
180:     function putFileContents($path, $content) {
181:         if (function_exists("file_put_contents"))
182:             return @file_put_contents($path, $content);
183: 
184:         $fp = @fopen($path, "wb");
185:         if ($fp) {
186:             fwrite($fp, $content);
187:             fclose($fp);
188:         }
189:     }
190: ?>
CMS CONTENIDO 4.9.5 API documentation generated by ApiGen 2.8.0