📄 class.em_index.php
字号:
<?php/**************************************************************** Copyright notice** (c) 1999-2005 Kasper Skaarhoj (kasperYYYY@typo3.com)* (c) 2005-2006 Karsten Dambekalns <karsten@typo3.org>* All rights reserved** This script is part of the TYPO3 project. The TYPO3 project is* free software; you can redistribute it and/or modify* it under the terms of the GNU General Public License as published by* the Free Software Foundation; either version 2 of the License, or* (at your option) any later version.** The GNU General Public License can be found at* http://www.gnu.org/copyleft/gpl.html.* A copy is found in the textfile GPL.txt and important notices to the license* from the author is found in LICENSE.txt distributed with these scripts.*** This script is distributed in the hope that it will be useful,* but WITHOUT ANY WARRANTY; without even the implied warranty of* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the* GNU General Public License for more details.** This copyright notice MUST APPEAR in all copies of the script!***************************************************************//** * Module: Extension manager * * $Id: class.em_index.php 2636 2007-10-29 17:57:42Z jsegars $ * * @author Kasper Skaarhoj <kasperYYYY@typo3.com> * @author Karsten Dambekalns <karsten@typo3.org> *//** * [CLASS/FUNCTION INDEX of SCRIPT] * * * * 194: class SC_mod_tools_em_index extends t3lib_SCbase * * SECTION: Standard module initialization * 337: function init() * 417: function handleExternalFunctionValue($MM_key='function', $MS_value=NULL) * 431: function menuConfig() * 508: function main() * 584: function printContent() * * SECTION: Function Menu Applications * 609: function extensionList_loaded() * 664: function extensionList_installed() * 736: function extensionList_import() * 903: function alterSettings() * * SECTION: Command Applications (triggered by GET var) * 1005: function importExtInfo($extKey, $version='') * 1062: function fetchMetaData($metaType) * 1125: function getMirrorURL() * 1158: function installExtension($extKey, $version=null, $mode=EM_INSTALL_VERSION_MIN) * 1279: function importExtFromRep($extKey,$version,$loc,$uploadFlag=0,$dontDelete=0,$directInput='') * 1425: function showExtDetails($extKey) * * SECTION: Application Sub-functions (HTML parts) * 1737: function updatesForm($extKey,$extInfo,$notSilent=0,$script='',$addFields='') * 1768: function extDumpTables($extKey,$extInfo) * 1835: function getFileListOfExtension($extKey,$conf) * 1889: function extDelete($extKey,$extInfo) * 1920: function extUpdateEMCONF($extKey,$extInfo) * 1940: function extBackup($extKey,$extInfo) * 1987: function extBackup_dumpDataTablesLine($tablesArray,$extKey) * 2015: function extInformationArray($extKey,$extInfo,$remote=0) * 2097: function extInformationArray_dbReq($techInfo,$tableHeader=0) * 2110: function extInformationArray_dbInst($dbInst,$current) * 2129: function getRepositoryUploadForm($extKey,$extInfo) * * SECTION: Extension list rendering * 2190: function extensionListRowHeader($trAttrib,$cells,$import=0) * 2251: function extensionListRow($extKey,$extInfo,$cells,$bgColorClass='',$inst_list=array(),$import=0,$altLinkUrl='') * * SECTION: Output helper functions * 2367: function wrapEmail($str,$email) * 2380: function helpCol($key) * 2396: function labelInfo($str) * 2408: function extensionTitleIconHeader($extKey,$extInfo,$align='top') * 2423: function removeButton() * 2432: function installButton() * 2441: function noImportMsg() * 2454: function depToString($dep,$type='depends') * 2473: function stringToDep($dep) * * SECTION: Read information about all available extensions * 2503: function getInstalledExtensions() * 2530: function getInstExtList($path,&$list,&$cat,$type) * 2561: function fixEMCONF($emConf) * 2600: function splitVersionRange($ver) * 2616: function prepareImportExtList() * 2660: function setCat(&$cat,$listArrayPart,$extKey) * * SECTION: Extension analyzing (detailed information) * 2710: function makeDetailedExtensionAnalysis($extKey,$extInfo,$validity=0) * 2892: function getClassIndexLocallangFiles($absPath,$table_class_prefix,$extKey) * 2962: function modConfFileAnalysis($confFilePath) * 2990: function serverExtensionMD5Array($extKey,$conf) * 3015: function findMD5ArrayDiff($current,$past) * * SECTION: File system operations * 3047: function createDirsInPath($dirs,$extDirPath) * 3065: function removeExtDirectory($removePath,$removeContentOnly=0) * 3128: function clearAndMakeExtensionDir($importedData,$type,$dontDelete=0) * 3182: function removeCacheFiles() * 3192: function extractDirsFromFileList($files) * 3218: function getExtPath($extKey,$type) * * SECTION: Writing to "conf.php" and "localconf.php" files * 3252: function writeTYPO3_MOD_PATH($confFilePath,$type,$mP) * 3289: function writeNewExtensionList($newExtList) * 3312: function writeTsStyleConfig($extKey,$arr) * 3334: function updateLocalEM_CONF($extKey,$extInfo) * * SECTION: Compiling upload information, emconf-file etc. * 3376: function construct_ext_emconf_file($extKey,$EM_CONF) * 3407: function arrayToCode($array, $level=0) * 3433: function makeUploadArray($extKey,$conf) * 3502: function getSerializedLocalLang($file,$content) * * SECTION: Managing dependencies, conflicts, priorities, load order of extension keys * 3538: function addExtToList($extKey,$instExtInfo) * 3569: function checkDependencies($extKey, $conf, $instExtInfo) * 3709: function removeExtFromList($extKey,$instExtInfo) * 3746: function removeRequiredExtFromListArr($listArr) * 3761: function managesPriorities($listArr,$instExtInfo) * * SECTION: System Update functions (based on extension requirements) * 3813: function checkClearCache($extInfo) * 3840: function checkUploadFolder($extKey,$extInfo) * 3925: function checkDBupdates($extKey,$extInfo,$infoOnly=0) * 4022: function forceDBupdates($extKey, $extInfo) * 4080: function tsStyleConfigForm($extKey,$extInfo,$output=0,$script='',$addFields='') * * SECTION: Dumping database (MySQL compliant) * 4175: function dumpTableAndFieldStructure($arr) * 4200: function dumpStaticTables($tableList) * 4229: function dumpHeader() * 4246: function dumpTableHeader($table,$fieldKeyInfo,$dropTableIfExists=0) * 4288: function dumpTableContent($table,$fieldStructure) * 4323: function getTableAndFieldStructure($parts) * * SECTION: TER Communication functions * 4373: function uploadExtensionToTER($em) * * SECTION: Various helper functions * 4411: function listOrderTitle($listOrder,$key) * 4436: function makeVersion($v,$mode) * 4448: function renderVersion($v,$raise='') * 4485: function ulFolder($extKey) * 4494: function importAtAll() * 4505: function importAsType($type,$lockType='') * 4527: function deleteAsType($type) * 4548: function versionDifference($v1,$v2,$div=1) * 4560: function first_in_array($str,$array,$caseInsensitive=FALSE) * 4578: function includeEMCONF($path,$_EXTKEY) * 4593: function searchExtension($extKey,$row) * * TOTAL FUNCTIONS: 90 * (This index is automatically created/updated by the extension "extdeveval") * */ // Include classes needed:require_once(PATH_t3lib.'class.t3lib_tcemain.php');require_once(PATH_t3lib.'class.t3lib_install.php');require_once(PATH_t3lib.'class.t3lib_tsstyleconfig.php');require_once(PATH_t3lib.'class.t3lib_scbase.php');require_once('class.em_xmlhandler.php');require_once('class.em_terconnection.php');require_once('class.em_unzip.php'); // from tx_ter by Robert Lemkedefine('TX_TER_RESULT_EXTENSIONSUCCESSFULLYUPLOADED', '10504');define('EM_INSTALL_VERSION_MIN', 1);define('EM_INSTALL_VERSION_MAX', 2);define('EM_INSTALL_VERSION_STRICT', 3);/** * Module: Extension manager * * @author Kasper Skaarhoj <kasperYYYY@typo3.com> * @author Karsten Dambekalns <karsten@typo3.org> * @package TYPO3 * @subpackage core */class SC_mod_tools_em_index extends t3lib_SCbase { // Internal, static: var $versionDiffFactor = 1; // This means that version difference testing for import is detected for sub-versions only, not dev-versions. Default: 1000 var $systemInstall = 0; // If "1" then installs in the sysext directory is allowed. Default: 0 var $requiredExt = ''; // List of required extension (from TYPO3_CONF_VARS) var $maxUploadSize = 31457280; // Max size in bytes of extension upload to repository var $kbMax = 500; // Max size in kilobytes for files to be edited. var $doPrintContent = true; // If set (default), the function printContent() will echo the content which was collected in $this->content. You can set this to FALSE in order to echo content from elsewhere, fx. when using outbut buffering var $listingLimit = 500; // List that many extension maximally at one time (fixing memory problems) var $listingLimitAuthor = 250; // List that many extension maximally at one time (fixing memory problems) /** * Internal variable loaded with extension categories (for display/listing). Should reflect $categories above * Dynamic var. */ var $defaultCategories = Array( 'cat' => Array ( 'be' => array(), 'module' => array(), 'fe' => array(), 'plugin' => array(), 'misc' => array(), 'services' => array(), 'templates' => array(), 'example' => array(), 'doc' => array() ) ); /** * Extension Categories (static var) * Content must be redundant with the same internal variable as in class.tx_extrep.php! */ var $categories = Array( 'be' => 'Backend', 'module' => 'Backend Modules', 'fe' => 'Frontend', 'plugin' => 'Frontend Plugins', 'misc' => 'Miscellaneous', 'services' => 'Services', 'templates' => 'Templates', 'example' => 'Examples', 'doc' => 'Documentation' ); /** * Extension States * Content must be redundant with the same internal variable as in class.tx_extrep.php! */ var $states = Array ( 'alpha' => 'Alpha', 'beta' => 'Beta', 'stable' => 'Stable', 'experimental' => 'Experimental', 'test' => 'Test', 'obsolete' => 'Obsolete', ); /** * Colors for extension states */ var $stateColors = Array ( 'alpha' => '#d12438', 'beta' => '#97b17e', 'stable' => '#3bb65c', 'experimental' => '#007eba', 'test' => '#979797', 'obsolete' => '#000000', ); /** * "TYPE" information; labels, paths, description etc. */ var $typeLabels = Array ( 'S' => 'System', 'G' => 'Global', 'L' => 'Local', ); var $typeDescr = Array ( 'S' => 'System extension (typo3/sysext/) - Always distributed with source code (Static).', 'G' => 'Global extensions (typo3/ext/) - Available for shared source on server (Dynamic).', 'L' => 'Local extensions (typo3conf/ext/) - Local for this TYPO3 installation only (Dynamic).', ); var $typePaths = Array(); // Also static, set in init() var $typeBackPaths = Array(); // Also static, set in init() var $typeRelPaths = Array ( 'S' => 'sysext/', 'G' => 'ext/', 'L' => '../typo3conf/ext/', ); var $detailCols = Array ( 0 => 2, 1 => 5, 2 => 6, 3 => 6, 4 => 4, 5 => 1 ); var $fe_user = array( 'username' => '', 'password' => '', ); var $privacyNotice = 'When you interact with the online repository, server information may be sent and stored in the repository for statistics.'; var $securityHint = '<strong>Found a security problem? Please get in touch with us!</strong><br />If you think you have found a security issue in TYPO3 or an extension, please contact the <a href="http://typo3.org/teams/security/" target="_blank">TYPO3 security team</a>! Thank you!'; var $editTextExtensions = 'html,htm,txt,css,tmpl,inc,php,sql,conf,cnf,pl,pm,sh,xml,ChangeLog'; var $nameSpaceExceptions = 'beuser_tracking,design_components,impexp,static_file_edit,cms,freesite,quickhelp,classic_welcome,indexed_search,sys_action,sys_workflows,sys_todos,sys_messages,direct_mail,sys_stat,tt_address,tt_board,tt_calender,tt_guest,tt_links,tt_news,tt_poll,tt_rating,tt_products,setup,taskcenter,tsconfig_help,context_help,sys_note,tstemplate,lowlevel,install,belog,beuser,phpmyadmin,aboutmodules,imagelist,setup,taskcenter,sys_notepad,viewpage,adodb';
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -