[TASK] Remove old em
authorChristian Kuhn <lolli@schwarzbu.ch>
Fri, 17 Aug 2012 16:53:47 +0000 (18:53 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Fri, 17 Aug 2012 17:07:08 +0000 (19:07 +0200)
Change-Id: Ieb3823ad72fe41875484dfc25c8f1eea1feef917
Resolves: #39906
Related: #39726
Reviewed-on: http://review.typo3.org/13869
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
107 files changed:
typo3/classes/Bootstrap/BaseSetup.php
typo3/sysext/em/ChangeLog [deleted file]
typo3/sysext/em/classes/class.tx_em_api.php [deleted file]
typo3/sysext/em/classes/class.tx_em_extensionmanager.php [deleted file]
typo3/sysext/em/classes/conf.php [deleted file]
typo3/sysext/em/classes/connection/class.tx_em_connection_extdirectserver.php [deleted file]
typo3/sysext/em/classes/connection/class.tx_em_connection_extdirectsoap.php [deleted file]
typo3/sysext/em/classes/connection/class.tx_em_connection_soap.php [deleted file]
typo3/sysext/em/classes/connection/class.tx_em_connection_ter.php [deleted file]
typo3/sysext/em/classes/database/class.tx_em_database.php [deleted file]
typo3/sysext/em/classes/exception/class.tx_em_connectionexception.php [deleted file]
typo3/sysext/em/classes/exception/class.tx_em_extensionimportexception.php [deleted file]
typo3/sysext/em/classes/exception/class.tx_em_extensionxmlexception.php [deleted file]
typo3/sysext/em/classes/exception/class.tx_em_mirrorxmlexception.php [deleted file]
typo3/sysext/em/classes/exception/class.tx_em_xmlexception.php [deleted file]
typo3/sysext/em/classes/extensions/class.tx_em_extensions_details.php [deleted file]
typo3/sysext/em/classes/extensions/class.tx_em_extensions_list.php [deleted file]
typo3/sysext/em/classes/import/class.tx_em_import_extensionlistimporter.php [deleted file]
typo3/sysext/em/classes/import/class.tx_em_import_mirrorlistimporter.php [deleted file]
typo3/sysext/em/classes/index.php [deleted file]
typo3/sysext/em/classes/install/class.tx_em_install.php [deleted file]
typo3/sysext/em/classes/parser/class.tx_em_parser_extensionxmlabstractparser.php [deleted file]
typo3/sysext/em/classes/parser/class.tx_em_parser_extensionxmlpullparser.php [deleted file]
typo3/sysext/em/classes/parser/class.tx_em_parser_extensionxmlpushparser.php [deleted file]
typo3/sysext/em/classes/parser/class.tx_em_parser_mirrorxmlabstractparser.php [deleted file]
typo3/sysext/em/classes/parser/class.tx_em_parser_mirrorxmlpullparser.php [deleted file]
typo3/sysext/em/classes/parser/class.tx_em_parser_mirrorxmlpushparser.php [deleted file]
typo3/sysext/em/classes/parser/class.tx_em_parser_xmlabstractparser.php [deleted file]
typo3/sysext/em/classes/parser/class.tx_em_parser_xmlparserfactory.php [deleted file]
typo3/sysext/em/classes/reports/class.tx_em_reports_extensionstatus.php [deleted file]
typo3/sysext/em/classes/repository/class.tx_em_repository.php [deleted file]
typo3/sysext/em/classes/repository/class.tx_em_repository_mirrors.php [deleted file]
typo3/sysext/em/classes/repository/class.tx_em_repository_utility.php [deleted file]
typo3/sysext/em/classes/settings/class.tx_em_settings.php [deleted file]
typo3/sysext/em/classes/tasks/class.tx_em_tasks_updateextensionlist.php [deleted file]
typo3/sysext/em/classes/tasks/class.tx_em_tasks_updatelanguagepackages.php [deleted file]
typo3/sysext/em/classes/tools/class.tx_em_tools.php [deleted file]
typo3/sysext/em/classes/tools/class.tx_em_tools_unzip.php [deleted file]
typo3/sysext/em/classes/tools/class.tx_em_tools_xmlhandler.php [deleted file]
typo3/sysext/em/classes/translations/class.tx_em_translations.php [deleted file]
typo3/sysext/em/ext_autoload.php [deleted file]
typo3/sysext/em/ext_conf_template.txt [deleted file]
typo3/sysext/em/ext_emconf.php [deleted file]
typo3/sysext/em/ext_icon.gif [deleted file]
typo3/sysext/em/ext_localconf.php [deleted file]
typo3/sysext/em/ext_tables.php [deleted file]
typo3/sysext/em/ext_tables.sql [deleted file]
typo3/sysext/em/ext_tables_static+adt.sql [deleted file]
typo3/sysext/em/interfaces/interface.tx_em_index_checkdatabaseupdateshook.php [deleted file]
typo3/sysext/em/interfaces/interface.tx_em_renderhook.php [deleted file]
typo3/sysext/em/language/locallang.xlf [deleted file]
typo3/sysext/em/res/css/editor.css [deleted file]
typo3/sysext/em/res/css/t3_em.css [deleted file]
typo3/sysext/em/res/icons/arrow_redo.png [deleted file]
typo3/sysext/em/res/icons/arrow_undo.png [deleted file]
typo3/sysext/em/res/icons/cancel.png [deleted file]
typo3/sysext/em/res/icons/download.png [deleted file]
typo3/sysext/em/res/icons/drive.png [deleted file]
typo3/sysext/em/res/icons/email.png [deleted file]
typo3/sysext/em/res/icons/extension-required.png [deleted file]
typo3/sysext/em/res/icons/filebrowser.png [deleted file]
typo3/sysext/em/res/icons/flag.png [deleted file]
typo3/sysext/em/res/icons/image.png [deleted file]
typo3/sysext/em/res/icons/install.gif [deleted file]
typo3/sysext/em/res/icons/jslint.gif [deleted file]
typo3/sysext/em/res/icons/oodoc.gif [deleted file]
typo3/sysext/em/res/icons/repupdate.png [deleted file]
typo3/sysext/em/res/icons/server.png [deleted file]
typo3/sysext/em/res/icons/settings.png [deleted file]
typo3/sysext/em/res/icons/text_indent.png [deleted file]
typo3/sysext/em/res/icons/tools.png [deleted file]
typo3/sysext/em/res/icons/uninstall.gif [deleted file]
typo3/sysext/em/res/js/em_app.js [deleted file]
typo3/sysext/em/res/js/em_components.js [deleted file]
typo3/sysext/em/res/js/em_files.js [deleted file]
typo3/sysext/em/res/js/em_languages.js [deleted file]
typo3/sysext/em/res/js/em_layouts.js [deleted file]
typo3/sysext/em/res/js/em_locallist.js [deleted file]
typo3/sysext/em/res/js/em_repositorylist.js [deleted file]
typo3/sysext/em/res/js/em_settings.js [deleted file]
typo3/sysext/em/res/js/em_ter.js [deleted file]
typo3/sysext/em/res/js/em_tools.js [deleted file]
typo3/sysext/em/res/js/em_usertools.js [deleted file]
typo3/sysext/em/res/js/overrides/ext_overrides.js [deleted file]
typo3/sysext/em/res/js/ux/GridFilters.js [deleted file]
typo3/sysext/em/res/js/ux/RowPanelExpander.js [deleted file]
typo3/sysext/em/res/js/ux/TreeState.js [deleted file]
typo3/sysext/em/res/js/ux/css/GridFilters.css [deleted file]
typo3/sysext/em/res/js/ux/css/RangeMenu.css [deleted file]
typo3/sysext/em/res/js/ux/custom_plugins.js [deleted file]
typo3/sysext/em/res/js/ux/fileuploadfield.js [deleted file]
typo3/sysext/em/res/js/ux/filter/BooleanFilter.js [deleted file]
typo3/sysext/em/res/js/ux/filter/DateFilter.js [deleted file]
typo3/sysext/em/res/js/ux/filter/Filter.js [deleted file]
typo3/sysext/em/res/js/ux/filter/ListFilter.js [deleted file]
typo3/sysext/em/res/js/ux/filter/NumericFilter.js [deleted file]
typo3/sysext/em/res/js/ux/filter/StringFilter.js [deleted file]
typo3/sysext/em/res/js/ux/images/equals.png [deleted file]
typo3/sysext/em/res/js/ux/images/find.png [deleted file]
typo3/sysext/em/res/js/ux/images/greater_than.png [deleted file]
typo3/sysext/em/res/js/ux/images/less_than.png [deleted file]
typo3/sysext/em/res/js/ux/images/sort_filtered_asc.gif [deleted file]
typo3/sysext/em/res/js/ux/images/sort_filtered_desc.gif [deleted file]
typo3/sysext/em/res/js/ux/jslint.js [deleted file]
typo3/sysext/em/res/js/ux/menu/ListMenu.js [deleted file]
typo3/sysext/em/res/js/ux/menu/RangeMenu.js [deleted file]
typo3/sysext/em/res/js/ux/searchfield.js [deleted file]

index 393ba4c..3048e23 100644 (file)
@@ -126,7 +126,7 @@ class Typo3_Bootstrap_BaseSetup {
                define('PHP_EXTENSIONS_DEFAULT', 'php,php3,php4,php5,php6,phpsh,inc,phtml');
 
                        // List of extensions required to run the core
-               define('REQUIRED_EXTENSIONS', 'cms,lang,sv,em,recordlist,extbase,fluid');
+               define('REQUIRED_EXTENSIONS', 'cms,lang,sv,extensionmanager,recordlist,extbase,fluid');
 
                        // Operating system identifier
                        // Either "WIN" or empty string
diff --git a/typo3/sysext/em/ChangeLog b/typo3/sysext/em/ChangeLog
deleted file mode 100644 (file)
index c20d665..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-2011-02-23  Steffen Kamper  <steffen@typo3.org>
-
-       * cleaned em_conf
-       * corrected initial settings with no saved extension configuration
-       * file editor - disable functions until they are proofed completely
-
-2011-02-20  Steffen Kamper  <steffen@typo3.org>
-
-       * move interface to correct place
-
-2011-02-19  Steffen Kamper  <steffen@typo3.org>
-
-       * Fixed file creation / node creation
-       * Fixed bug #13180 Hardcoded Labels for Extension State and in menu "Filters"
-       * Fixed bug #13183 Saving Settings uses hardcoded labels
-       * Fixed bug #13179 Order in "Udate EM_CONF" is not ideal
-       * Fixed bug #13181 Unreplaced variable in headline when editing a repository
-       * Fixed bug #13182 Updating a repository gives wrong flash message
-       * Fixed bug #13178 GUI partly hidden with 1024x768 pixels and less
-       * Fixed bug #13177 Button "Refresh" in Extension > Details > Files misses tooltip
-       * Many fixes for FileEditor
-       * Use interface for renderHook
-       * Fixed bug #13164 EM GUI does not use translations
-
-2011-02-11  Steffen Kamper  <steffen@typo3.org>
-
-       * Fixed file saving, file diff, prepared file creation/moveing
-
-2011-02-10  Steffen Kamper  <steffen@typo3.org>
-
-       * Fixed bug #17538: EM gets instantiated before XCLASS definition (Thanks to Jesper Paardekooper)
-
-2011-02-09  Steffen Kamper  <steffen@typo3.org>
-
-       * Prompt for save with new file load
-       * Small fixes for init configuration in fileeditor
-       * Prevent file actions before a file is loaded
-       * Simplified codemirror configuration
-       * Use mixed parser for php files for correct parsing
-       * Fixed change of parser in file editor
-
-2011-02-08  Steffen Kamper  <steffen@typo3.org>
-
-       * CGL spaces=>tabs, raised ext version to 4.5.1, cleaned em_conf
-       * fix docPath in link generation for documentation
-       * remote list should show installed extensions without search word
-       * log saving of ext files in be-log
-       * Mark filename red when file content changed
-
-2011-02-07  Steffen Kamper  <steffen@typo3.org>
-
-       * Fixed bug #11487 Edit Files - Download not implemented
-       * Adjusted tooltips for filter
-       * Fixed bug #15019: Extension Manager does not free the DB result with sql_free_result
-       * Fixed bug #17363: Legacy extension manager does not allow to change category of configuration anymore
-       * StateProvider for file tree adjusted
-
-2011-02-06  Steffen Kamper  <steffen@typo3.org>
-
-       * Prevent single click in translations while fetching languages
-       * StateProvider for file tree added
-       * Fixed bug #11862 Updating translations fails
-       * Fixed bug #12799 Problem with Planer Task
-       * Fixed bug #12812 State destroys the columns menu in repository list
-
-2011-02-05  Steffen Kamper  <steffen@typo3.org>
-
-       * CSS - fixed links in grid header menus
-       * Fixed bug #12556 Upload comment not uploaded
-       * CSS: remove border from filter trigger icons, cancel item displaced
-       * remote list: do not deliver all data with empty search
-       * CGL cleanups
-
-2011-02-04  Steffen Kamper  <steffen@typo3.org>
-
-       * CSS for filetree folder icons removed (use standard), filter with typo3 icons
-       * Render settings and labels after the hook for easy additions
-       * Implemented Hook to allow extensions to plug in the gui
-
-2011-02-03  Steffen Kamper  <steffen@typo3.org>
-
-       * Fixed bug #17450 path to Documentation for sysextensions is wrong (Thanks to Simon Schaufelberger)
-       * Fixed double form tag in configuration forms (Thanks to Helmut Hummel)
-
diff --git a/typo3/sysext/em/classes/class.tx_em_api.php b/typo3/sysext/em/classes/class.tx_em_api.php
deleted file mode 100644 (file)
index da0e3a5..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-<?php
-/***************************************************************
- *  Copyright notice
- *
- *  (c) 2010 Steffen Kamper <steffen@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!
- ***************************************************************/
-
-/**
- * Extension manager api
- *
- * @author Steffen Kamper <info@sk-typo3.de>
- * @package TYPO3
- * @subpackage em
- */
-class tx_em_API {
-
-       /**
-        * @var array
-        */
-       public $typeLabels = array();
-
-       /**
-        * @var array
-        */
-       public $typeDescr = array();
-
-       /**
-        * @var array
-        */
-       public $typeBackPaths = array();
-
-       /**
-        * Constructor
-        *
-        * @return void
-        */
-       public function __construct() {
-
-               // load langauge file
-               $GLOBALS['LANG']->includeLLFile(t3lib_extMgm::extPath('em') . 'language/locallang.xml');
-
-               /**
-                * "TYPE" information; labels, paths, description etc.
-                */
-               $this->typeLabels = array(
-                       'S' => $GLOBALS['LANG']->getLL('type_system'),
-                       'G' => $GLOBALS['LANG']->getLL('type_global'),
-                       'L' => $GLOBALS['LANG']->getLL('type_local'),
-               );
-               $this->typeDescr = array(
-                       'S' => $GLOBALS['LANG']->getLL('descr_system'),
-                       'G' => $GLOBALS['LANG']->getLL('descr_global'),
-                       'L' => $GLOBALS['LANG']->getLL('descr_local'),
-               );
-       }
-}
-?>
\ No newline at end of file
diff --git a/typo3/sysext/em/classes/class.tx_em_extensionmanager.php b/typo3/sysext/em/classes/class.tx_em_extensionmanager.php
deleted file mode 100644 (file)
index a0d04af..0000000
+++ /dev/null
@@ -1,280 +0,0 @@
-<?php
-/***************************************************************
-*  Copyright notice
-*
-*  (c) 2010 Steffen Kamper (info@sk-typo3.de)
-*  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, developer module
- *
- * @author Steffen Kamper <info@sk-typo3.de>
- * @package TYPO3
- * @subpackage em
- */
-class tx_em_ExtensionManager {
-
-       /**
-        * Parent module object
-        *
-        * @var SC_mod_tools_em_index
-        */
-       protected $parentObject;
-
-       /**
-        * Page Renderer
-        *
-        * @var t3lib_PageRenderer
-        */
-       protected $pageRenderer;
-
-       /**
-        * Path of res for JS/CSS/resources
-        *
-        * @var string
-        */
-       protected $resPath;
-
-       /**
-        * Debug flag for develop debug=1 will use one uncompressed concatenated file, debug=2 will use single files
-        *
-        * @var int
-        */
-       protected $debug;
-
-       /**
-        * Gzip support - use it if server supports gzipped js files
-        *
-        * @var boolean
-        */
-       protected $gzSupport = FALSE;
-
-       /**
-        * Constructor
-        *
-        * @param SC_mod_tools_em_index $parentObject
-        */
-       public function __construct(SC_mod_tools_em_index $parentObject) {
-               $this->parentObject = $parentObject;
-               $this->parentObject->doc->setExtDirectStateProvider();
-               $this->pageRenderer = $this->parentObject->doc->getPageRenderer();
-               $this->resPath = $this->parentObject->doc->backPath . t3lib_extMgm::extRelPath('em') . 'res/';
-
-               $userSettings = $this->parentObject->settings->getUserSettings();
-
-               $this->debug = isset($userSettings['debug']) ? intval($userSettings['debug']) : 0;
-               $this->gzSupport = isset($userSettings['jsGzCompressed']) ? TRUE : FALSE;
-
-               $this->checkRepository();
-       }
-
-       /**
-        * Render module content
-        *
-        * @return string $content
-        */
-       public function render() {
-
-               /* Add CSS */
-               $this->pageRenderer->addCssFile($this->resPath . 'js/ux/css/GridFilters.css');
-               $this->pageRenderer->addCssFile($this->resPath . 'js/ux/css/RangeMenu.css');
-               $this->pageRenderer->addCssFile($this->resPath . 'css/t3_em.css');
-
-               $iconsGfxPath = $GLOBALS['TBE_STYLES']['skinImgAutoCfg']['relDir'] . 'gfx/';
-               $this->pageRenderer->addCssInlineBlock('em-t3skin-icons', '
-                       .x-tree-node-leaf img.tree-edit { background-image:url(' . $iconsGfxPath . 'edit_file.gif);}
-                       .x-btn-edit { background-image:url(' . $iconsGfxPath . 'edit2.gif) !important;}
-                       .x-btn-new { background-image:url(' . $iconsGfxPath . 'new_el.gif) !important;}
-                       .x-btn-delete { background-image:url(' . $iconsGfxPath . 'garbage.gif) !important;}
-                       .x-tree-node-leaf img.tree-unknown { background-image:url(' . $iconsGfxPath . 'default.gif); }
-                       .x-btn-save { background-image:url(' . $iconsGfxPath . 'savedok.gif) !important;}
-                       .x-btn-upload { background-image:url(' . $iconsGfxPath . 'upload.gif) !important;}
-                       .x-btn-download { background-image:url(' . $iconsGfxPath . 'down.gif) !important;}
-                       .x-btn-undo { background-image:url(' . $this->resPath . 'icons/arrow_undo.png) !important;}
-                       .x-btn-redo { background-image:url(' . $this->resPath . 'icons/arrow_redo.png) !important;}
-                       .x-btn-jslint { background-image:url(' . $this->resPath . 'icons/jslint.gif) !important;}
-                       .x-btn-indent { background-image:url(' . $this->resPath . 'icons/text_indent.png) !important;}
-               ');
-
-               /* load ExtJS */
-               $this->pageRenderer->loadExtJS();
-               $this->pageRenderer->enableExtJSQuickTips();
-
-               $this->pageRenderer->addExtDirectCode();
-
-                       // Localization
-               $labels = array();
-               $this->pageRenderer->addInlineLanguageLabelFile(t3lib_extMgm::extPath('em', 'language/locallang.xml'));
-               $labels['yes'] = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_common.xml:yes');
-               $labels['no'] = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_common.xml:no');
-               $this->pageRenderer->addInlineLanguageLabelArray($labels);
-
-               $globalSettings = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['em']);
-               if (!is_array($globalSettings)) {
-                       $globalSettings = array(
-                               'displayMyExtensions' => 0,
-                               'selectedLanguages' => '',
-                               'inlineToWindow' => 1,
-                       );
-               } elseif (!isset($globalSettings['inlineToWindow'])) {
-                       $globalSettings['inlineToWindow'] = 1;
-               }
-               $settings = $this->parentObject->MOD_SETTINGS;
-               $mirrors = unserialize($settings['extMirrors']);
-               $settings['extMirrors'] = array(array('Random (recommended)', '', '', '', '', '', ''));
-               if (is_array($mirrors)) {
-                       foreach ($mirrors as $mirror) {
-                               $settings['extMirrors'][] = array(
-                                       $mirror['title'], $mirror['country'], $mirror['host'], $mirror['path'],
-                                       $mirror['sponsor']['name'], $mirror['sponsor']['link'], $mirror['sponsor']['logo']
-                               );
-                       }
-               }
-
-               $allowRepositoryUpdate = !intval($GLOBALS['BE_USER']->getTSConfigVal('mod.tools_em.hideRepositoryUpdate'));
-
-               /* file operations */
-               $fileAllowMove = intval($GLOBALS['BE_USER']->getTSConfigVal('mod.tools_em.fileAllowMove'));
-               $fileAllowDelete = intval($GLOBALS['BE_USER']->getTSConfigVal('mod.tools_em.fileAllowDelete'));
-               $fileAllowRename = intval($GLOBALS['BE_USER']->getTSConfigVal('mod.tools_em.fileAllowRename'));
-               $fileAllowUpload = intval($GLOBALS['BE_USER']->getTSConfigVal('mod.tools_em.fileAllowUpload'));
-               $fileAllowCreate = intval($GLOBALS['BE_USER']->getTSConfigVal('mod.tools_em.fileAllowCreate'));
-               $fileAllowDownload = intval($GLOBALS['BE_USER']->getTSConfigVal('mod.tools_em.fileAllowDownload'));
-
-                       // add the settings
-               $additionalSettings = array(
-                       'siteUrl' => t3lib_div::getIndpEnv('TYPO3_SITE_URL'),
-                       'backPath' => $this->parentObject->doc->backPath,
-                       'hasCredentials' => (isset($settings['fe_u']) && isset($settings['fe_p']) && $settings['fe_u'] !== '' && $settings['fe_p'] !== ''),
-                       'scriptLink' => $this->parentObject->script,
-                       'editorCss' => $this->resPath . 'css/editor.css',
-                       'codemirrorCssPath' => $this->parentObject->doc->backPath . 'contrib/codemirror/css/',
-                       'codemirrorJsPath' => $this->parentObject->doc->backPath . 'contrib/codemirror/js/',
-                       'codemirrorContribPath' => $this->parentObject->doc->backPath . 'contrib/codemirror/contrib/',
-                       'selectedLanguages' => t3lib_div::trimExplode(',', $globalSettings['selectedLanguages'], TRUE),
-                       'inlineToWindow' => $globalSettings['inlineToWindow'],
-                       'allowRepositoryUpdate' => $allowRepositoryUpdate,
-                       'displayMyExtensions' => $globalSettings['displayMyExtensions'],
-                       'debug' => $GLOBALS['TYPO3_CONF_VARS']['BE']['debug'] > 0,
-                       //TODO: some are disabled until feater-proofed
-                       'fileAllowSave' => $GLOBALS['TYPO3_CONF_VARS']['EXT']['noEdit'] == 0,
-                       'fileAllowMove' => 0,
-                       'fileAllowDelete' => 0,
-                       'fileAllowRename' => 0,
-                       'fileAllowUpload' => 0,
-                       'fileAllowCreate' => 0,
-                       'fileAllowDownload' => $fileAllowDownload,
-
-               );
-               $settings = array_merge($settings, $additionalSettings);
-
-               // Add JS
-               $this->pageRenderer->addJsFile($this->parentObject->doc->backPath . '../t3lib/js/extjs/ux/flashmessages.js');
-               $this->pageRenderer->addJsFile($this->parentObject->doc->backPath . 'js/extjs/iframepanel.js');
-               $this->pageRenderer->addJsFile($this->parentObject->doc->backPath . 'contrib/codemirror/js/codemirror.js');
-
-               //Plugins
-               $this->pageRenderer->addJsFile($this->resPath . 'js/overrides/ext_overrides.js');
-               $this->pageRenderer->addJsFile($this->resPath . 'js/ux/custom_plugins.js');
-               $this->pageRenderer->addJsFile($this->parentObject->doc->backPath . '../t3lib/js/extjs/ux/Ext.ux.FitToParent.js');
-               $this->pageRenderer->addJsFile($this->parentObject->doc->backPath . '../t3lib/js/extjs/notifications.js');
-               $this->pageRenderer->addJsFile($this->resPath . 'js/ux/TreeState.js');
-               $this->pageRenderer->addJsFile($this->resPath . 'js/ux/RowPanelExpander.js');
-               $this->pageRenderer->addJsFile($this->resPath . 'js/ux/searchfield.js');
-               $this->pageRenderer->addJsFile($this->resPath . 'js/ux/fileuploadfield.js');
-               $this->pageRenderer->addJsFile($this->resPath . 'js/ux/menu/RangeMenu.js');
-               $this->pageRenderer->addJsFile($this->resPath . 'js/ux/menu/ListMenu.js');
-               $this->pageRenderer->addJsFile($this->resPath . 'js/ux/GridFilters.js');
-               $this->pageRenderer->addJsFile($this->resPath . 'js/ux/filter/Filter.js');
-               $this->pageRenderer->addJsFile($this->resPath . 'js/ux/filter/BooleanFilter.js');
-               $this->pageRenderer->addJsFile($this->resPath . 'js/ux/filter/DateFilter.js');
-               $this->pageRenderer->addJsFile($this->resPath . 'js/ux/filter/ListFilter.js');
-               $this->pageRenderer->addJsFile($this->resPath . 'js/ux/filter/NumericFilter.js');
-               $this->pageRenderer->addJsFile($this->resPath . 'js/ux/filter/StringFilter.js');
-               $this->pageRenderer->addJsFile($this->resPath . 'js/ux/jslint.js');
-
-               //Scripts
-               $this->pageRenderer->addJsFile($this->resPath . 'js/em_layouts.js');
-
-               $this->pageRenderer->addJsFile($this->resPath . 'js/em_components.js');
-               $this->pageRenderer->addJsFile($this->resPath . 'js/em_files.js');
-               $this->pageRenderer->addJsFile($this->resPath . 'js/em_ter.js');
-               $this->pageRenderer->addJsFile($this->resPath . 'js/em_tools.js');
-
-               $this->pageRenderer->addJsFile($this->resPath . 'js/em_locallist.js');
-               $this->pageRenderer->addJsFile($this->resPath . 'js/em_repositorylist.js');
-               $this->pageRenderer->addJsFile($this->resPath . 'js/em_usertools.js');
-
-               $this->pageRenderer->addJsFile($this->resPath . 'js/em_languages.js');
-               $this->pageRenderer->addJsFile($this->resPath . 'js/em_settings.js');
-               //Application
-               $this->pageRenderer->addJsFile($this->resPath . 'js/em_app.js');
-
-               // clear flashmessages from php
-               t3lib_FlashMessageQueue::getAllMessagesAndFlush();
-
-               $content =  '
-                       <div id="em-message-area"></div><div id="em-app"></div>
-                       <!-- dummy form to make configuration js happy -->
-                       <form name="tsStyleConfigForm" action="" method="post"></form>
-               ';
-
-                       //hook for the extension manager gui
-               if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['em/classes/class.tx_em_extensionamager.php']['renderHook'])) {
-                       foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['em/classes/class.tx_em_extensionamager.php']['renderHook'] as $classRef) {
-                               $hookObject = t3lib_div::getUserObj($classRef);
-                               if(!($hookObject instanceof tx_em_renderHook)) {
-                                       throw new UnexpectedValueException('$hookObject must implement interface tx_em_renderHook', 1298121373);
-                               }
-                               $hookObject->render(
-                                       $this->pageRenderer, $settings, $content
-                               );
-                       }
-               }
-
-                       // render settings and labels
-               $this->pageRenderer->addInlineSettingArray('EM', $settings);
-               $this->pageRenderer->addInlineLanguageLabelArray($labels);
-
-               return $content;
-       }
-
-       /**
-        * Check integrity of repository entry in sys_ter
-        *
-        * @return void
-        */
-       protected function checkRepository() {
-               /** @var $repository tx_em_Repository  */
-               $repository = t3lib_div::makeInstance('tx_em_Repository');
-               if ($repository->getLastUpdate() == 0) {
-                       $extCount = tx_em_Database::getExtensionCountFromRepository($repository);
-                       if ($extCount > 0) {
-                               $repository->setExtensionCount($extCount);
-                               $repository->setLastUpdate(time());
-                               tx_em_Database::updateRepository($repository);
-                       }
-               }
-       }
-}
-?>
\ No newline at end of file
diff --git a/typo3/sysext/em/classes/conf.php b/typo3/sysext/em/classes/conf.php
deleted file mode 100644 (file)
index e08f052..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-<?php
-$MLANG['default']['tabs_images']['tab'] = 'em.gif';
-$MLANG['default']['ll_ref'] = 'LLL:EXT:em/language/locallang.xml';
-
-$MCONF['script']='_DISPATCH';
-$MCONF['access']='admin';
-$MCONF['name']='tools_em';
-$MCONF['workspaces']='online';
-?>
\ No newline at end of file
diff --git a/typo3/sysext/em/classes/connection/class.tx_em_connection_extdirectserver.php b/typo3/sysext/em/classes/connection/class.tx_em_connection_extdirectserver.php
deleted file mode 100644 (file)
index e872ed8..0000000
+++ /dev/null
@@ -1,1674 +0,0 @@
-<?php
-/***************************************************************
- *  Copyright notice
- *
- *  (c) 2010 Steffen Kamper (info@sk-typo3.de)
- *  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, developer module
- *
- * This class handles all Ajax calls coming from ExtJS
- *
- * @author     Steffen Kamper <info@sk-typo3.de>
- * @package TYPO3
- * @subpackage em
- */
-class tx_em_Connection_ExtDirectServer {
-       /**
-        * @var tx_em_Tools_XmlHandler
-        */
-       var $xmlHandler;
-
-       /**
-        * Class for printing extension lists
-        *
-        * @var tx_em_Extensions_List
-        */
-       public $extensionList;
-
-       /**
-        * Class for extension details
-        *
-        * @var tx_em_Extensions_Details
-        */
-       public $extensionDetails;
-
-       /**
-        * Keeps instance of settings class.
-        *
-        * @var tx_em_Settings
-        */
-       static protected $objSettings;
-
-       /**
-        * @var array
-        */
-       protected $globalSettings;
-
-       /*********************************************************************/
-       /* General                                                           */
-       /*********************************************************************/
-
-       /**
-        * Constructor
-        *
-        * @param boolean $createTemplateInstance: set to FALSE if no instance of template class needs to be created
-        * @return void
-        */
-       public function __construct($createTemplateInstance = TRUE) {
-               if ($createTemplateInstance) {
-                       $this->template = t3lib_div::makeInstance('template');
-               }
-               $this->globalSettings = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['em']);
-       }
-
-
-       /**
-        * Method returns instance of settings class.
-        *
-        * @access  protected
-        * @return  tx_em_Settings  instance of settings class
-        */
-       protected function getSettingsObject() {
-               if (!is_object(self::$objSettings) && !(self::$objSettings instanceof tx_em_Settings)) {
-                       self::$objSettings = t3lib_div::makeInstance('tx_em_Settings');
-               }
-               return self::$objSettings;
-       }
-
-
-       /*********************************************************************/
-       /* Local Extension List                                              */
-       /*********************************************************************/
-
-
-       /**
-        * Render local extension list, sorted by extension key.
-        *
-        * @param object $parameters
-        * @return array
-        */
-       public function getExtensionList($parameters) {
-               $repositoryId = $parameters->repository;
-
-               /** @var $list tx_em_Extensions_List */
-               $list = t3lib_div::makeInstance('tx_em_Extensions_List');
-               $extList = $list->getInstalledExtensions(TRUE);
-
-               $temp = array();
-               $localList = array();
-               foreach ($extList as $entry) {
-                       $temp[] = '"' . $entry['extkey'] . '"';
-                       $entry['intversion'] = t3lib_utility_VersionNumber::convertVersionNumberToInteger($entry['version']);
-                       $localList[$entry['extkey']] = $entry;
-               }
-
-               $where = ' AND cache_extensions.extkey IN (' . implode(',', $temp) . ')';
-               $additionalData = tx_em_Database::getExtensionListFromRepository(
-                       $repositoryId,
-                       '',
-                       $where
-               );
-
-               foreach ($additionalData['results'] as $key => $value) {
-                       $isUpdatable = ($localList[$value['extkey']]['intversion'] < $value['maxintversion']) && ($localList[$value['extkey']]['stateCls'] != 'state-excludeFromUpdates');
-                       $localList[$value['extkey']]['versionislower'] = $isUpdatable;
-                       $localList[$value['extkey']]['maxversion'] = tx_em_Tools::versionFromInt($value['maxintversion']);
-               }
-
-                       // Sort the list by extension key
-               ksort($localList);
-
-               return array(
-                       'length' => count($localList),
-                       'data' => array_values($localList)
-               );
-       }
-
-       /**
-        * Returns the list of extensions with additional data
-        *
-        * @return array
-        */
-       public function getFlatExtensionList() {
-               /** @var $list tx_em_Extensions_List */
-               $list = t3lib_div::makeInstance('tx_em_Extensions_List');
-               $extList = $list->getInstalledExtensions(TRUE);
-
-               $flatList = array();
-               foreach ($extList as $entry) {
-                       $flatList[$entry['extkey']] = array(
-                               'version' => $entry['version'],
-                               'intversion' => t3lib_utility_VersionNumber::convertVersionNumberToInteger($entry['version']),
-                               'installed' => $entry['installed'],
-                               'typeShort' => $entry['typeShort'],
-                       );
-               }
-               return array(
-                       'length' => count($flatList),
-                       'data' => $flatList
-               );
-       }
-
-       /**
-        * Render extension list for languages
-        *
-        * @param object $parameters
-        * @return array
-        */
-       public function getInstalledExtkeys($parameters) {
-               $list = $this->getExtensionList($parameters);
-               $extList = $list['data'];
-
-               $selectedLanguages = t3lib_div::trimExplode(',', $this->globalSettings['selectedLanguages']);
-
-               $keys = array();
-               $i = 0;
-               foreach ($extList as $ext) {
-                       if ($ext['installed']) {
-                               $keys[$i] = array(
-                                       'extkey' => $ext['extkey'],
-                                       'icon' => $ext['icon'],
-                                       'stype' => $ext['typeShort'],
-                               );
-                               $keys[$i]['lang'] = array();
-                               if (count($selectedLanguages)) {
-                                       foreach ($selectedLanguages as $language) {
-                                               $keys[$i]['lang'][] = $GLOBALS['LANG']->sL('LLL:EXT:setup/mod/locallang.xml:lang_' . $language);
-                                       }
-                               }
-                               $i++;
-                       }
-               }
-
-               return array(
-                       'length' => count($keys),
-                       'data' => $keys,
-               );
-       }
-
-       /**
-        * Render module content
-        *
-        * @return string $content
-        */
-       public function getExtensionDetails() {
-               /** @var $list tx_em_Extensions_List */
-               $list = t3lib_div::makeInstance('tx_em_Extensions_List');
-               $extList = $list->getInstalledExtensions(TRUE);
-
-               return array(
-                       'length' => count($extList),
-                       'data' => $extList
-               );
-
-       }
-
-       /**
-        * Render extension update
-        *
-        * @var string $extKey
-        * @return string $content
-        */
-       public function getExtensionUpdate($extKey) {
-               if (isset($GLOBALS['TYPO3_LOADED_EXT'][$extKey])) {
-                       /** @var $install tx_em_Install */
-                       $install = t3lib_div::makeInstance('tx_em_Install');
-                       /** @var $extension tx_em_Extensions_List */
-                       $extension = t3lib_div::makeInstance('tx_em_Extensions_List');
-
-                       $extPath = t3lib_extMgm::extPath($extKey);
-                       $type = tx_em_Tools::getExtTypeFromPath($extPath);
-                       $typePath = tx_em_Tools::typePath($type);
-                       $extInfo = array();
-
-                       $extension->singleExtInfo($extKey, $typePath, $extInfo);
-                       $extInfo = $extInfo[0];
-                       $extInfo['type'] = $extInfo['typeShort'];
-                       $update = $install->checkDBupdates($extKey, $extInfo);
-                       if ($update) {
-                               $update = $GLOBALS['LANG']->getLL('ext_details_new_tables_fields_select') .
-                                       $update .
-                                       '<br /><input type="submit" name="write" id="update-submit-' . htmlspecialchars($extKey) . '" value="' .
-                                               htmlspecialchars($GLOBALS['LANG']->getLL('updatesForm_make_updates')) . '" />';
-                       }
-                       return $update ? $update : $GLOBALS['LANG']->sL('LLL:EXT:em/language/locallang.xml:ext_details_dbUpToDate');
-               } else {
-                       return sprintf($GLOBALS['LANG']->sL('LLL:EXT:em/language/locallang.xml:msg_extNotInstalled'), htmlspecialchars($extKey));
-               }
-       }
-
-
-       /**
-        * Render extension configuration
-        *
-        * @var string $extKey
-        * @return string $content
-        */
-       public function getExtensionConfiguration($extKey) {
-               /** @var $extensionList tx_em_Extensions_List */
-               $extensionList = t3lib_div::makeInstance('tx_em_Extensions_List', $this);
-               list($list,) = $extensionList->getInstalledExtensions();
-               /** @var $install tx_em_Install */
-               $install = t3lib_div::makeInstance('tx_em_Install');
-               $install->setSilentMode(TRUE);
-
-               $form = $install->updatesForm($extKey, $list[$extKey], 1, '', '', FALSE, TRUE);
-               if (!$form) {
-                       return '<p>' . $GLOBALS['LANG']->sL('LLL:EXT:em/language/locallang.xml:msg_extNoConfiguration') . '</p>';
-               } else {
-                       return $form;
-               }
-       }
-
-       /**
-        * Save extension configuration
-        *
-        * @formHandler
-        * @param array $parameter
-        * @return array
-        */
-       public function saveExtensionConfiguration($parameter) {
-
-               $extKey = $parameter['extkey'];
-               $extType = $parameter['exttype'];
-               $noSave = $parameter['noSave'];
-
-               $absPath = tx_em_Tools::getExtPath($extKey, $extType);
-               $relPath = tx_em_Tools::typeRelPath($extType) . $extKey . '/';
-
-               /** @var $extensionList tx_em_Extensions_List */
-               $extensionList = t3lib_div::makeInstance('tx_em_Extensions_List', $this);
-               list($list,) = $extensionList->getInstalledExtensions();
-
-               $arr = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf'][$extKey]);
-               $arr = is_array($arr) ? $arr : array();
-
-               /** @var $tsStyleConfig t3lib_tsStyleConfig */
-               $tsStyleConfig = t3lib_div::makeInstance('t3lib_tsStyleConfig');
-               $tsStyleConfig->doNotSortCategoriesBeforeMakingForm = TRUE;
-               $theConstants = $tsStyleConfig->ext_initTSstyleConfig(
-                       t3lib_div::getUrl($absPath . 'ext_conf_template.txt'),
-                       $relPath,
-                       $absPath,
-                       $GLOBALS['BACK_PATH']
-               );
-
-               $tsStyleConfig->ext_procesInput($parameter, array(), $theConstants, array());
-               $arr = $tsStyleConfig->ext_mergeIncomingWithExisting($arr);
-
-               /** @var $install tx_em_Install */
-               $install = t3lib_div::makeInstance('tx_em_Install');
-               $install->setSilentMode(TRUE);
-               $install->install->INSTALL = $parameter['TYPO3_INSTALL'];
-               $install->checkDBupdates($extKey, $list[$extKey]);
-
-               $html = '';
-               if ($noSave) {
-                       $html = $install->updatesForm($extKey, $list[$extKey], 1, '', '', FALSE);
-               } else {
-                       $install->writeTsStyleConfig($extKey, $arr);
-               }
-
-               return array(
-                       'success' => TRUE,
-                       'data' => $parameter['data'],
-                       'html' => $html,
-               );
-       }
-
-       /**
-        * Cleans EMConf of extension
-        *
-        * @param  string  $extKey
-        * @return array
-        */
-       public function cleanEmConf($extKey) {
-
-               /** @var $extensionList tx_em_Extensions_List */
-               $extensionList = t3lib_div::makeInstance('tx_em_Extensions_List', $this);
-               list($list,) = $extensionList->getInstalledExtensions();
-               /** @var $extensionDetails tx_em_Extensions_Details */
-               $this->extensionDetails = t3lib_div::makeInstance('tx_em_Extensions_Details', $this);
-
-               $result = $this->extensionDetails->updateLocalEM_CONF($extKey, $list[$extKey]);
-
-               return array(
-                       'success' => TRUE,
-                       'extkey' => $extKey,
-                       'result' => $result
-               );
-       }
-
-       /**
-        * Delete extension
-        *
-        * @param  $extKey
-        * @return array
-        */
-       public function deleteExtension($extKey) {
-
-               /** @var $extensionList tx_em_Extensions_List */
-               $extensionList = t3lib_div::makeInstance('tx_em_Extensions_List', $this);
-               list($list,) = $extensionList->getInstalledExtensions();
-               $type = $list[$extKey]['type'];
-               $absPath = tx_em_Tools::getExtPath($extKey, $type);
-
-               /** @var $install tx_em_Install */
-               $install = t3lib_div::makeInstance('tx_em_Install');
-               $install->setSilentMode(TRUE);
-
-               $res = $install->removeExtDirectory($absPath);
-               $error = '';
-               $success = TRUE;
-
-               if ($res) {
-                       $res = nl2br($res);
-                       $error = sprintf($GLOBALS['LANG']->getLL('extDelete_remove_dir_failed'), $absPath);
-                       $success = FALSE;
-               }
-               return array(
-                       'success' => $success,
-                       'extkey' => $extKey,
-                       'result' => $res,
-                       'error' => $error
-               );
-       }
-
-       /**
-        * generates a file tree
-        *
-        * @param object $parameter
-        * @return array
-        */
-       public function getExtFileTree($parameter) {
-               $type = $parameter->typeShort;
-               $node = substr($parameter->node, 0, 6) !== 'xnode-' ? $parameter->node : $parameter->baseNode;
-
-               $path = PATH_site . $node;
-               $fileArray = array();
-
-               $dirs = t3lib_div::get_dirs($path);
-               $files = t3lib_div::getFilesInDir($path, '', FALSE, '', '');
-
-               if (!is_array($dirs) && !is_array($files)) {
-                       return array();
-               }
-
-               foreach ($dirs as $dir) {
-                       if ($dir{0} !== '.') {
-                               $fileArray[] = array(
-                                       'id' => ($node == '' ? '' : $node . '/') . $dir,
-                                       'text' => htmlspecialchars($dir),
-                                       'leaf' => FALSE,
-                                       'qtip' => ''
-                               );
-                       }
-               }
-
-               foreach ($files as $key => $file) {
-                       $fileInfo = $this->getFileInfo($file);
-
-                       $fileArray[] = array(
-                               'id' => $node . '/' . $file,
-                               'text' => $fileInfo[0],
-                               'leaf' => TRUE,
-                               'qtip' => $fileInfo[1],
-                               'iconCls' => $fileInfo[4],
-                               'fileType' => $fileInfo[3],
-                               'ext' => $fileInfo[2]
-                       );
-               }
-
-               return $fileArray;
-       }
-
-
-       /**
-        * Read extension file and send content
-        *
-        * @param string $path
-        * @return string file content
-        */
-       public function readExtFile($path) {
-               $path = PATH_site . $path;
-               if (@file_exists($path)) {
-                       return t3lib_div::getUrl($path);
-               }
-               return '';
-       }
-
-       /**
-        * Save extension file
-        *
-        * @param string $file
-        * @param string $content
-        * @return boolean success
-        */
-       public function saveExtFile($file, $content) {
-               $path = PATH_site . $file;
-               $error = '';
-               $fileSaveAllowed = $GLOBALS['TYPO3_CONF_VARS']['EXT']['noEdit'] == 0;
-               $fileExists = @file_exists($path);
-               $fileSaveable = is_writable($path);
-
-               if ($fileExists && $fileSaveable && $fileSaveAllowed) {
-                       $success = t3lib_div::writeFile($path, $content);
-               } else {
-                       $success = FALSE;
-                       $error = $fileSaveAllowed
-                                       ? ($fileSaveable
-                                                       ? $GLOBALS['LANG']->sL('LLL:EXT:em/language/locallang.xml:msg_fileNotExists', TRUE)
-                                                       : $GLOBALS['LANG']->sL('LLL:EXT:em/language/locallang.xml:msg_fileWriteProtected', TRUE)
-                                       )
-                                       : $GLOBALS['LANG']->sL('LLL:EXT:em/language/locallang.xml:ext_details_saving_disabled', TRUE);
-               }
-
-               if ($success) {
-                       $GLOBALS['BE_USER']->writelog(9, 0, 0, 0, sprintf('File "%s" has been modified', $file));
-               }
-               return array(
-                       'success' => $success,
-                       'path' => $path,
-                       'file' => basename($path),
-                       'content' => $content,
-                       'error' => $error
-               );
-       }
-
-       /**
-        * Create a new file
-        *
-        * @param  string $folder
-        * @param  string $file
-        * @param  boolean $isFolder
-        * @return array result
-        */
-       public function createNewFile($folder, $file, $isFolder) {
-               $result = tx_em_Tools::createNewFile($folder, $file, $isFolder);
-
-               $node = array();
-
-               if ($result[0] === TRUE) {
-                       if ($isFolder) {
-                               $node = array(
-                                       'id' => htmlspecialchars(substr($result[1], strlen(PATH_site))),
-                                       'text' => htmlspecialchars(basename($result[1])),
-                                       'leaf' => FALSE,
-                                       'qtip' => ''
-                               );
-                       } else {
-                               $fileInfo = $this->getFileInfo($result[1]);
-                               $node = array(
-                                       'id' => substr($fileInfo[0], strlen(PATH_site)),
-                                       'text' => basename($fileInfo[0]),
-                                       'leaf' => !$isFolder,
-                                       'qtip' => $fileInfo[1],
-                                       'iconCls' => $fileInfo[4],
-                                       'fileType' => $fileInfo[3],
-                                       'ext' => $fileInfo[2]
-                               );
-                       }
-               }
-               return array(
-                       'success' => $result[0],
-                       'created' => $result[1],
-                       'node' => $node,
-                       'error' => $result[2]
-               );
-       }
-
-       /**
-        * Rename a file/folder
-        *
-        * @param  string $file
-        * @param  string $newName
-        * @param  boolean $isFolder
-        * @return array result
-        */
-       public function renameFile($file, $newName, $isFolder) {
-               $src = basename($file);
-               $newFile = substr($file, 0, -1 * strlen($src)) . $newName;
-
-               $success = tx_em_Tools::renameFile($file, $newFile);
-
-               return array(
-                       'success' => $success,
-                       'oldFile' => $file,
-                       'newFile' => $newFile,
-                       'newFilename' => basename($newFile),
-               );
-       }
-
-
-       /**
-        * Moves a file to new destination
-        *
-        * @param  string $file
-        * @param  string $destination
-        * @param  boolean $isFolder
-        * @return array
-        */
-       public function moveFile($file, $destination, $isFolder) {
-               return array(
-                       'success' => TRUE,
-                       'file' => $file,
-                       'destination' => $destination,
-                       'isFolder' => $isFolder
-               );
-       }
-
-       /**
-        * Deletes a file/folder
-        *
-        * @param  string $file
-        * @param  boolean $isFolder
-        * @return array
-        */
-       public function deleteFile($file, $isFolder) {
-
-               $file = str_replace('//', '/', PATH_site . $file);
-               $command['delete'][] = array(
-                       'data' => $file
-               );
-               $result = $this->fileOperation($command);
-
-               return array(
-                       'success' => TRUE,
-                       'file' => $file,
-                       'isFolder' => $isFolder,
-                       'command' => $command,
-                       'result' => $result
-               );
-       }
-
-       /**
-        * Shows a diff of content changes of a file
-        *
-        * @param  string $file
-        * @param  string $content
-        * @return array
-        */
-       public function makeDiff($original, $content) {
-               /** @var $diff t3lib_diff */
-               $diff = t3lib_div::makeInstance('t3lib_diff');
-               $result = $diff->makeDiffDisplay($original, $content);
-
-               return array(
-                       'success' => TRUE,
-                       'diff' => '<pre>' . $result . '</pre>'
-               );
-       }
-
-       /**
-        * Load upload form for extension upload to TER
-        *
-        * @formcHandler
-        * @return array
-        */
-       public function loadUploadExtToTer() {
-               $settings = $this->getSettings();
-               return array(
-                       'success' => TRUE,
-                       'data' => array(
-                               'fe_u' => $settings['fe_u'],
-                               'fe_p' => $settings['fe_p']
-                       )
-               );
-       }
-
-       /**
-        * Upload extension to TER
-        *
-        * @formHandler
-        *
-        * @param string $parameter
-        * @return array
-        */
-       public function uploadExtToTer($parameter) {
-               $repository = $this->getSelectedRepository();
-               $wsdlURL = $repository['wsdl_url'];
-
-               $parameter['user']['fe_u'] = $parameter['fe_u'];
-               $parameter['user']['fe_p'] = $parameter['fe_p'];
-               $parameter['upload']['mode'] = $parameter['newversion'];
-               $parameter['upload']['comment'] = $parameter['uploadcomment'];
-
-               /** @var $extensionList tx_em_Extensions_List */
-               $extensionList = t3lib_div::makeInstance('tx_em_Extensions_List', $this);
-               list($list,) = $extensionList->getInstalledExtensions();
-               /** @var $extensionDetails tx_em_Extensions_Details */
-               $this->extensionDetails = t3lib_div::makeInstance('tx_em_Extensions_Details', $this);
-
-               /** @var $terConnection tx_em_Connection_Ter */
-               $terConnection = t3lib_div::makeInstance('tx_em_Connection_Ter', $this);
-               $terConnection->wsdlURL = $wsdlURL;
-
-               $parameter['extInfo'] = $list[$parameter['extKey']];
-               $response = $terConnection->uploadToTER($parameter);
-
-               if (!is_array($response)) {
-                       return array(
-                               'success' => FALSE,
-                               'error' => $response,
-                               'params' => $parameter,
-                       );
-               }
-               if ($response['resultCode'] == 10504) { //success
-                       $parameter['extInfo']['EM_CONF']['version'] = $response['version'];
-                       $response['resultMessages'][] = sprintf(
-                               $GLOBALS['LANG']->sL('LLL:EXT:em/language/locallang.xml:terCommunication_ext_version'),
-                               $response['version']
-                       );
-                       $response['resultMessages'][] = $this->extensionDetails->updateLocalEM_CONF($parameter['extKey'], $parameter['extInfo']);
-               }
-
-               return array(
-                       'success' => TRUE,
-                       'params' => $parameter,
-                       'response' => $response
-               );
-       }
-
-       /**
-        * Prints developer information
-        *
-        * @param string $parameter
-        * @return string
-        */
-       public function getExtensionDevelopInfo($extKey) {
-               /** @var $extensionList tx_em_Extensions_List */
-               $extensionList = t3lib_div::makeInstance('tx_em_Extensions_List', $this);
-               list($list,) = $extensionList->getInstalledExtensions();
-               /** @var $extensionDetails tx_em_Extensions_Details */
-               $extensionDetails = t3lib_div::makeInstance('tx_em_Extensions_Details', $this);
-
-               return $extensionDetails->extInformationarray($extKey, $list[$extKey]);
-       }
-
-       /**
-        * Prints backup delete
-        *
-        * @param string $parameter
-        * @return string
-        */
-       public function getExtensionBackupDelete($extKey) {
-               $content = '';
-               /** @var $extensionList tx_em_Extensions_List */
-               $extensionList = t3lib_div::makeInstance('tx_em_Extensions_List', $this);
-               /** @var $extensionDetails tx_em_Extensions_Details */
-               $extensionDetails = t3lib_div::makeInstance('tx_em_Extensions_Details');
-               /** @var $terConnection tx_em_Connection_Ter */
-               $terConnection = t3lib_div::makeInstance('tx_em_Connection_Ter', $this);
-               /** @var $install tx_em_Install */
-               $install = t3lib_div::makeInstance('tx_em_Install');
-               /** @var $api tx_em_API */
-               $api = t3lib_div::makeInstance('tx_em_API');
-
-               list($list,) = $extensionList->getInstalledExtensions();
-               $uploadArray = $extensionDetails->makeUploadarray($extKey, $list[$extKey]);
-
-               if (is_array($uploadArray)) {
-                       $backUpData = $terConnection->makeUploadDataFromarray($uploadArray);
-                       $filename = 'T3X_' . $extKey . '-' . str_replace('.', '_', $list[$extKey]['EM_CONF']['version']) . '-z-' . date('YmdHi') . '.t3x';
-
-                       $techInfo = $install->makeDetailedExtensionAnalysis($extKey, $list[$extKey], FALSE, FALSE);
-                       $lines = array();
-
-                       // Backup
-                       $lines[] = '<tr class="t3-row-header"><td colspan="2">' .
-                                       $GLOBALS['LANG']->sL('LLL:EXT:em/language/locallang.xml:ext_details_backup') . '</td></tr>';
-                       $lines[] = '<tr class="bgColor4"><td><strong>' .
-                                       $GLOBALS['LANG']->sL('LLL:EXT:em/language/locallang.xml:extBackup_files') . '</strong></td><td>' .
-                                       '<a class="t3-link" href="' . htmlspecialchars(t3lib_div::linkThisScript(array(
-                               'CMD[doBackup]' => 1,
-                               'CMD[showExt]' => $extKey,
-                               'SET[singleDetails]' => 'backup'
-                       ))) .
-                                       '">' . sprintf($GLOBALS['LANG']->sL('LLL:EXT:em/language/locallang.xml:extBackup_download'),
-                               $extKey
-                       ) . '</a><br />
-                               (' . $filename . ', <br />' .
-                                       t3lib_div::formatSize(strlen($backUpData)) . ', <br />' .
-                                       $GLOBALS['LANG']->sL('LLL:EXT:em/language/locallang.xml:extBackup_md5') . ' ' . md5($backUpData) . ')
-                               <br /></td></tr>';
-
-                       if (is_array($techInfo['tables'])) {
-                               $lines[] = '<tr class="bgColor4"><td><strong>' . $GLOBALS['LANG']->sL('LLL:EXT:em/language/locallang.xml:extBackup_data_tables') .
-                                               '</strong></td><td>' .
-                                                       tx_em_Database::dumpDataTablesLine($techInfo['tables'], $extKey, array('SET[singleDetails]' => 'backup')) .
-                                               '</td></tr>';
-                       }
-                       if (is_array($techInfo['static'])) {
-                               $lines[] = '<tr class="bgColor4"><td><strong>' . $GLOBALS['LANG']->sL('LLL:EXT:em/language/locallang.xml:extBackup_static_tables') .
-                                               '</strong></td><td>' .
-                                                       tx_em_Database::dumpDataTablesLine($techInfo['static'], $extKey, array('SET[singleDetails]' => 'backup')) .
-                                               '</td></tr>';
-                       }
-
-                       // Delete
-                       if (!t3lib_extMgm::isLoaded($extKey)) {
-                                       // check ext scope
-                               if (tx_em_Tools::deleteAsType($list[$extKey]['type']) && t3lib_div::inList('G,L', $list[$extKey]['type'])) {
-                                       $lines[] = '<tr class="t3-row-header"><td colspan="2">' .
-                                                       $GLOBALS['LANG']->sL('LLL:EXT:em/language/locallang.xml:ext_details_delete') . '</td></tr>';
-                                       $lines[] = '<tr class="bgColor4"><td colspan="2">' . $install->extDelete($extKey, $list[$extKey], '') . '</td></tr>';
-                               }
-                       }
-                       // EM_CONF
-                       $lines[] = '<tr class="t3-row-header"><td colspan="2">' .
-                                       $GLOBALS['LANG']->sL('LLL:EXT:em/language/locallang.xml:ext_details_update_em_conf') . '</td></tr>';
-
-                       $updateEMConf = $GLOBALS['LANG']->sL('LLL:EXT:em/language/locallang.xml:extUpdateEMCONF_file');
-                       $lines[] = '<tr class="bgColor4"><td colspan="2">' .
-                                       $GLOBALS['LANG']->sL('LLL:EXT:em/language/locallang.xml:extUpdateEMCONF_info_changes') . '<br />
-                                               ' . $GLOBALS['LANG']->sL('LLL:EXT:em/language/locallang.xml:extUpdateEMCONF_info_reset') .
-                                       '<br /><br />' .
-                                       '<a class="t3-link emconfLink" href="#"><strong>' . $updateEMConf . '</strong> ' .
-                                       sprintf($GLOBALS['LANG']->sL('LLL:EXT:em/language/locallang.xml:extDelete_from_location'),
-                                               $api->typeLabels[$list[$extKey]['type']],
-                                               substr(tx_em_Tools::getExtPath($extKey, $list[$extKey]['type']['type']), strlen(PATH_site))
-                                       ) . '</a>'
-                                       . '</td></tr>';
-
-                       // mod menu for singleDetails
-                       $modMenu = $GLOBALS['TBE_MODULES_EXT']['tools_em']['MOD_MENU']['singleDetails'];
-                       if (isset($modMenu) && is_array($modMenu)) {
-                               $lines[] = '<tr class="t3-row-header"><td colspan="2">' .
-                                       $GLOBALS['LANG']->sL('LLL:EXT:em/language/locallang.xml:ext_details_externActions') . '</td></tr>';
-                               $menuLinks = '';
-                               foreach ($modMenu as $menuEntry) {
-                                       $onClick = htmlspecialchars('jumpToUrl(\'mod.php?&id=0&M=tools_em&SET[singleDetails]=' . $menuEntry['name'] . '&CMD[showExt]=' . $extKey . '\');');
-                                       $menuLinks .= '<a class="t3-link" href="#" onclick="' . $onClick . '" >' .
-                                                       $GLOBALS['LANG']->sL($menuEntry['title'], TRUE) . '</a><br />';
-                               }
-                               $lines[] = '<tr class="bgColor4"><td colspan="2"><p>' . $menuLinks . '</p></td></tr>';
-                       }
-
-                       $content = '<table border="0" cellpadding="2" cellspacing="2">' . implode('', $lines) . '</table>';
-
-                       return $this->replaceLinks($content);
-               }
-       }
-
-       /**
-        * Execute update script
-        *
-        * @param  $extkey
-        * @return array
-        */
-       public function getExtensionUpdateScript($extkey) {
-               $updateScript = t3lib_extMgm::extPath($extkey) . 'class.ext_update.php';
-               require_once($updateScript);
-               $updateObj = new ext_update;
-               $access = FALSE;
-               if ($updateObj->access()) {
-                       $access = TRUE;
-               }
-
-               return array(
-                       'success' => $access,
-               );
-
-       }
-       /*********************************************************************/
-       /* Remote Extension List                                             */
-       /*********************************************************************/
-
-
-       /**
-        * Render remote extension list
-        *
-        * @param object $parameters
-        * @return string $content
-        */
-       public function getRemoteExtensionList($parameters) {
-               $repositoryId = $parameters->repository;
-               $mirrorUrl = $this->getMirrorUrl($repositoryId);
-
-               $list = $this->getFlatExtensionList();
-               $localList = $list['data'];
-
-               $search = htmlspecialchars($parameters->query);
-               $limit = htmlspecialchars($parameters->start . ', ' . $parameters->limit);
-               $orderBy = htmlspecialchars($parameters->sort);
-               $orderDir = htmlspecialchars($parameters->dir);
-               if ($orderBy == '') {
-                       $orderBy = 'relevance';
-                       $orderDir = 'ASC';
-               }
-               if ($orderBy === 'statevalue') {
-                       $orderBy = 'cache_extensions.state ' . $orderDir;
-               } elseif ($orderBy === 'relevance') {
-                       $orderBy = 'relevance ' . $orderDir . ', cache_extensions.title ' . $orderDir;
-               } else {
-                       $orderBy = 'cache_extensions.' . $orderBy . ' ' . $orderDir;
-               }
-               $installedOnly = $parameters->installedOnly;
-
-               $where = $addFields = '';
-
-               if ($search === '' && !$installedOnly) {
-                       return array(
-                               'length' => 0,
-                               'data' => array(),
-                       );
-               } elseif ($search === '*') {
-                       // Nothing to do
-               } else {
-                       $quotedSearch = $GLOBALS['TYPO3_DB']->escapeStrForLike(
-                               $GLOBALS['TYPO3_DB']->quoteStr($search, 'cache_extensions'),
-                               'cache_extensions'
-                       );
-                       $addFields = '
-                               (CASE WHEN cache_extensions.extkey =  "' . $search . '" THEN 100 ELSE 5 END) +
-                               (CASE WHEN cache_extensions.title = "' . $search . '" THEN 80 ELSE 5 END) +
-                               (CASE WHEN cache_extensions.extkey LIKE \'%' . $quotedSearch . '%\' THEN 60 ELSE 5 END) +
-                               (CASE WHEN cache_extensions.title LIKE \'%' . $quotedSearch . '%\' THEN 40 ELSE 5 END)
-                        AS relevance';
-
-                       if (t3lib_extMgm::isLoaded('dbal')) {
-                               // as dbal can't use the sum, make it more easy for dbal
-                               $addFields = 'CASE WHEN cache_extensions.extkey =  \'' . $search . '\' THEN 100 ELSE 10 END AS relevance';
-                       }
-                       $where = ' AND (cache_extensions.extkey LIKE \'%' . $quotedSearch . '%\' OR cache_extensions.title LIKE \'%' . $quotedSearch . '%\')';
-
-               }
-                       // check for filter
-               $where .= $this->makeFilterQuery(get_object_vars($parameters));
-
-               if ($installedOnly) {
-                       $temp = array();
-                       foreach ($localList as $key => $value) {
-                               if ($value['installed']) {
-                                       $temp[] = '"' . $key . '"';
-                               }
-                       }
-                       $where .= ' AND cache_extensions.extkey IN(' . implode(',', $temp) . ')';
-                       $limit = '';
-               }
-
-               $list = tx_em_Database::getExtensionListFromRepository(
-                       $repositoryId,
-                       $addFields,
-                       $where,
-                       $orderBy,
-                       $limit
-               );
-
-               $updateKeys = array();
-
-                       // transform array
-               foreach ($list['results'] as $key => $value) {
-                       $newEntry = $value;
-                       $newEntry['dependencies'] = unserialize($value['dependencies']);
-                       $extPath = t3lib_div::strtolower($value['extkey']);
-                       $newEntry['statevalue'] = $value['state'];
-                       $newEntry['state'] = tx_em_Tools::getDefaultState(intval($value['state']));
-                       $newEntry['stateCls'] = 'state-' . $newEntry['state'];
-                       $newEntry['version'] = tx_em_Tools::versionFromInt($value['maxintversion']);
-                       $newEntry['icon'] = '<img alt="" src="' . $mirrorUrl . $extPath{0} . '/' . $extPath{1} . '/' . $extPath . '_' . $newEntry['version'] . '.gif" />';
-
-                       $newEntry['exists'] = 0;
-                       $newEntry['installed'] = 0;
-                       $newEntry['versionislower'] = 0;
-                       $newEntry['existingVersion'] = '';
-                       if (isset($localList[$value['extkey']])) {
-                               $isUpdatable = ($localList[$value['extkey']]['intversion'] < $value['maxintversion']);
-                               $newEntry['exists'] = 1;
-                               $newEntry['installed'] = $localList[$value['extkey']]['installed'];
-                               $newEntry['versionislower'] = $isUpdatable;
-                               $newEntry['existingVersion'] =  $localList[$value['extkey']]['version'];
-                               if ($isUpdatable) {
-                                       $updateKeys[] = $key;
-                               }
-                       }
-
-                               // If search expression matches an extension key, move it to 1st place in results
-                       if ($value['extkey'] === strtolower($search)) {
-                               array_unshift($list['results'], $newEntry);
-                       } else {
-                               $list['results'][$key] = $newEntry;
-                       }
-
-               }
-                       // updatable only
-               if ($installedOnly == 2) {
-                       $temp = array();
-                       if (count($updateKeys)) {
-                               foreach ($updateKeys as $key) {
-                                       $temp[]= $list['results'][$key];
-                               }
-                       }
-                       $list['results'] = $temp;
-                       $list['count'] -= count($updateKeys);
-               }
-
-               return array(
-                       'length' => $list['count'],
-                       'data' => $list['results'],
-               );
-
-       }
-
-
-       /**
-        * Loads repositories
-        *
-        * @return array
-        */
-       public function getRepositories() {
-               $settings = $this->getSettings();
-               $repositories = tx_em_Database::getRepositories();
-               $data = array();
-
-               foreach ($repositories as $uid => $repository) {
-                       $data[] = array(
-                               'title' => $repository['title'],
-                               'uid' => $repository['uid'],
-                               'description' => $repository['description'],
-                               'wsdl_url' => $repository['wsdl_url'],
-                               'mirror_url' => $repository['mirror_url'],
-                               'count' => $repository['extCount'],
-                               'updated' => $repository['lastUpdated'] ? date('d/m/Y H:i', $repository['lastUpdated']) : 'never',
-                               'selected' => $repository['uid'] === $settings['selectedRepository'],
-                       );
-               }
-
-               return array(
-                       'length' => count($data),
-                       'data' => $data,
-               );
-       }
-
-
-       /**
-        * Get Mirrors for selected repository
-        *
-        * @param  object $parameter
-        * @return array
-        */
-       public function getMirrors($parameter) {
-               $data = array();
-               /** @var $objRepository tx_em_Repository */
-               $objRepository = t3lib_div::makeInstance('tx_em_Repository', $parameter->repository);
-
-               if ($objRepository->getMirrorListUrl()) {
-                       /** @var $objRepositoryUtility tx_em_Repository_Utility */
-                       $objRepositoryUtility = t3lib_div::makeInstance('tx_em_Repository_Utility', $objRepository);
-                       $mirrors = $objRepositoryUtility->getMirrors(TRUE)->getMirrors();
-
-                       if (count($mirrors)) {
-                               $data = array(
-                                       array(
-                                               'title' => $GLOBALS['LANG']->sL('LLL:EXT:em/language/locallang.xml:mirror_use_random'),
-                                               'country' => '',
-                                               'host' => '',
-                                               'path' => '',
-                                               'sponsor' => '',
-                                               'link' => '',
-                                               'logo' => '',
-                                       )
-                               );
-                               foreach ($mirrors as $mirror) {
-                                       $data[] = array(
-                                               'title' => $mirror['title'],
-                                               'country' => $mirror['country'],
-                                               'host' => $mirror['host'],
-                                               'path' => $mirror['path'],
-                                               'sponsor' => $mirror['sponsorname'],
-                                               'link' => $mirror['sponsorlink'],
-                                               'logo' => str_replace('http:', '', $mirror['sponsorlogo']),
-                                       );
-                               }
-                       }
-               }
-
-               return array(
-                       'length' => count($data),
-                       'data' => $data,
-               );
-
-       }
-
-       /**
-        * Edit / Create repository
-        *
-        * @formHandler
-        * @param array $parameter
-        * @return array
-        */
-       public function repositoryEditFormSubmit($parameter) {
-               $repId = intval($parameter['rep']);
-
-               /** @var $repository tx_em_Repository */
-               $repository = t3lib_div::makeInstance('tx_em_Repository', $repId);
-               $repository->setTitle($parameter['title']);
-               $repository->setDescription($parameter['description']);
-               $repository->setWsdlUrl($parameter['wsdl_url']);
-               $repository->setMirrorListUrl($parameter['mirror_url']);
-               $repositoryData = array(
-                       'title' => $repository->getTitle(),
-                       'description' => $repository->getDescription(),
-                       'wsdl_url' => $repository->getWsdlUrl(),
-                       'mirror_url' => $repository->getMirrorListUrl(),
-                       'lastUpdated' => $repository->getLastUpdate(),
-                       'extCount' => $repository->getExtensionCount(),
-               );
-
-               if ($repId === 0) {
-                               // create a new repository
-                       $id = tx_em_Database::insertRepository($repository);
-                       return array(
-                               'success' => TRUE,
-                               'newId' => $id,
-                               'params' => $repositoryData
-                       );
-
-               } else {
-                       tx_em_Database::updateRepository($repository);
-                       return array(
-                               'success' => TRUE,
-                               'params' => $repositoryData
-                       );
-               }
-       }
-
-       /**
-        * Delete repository
-        *
-        * @param  int $uid
-        * @return array
-        */
-       public function deleteRepository($uid) {
-               if (intval($uid) < 2) {
-                       return array(
-                               'success' => FALSE,
-                               'error' => $GLOBALS['LANG']->sL('LLL:EXT:em/language/locallang.xml:repository_main_nodelete')
-                       );
-               }
-               $repository = t3lib_div::makeInstance('tx_em_Repository', intval($uid));
-               tx_em_Database::deleteRepository($repository);
-               return array(
-                               'success' => TRUE,
-                               'uid' => intval($uid)
-                       );
-       }
-
-       /**
-        * Update repository
-        *
-        * @param integer $repositoryId
-        * @return array
-        */
-       public function repositoryUpdate($repositoryId) {
-               if (!intval($repositoryId)) {
-                       return array(
-                               'success' => FALSE,
-                               'errors' => 'no repository choosen',
-                               'rep' => 0
-                       );
-               }
-
-               /** @var $objRepository tx_em_Repository */
-               $objRepository = t3lib_div::makeInstance('tx_em_Repository', intval($repositoryId));
-               /** @var $objRepositoryUtility tx_em_Repository_Utility */
-               $objRepositoryUtility = t3lib_div::makeInstance('tx_em_Repository_Utility', $objRepository);
-               $count = $objRepositoryUtility->updateExtList();
-               $time = $GLOBALS['EXEC_TIME'];
-
-               if ($count) {
-                       $objRepository->setExtensionCount($count);
-                       $objRepository->setLastUpdate($time);
-                       tx_em_Database::updateRepository($objRepository);
-                       return array(
-                               'success' => TRUE,
-                               'data' => array(
-                                       'count' => $count,
-                                       'updated' => date('d/m/Y H:i', $time)
-                               ),
-                               'rep' =>  intval($repositoryId)
-                       );
-               } else {
-                       return array(
-                               'success' => FALSE,
-                               'errormsg' => $GLOBALS['LANG']->sL('LLL:EXT:em/language/locallang.xml:repository_upToDate'),
-                               'rep' =>  intval($repositoryId)
-                       );
-               }
-       }
-
-
-       /*********************************************************************/
-       /* Translation Handling                                              */
-       /*********************************************************************/
-
-
-       /**
-        * Gets the system languages
-        *
-        * @return array
-        */
-       public function getLanguages() {
-               $this->globalSettings = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['em']);
-               $selected = t3lib_div::trimExplode(',', $this->globalSettings['selectedLanguages'], TRUE);
-
-               /** @var $locales t3lib_l10n_Locales */
-               $locales = t3lib_div::makeInstance('t3lib_l10n_Locales');
-               $theLanguages = $locales->getLanguages();
-                       //drop default
-               array_shift($theLanguages);
-               $lang = $meta = array();
-               foreach ($theLanguages as $language => $name) {
-                       $label = htmlspecialchars($GLOBALS['LANG']->sL('LLL:EXT:setup/mod/locallang.xml:lang_' . $language));
-                       if ($label === '') {
-                               $label = htmlspecialchars($name);
-                       }
-                       $lang[] = array(
-                               'label' => $label,
-                               'lang' => $language,
-                               'selected' => is_array($selected) && in_array($language, $selected) ? 1 : 0
-                       );
-                       $meta[] = array(
-                               'hidden' => is_array($selected) && in_array($language, $selected) ? 'false' : 'true',
-                               'header' => $language,
-                               'dataIndex' =>  $language,
-                               'width' => '100',
-                               'fixed' => TRUE,
-                               'sortable' => FALSE,
-                               'hidable' => FALSE,
-                               'menuDisabled' => TRUE,
-                       );
-               }
-               return array(
-                       'length' => count($lang),
-                       'data' => $lang,
-                       'meta' => $meta,
-               );
-
-       }
-
-       /**
-        * Saves language selection
-        *
-        * @param array $parameter
-        * @return string
-        */
-       public function saveLanguageSelection($parameter) {
-                       // Add possible dependencies for selected languages
-               /** @var $locales t3lib_l10n_Locales */
-               $locales = t3lib_div::makeInstance('t3lib_l10n_Locales');
-               $dependencies = array();
-               foreach ($parameter as $language) {
-                       $dependencies = array_merge($dependencies, $locales->getLocaleDependencies($language));
-               }
-               if (count($dependencies) > 0) {
-                       $parameter = array_unique(array_merge($parameter, $dependencies));
-               }
-
-               $this->globalSettings = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['em']);
-               $selected = t3lib_div::trimExplode(',', $this->globalSettings['selectedLanguages'], TRUE);
-
-               $dir = count($parameter) - count($selected);
-               $diff = $dir < 0 ? array_diff($selected, $parameter) : array_diff($parameter, $selected);
-               $type = tx_em_Tools::getExtTypeFromPath(t3lib_extMgm::extPath('em'));
-
-               $params = array(
-                       'extkey' => 'em',
-                       'exttype' => $type,
-                       'data' => array(
-                               'selectedLanguages' => implode(',', $parameter)
-                       )
-               );
-               $this->saveExtensionConfiguration($params);
-
-               return array(
-                       'success' => count($diff) > 0,
-                       'dir' => $dir,
-                       'diff' => array_values($diff),
-                       'languages' => $parameter
-               );
-       }
-
-
-       /**
-        * Fetches translation from server
-        *
-        * @param string $extkey
-        * @param string $type
-        * @param array $selection
-        * @return array
-        */
-       public function fetchTranslations($extkey, $type, $selection) {
-               $result = array();
-               if (is_array($selection) && count($selection)) {
-                       /** @var $terConnection tx_em_Connection_Ter */
-                       $terConnection = t3lib_div::makeInstance('tx_em_Connection_Ter', $this);
-                       /** @var $xmlHandler tx_em_Tools_XmlHandler */
-                       $this->xmlHandler = t3lib_div::makeInstance('tx_em_Tools_XmlHandler');
-                       $mirrorURL = $this->getSettingsObject()->getMirrorURL();
-
-                       $infoIcon = '<span class="t3-icon t3-icon-actions t3-icon-actions-document t3-icon-document-info">&nbsp;</span>';
-                       $updateIcon = '<span class="t3-icon t3-icon-actions t3-icon-actions-system t3-icon-system-extension-update">&nbsp;</span>';
-                       $newIcon = '<span class="t3-icon t3-icon-actions t3-icon-actions-system t3-icon-system-extension-import">&nbsp;</span>';
-                       $okIcon = '<span class="t3-icon t3-icon-status t3-icon-status-status t3-icon-status-checked">&nbsp;</span>';
-                       $errorIcon = '<span class="t3-icon t3-icon-status t3-icon-status-status t3-icon-status-permission-denied">&nbsp;</span>';
-
-                       foreach ($selection as $lang) {
-                               $fetch = $terConnection->fetchTranslationStatus($extkey, $mirrorURL);
-
-                               $localmd5 = '';
-                               if (!isset($fetch[$lang])) {
-                                               //no translation available
-                                       $result[$lang] = $infoIcon . $GLOBALS['LANG']->sL('LLL:EXT:em/language/locallang.xml:translation_n_a');
-                               } else {
-                                       $zip = PATH_site . 'typo3temp/' . $extkey . '-l10n-' . $lang . '.zip';
-                                       if (is_file($zip)) {
-                                               $localmd5 = md5_file($zip);
-                                       }
-                                       if ($localmd5 !== $fetch[$lang]['md5']) {
-                                               if ($type) {
-                                                               //fetch translation
-                                                       $ret = $terConnection->updateTranslation($extkey, $lang, $mirrorURL);
-
-                                                       $result[$lang] = $ret
-                                                                       ? $okIcon . $GLOBALS['LANG']->sL('LLL:EXT:em/language/locallang.xml:msg_updated')
-                                                                       : $errorIcon . $GLOBALS['LANG']->sL('LLL:EXT:em/language/locallang.xml:msg_failed');
-                                               } else {
-                                                               //translation status
-                                                       $result[$lang] = $localmd5 !== ''
-                                                                       ? $updateIcon . $GLOBALS['LANG']->sL('LLL:EXT:em/language/locallang.xml:translation_status_update')
-                                                                       : $newIcon . $GLOBALS['LANG']->sL('LLL:EXT:em/language/locallang.xml:translation_status_new');
-                                               }
-                                       } else {
-                                                       //translation is up to date
-                                               $result[$lang] = $okIcon . $GLOBALS['LANG']->sL('LLL:EXT:em/language/locallang.xml:translation_status_uptodate');
-                                       }
-                               }
-                       }
-               }
-               return $result;
-       }
-
-
-       /*********************************************************************/
-       /* Settings                                                          */
-       /*********************************************************************/
-
-       /**
-        * Returns settings object.
-        *
-        * @access  public
-        * @return  tx_em_Settings  instance of settings object
-        */
-       public function getSettings() {
-               return $this->getSettingsObject()->getSettings();
-       }
-
-       /**
-        * Enter description here...
-        *
-        * @param string $name
-        * @param mixed $value
-        * @return boolean
-        */
-       public function saveSetting($name, $value) {
-               $this->getSettingsObject()->saveSetting($name, $value);
-               return TRUE;
-       }
-
-       /**
-        * Load form values for settings form
-        *
-        * @return array FormValues
-        */
-       public function settingsFormLoad() {
-               $settings = $this->getSettings();
-
-               return array(
-                       'success' => TRUE,
-                       'data' => array(
-                               'display_unchecked' => $settings['display_unchecked'],
-                               'fe_u' => $settings['fe_u'],
-                               'fe_p' => $settings['fe_p'],
-                               'selectedMirror' => $settings['selectedMirror'],
-                               'selectedRepository' => $settings['selectedRepository'],
-                       )
-               );
-       }
-
-       /**
-        * Save settings from form submit
-        *
-        * @formHandler
-        * @param array $parameter
-        * @return array
-        */
-       public function settingsFormSubmit($parameter) {
-               $settings = $this->getSettingsObject()->saveSettings(array(
-                       'display_unchecked' => isset($parameter['display_unchecked']),
-                       'fe_u' => $parameter['fe_u'],
-                       'fe_p' => $parameter['fe_p'],
-                       'selectedMirror' => $parameter['selectedMirror'],
-                       'selectedRepository' => $parameter['selectedRepository'],
-               ));
-               return array(
-                       'success' => TRUE,
-                       'data' => $parameter,
-                       'settings' => $settings
-               );
-       }
-
-
-       /*********************************************************************/
-       /* EM Tools                                                          */
-       /*********************************************************************/
-
-       /**
-        * Upload an extension
-        *
-        * @formHandler
-        *
-        * @access  public
-        * @param $parameter composed parameter from $POST and $_FILES
-        * @return  array status
-        */
-       public function uploadExtension($parameter) {
-               $uploadedTempFile = isset($parameter['extfile']) ? $parameter['extfile'] : t3lib_div::upload_to_tempfile($parameter['extupload-path']['tmp_name']);
-               $location = ($parameter['loc'] === 'G' || $parameter['loc'] === 'S') ? $parameter['loc'] : 'L';
-               $uploadOverwrite = $parameter['uploadOverwrite'] ? TRUE : FALSE;
-
-               $install = t3lib_div::makeInstance('tx_em_Install', $this);
-               $this->extensionList = t3lib_div::makeInstance('tx_em_Extensions_List', $this);
-               $this->extensionDetails = t3lib_div::makeInstance('tx_em_Extensions_Details', $this);
-
-               $upload = $install->uploadExtensionFile($uploadedTempFile, $location, $uploadOverwrite);
-
-               if ($upload[0] === FALSE) {
-                       return array(
-                               'success' => FALSE,
-                               'error' => $upload[1]
-                       );
-               }
-
-               $extKey = $upload[1][0]['extKey'];
-               $version = '';
-               $dontDelete = TRUE;
-               $result = $install->installExtension($upload[1], $location, $version, $uploadedTempFile, $dontDelete);
-               return array(
-                       'success' => TRUE,
-                       'data' => $result,
-                       'extKey' => $extKey
-               );
-
-       }
-
-       /**
-        * Enables an extension
-        *
-        * @param  $extensionKey
-        * @return void
-        */
-       public function enableExtension($extensionKey) {
-               $this->extensionList = t3lib_div::makeInstance('tx_em_Extensions_List', $this);
-               $install = t3lib_div::makeInstance('tx_em_Install', $this);
-
-               list($installedList,) = $this->extensionList->getInstalledExtensions();
-               $newExtensionList = $this->extensionList->addExtToList($extensionKey, $installedList);
-
-               $install->writeNewExtensionList($newExtensionList);
-               tx_em_Tools::refreshGlobalExtList();
-               $install->forceDBupdates($extensionKey, $installedList[$extensionKey]);
-       }
-
-       /**
-        * Disables (uninstalls) an extension
-        *
-        * @param string $extensionKey Extension to uninstall
-        * @return void
-        */
-       public function disableExtension($extensionKey) {
-               /** @var tx_em_Extensions_List */
-               $this->extensionList = t3lib_div::makeInstance('tx_em_Extensions_List', $this);
-               /** @var $install tx_em_Install */
-               $install = t3lib_div::makeInstance('tx_em_Install', $this);
-
-               list($installedList,) = $this->extensionList->getInstalledExtensions();
-               $newExtensionList = $this->extensionList->removeExtFromList($extensionKey, $installedList);
-
-               $install->writeNewExtensionList($newExtensionList);
-               tx_em_Tools::refreshGlobalExtList();
-       }
-
-       /**
-        * Reset all states for current user
-        *
-        * @return void
-        */
-       public function resetStates() {
-               unset($GLOBALS['BE_USER']->uc['moduleData']['tools_em']['States']);
-               $GLOBALS['BE_USER']->writeUC($GLOBALS['BE_USER']->uc);
-               return array('success' => TRUE);
-       }
-
-       /**
-        * Gets the mirror url from selected mirror
-        *
-        * @param  $repositoryId
-        * @return string
-        */
-       protected function getMirrorUrl($repositoryId) {
-               $settings = $this->getSettings();
-               /** @var $objRepository  tx_em_Repository */
-               $objRepository = t3lib_div::makeInstance('tx_em_Repository', $repositoryId);
-               /** @var $objRepositoryUtility  tx_em_Repository_Utility */
-               $objRepositoryUtility = t3lib_div::makeInstance('tx_em_Repository_Utility', $objRepository);
-               $mirrors = $objRepositoryUtility->getMirrors(TRUE)->getMirrors();
-
-               if ($settings['selectedMirror'] == '') {
-                       $randomMirror = array_rand($mirrors);
-                       $mirrorUrl = $mirrors[$randomMirror]['host'] . $mirrors[$randomMirror]['path'];
-               } else {
-                       foreach($mirrors as $mirror) {
-                               if ($mirror['host'] == $settings['selectedMirror']) {
-                                       $mirrorUrl = $mirror['host'] . $mirror['path'];
-                                       break;
-                               }
-                       }
-               }
-
-               return 'http://' . $mirrorUrl;
-       }
-
-       /**
-        * Resolves the filter settings from repository list and makes a whereClause
-        *
-        * @param  array  $parameter
-        * @return string additional whereClause
-        */
-       protected function makeFilterQuery($parameter) {
-               $where = '';
-               $filter = $found = array();
-
-               foreach ($parameter as $key => $value) {
-                       if (substr($key, 0, 6) === 'filter') {
-                               eval('$' . $key . ' = \'' . $value . '\';');
-                       }
-               }
-
-               if (count($filter)) {
-                       foreach ($filter as $value) {
-                               switch ($value['data']['type']) {
-                                       case 'list':
-                                               if ($value['field'] === 'statevalue') {
-                                                       $where .= ' AND cache_extensions.state IN(' . htmlspecialchars($value['data']['value']) . ')';
-                                               }
-                                               if ($value['field'] === 'category') {
-                                                       $where .= ' AND cache_extensions.category IN(' . htmlspecialchars($value['data']['value']) . ')';
-                                               }
-                                       break;
-                                       default:
-                                               $quotedSearch = $GLOBALS['TYPO3_DB']->escapeStrForLike(
-                                                       $GLOBALS['TYPO3_DB']->quoteStr($value['data']['value'], 'cache_extensions'),
-                                                       'cache_extensions'
-                                               );
-                                               $where .= ' AND cache_extensions.' . htmlspecialchars($value['field']) . ' LIKE "%' . $quotedSearch . '%"';
-                               }
-                       }
-               }
-               return $where;
-       }
-
-       /**
-        * Replace links that are created with t3lib_div::linkThisScript to point to module
-        *
-        * @param  string  $string
-        * @return string
-        */
-       protected function replaceLinks($string) {
-               return str_replace(
-                       'ajax.php?ajaxID=ExtDirect%3A%3Aroute&amp;namespace=TYPO3.EM',
-                       'mod.php?M=tools_em',
-                       $string
-               );
-       }
-
-       /**
-        * Get the selected repository
-        *
-        * @return array
-        */
-       protected function getSelectedRepository() {
-               $settings = $this->getSettings();
-               $repositories = tx_em_Database::getRepositories();
-               $selectedRepository = array();
-
-               foreach ($repositories as $uid => $repository) {
-                       if ($repository['uid'] == $settings['selectedRepository']) {
-                               $selectedRepository = array(
-                                       'title' => $repository['title'],
-                                       'uid' => $repository['uid'],
-                                       'description' => $repository['description'],
-                                       'wsdl_url' => $repository['wsdl_url'],
-                                       'mirror_url' => $repository['mirror_url'],
-                                       'count' => $repository['extCount'],
-                                       'updated' => $repository['lastUpdated'] ? date('d/m/Y H:i', $repository['lastUpdated']) : 'never',
-                                       'selected' => $repository['uid'] === $settings['selectedRepository'],
-                               );
-                       }
-               }
-
-               return $selectedRepository;
-       }
-
-       /**
-        * Gets file info for ExtJs tree node
-        *
-        * @param  $file
-        * @return array
-        */
-       protected function getFileInfo($file) {
-               $unknownType = $GLOBALS['LANG']->sL('LLL:EXT:em/language/locallang.xml:ext_details_file_unknownType');
-               $imageType = $GLOBALS['LANG']->sL('LLL:EXT:em/language/locallang.xml:ext_details_file_imageType');
-               $textType = $GLOBALS['LANG']->sL('LLL:EXT:em/language/locallang.xml:ext_details_file_textType');
-               $extType = $GLOBALS['LANG']->sL('LLL:EXT:em/language/locallang.xml:ext_details_file_extType');
-
-               $editTypes = explode(',', $GLOBALS['TYPO3_CONF_VARS']['SYS']['textfile_ext']);
-               $imageTypes = array('gif', 'jpg', 'png');
-
-               $fileExt = '';
-               $type = '';
-               $cls = t3lib_iconWorks::mapFileExtensionToSpriteIconClass('');
-               if (strrpos($file, '.') !== FALSE) {
-                       $fileExt = strtolower(substr($file, strrpos($file, '.') + 1));
-               }
-
-               if ($fileExt && in_array($fileExt, $imageTypes) || in_array($fileExt, $editTypes)) {
-                       $cls = t3lib_iconWorks::mapFileExtensionToSpriteIconClass($fileExt);
-                       $type = in_array($fileExt, $imageTypes) ? 'image' : 'text';
-               }
-
-               if (t3lib_div::strtolower($file) === 'changelog') {
-                       $cls = t3lib_iconWorks::mapFileExtensionToSpriteIconClass('txt');
-                       $type = 'text';
-               }
-
-               switch($type) {
-                       CASE 'image':
-                               $label = $imageType;
-                       break;
-                       CASE 'text':
-                               $label = $textType;
-                       break;
-                       default:
-                               $label = $fileExt ? sprintf($extType, $fileExt) : $unknownType;
-               }
-
-               return array(
-                       htmlspecialchars($file),
-                       $label,
-                       htmlspecialchars($fileExt),
-                       $type,
-                       $cls
-               );
-
-       }
-
-
-       /**
-        * File operations like delete, copy, move
-        * @param  $file commandMap, @see
-        * @return
-        */
-       protected function fileOperation($file) {
-               $mount = array(0 => array(
-                       'name' => 'root',
-                       'path' => PATH_site,
-                       'type' => ''
-               ));
-               $files = array(0 => array(
-                       'webspace' => array('allow' => '*', 'deny' => ''),
-                       'ftpspace' => array('allow' => '*', 'deny' => '')
-               ));
-               $fileProcessor = t3lib_div::makeInstance('t3lib_extFileFunctions');
-               $fileProcessor->init($mount, $files);
-               $fileProcessor->init_actionPerms($GLOBALS['BE_USER']->getFileoperationPermissions());
-               $fileProcessor->dontCheckForUnique = 0;
-
-                       // Checking referer / executing:
-               $refInfo = parse_url(t3lib_div::getIndpEnv('HTTP_REFERER'));
-               $httpHost = t3lib_div::getIndpEnv('TYPO3_HOST_ONLY');
-               if ($httpHost != $refInfo['host']
-                       && $this->vC != $GLOBALS['BE_USER']->veriCode()
-                       && !$GLOBALS['TYPO3_CONF_VARS']['SYS']['doNotCheckReferer']
-                       && $GLOBALS['CLIENT']['BROWSER'] != 'flash') {
-                       $fileProcessor->writeLog(0, 2, 1, 'Referer host "%s" and server host "%s" did not match!', array($refInfo['host'], $httpHost));
-               } else {
-                       $fileProcessor->start($file);
-                       $fileData = $fileProcessor->processData();
-               }
-
-               return $fileData;
-       }
-}
-?>
\ No newline at end of file
diff --git a/typo3/sysext/em/classes/connection/class.tx_em_connection_extdirectsoap.php b/typo3/sysext/em/classes/connection/class.tx_em_connection_extdirectsoap.php
deleted file mode 100644 (file)
index 5963a3c..0000000
+++ /dev/null
@@ -1,405 +0,0 @@
-<?php
-/***************************************************************
- *  Copyright notice
- *
- *  (c) 2010 Steffen Kamper <steffen@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!
- ***************************************************************/
-
-/**
- * ExtDirect connection for SOAP
- *
- * @author Steffen Kamper <steffen@typo3.org>
- * @package TYPO3
- * @subpackage em
- */
-class tx_em_Connection_ExtDirectSoap {
-       /**
-        * @var tx_em_Repository
-        */
-       var $repository;
-
-       /**
-        * @var tx_em_Connection_Soap
-        */
-       var $soap = NULL;
-
-
-       /**
-        * Keeps instance of settings class.
-        *
-        * @var tx_em_Settings
-        */
-       static protected $objSettings;
-
-       /**
-        * @var array
-        */
-       protected $settings;
-
-       /**
-        * @var array
-        */
-       protected $accountData = NULL;
-
-       /**
-        * Constructor
-        */
-       public function __construct() {
-               $this->settings = $this->getSettingsObject()->getSettings();
-               /** @var $repository tx_em_Repository */
-               $this->repository = t3lib_div::makeInstance('tx_em_Repository', $this->settings['selectedRepository']);
-
-               if (isset($this->settings['fe_u']) && isset($this->settings['fe_p']) && $this->settings['fe_u'] !== '' && $this->settings['fe_p'] !== '' ) {
-                       $this->setAccountData($this->settings['fe_u'], $this->settings['fe_p']);
-               }
-       }
-
-       /**
-        * Show Info of extension record
-        *
-        * @param  array $record
-        * @return string
-        */
-       public function showRemoteExtInfo($record) {
-               return t3lib_utility_Debug::viewArray(array($record, $this->settings));
-       }
-
-       /**
-        * Checks validity of extension key
-        *
-        * @formHandler
-        * @param  array $parameter
-        * @return array
-        */
-       public function checkExtensionkey($parameter) {
-               $this->initSoap();
-               $params = array(
-                       'extensionKey' => $parameter['extkey']
-               );
-               $result = $this->soapCall('checkExtensionKey', $params);
-               $message = $this->getSoapResultMessageFromCode($result['resultCode']);
-               if ($result['resultCode'] == 10501) {
-                       $return =  array(
-                               'success' => TRUE,
-                               'message' => $message,
-                               'valid' => TRUE,
-                               'raw' => $result
-                       );
-               } else {
-                       $return =  array(
-                               'success' => FALSE,
-                               'message' => $message,
-                               'raw' => $result
-                       );
-               }
-
-               return $return;
-       }
-
-       /**
-        * Register extension key
-        *
-        * @formHandler
-        * @param  array $parameter
-        * @return array
-        */
-       public function registerExtensionkey($parameter) {
-               $this->initSoap();
-               $params = array(
-                       'registerExtensionKeyData' => array(
-                               'extensionKey' => $parameter['extkey'],
-                               'title' => $parameter['title'],
-                               'description' => $parameter['description']
-                       )
-               );
-               $result = $this->soapCall('registerExtensionKey', $params);
-               $message = $this->getSoapResultMessageFromCode($result['resultCode']);
-
-               if ($result['resultCode'] == 10503) {
-                       $return =  array(
-                               'success' => TRUE,
-                               'message' => $message,
-                               'valid' => TRUE,
-                               'raw' => $result
-                       );
-               } else {
-                       $return =  array(
-                               'success' => FALSE,
-                               'message' => $message,
-                               'raw' => $result
-                       );
-               }
-
-               return $return;
-       }
-
-       /**
-        * Get own extensions
-        *
-        * @return array
-        */
-       public function getExtensions() {
-               $this->initSoap();
-               $params = array(
-                       'extensionKeyFilterOptions' => array(
-                               'username' => $this->settings['fe_u']
-                       )
-               );
-               $result = $this->soapCall('getExtensionKeys', $params);
-               $data = $this->addUploads($result['extensionKeyData']);
-
-               if ($result['simpleResult']['resultCode'] == 10000 && $data !== NULL) {
-                       $return =  array(
-                               'success' => TRUE,
-                               'total' => count($result['extensionKeyData']),
-                               'data' => $data,
-                               'raw' => $result
-                       );
-               } else {
-                       $return =  array(
-                               'success' => FALSE,
-                               'raw' => $result
-                       );
-               }
-
-               return $return;
-       }
-
-       /**
-        * Delete extension key
-        *
-        * @param  string $key
-        * @return array
-        */
-       public function deleteExtensionKey($key) {
-               $this->initSoap();
-               $params = array(
-                       'extensionKey' => $key
-               );
-               $result = $this->soapCall('deleteExtensionKey', $params);
-               $message = $this->getSoapResultMessageFromCode($result['resultCode']);
-
-               if ($result['resultCode'] == 10000) {
-                       $return =  array(
-                               'success' => TRUE,
-                               'message' => $this->getSoapResultMessageFromCode(10505), // TER API doesn't send correct result code
-                               'key' => $key
-                       );
-               } else {
-                       $return =  array(
-                               'success' => FALSE,
-                               'message' => $message,
-                               'key' => $key
-                       );
-               }
-
-               return $return;
-       }
-
-       /**
-        * Transfer extension key to other user
-        *
-        * @param  $key
-        * @param  $user
-        * @return array
-        */
-       public function transferExtensionKey($key, $user) {
-               $this->initSoap();
-               $params = array(
-                       'modifyExtensionKeyData' => array(
-                               'extensionKey' => $key,
-                               'ownerUsername' => $user
-                       )
-               );
-               $result = $this->soapCall('modifyExtensionKey', $params);
-               $message = $this->getSoapResultMessageFromCode($result['resultCode']);
-
-               if ($result['resultCode'] == 10000) {
-                       $return =  array(
-                               'success' => TRUE,
-                               'message' => $message,
-                               'key' => $key,
-                               'user' => $user
-                       );
-               } else {
-                       $return =  array(
-                               'success' => FALSE,
-                               'message' => $message,
-                               'key' => $key,
-                               'user' => $user
-                       );
-               }
-
-               return $return;
-       }
-
-
-       /*
-        * protected class functions
-        */
-
-       /**
-        * Sets the account data
-        *
-        * @param  string  $user
-        * @param  string  $password
-        * @return void
-        */
-       protected function setAccountData($user, $password) {
-               $this->accountData = array(
-                       'accountData' => array(
-                               'username' => $user,
-                               'password' => $password
-                       )
-               );
-       }
-
-       /**
-        * Init soap
-        *
-        * @return void
-        */
-       protected function initSoap() {
-               if(!is_object($this->soap) || !($this->soap instanceof tx_em_Connection_Soap)) {
-                       if ($this->repository->getWsdlUrl()) {
-                                       /** @var $soap tx_em_Connection_Soap */
-                               $this->soap = t3lib_div::makeInstance('tx_em_Connection_Soap');
-                               $this->soap->init(
-                                       array(
-                                               'wsdl' => $this->repository->getWsdlUrl(),
-                                               'soapoptions' => array(
-                                                       'trace' => 1,
-                                                       'exceptions' => 1
-                                               )
-                                       ),
-                                       $this->settings['fe_u'],
-                                       $this->settings['fe_p']
-                               );
-                       }
-               }
-       }
-
-       /**
-        * @param  $data
-        * @return bool|NULL|string|tx_em_Settings|unknown
-        */
-       protected function addUploads($data) {
-               if (count((array) $data) === 0) {
-                       return NULL;
-               }
-
-               foreach ($data as $key => $extkey) {
-                       $row = $GLOBALS['TYPO3_DB']->exec_SELECTgetSingleRow(
-                               'extkey, count(version) as uploads',
-                               'cache_extensions',
-                               'extkey=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($extkey['extensionkey'], 'cache_extensions') . ' AND repository=1',
-                               'extkey'
-                       );
-                       $data[$key]['uploads'] = intval($row['uploads']);
-                       $data[$key]['hasUploads'] = (intval($row['uploads']) > 0);
-               }
-
-               return $data;
-       }
-       /**
-        * Get settings object
-        *
-        * @return tx_em_Settings
-        */
-       protected function getSettingsObject() {
-               if (!is_object(self::$objSettings) && !(self::$objSettings instanceof tx_em_Settings)) {
-                       self::$objSettings = t3lib_div::makeInstance('tx_em_Settings');
-               }
-               return self::$objSettings;
-       }
-
-       /**
-        * Executes a soap call
-        *
-        * @param  $name
-        * @param  $params
-        * @return string $response
-        */
-       protected function soapCall($name, $params) {
-               if (!is_object($this->soap)) {
-                       return array(
-                               'success' => FALSE,
-                               'error' => $GLOBALS['LANG']->sL('LLL:EXT:em/language/locallang.xml:msg_noUserLoginData')
-                       );
-               }
-
-               try {
-                       $response = $this->soap->call(
-                               $name,
-                               array_merge($this->accountData, $params),
-                               $this->accountData['accountData']['username'],
-                               $this->accountData['accountData']['password']
-                       );
-                       return $response;
-               } catch (SoapFault $error) {
-                       return array(
-                               'success' => FALSE,
-                               'error' => $error->faultstring
-                       );
-               }
-       }
-
-       /**
-        * Translates SOAP return codes to messages
-        *
-        * @param  int $code
-        * @return string
-        */
-       protected function getSoapResultMessageFromCode($code) {
-               switch ($code) {
-                       case 10000:
-                               return $GLOBALS['LANG']->sL('LLL:EXT:em/language/locallang.xml:msg_ok');
-                       break;
-                       case 102:
-                               return $GLOBALS['LANG']->sL('LLL:EXT:em/language/locallang.xml:msg_userNotExists');
-                       break;
-                       case 10500:
-                               return $GLOBALS['LANG']->sL('LLL:EXT:em/language/locallang.xml:msg_extkexExists');
-                       break;
-                       case 10501:
-                               return $GLOBALS['LANG']->sL('LLL:EXT:em/language/locallang.xml:msg_extkexNotExists');
-                       break;
-                       case 10502:
-                               return $GLOBALS['LANG']->sL('LLL:EXT:em/language/locallang.xml:msg_extkexNotValid');
-                       break;
-                       case 10503:
-                               return $GLOBALS['LANG']->sL('LLL:EXT:em/language/locallang.xml:msg_extkexRegistered');
-                       break;
-                       case 10504:
-                               return $GLOBALS['LANG']->sL('LLL:EXT:em/language/locallang.xml:msg_extkexUploadedSuccess');
-                       break;
-                       case 10505:
-                               return $GLOBALS['LANG']->sL('LLL:EXT:em/language/locallang.xml:msg_extkexDeletedSuccess');
-                       break;
-                       default:
-                               return $GLOBALS['LANG']->sL('LLL:EXT:em/language/locallang.xml:msg_unknownError');
-
-               }
-       }
-}
-?>
\ No newline at end of file
diff --git a/typo3/sysext/em/classes/connection/class.tx_em_connection_soap.php b/typo3/sysext/em/classes/connection/class.tx_em_connection_soap.php
deleted file mode 100644 (file)
index 7e8e579..0000000
+++ /dev/null
@@ -1,275 +0,0 @@
-<?php
-/* **************************************************************
-*  Copyright notice
-*
-*  (c) webservices.nl
-*  (c) 2006-2010 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!
-***************************************************************/
-
-/**
- * Connection class for SOAP
- *
- * @author Karsten Dambekalns <karsten@typo3.org>
- * @package TYPO3
- * @subpackage em
- */
-class tx_em_Connection_Soap {
-       /**
-        * valid options passed to the constructor :
-        * wsdl            : The WSDL location, can be a local file location or
-        *                                an URL.
-        * soapoptions  : Associative array of SOAP options to be passed to
-        *                                the SOAP implementation constructor, only used for
-        *                                the phpsoap implement.
-        * authentication : method of authentication :
-        *                                'headers'   soap headers are used
-        *                                'prefix'      function prefixes are used
-        * prefix                : optional prefix to be put in front of all methods.
-        * format                : Which type of return structure :
-        *                                'object'      PHP objects
-        *                                'array'        PHP arrays, default
-        */
-       var $options = array();
-
-       /**
-        * SOAP client, instance of PHP SOAP class
-        *
-        * @var SoapClient
-        */
-       var $client = FALSE;
-
-       var $error = FALSE;
-       var $username = FALSE;
-       var $password = FALSE;
-       var $reactid = FALSE;
-
-       /**
-        * Init Soap
-        *
-        * @param       array           $options
-        * @param       string          $username
-        * @param       string          $password
-        * @return      [type]          ...
-        */
-       function init($options = FALSE, $username = FALSE, $password = FALSE) {
-               if ($username !== FALSE) {
-                       if ($password === FALSE) {
-                               $this->reactid = $username;
-                       } else {
-                               $this->username = $username;
-                               $this->password = $password;
-                       }
-               }
-
-               $options['format'] = $options['format'] == 'object' ? 'object' : 'array';
-
-               if ($options !== FALSE) {
-                       $this->options = (array) $options;
-               }
-
-               if (defined('SOAP_1_2')) {
-                       $this->client = new SoapClient($options['wsdl'], (array) $options['soapoptions']);
-               } else {
-                       $this->client = FALSE;
-                       throw new RuntimeException('PHP soap extension not available', 1333754714);
-               }
-       }
-
-       /**
-        * Login
-        *
-        * @param       string          $username
-        * @param       string          $password
-        * @return      mixed           FALSE on failure, $reactid on success
-        */
-       function login($username, $password) {
-               $reactid = $this->call('login', array('username' => $username, 'password' => $password));
-
-               if ($this->error) {
-                       return FALSE;
-               }
-
-               $this->reactid = $reactid;
-               $this->username = $username;
-               $this->password = FALSE;
-
-               return $reactid;
-       }
-
-       /**
-        * Logout
-        *
-        * @return      unknown
-        */
-       function logout() {
-               $this->call('logout');
-               $this->reactid = FALSE;
-               if ($this->error) {
-                       return FALSE;
-               }
-               return TRUE;
-       }
-
-
-       /**
-        * Soapcall
-        *
-        * @param       unknown_type            $func
-        * @param       unknown_type            $param
-        * @param       unknown_type            $username
-        * @param       unknown_type            $password
-        * @return      unknown
-        */
-       function call($func, $param = array(), $username = FALSE, $password = FALSE) {
-               if (!$this->client) {
-                       $this->error = sprintf(
-                               'Error in %s: No soap client implementation found. ' .
-                                               'Make sure PHP soap extension is available!', __FILE__);
-                       return FALSE;
-               }
-
-               if ($username !== FALSE) {
-                       if ($password === FALSE) {
-                               $this->reactid = $username;
-                       } else {
-                               $this->username = $username;
-                               $this->password = $password;
-                       }
-               }
-
-               if ($this->options['authentication'] == 'prefix') {
-                       $param = array_merge(array('reactid' => $this->reactid), $param);
-               }
-
-               if ($this->options['prefix']) {
-                       $func = $this->options['prefix'] . ucfirst($func);
-               }
-               $this->error = FALSE;
-
-               return $this->callPhpSOAP($func, $param);
-       }
-
-       /**
-        * Call php soap
-        *
-        * @param       unknown_type            $func
-        * @param       unknown_type            $param
-        * @return      unknown
-        */
-       function callPhpSOAP($func, $param) {
-               $header = NULL;
-               if ($this->options['authentication'] == 'headers') {
-                       if ($this->reactid) {
-                               $header = new SoapHeader(
-                                       '', 'HeaderAuthenticate',
-                                       (object) array('reactid' => $this->reactid), 1
-                               );
-                       } elseif ($this->username && $this->password) {
-                               $header = new SoapHeader(
-                                       '', 'HeaderLogin',
-                                       (object) array(
-                                               'username' => $this->username,
-                                               'password' => $this->password
-                                       ), 1
-                               );
-                               $this->password = FALSE;
-                       }
-               }
-
-               $result = $this->client->__soapCall($func, $param, NULL, $header);
-
-               if (is_soap_fault($result)) {
-                       $this->error = $result;
-                       return FALSE;
-               }
-
-               if (is_a($this->client->headersIn['HeaderAuthenticate'], 'stdClass')) {
-                       $this->reactid = $this->client->headersIn['HeaderAuthenticate']->reactid;
-               }
-
-               return $this->options['format'] == 'object' ? $result : $this->object2array($result);
-       }
-
-       /**
-        * Convert object to array
-        *
-        * @param       object  $object
-        * @return      array
-        */
-       function object2array($object) {
-               if (!is_object($object) && !is_array($object)) {
-                       return $object;
-               }
-
-               $array = (array) $object;
-               foreach ($array as $key => $value) {
-                       $array[$key] = $this->object2array($value);
-               }
-               return $array;
-       }
-
-       /**
-        * Convert array to object
-        *
-        * @param       unknown_type            $array
-        * @return      unknown
-        */
-       function array2object($array) {
-               if (!is_array($array)) {
-                       return $array;
-               }
-
-               foreach ($array as $key => $value) {
-                       $array[$key] = $this->array2object($value);
-               }
-               return (object) $array;
-       }
-
-       /**
-        * Get last request.
-        *
-        * @return      unknown
-        */
-       function lastRequest() {
-               return $this->client->__getLastRequest();
-       }
-
-       /**
-        * Get last response
-        *
-        * @return      unknown
-        */
-       function lastResponse() {
-               $this->client->__getLastResponse();
-       }
-
-       /**
-        * Get available functions
-        *
-        * @return      unknown
-        */
-       function getFunctions() {
-               return $this->client->__getFunctions();
-       }
-}
-?>
\ No newline at end of file
diff --git a/typo3/sysext/em/classes/connection/class.tx_em_connection_ter.php b/typo3/sysext/em/classes/connection/class.tx_em_connection_ter.php
deleted file mode 100644 (file)
index 0e78d49..0000000
+++ /dev/null
@@ -1,376 +0,0 @@
-<?php
-/* **************************************************************
-*  Copyright notice
-*
-*  (c) 1999-2010 Kasper Skårhøj (kasperYYYY@typo3.com)
-*  (c) 2006-2010 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!
-***************************************************************/
-
-
-/**
- * TER2 connection handling class for the TYPO3 Extension Manager.
- *
- * It contains methods for downloading and uploading extensions and related code
- *
- * @author Karsten Dambekalns <karsten@typo3.org>
- * @author     Kasper Skårhøj <kasperYYYY@typo3.com>
- * @package TYPO3
- * @subpackage em
- */
-class tx_em_Connection_Ter {
-       var $wsdlURL;
-
-       /**
-        * Extension manager module
-        *
-        * @var SC_mod_tools_em_index
-        */
-       var $emObj;
-
-       public function __construct($emObj) {
-               $this->emObj = $emObj;
-       }
-
-       /**
-        * Fetches an extension from the given mirror
-        *
-        * @param       string          $extKey Extension Key
-        * @param       string          $version        Version to install
-        * @param       string          $expectedMD5    Expected MD5 hash of extension file
-        * @param       string          $mirrorURL      URL of mirror to use
-        * @return      mixed           T3X data (array) or error message (string)
-        */
-       function fetchExtension($extKey, $version, $expectedMD5, $mirrorURL) {
-               $extPath = t3lib_div::strtolower($extKey);
-               $mirrorURL .= $extPath{0} . '/' . $extPath{1} . '/' . $extPath . '_' . $version . '.t3x';
-               $t3x = t3lib_div::getUrl($mirrorURL, 0, array(TYPO3_user_agent));
-               $MD5 = md5($t3x);
-
-               if ($t3x === FALSE) {
-                       return sprintf('The T3X file "%s" could not be fetched. Possible reasons: network problems, allow_url_fopen is off, cURL is not enabled in Install Tool.', $mirrorURL);
-               }
-
-               if ($MD5 == $expectedMD5) {
-                       // Fetch and return:
-                       return $this->decodeExchangeData($t3x);
-               } else {
-                       return 'Error: MD5 hash of downloaded file not as expected:<br />' . $MD5 . ' != ' . $expectedMD5;
-               }
-       }
-
-       /**
-        * Fetches an extensions l10n file from the given mirror
-        *
-        * @param string $extKey        Extension Key
-        * @param string $lang  The language code of the translation to fetch
-        * @param string $mirrorURL     URL of mirror to use
-        * @return mixed        Array containing l10n data or error message (string)
-        */
-       function fetchTranslation($extKey, $lang, $mirrorURL) {
-               $extPath = t3lib_div::strtolower($extKey);
-               $mirrorURL .= $extPath{0} . '/' . $extPath{1} . '/' . $extPath . '-l10n/' . $extPath . '-l10n-' . $lang . '.zip';
-               $l10n = t3lib_div::getUrl($mirrorURL, 0, array(TYPO3_user_agent));
-
-               if ($l10n !== FALSE) {
-                       return array($l10n);
-               } else {
-                       return 'Error: Translation could not be fetched.';
-               }
-       }
-
-       /**
-        * Install translations for all selected languages for an extension
-        *
-        * @param string $extKey                The extension key to install the translations for
-        * @param string $lang          Language code of translation to fetch
-        * @param string $mirrorURL             Mirror URL to fetch data from
-        * @return mixed        TRUE on success, error string on fauilure
-        */
-       function updateTranslation($extKey, $lang, $mirrorURL) {
-               $l10n = $this->fetchTranslation($extKey, $lang, $mirrorURL);
-               if (is_array($l10n)) {
-                       $file = PATH_site . 'typo3temp' . DIRECTORY_SEPARATOR . $extKey . '-l10n-' . $lang . '.zip';
-                       $path = 'l10n' . DIRECTORY_SEPARATOR . $lang . DIRECTORY_SEPARATOR;
-                       if (!is_dir(PATH_typo3conf . $path)) {
-                               t3lib_div::mkdir_deep(PATH_typo3conf, $path);
-                       }
-                       t3lib_div::writeFile($file, $l10n[0]);
-
-                       t3lib_div::rmdir(PATH_typo3conf . $path . $extKey, TRUE);
-
-                       if (tx_em_Tools::unzip($file, PATH_typo3conf . $path)) {
-                               t3lib_div::fixPermissions(PATH_typo3conf . $path, TRUE);
-                               return TRUE;
-                       }
-               }
-               return FALSE;
-       }
-
-       /**
-        * Fetches extension l10n status from the given mirror
-        *
-        * @param string         $extKey        Extension Key
-        * @param string         $mirrorURL     URL of mirror to use
-        * @return mixed        Array containing l10n status data or FALSE if no status could be fetched
-        */
-       function fetchTranslationStatus($extKey, $mirrorURL) {
-               $extPath = t3lib_div::strtolower($extKey);
-               $mirrorURL .= $extPath{0} . '/' . $extPath{1} . '/' . $extPath . '-l10n/' . $extPath . '-l10n.xml';
-               $remote = t3lib_div::getUrl($mirrorURL, 0, array(TYPO3_user_agent));
-
-               if ($remote !== FALSE) {
-                       $parsed = $this->emObj->xmlHandler->parseL10nXML($remote);
-                       return $parsed['languagePackIndex'];
-               }
-
-               return FALSE;
-       }
-
-       /**
-        * Decode server data
-        * This is information like the extension list, extension information etc., return data after uploads (new em_conf)
-        *
-        * @param       string          Data stream from remove server
-        * @return      mixed           On success, returns an array with data array and stats array as key 0 and 1. Otherwise returns error string
-        * @see fetchServerData(), processRepositoryReturnData()
-        */
-       function decodeServerData($externalData) {
-               $parts = explode(':', $externalData, 4);
-               $dat = base64_decode($parts[2]);
-               // compare hashes ignoring any leading whitespace. See bug #0000365.
-               if (ltrim($parts[0]) == md5($dat)) {
-                       if ($parts[1] == 'gzcompress') {
-                               if (function_exists('gzuncompress')) {
-                                       $dat = gzuncompress($dat);
-                               } else {
-                                       return 'Decoding Error: No decompressor available for compressed content. gzuncompress() function is not available!';
-                               }
-                       }
-                       $listArr = unserialize($dat);
-
-                       if (is_array($listArr)) {
-                               return $listArr;
-                       } else {
-                               return 'Error: Unserialized information was not an array - strange!';
-                       }
-               } else {
-                       return 'Error: MD5 hashes in T3X data did not match!';
-               }
-       }
-
-       /**
-        * Decodes extension upload array.
-        * This kind of data is when an extension is uploaded to TER
-        *
-        * @param       string          Data stream
-        * @return      mixed           Array with result on success, otherwise an error string.
-        */
-       function decodeExchangeData($str) {
-               $parts = explode(':', $str, 3);
-               if ($parts[1] == 'gzcompress') {
-                       if (function_exists('gzuncompress')) {
-                               $parts[2] = gzuncompress($parts[2]);
-                       } else {
-                               return 'Decoding Error: No decompressor available for compressed content. gzcompress()/gzuncompress() functions are not available!';
-                       }
-               }
-               if (md5($parts[2]) == $parts[0]) {
-                       $output = unserialize($parts[2]);
-                       if (is_array($output)) {
-                               return array($output, '');
-                       } else {
-                               return 'Error: Content could not be unserialized to an array. Strange (since MD5 hashes match!)';
-                       }
-               } else {
-                       return 'Error: MD5 mismatch. Maybe the extension file was downloaded and saved as a text file by the browser and thereby corrupted!? (Always select "All" filetype when saving extensions)';
-               }
-       }
-
-
-       /**
-        * Encodes extension upload array
-        *
-        * @param       array           Array containing extension
-        * @return      string          Content stream
-        */
-       function makeUploadDataFromarray($uploadArray) {
-               $content = '';
-               if (is_array($uploadArray)) {
-                       $serialized = serialize($uploadArray);
-                       $md5 = md5($serialized);
-
-                       $content = $md5 . ':';
-                       $content .= 'gzcompress:';
-                       $content .= gzcompress($serialized);
-               }
-               return $content;
-       }
-
-       /**
-        * Upload extension to ter
-        * @param  $em
-        * @return
-        */
-       function uploadToTER($em) {
-               $uArr = $this->emObj->extensionDetails->makeUploadarray($em['extKey'], $em['extInfo']);
-               if (!is_array($uArr)) {
-                       return $uArr;
-               }
-
-               // Render new version number:
-               $newVersionBase = $em['extInfo']['EM_CONF']['version'];
-               switch ((string) $em['upload']['mode']) {
-                       case 'new_dev':
-                               $cmd = 'dev';
-                               break;
-                       case 'new_sub':
-                               $cmd = 'sub';
-                               break;
-                       case 'new_main':
-                               $cmd = 'main';
-                               break;
-                       case 'custom':
-                               $newVersionBase = $em['upload']['version'];
-                       case 'latest':
-                       default:
-                               $cmd = '';
-                               break;
-               }
-               $versionArr = tx_em_Tools::renderVersion($newVersionBase, $cmd);
-               $em['version'] = $versionArr['version'];
-
-               // Create dependency / conflict information:
-               $dependenciesArr = array();
-               $extKeysArr = $uArr['EM_CONF']['constraints']['depends'];
-
-               if (is_array($extKeysArr)) {
-                       foreach ($extKeysArr as $extKey => $version) {
-                               if (strlen($extKey)) {
-                                       $dependenciesArr[] = array(
-                                               'kind' => 'depends',
-                                               'extensionKey' => utf8_encode($extKey),
-                                               'versionRange' => utf8_encode($version),
-                                       );
-                               }
-                       }
-               }
-
-               $extKeysArr = $uArr['EM_CONF']['constraints']['conflicts'];
-               if (is_array($extKeysArr)) {
-                       foreach ($extKeysArr as $extKey => $version) {
-                               if (strlen($extKey)) {
-                                       $dependenciesArr[] = array(
-                                               'kind' => 'conflicts',
-                                               'extensionKey' => utf8_encode($extKey),
-                                               'versionRange' => utf8_encode($version),
-                                       );
-                               }
-                       }
-               }
-               // FIXME: This part must be removed, when the problem is solved on the TER-Server #5919
-               if (count($dependenciesArr) == 1) {
-                       $dependenciesArr[] = array(
-                               'kind' => 'depends',
-                               'extensionKey' => '',
-                               'versionRange' => '',
-                       );
-               }
-               // END for Bug #5919
-
-               // Compile data for SOAP call:
-               $accountData = array(
-                       'username' => $em['user']['fe_u'],
-                       'password' => $em['user']['fe_p']
-               );
-               $extensionData = array(
-                       'extensionKey' => utf8_encode($em['extKey']),
-                       'version' => utf8_encode($em['version']),
-                       'metaData' => array(
-                               'title' => utf8_encode($uArr['EM_CONF']['title']),
-                               'description' => utf8_encode($uArr['EM_CONF']['description']),
-                               'category' => utf8_encode($uArr['EM_CONF']['category']),
-                               'state' => utf8_encode($uArr['EM_CONF']['state']),
-                               'authorName' => utf8_encode($uArr['EM_CONF']['author']),
-                               'authorEmail' => utf8_encode($uArr['EM_CONF']['author_email']),
-                               'authorCompany' => utf8_encode($uArr['EM_CONF']['author_company']),
-                       ),
-                       'technicalData' => array(
-                               'dependencies' => $dependenciesArr,
-                               'loadOrder' => utf8_encode($uArr['EM_CONF']['loadOrder']),
-                               'uploadFolder' => (boolean) intval($uArr['EM_CONF']['uploadfolder']),
-                               'createDirs' => utf8_encode($uArr['EM_CONF']['createDirs']),
-                               'shy' => (boolean) intval($uArr['EM_CONF']['shy']),
-                               'modules' => utf8_encode($uArr['EM_CONF']['module']),
-                               'modifyTables' => utf8_encode($uArr['EM_CONF']['modify_tables']),
-                               'priority' => utf8_encode($uArr['EM_CONF']['priority']),
-                               'clearCacheOnLoad' => (boolean) intval($uArr['EM_CONF']['clearCacheOnLoad']),
-                               'lockType' => utf8_encode($uArr['EM_CONF']['lockType']),
-                               'docPath' => utf8_encode($uArr['EM_CONF']['docPath']),
-                       ),
-                       'infoData' => array(
-                               'codeLines' => intval($uArr['misc']['codelines']),
-                               'codeBytes' => intval($uArr['misc']['codebytes']),
-                               'codingGuidelinesCompliance' => utf8_encode($uArr['EM_CONF']['CGLcompliance']),
-                               'codingGuidelinesComplianceNotes' => utf8_encode($uArr['EM_CONF']['CGLcompliance_note']),
-                               'uploadComment' => utf8_encode($em['upload']['comment']),
-                               'techInfo' => $uArr['techInfo'],
-                       ),
-               );
-
-               $filesData = array();
-               foreach ($uArr['FILES'] as $filename => $infoArr) {
-                       $filesData[] = array(
-                               'name' => utf8_encode($infoArr['name']),
-                               'size' => intval($infoArr['size']),
-                               'modificationTime' => intval($infoArr['mtime']),
-                               'isExecutable' => intval($infoArr['is_executable']),
-                               'content' => $infoArr['content'],
-                               'contentMD5' => $infoArr['content_md5'],
-                       );
-               }
-
-               $soap = t3lib_div::makeInstance('tx_em_Connection_Soap');
-               $soap->init(array('wsdl' => $this->wsdlURL, 'soapoptions' => array('trace' => 1, 'exceptions' => 0)));
-               $response = $soap->call(
-                       'uploadExtension',
-                       array(
-                               'accountData' => $accountData,
-                               'extensionData' => $extensionData,
-                               'filesData' => $filesData
-                       )
-               );
-
-               if ($response === FALSE) {
-                       switch (TRUE) {
-                               case is_string($soap->error):
-                                       return $soap->error;
-                                       break;
-                               default:
-                                       return $soap->error->faultstring;
-                       }
-               }
-
-               return $response;
-       }
-}
-?>
\ No newline at end of file
diff --git a/typo3/sysext/em/classes/database/class.tx_em_database.php b/typo3/sysext/em/classes/database/class.tx_em_database.php
deleted file mode 100644 (file)
index 0862c13..0000000
+++ /dev/null
@@ -1,534 +0,0 @@
-<?php
-/***************************************************************
- *  Copyright notice
- *
- *  (c) 2010 Marcus Krause <marcus#exp2010@t3sec.info>
- *  (c) 2010 Steffen Kamper <info@sk-typo3.de>
- *  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.
- *
- *  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!
- ***************************************************************/
-/**
- * class.tx_em_database.php
- *
- * Module: Extension manager - DB access
- *
- * @author  Marcus Krause <marcus#exp2010@t3sec.info>
- * @author  Steffen Kamper <info@sk-typo3.de>
- */
-
-/**
- * DB access class for extension manager.
- *
- * Contains static methods for DB operations.
- *
- * @author       Marcus Krause <marcus#exp2010@t3sec.info>
- * @author       Steffen Kamper <info@sk-typo3.de>
- *
- * @since         2010-02-27
- * @package     TYPO3
- * @subpackage  EM
- */
-final class tx_em_Database {
-
-       const MULTI_LINEBREAKS = "\n\n\n";
-
-       const TABLE_REPOSITORY = 'sys_ter';
-
-       const TABLE_EXTENSION = 'cache_extensions';
-
-
-       /**
-        * Get the count of extensions in cache_extensions from a repository.
-        *
-        * If $repository parameter is obmitted, sum of all extensions will be
-        * returned.
-        *
-        * @access  public
-        * @param   integer  $repository  (optional) repository uid of extensions to count
-        * @return  integer  sum of extensions in database
-        */
-       public static function getExtensionCountFromRepository($repository = NULL) {
-               if (is_null($repository)) {
-                       return $GLOBALS['TYPO3_DB']->exec_SELECTcountRows(
-                               'DISTINCT extkey',
-                               self::TABLE_EXTENSION
-                       );
-               } else {
-                       return $GLOBALS['TYPO3_DB']->exec_SELECTcountRows(
-                               'DISTINCT extkey',
-                               self::TABLE_EXTENSION,
-                               'repository=' . intval($repository)
-                       );
-               }
-       }
-
-       /**
-        * Get extension list from cache_extensions
-        *
-        * @param int $repository
-        * @param string $addFields
-        * @param string $andWhere
-        * @param string $order
-        * @param string $limit
-        * @return array
-        */
-       public static function getExtensionListFromRepository($repository, $addFields = '', $andWhere = '', $order = '', $limit = '') {
-               $ret = array();
-               $temp = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows(
-                       'count(*) AS count',
-                       'cache_extensions',
-                       'repository=' . intval($repository) . $andWhere,
-                       'extkey'
-               );
-               $ret['count'] = count($temp);
-
-               $ret['results'] = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows(
-                       'cache_extensions.*, count(*) AS versions, cache_extensions.intversion AS maxintversion' .
-                       ($addFields === '' ? '' : ',' . $addFields),
-                       'cache_extensions JOIN cache_extensions AS ce ON cache_extensions.extkey = ce.extkey',
-                       'cache_extensions.lastversion=1 AND cache_extensions.repository=' . intval($repository) . $andWhere,
-                       'ce.extkey',
-                       $order,
-                       $limit
-               );
-
-               return $ret;
-       }
-
-       /**
-        * Get versions of extension
-        *
-        * @param int $repository
-        * @param string $extKey
-        * @return array $versions
-        */
-       public static function getExtensionVersionsFromRepository($repository, $extKey) {
-               $versions = array();
-               //TODO: implement
-               return $versions;
-       }
-
-       /**
-        * Function inserts a repository object into database.
-        *
-        * @access  public
-        * @param   tx_em_Repository $repository  repository object
-        * @return  void
-        */
-       public static function updateRepository(tx_em_Repository $repository) {
-               $repositoryData = array(
-                       'title' => $repository->getTitle(),
-                       'description' => $repository->getDescription(),
-                       'wsdl_url' => $repository->getWsdlUrl(),
-                       'mirror_url' => $repository->getMirrorListUrl(),
-                       'lastUpdated' => $repository->getLastUpdate(),
-                       'extCount' => $repository->getExtensionCount(),
-               );
-               $GLOBALS['TYPO3_DB']->exec_UPDATEquery(
-                       self::TABLE_REPOSITORY,
-                       'uid=' . $repository->getId(),
-                       $repositoryData
-               );
-
-       }
-
-
-       /**
-        * Function inserts a repository object into database.
-        *
-        * @access  public
-        * @param   tx_em_Repository $repository  repository object
-        * @return  integer  UID of the newly inserted repository object
-        */
-       public static function insertRepository(tx_em_Repository $repository) {
-               $repositoryData = array(
-                       'title' => $repository->getTitle(),
-                       'description' => $repository->getDescription(),
-                       'wsdl_url' => $repository->getWsdlUrl(),
-                       'mirror_url' => $repository->getMirrorListUrl(),
-                       'lastUpdated' => $repository->getLastUpdate(),
-                       'extCount' => $repository->getExtensionCount(),
-               );
-               $GLOBALS['TYPO3_DB']->exec_INSERTquery(
-                       self::TABLE_REPOSITORY,
-                       $repositoryData
-               );
-               return $GLOBALS['TYPO3_DB']->sql_insert_id();
-       }
-
-       /**
-        * Deletes given Repository
-        *
-        * @param  tx_em_Repository $repository  repository object
-        * @return void
-        */
-       public static function deleteRepository(tx_em_Repository $repository) {
-               $GLOBALS['TYPO3_DB']->exec_DELETEquery(
-                       self::TABLE_REPOSITORY,
-                       'uid=' . $repository->getId()
-               );
-       }
-
-       /**
-        * Updates ExtCount and lastUpdated  in Repository eg after import
-        * @param  int $extCount
-        * @param int $uid
-        * @return void
-        */
-       public static function updateRepositoryCount($extCount, $uid = 1) {
-               $GLOBALS['TYPO3_DB']->exec_UPDATEquery(
-                       self::TABLE_REPOSITORY,
-                       'uid=' . intval($uid),
-                       array (
-                               'lastUpdated' => time(),
-                               'extCount' => intval($extCount)
-                       ));
-       }
-
-       /**
-        * Insert version
-        *
-        * @param  $arrFields
-        * @return void
-        */
-       public static function insertVersion(array $arrFields) {
-               $GLOBALS['TYPO3_DB']->exec_INSERTquery(self::TABLE_EXTENSION, $arrFields);
-       }
-
-       /**
-        * Update the lastversion field after update
-        *
-        * @param int $repositoryUid
-        * @return integer
-        */
-       public static function insertLastVersion($repositoryUid = 1) {
-               $groupedRows = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows(
-                       'extkey, version, max(intversion) maxintversion',
-                       'cache_extensions',
-                       'repository=' . intval($repositoryUid),
-                       'extkey'
-               );
-               $extensions = count($groupedRows);
-
-               if ($extensions > 0) {
-                       // set all to 0
-                       $GLOBALS['TYPO3_DB']->exec_UPDATEquery(
-                               'cache_extensions',
-                               'lastversion=1 AND repository=' . intval($repositoryUid),
-                               array('lastversion' => 0)
-                       );
-
-                               // Find latest version of extensions and set lastversion to 1 for these
-                       foreach ($groupedRows as $row) {
-                               $GLOBALS['TYPO3_DB']->exec_UPDATEquery(
-                                       'cache_extensions',
-                                       'extkey=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($row['extkey'], 'cache_extensions') . ' AND intversion=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($row['maxintversion'], 'cache_extensions') . ' AND repository=' . intval($repositoryUid),
-                                       array('lastversion' => 1)
-                               );
-                       }
-               }
-
-               return $extensions;
-       }
-
-       /**
-        * Method finds and returns repository fields identified by its UID.
-        *
-        * @access  public
-        * @param   int  $uid  repository UID
-        * @return array
-        */
-       public static function getRepositoryByUID($uid) {
-               $row = $GLOBALS['TYPO3_DB']->exec_SELECTgetSingleRow('*', self::TABLE_REPOSITORY, 'uid=' . intval($uid));
-
-               return $row;
-       }
-
-       /**
-        * Method finds and returns repository identified by its title
-        *
-        * @param  $title
-        * @return array
-        */
-       public static function getRepositoryByTitle($title) {
-               return $GLOBALS['TYPO3_DB']->exec_SELECTgetRows(
-                       '*',
-                       self::TABLE_REPOSITORY,
-                       'title=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($title,
-                       self::TABLE_REPOSITORY)
-               );
-       }
-
-       /**
-        * Get available repositories
-        *
-        * @param string $where
-        * @return array
-        */
-       public static function getRepositories($where = NULL) {
-               return $GLOBALS['TYPO3_DB']->exec_SELECTgetRows(
-                       '*',
-                       self::TABLE_REPOSITORY,
-                       $where ? $where : ''
-               );
-       }
-
-       /**
-        * Dump table content
-        * Is DBAL compliant, but the dump format is written as MySQL standard. If the INSERT statements should be imported in a DBMS using other quoting than MySQL they must first be translated. t3lib_sqlengine can parse these queries correctly and translate them somehow.
-        *
-        * @param       string          Table name
-        * @param       array           Field structure
-        * @return      string          SQL Content of dump (INSERT statements)
-        */
-       protected static function dumpTableContent($table, array $fieldStructure) {
-
-               // Substitution of certain characters (borrowed from phpMySQL):
-               $search = array('\\', '\'', "\x00", "\x0a", "\x0d", "\x1a");
-               $replace = array('\\\\', '\\\'', '\0', '\n', '\r', '\Z');
-
-               $lines = array();
-
-               // Select all rows from the table:
-               $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', $table, '');
-
-               // Traverse the selected rows and dump each row as a line in the file:
-               while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result)) {
-                       $values = array();
-                       foreach ($fieldStructure as $field => $structure) {
-                               $values[] = isset($row[$field]) ? "'" . str_replace($search, $replace, $row[$field]) . "'" : 'NULL';
-                       }
-                       $lines[] = 'INSERT INTO ' . $table . ' VALUES (' . implode(', ', $values) . ');';
-               }
-
-               // Free DB result:
-               $GLOBALS['TYPO3_DB']->sql_free_result($result);
-
-               // Implode lines and return:
-               return implode(LF, $lines);
-       }
-
-       /**
-        * Gets the table and field structure from database.
-        * Which fields and which tables are determined from the ext_tables.sql file
-        *
-        * @param       string          Array with table.field values
-        * @return      array           Array of tables and fields split.
-        */
-       public static function getTableAndFieldStructure($parts) {
-                       /** @var $instObj t3lib_install_Sql */
-               $instObj = t3lib_div::makeInstance('t3lib_install_Sql');
-               $dbFields = $instObj->getFieldDefinitions_database(TYPO3_db);
-
-               $outTables = array();
-               foreach ($parts as $table) {
-                       $sub = explode('.', $table);
-                       if ($sub[0] && isset($dbFields[$sub[0]])) {
-                               if ($sub[1]) {
-                                       $key = explode('KEY:', $sub[1], 2);
-                                       if (count($key) == 2 && !$key[0]) { // key:
-                                               if (isset($dbFields[$sub[0]]['keys'][$key[1]])) {
-                                                       $outTables[$sub[0]]['keys'][$key[1]] = $dbFields[$sub[0]]['keys'][$key[1]];
-                                               }
-                                       } else {
-                                               if (isset($dbFields[$sub[0]]['fields'][$sub[1]])) {
-                                                       $outTables[$sub[0]]['fields'][$sub[1]] = $dbFields[$sub[0]]['fields'][$sub[1]];
-                                               }
-                                       }
-                               } else {
-                                       $outTables[$sub[0]] = $dbFields[$sub[0]];
-                               }
-                       }
-               }
-
-               return $outTables;
-       }
-
-       /**
-        * Makes a dump of the tables/fields definitions for an extension
-        *
-        * @param       array           Array with table => field/key definition arrays in
-        * @return      string          SQL for the table definitions
-        * @see dumpStaticTables()
-        */
-       public static function dumpTableAndFieldStructure(array $arr) {
-               $tables = array();
-
-               if (count($arr)) {
-
-                       // Get file header comment:
-                       $tables[] = self::dumpHeader();
-
-                       // Traverse tables, write each table/field definition:
-                       foreach ($arr as $table => $fieldKeyInfo) {
-                               $tables[] = self::dumpTableHeader($table, $fieldKeyInfo);
-                       }
-               }
-
-               // Return result:
-               return implode(LF . LF . LF, $tables);
-       }
-
-       /**
-        * Link to dump of database tables
-        *
-        * @param       array  $tablesArray
-        * @param       string $extKey
-        * @param       array  $additionalLinkParameter
-        * @return      string          HTML
-        */
-       public static function dumpDataTablesLine(array $tablesArray, $extKey, array $additionalLinkParameter = array()) {
-               $tables = array();
-               $tablesNA = array();
-               $allTables = array_keys($GLOBALS['TYPO3_DB']->admin_get_tables());
-
-               foreach ($tablesArray as $tableName) {
-                       if (in_array($tableName, $allTables)) {
-                               $count = $GLOBALS['TYPO3_DB']->exec_SELECTcountRows('*', $tableName);
-                               $tables[$tableName] = '<tr><td>&nbsp;</td><td>
-                                       <a class="t3-link dumpLink" href="' .
-                                               htmlspecialchars(t3lib_div::linkThisScript(
-                                                       array_merge(array(
-                                                               'CMD[dumpTables]' => $tableName,
-                                                               'CMD[showExt]' => $extKey,
-                                                       ), $additionalLinkParameter)
-                                               )) .
-                                               '" title="' .
-                                               sprintf($GLOBALS['LANG']->sL('LLL:EXT:em/language/locallang.xml:extBackup_dump_table'),
-                                                       $tableName) .
-                                               '">' . $tableName . '</a></td><td>&nbsp;&nbsp;&nbsp;</td><td>' .
-                                               sprintf($GLOBALS['LANG']->sL('LLL:EXT:em/language/locallang.xml:extBackup_number_of_records'),
-                                                       $count) . '</td></tr>';
-                       } else {
-                               $tablesNA[$tableName] = '<tr><td>&nbsp;</td><td>' . $tableName . '</td><td>&nbsp;</td><td>' .
-                                               $GLOBALS['LANG']->sL('LLL:EXT:em/language/locallang.xml:extBackup_table_not_there') . '</td></tr>';
-                       }
-               }
-               $label = '<table border="0" cellpadding="0" cellspacing="0">' .
-                               implode('', array_merge($tables, $tablesNA)) .
-                               '</table>';
-               if (count($tables)) {
-                       $label = '<a class="t3-link dumpLink" href="' .
-                                       htmlspecialchars(t3lib_div::linkThisScript(
-                                               array_merge(array(
-                                                       'CMD[dumpTables]' => implode(',', array_keys($tables)),
-                                                       'CMD[showExt]' => $extKey
-                                               ), $additionalLinkParameter)
-                                       )) .
-                                       '" title="' . $GLOBALS['LANG']->sL('LLL:EXT:em/language/locallang.xml:extBackup_dump_all_tables') . '">' .
-                                       $GLOBALS['LANG']->sL('LLL:EXT:em/language/locallang.xml:extBackup_download_all_data') . '</a><br /><br />' . $label;
-               }
-               else {
-                       $label = $GLOBALS['LANG']->sL('LLL:EXT:em/language/locallang.xml:extBackup_nothing_to_dump') . '<br /><br />' . $label;
-               }
-               return $label;
-       }
-
-       /**
-        * Dump content for static tables
-        *
-        * @param       string          Comma list of tables from which to dump content
-        * @return      string          Returns the content
-        * @see dumpTableAndFieldStructure()
-        */
-       public static function dumpStaticTables($tableList) {
-                       /** @var $instObj t3lib_install_Sql */
-               $instObj = t3lib_div::makeInstance('t3lib_install_Sql');
-               $dbFields = $instObj->getFieldDefinitions_database(TYPO3_db);
-
-               $out = '';
-               $parts = t3lib_div::trimExplode(',', $tableList, TRUE);
-
-               // Traverse the table list and dump each:
-               foreach ($parts as $table) {
-                       if (is_array($dbFields[$table]['fields'])) {
-                               $header = self::dumpHeader();
-                               $tableHeader = self::dumpTableHeader($table, $dbFields[$table], TRUE);
-                               $insertStatements = self::dumpTableContent($table, $dbFields[$table]['fields']);
-                               $out .= $header . self::MULTI_LINEBREAKS .
-                                               $tableHeader . self::MULTI_LINEBREAKS .
-                                               $insertStatements . self::MULTI_LINEBREAKS;
-                       } else {
-                               throw new RuntimeException(
-                                       'TYPO3 Fatal Error: ' . $GLOBALS['LANG']->getLL('dumpStaticTables_table_not_found'),
-                                       1270853983
-                               );
-                       }
-               }
-               unset($instObj);
-               return $out;
-       }
-
-       /**
-        * Header comments of the SQL dump file
-        *
-        * @return      string          Table header
-        */
-       protected static function dumpHeader() {
-               return trim('
-# TYPO3 Extension Manager dump 1.1
-#
-# Host: ' . TYPO3_db_host . '    Database: ' . TYPO3_db . '
-#--------------------------------------------------------
-');
-       }
-
-       /**
-        * Dump CREATE TABLE definition
-        *
-        * @param       string          Table name
-        * @param       array           Field and key information (as provided from Install Tool class!)
-        * @param       boolean         If TRUE, add "DROP TABLE IF EXISTS"
-        * @return      string          Table definition SQL
-        */
-       protected static function dumpTableHeader($table, array $fieldKeyInfo, $dropTableIfExists = FALSE) {
-               $lines = array();
-               $dump = '';
-
-               // Create field definitions
-               if (is_array($fieldKeyInfo['fields'])) {
-                       foreach ($fieldKeyInfo['fields'] as $fieldN => $data) {
-                               $lines[] = '  ' . $fieldN . ' ' . $data;
-                       }
-               }
-
-               // Create index key definitions
-               if (is_array($fieldKeyInfo['keys'])) {
-                       foreach ($fieldKeyInfo['keys'] as $fieldN => $data) {
-                               $lines[] = '  ' . $data;
-                       }
-               }
-
-               // Compile final output:
-               if (count($lines)) {
-                       $dump = trim('
-#
-# Table structure for table "' . $table . '"
-#
-' . ($dropTableIfExists ? 'DROP TABLE IF EXISTS ' . $table . ';
-' : '') . 'CREATE TABLE ' . $table . ' (
-' . implode(',' . LF, $lines) . '
-);');
-               }
-
-               return $dump;
-       }
-
-}
-
-?>
\ No newline at end of file
diff --git a/typo3/sysext/em/classes/exception/class.tx_em_connectionexception.php b/typo3/sysext/em/classes/exception/class.tx_em_connectionexception.php
deleted file mode 100644 (file)
index 55ae30a..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-<?php
-/***************************************************************
-*  Copyright notice
-*
-*  (c) 2010 Marcus Krause <marcus#exp2010@t3sec.info>
-*           Steffen Kamper <info@sk-typo3.de>
-*  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.
-*
-*  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 - connection exception
- */
-
-/**
- * Exception for internet connection handling.
- *
- * This exception is supposed to be thrown when
- * there are problems with the internet connections
- * initialized by the web server.
- *
- * @author      Marcus Krause <marcus#exp2010@t3sec.info>
- * @author      Steffen Kamper <info@sk-typo3.de>
- *
- * @since       2010-02-18
- * @package     TYPO3
- * @subpackage  EM
- */
-class tx_em_ConnectionException extends Exception {
-
-}
-?>
\ No newline at end of file
diff --git a/typo3/sysext/em/classes/exception/class.tx_em_extensionimportexception.php b/typo3/sysext/em/classes/exception/class.tx_em_extensionimportexception.php
deleted file mode 100644 (file)
index f70d374..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-<?php
-/***************************************************************
-*  Copyright notice
-*
-*  (c) 2010 Marcus Krause <marcus#exp2010@t3sec.info>
-*           Steffen Kamper <info@sk-typo3.de>
-*  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.
-*
-*  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 - Extension import exception
- */
-
-/**
- * Exception for extension import handling.
- *
- * TODO: this is currently unused
- *
- * @author      Marcus Krause <marcus#exp2010@t3sec.info>
- * @author      Steffen Kamper <info@sk-typo3.de>
- *
- * @since       2010-02-18
- * @package     TYPO3
- * @subpackage  EM
- */
-class tx_em_ExtensionImportException extends Exception {
-
-}
-?>
\ No newline at end of file
diff --git a/typo3/sysext/em/classes/exception/class.tx_em_extensionxmlexception.php b/typo3/sysext/em/classes/exception/class.tx_em_extensionxmlexception.php
deleted file mode 100644 (file)
index 65cbbdf..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-<?php
-/***************************************************************
-*  Copyright notice
-*
-*  (c) 2010 Marcus Krause <marcus#exp2010@t3sec.info>
-*           Steffen Kamper <info@sk-typo3.de>
-*  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.
-*
-*  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 - Extension.xml exception
- */
-
-
-/**
- * Exception for extension.xml handling.
- *
- * @author      Marcus Krause <marcus#exp2010@t3sec.info>
- * @author      Steffen Kamper <info@sk-typo3.de>
- *
- * @since       2010-02-10
- * @package     TYPO3
- * @subpackage  EM
- */
-class tx_em_ExtensionXmlException extends tx_em_XmlException {
-
-}
-?>
\ No newline at end of file
diff --git a/typo3/sysext/em/classes/exception/class.tx_em_mirrorxmlexception.php b/typo3/sysext/em/classes/exception/class.tx_em_mirrorxmlexception.php
deleted file mode 100644 (file)
index f3ec434..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-<?php
-/***************************************************************
-*  Copyright notice
-*
-*  (c) 2010 Marcus Krause <marcus#exp2010@t3sec.info>
-*           Steffen Kamper <info@sk-typo3.de>
-*  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.
-*
-*  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 - Extension.xml exception
- */
-
-
-/**
- * Exception for extension.xml handling.
- *
- * @author      Marcus Krause <marcus#exp2010@t3sec.info>
- * @author      Steffen Kamper <info@sk-typo3.de>
- *
- * @since       2010-02-18
- * @package     TYPO3
- * @subpackage  EM
- */
-class tx_em_MirrorXmlException extends tx_em_XmlException {
-
-}
-?>
\ No newline at end of file
diff --git a/typo3/sysext/em/classes/exception/class.tx_em_xmlexception.php b/typo3/sysext/em/classes/exception/class.tx_em_xmlexception.php
deleted file mode 100644 (file)
index 240ee51..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-<?php
-/***************************************************************
-*  Copyright notice
-*
-*  (c) 2010 Marcus Krause <marcus#exp2010@t3sec.info>
-*           Steffen Kamper <info@sk-typo3.de>
-*  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.
-*
-*  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 - XML exception
- */
-
-/**
- * Exception for XML handling.
- *
- * @author      Marcus Krause <marcus#exp2010@t3sec.info>
- * @author      Steffen Kamper <info@sk-typo3.de>
- *
- * @since       2010-02-18
- * @package     TYPO3
- * @subpackage  EM
- */
-class tx_em_XmlException extends Exception {
-
-}
-?>
\ No newline at end of file
diff --git a/typo3/sysext/em/classes/extensions/class.tx_em_extensions_details.php b/typo3/sysext/em/classes/extensions/class.tx_em_extensions_details.php
deleted file mode 100644 (file)
index 0054588..0000000
+++ /dev/null
@@ -1,751 +0,0 @@
-<?php
-/* **************************************************************
-*  Copyright notice
-*
-*  (c) webservices.nl
-*  (c) 2006-2010 Karsten Dambekalns <karsten@typo3.org>
-*  (c) 2010 Steffen Kamper <steffen@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!
-***************************************************************/
-
-/**
- * Class for extension details
- *
- * @author Karsten Dambekalns <karsten@typo3.org>
- * @author Steffen Kamper <steffen@typo3.org>
- * @package TYPO3
- * @subpackage em
- */
-class tx_em_Extensions_Details {
-
-       protected $maxUploadSize = 31457280;
-       protected $descrTable = '_MOD_tools_em';
-       protected $parentObject;
-
-       protected $categories;
-       protected $states;
-
-       /**
-        * Instance of EM API
-        *
-        * @var tx_em_API
-        */
-       protected $api;
-
-       /**
-        * Class for install extensions
-        *
-        * @var tx_em_Install
-        */
-       public $install;
-
-       /**
-        * Constructor
-        *
-        * @param object $parentObject
-        */
-       public function __construct($parentObject = NULL) {
-               $this->parentObject = $parentObject;
-               $this->api = t3lib_div::makeInstance('tx_em_API');
-               $this->install = t3lib_div::makeInstance('tx_em_Install', $this);
-               $GLOBALS['LANG']->includeLLFile(t3lib_extMgm::extPath('em') . 'language/locallang.xml');
-               $this->categories = array(
-                       'be' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_tools_em.xml:category_BE'),
-                       'module' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_tools_em.xml:category_BE_modules'),
-                       'fe' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_tools_em.xml:category_FE'),
-                       'plugin' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_tools_em.xml:category_FE_plugins'),
-                       'misc' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_tools_em.xml:category_miscellanous'),
-                       'services' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_tools_em.xml:category_services'),
-                       'templates' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_tools_em.xml:category_templates'),
-                       'example' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_tools_em.xml:category_examples'),
-                       'doc' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_tools_em.xml:category_documentation')
-               );
-               $this->states = tx_em_Tools::getStates();
-       }
-
-
-       /**
-        * Reads $confFilePath (a module $conf-file) and returns information on the existence of TYPO3_MOD_PATH definition and MCONF_name
-        *
-        * @param       string          Absolute path to a "conf.php" file of a module which we are analysing.
-        * @return      array           Information found.
-        * @see writeTYPO3_MOD_PATH()
-        */
-       function modConfFileAnalysis($confFilePath) {
-               $lines = explode(LF, t3lib_div::getUrl($confFilePath));
-               $confFileInfo = array();
-               $confFileInfo['lines'] = $lines;
-               $reg = array();
-
-               foreach ($lines as $k => $l) {
-                       $line = trim($l);
-
-                       unset($reg);
-                       if (preg_match('/^define[[:space:]]*\([[:space:]]*["\']TYPO3_MOD_PATH["\'][[:space:]]*,[[:space:]]*["\']([[:alnum:]_\/\.]+)["\'][[:space:]]*\)[[:space:]]*;/', $line, $reg)) {
-                               $confFileInfo['TYPO3_MOD_PATH'] = array($k, $reg);
-                       }
-
-                       unset($reg);
-                       if (preg_match('/^\$MCONF\[["\']?name["\']?\][[:space:]]*=[[:space:]]*["\']([[:alnum:]_]+)["\'];/', $line, $reg)) {
-                               $confFileInfo['MCONF_name'] = array($k, $reg);
-                       }
-               }
-               return $confFileInfo;
-       }
-
-       /**
-        * Check if upload folder / "createDir" directories should be created.
-        *
-        * @param       string          Extension key
-        * @param       array           Extension information array
-        * @return      string          HTML content.
-        */
-       function checkUploadFolder($extKey, $extInfo) {
-
-               // Checking for upload folder:
-               $uploadFolder = PATH_site . tx_em_Tools::uploadFolder($extKey);
-               if ($extInfo['EM_CONF']['uploadfolder'] && !@is_dir($uploadFolder)) {
-                       if (t3lib_div::_POST('_uploadfolder')) { // CREATE dir:
-                               t3lib_div::mkdir($uploadFolder);
-                               $indexContent = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<HTML>
-<HEAD>
-       <TITLE></TITLE>
-<META http-equiv=Refresh Content="0; Url=../../">
-</HEAD>
-</HTML>';
-                               t3lib_div::writeFile($uploadFolder . 'index.html', $indexContent);
-                       } else { // Show checkbox / HTML for creation:
-                               $content .= '
-                                       <br /><h3>' . $GLOBALS['LANG']->getLL('checkUploadFolder_create_upload_folder') . '</h3>
-                                       <p>' . sprintf($GLOBALS['LANG']->getLL('checkUploadFolder_upload_folder_needed'),
-                                       tx_em_Tools::uploadFolder($extKey)
-                               ) . '<br />
-                                               <label for="check_uploadfolder">' . sprintf($GLOBALS['LANG']->getLL('checkUploadFolder_create_dir'),
-                                       tx_em_Tools::uploadFolder($extKey)
-                               ) . '</label>
-                                               <input type="checkbox" name="_uploadfolder" id="check_uploadfolder" checked="checked" value="1" /><br />
-                                       </p>
-                               ';
-                       }
-               }
-
-               // Additional directories that should be created:
-               if ($extInfo['EM_CONF']['createDirs']) {
-                       $createDirs = array_unique(t3lib_div::trimExplode(',', $extInfo['EM_CONF']['createDirs'], 1));
-
-                       foreach ($createDirs as $crDir) {
-                               if (!@is_dir(PATH_site . $crDir)) {
-                                       if (t3lib_div::_POST('_createDir_' . md5($crDir))) { // CREATE dir:
-
-                                               // Initialize:
-                                               $crDirStart = '';
-                                               $dirs_in_path = explode('/', preg_replace('/\/$/', '', $crDir));
-
-                                               // Traverse each part of the dir path and create it one-by-one:
-                                               foreach ($dirs_in_path as $dirP) {
-                                                       if (strcmp($dirP, '')) {
-                                                               $crDirStart .= $dirP . '/';
-                                                               if (!@is_dir(PATH_site . $crDirStart)) {
-                                                                       t3lib_div::mkdir(PATH_site . $crDirStart);
-                                                                       $finalDir = PATH_site . $crDirStart;
-                                                               }
-                                                       } else {
-                                                               throw new RuntimeException(
-                                                                       'TYPO3 Fatal Error: ' . sprintf($GLOBALS['LANG']->getLL('checkUploadFolder_error'), PATH_site . $crDir),
-                                                                       1270853982
-                                                               );
-                                                       }
-                                               }
-                                               if ($finalDir) {
-                                                       $indexContent = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<HTML>
-<HEAD>
-       <TITLE></TITLE>
-<META http-equiv=Refresh Content="0; Url=/">
-</HEAD>
-</HTML>';
-                                                       t3lib_div::writeFile($finalDir . 'index.html', $indexContent);
-                                               }
-                                       } else { // Show checkbox / HTML for creation:
-                                               $md5CrDir = md5($crDir);
-                                               $content .= '
-                                                       <br />
-                                                       <h3>' . $GLOBALS['LANG']->getLL('checkUploadFolder_create_folder') . '</h3>
-                                                       <p>' . sprintf($GLOBALS['LANG']->getLL('checkUploadFolder_folder_needed'),
-                                                       $crDir
-                                               ) . '<br />
-                                                               <label for="check_createDir_' . $md5CrDir . '">' . sprintf($GLOBALS['LANG']->getLL('checkUploadFolder_create_dir'),
-                                                       $crDir
-                                               ) . '</label>
-                                                               <input type="checkbox" name="_createDir_' . $md5CrDir . '" id="check_createDir_' . $md5CrDir . '" checked="checked" value="1" /><br />
-                                                       </p>
-                                               ';
-                                       }
-                               }
-                       }
-               }
-
-               return $content;
-       }
-
-
-       /**
-        * Processes return-data from online repository.
-        * Currently only the returned emconf array is written to extension.
-        *
-        * @param       array           Command array returned from TER
-        * @return      string          Message
-        */
-       function uploadExtensionToTER($em) {
-               $msg = '';
-               $response = $this->parentObject->terConnection->uploadToTER($em);
-
-               if (!is_array($response)) {
-                       return $response;
-               }
-
-               if ($response['resultCode'] == TX_TER_RESULT_EXTENSIONSUCCESSFULLYUPLOADED) {
-                       $em['extInfo']['EM_CONF']['version'] = $response['version'];
-                       $response['resultMessages'][] = sprintf($GLOBALS['LANG']->getLL('terCommunication_ext_version'),
-                               $response['version']
-                       );
-                       $response['resultMessages'][] = $this->updateLocalEM_CONF($em['extKey'], $em['extInfo']);
-               }
-
-               $msg = '<ul><li>' . implode('</li><li>', $response['resultMessages']) . '</li></ul>';
-               return $msg;
-       }
-
-       /**
-        * Forces update of local EM_CONF. This will renew the information of changed files.
-        *
-        * @param       string          Extension key
-        * @param       array           Extension information array
-        * @return      string          Status message
-        */
-       function updateLocalEM_CONF($extKey, $extInfo) {
-               $extInfo['EM_CONF']['_md5_values_when_last_written'] = serialize($this->serverExtensionMD5array($extKey, $extInfo));
-               $emConfFileContent = $this->construct_ext_emconf_file($extKey, $extInfo['EM_CONF']);
-
-               $absPath = tx_em_Tools::getExtPath($extKey, $extInfo['type']);
-               $emConfFileName = $absPath . 'ext_emconf.php';
-               if ($emConfFileContent) {
-
-                       if (@is_file($emConfFileName)) {
-                               if (t3lib_div::writeFile($emConfFileName, $emConfFileContent) === TRUE) {
-                                       return sprintf($GLOBALS['LANG']->getLL('updateLocalEM_CONF_ok'),
-                                               substr($emConfFileName, strlen($absPath)));
-                               } else {
-                                       return '<strong>' . sprintf($GLOBALS['LANG']->getLL('updateLocalEM_CONF_not_writable'),
-                                               $emConfFileName) . '</strong>';
-                               }
-                       } else {
-                               return ('<strong>' . sprintf($GLOBALS['LANG']->getLL('updateLocalEM_CONF_not_found'),
-                                       $emConfFileName) . '</strong>');
-                       }
-               } else {
-                       return sprintf($GLOBALS['LANG']->getLL('updateLocalEM_CONF_no_content'),
-                               substr($emConfFileName, strlen($absPath)));
-               }
-       }
-
-       /**
-        * Creates a MD5-hash array over the current files in the extension
-        *
-        * @param       string          Extension key
-        * @param       array           Extension information array
-        * @return      array           MD5-keys
-        */
-       function serverExtensionMD5array($extKey, $conf) {
-
-               // Creates upload-array - including filelist.
-               $mUA = $this->makeUploadarray($extKey, $conf);
-
-               $md5Array = array();
-               if (is_array($mUA['FILES'])) {
-
-                       // Traverse files.
-                       foreach ($mUA['FILES'] as $fN => $d) {
-                               if ($fN != 'ext_emconf.php') {
-                                       $md5Array[$fN] = substr($d['content_md5'], 0, 4);
-                               }
-                       }
-               } else {
-                       debug(array($mUA, $conf), 'serverExtensionMD5Array:' . $extKey);
-               }
-               return $md5Array;
-       }
-
-       /*******************************************
-        *
-        * Compiling upload information, emconf-file etc.
-        *
-        *******************************************/
-
-       /**
-        * Compiles the ext_emconf.php file
-        *
-        * @param       string          Extension key
-        * @param       array           EM_CONF array
-        * @return      string          PHP file content, ready to write to ext_emconf.php file
-        */
-       function construct_ext_emconf_file($extKey, $EM_CONF) {
-
-               // clean version number:
-               $vDat = tx_em_Tools::renderVersion($EM_CONF['version']);
-               $EM_CONF['version'] = $vDat['version'];
-
-               $code = '<?php
-
-/***************************************************************
-* Extension Manager/Repository config file for ext "' . $extKey . '".
-*
-* Auto generated ' . date('d-m-Y H:i') . '
-*
-* Manual updates:
-* Only the data in the array - everything else is removed by next
-* writing. "version" and "dependencies" must not be touched!
-***************************************************************/
-
-$EM_CONF[$_EXTKEY] = ' . tx_em_Tools::arrayToCode($EM_CONF, 0) . ';
-
-?>';
-               return str_replace(CR, '', $code);
-       }
-
-       /**
-        * Make upload array out of extension
-        *
-        * @param       string          Extension key
-        * @param       array           Extension information array
-        * @return      mixed           Returns array with extension upload array on success, otherwise an error string.
-        */
-       function makeUploadarray($extKey, $conf) {
-               $extPath = tx_em_Tools::getExtPath($extKey, $conf['type']);
-
-               if ($extPath) {
-
-                       // Get files for extension:
-                       $fileArr = array();
-                       $fileArr = t3lib_div::getAllFilesAndFoldersInPath($fileArr, $extPath, '', 0, 99, $GLOBALS['TYPO3_CONF_VARS']['EXT']['excludeForPackaging']);
-
-                       // Calculate the total size of those files:
-                       $totalSize = 0;
-                       foreach ($fileArr as $file) {
-                               $totalSize += filesize($file);
-                       }
-
-                       // If the total size is less than the upper limit, proceed:
-                       if ($totalSize < $this->maxUploadSize) {
-
-                               // Initialize output array:
-                               $uploadArray = array();
-                               $uploadArray['extKey'] = $extKey;
-                               $uploadArray['EM_CONF'] = $conf['EM_CONF'];
-                               $uploadArray['misc']['codelines'] = 0;
-                               $uploadArray['misc']['codebytes'] = 0;
-
-                               $uploadArray['techInfo'] = $this->install->makeDetailedExtensionAnalysis($extKey, $conf, 1);
-
-                               // Read all files:
-                               foreach ($fileArr as $file) {
-                                       $relFileName = substr($file, strlen($extPath));
-                                       $fI = pathinfo($relFileName);
-                                       if ($relFileName != 'ext_emconf.php') { // This file should be dynamically written...
-                                               $uploadArray['FILES'][$relFileName] = array(
-                                                       'name' => $relFileName,
-                                                       'size' => filesize($file),
-                                                       'mtime' => filemtime($file),
-                                                       'is_executable' => (TYPO3_OS == 'WIN' ? 0 : is_executable($file)),
-                                                       'content' => t3lib_div::getUrl($file)
-                                               );
-                                               if (t3lib_div::inList('php,inc', strtolower($fI['extension']))) {
-                                                       $uploadArray['FILES'][$relFileName]['codelines'] = count(explode(LF, $uploadArray['FILES'][$relFileName]['content']));
-                                                       $uploadArray['misc']['codelines'] += $uploadArray['FILES'][$relFileName]['codelines'];
-                                                       $uploadArray['misc']['codebytes'] += $uploadArray['FILES'][$relFileName]['size'];
-
-                                                       // locallang*.php files:
-                                                       if (substr($fI['basename'], 0, 9) == 'locallang' && strstr($uploadArray['FILES'][$relFileName]['content'], '$LOCAL_LANG')) {
-                                                               $uploadArray['FILES'][$relFileName]['LOCAL_LANG'] = tx_em_Tools::getSerializedLocalLang($file, $uploadArray['FILES'][$relFileName]['content']);
-                                                       }
-                                               }
-                                               $uploadArray['FILES'][$relFileName]['content_md5'] = md5($uploadArray['FILES'][$relFileName]['content']);
-                                       }
-                               }
-
-                               // Return upload-array:
-                               return $uploadArray;
-                       } else {
-                               return sprintf($GLOBALS['LANG']->getLL('makeUploadArray_error_size'),
-                                       $totalSize, t3lib_div::formatSize($this->maxUploadSize));
-                       }
-               } else {
-                       return sprintf($GLOBALS['LANG']->getLL('makeUploadArray_error_path'),
-                               $extKey);
-               }
-       }
-
-
-       /**
-        * Prints a table with extension information in it.
-        *
-        * @param       string          Extension key
-        * @param       array           Extension information array
-        * @param       boolean         If set, the information array shows information for a remote extension in TER, not a local one.
-        * @return      string          HTML content.
-        */
-       function extInformationarray($extKey, $extInfo, $remote = 0) {
-               $emConf = $extInfo['EM_CONF'];
-
-               $lines = array();
-               $lines[] = '
-                       <tr class="t3-row-header"><td colspan="2"><strong>' . $GLOBALS['LANG']->getLL('extInfoArray_general_info') . '</strong></td></tr>';
-
-               // row for the extension title
-               $key = 'title';
-               $dataCol = $emConf['_icon'] . $emConf[$key];
-               $lines[] = array(
-                       $this->headerCol($key),
-                       $dataCol
-               );
-
-               // row for the extension description
-               $key = 'description';
-               $dataCol = nl2br(htmlspecialchars($emConf[$key]));
-               $lines[] = array(
-                       $this->headerCol($key),
-                       $dataCol
-               );
-
-               // row for the extension author
-               $key = 'author';
-               $dataCol = tx_em_Tools::wrapEmail($emConf['author'] . ($emConf['author_email'] ? ' <' . $emConf['author_email'] . '>' : ''), $emConf['author_email']);
-               if ($emConf['author_company']) {
-                       $dataCol .= ', ' . $emConf['author_company'];
-               }
-               $lines[] = array(
-                       $this->headerCol($key),
-                       $dataCol
-               );
-
-               // row for the version
-               $key = 'version';
-               $dataCol = $emConf[$key];
-               $lines[] = array(
-                       $this->headerCol($key),
-                       $dataCol
-               );
-
-               // row for the category
-               $key = 'category';
-               $dataCol = $this->categories[$emConf[$key]];
-               $lines[] = array(
-                       $this->headerCol($key),
-                       $dataCol
-               );
-
-               // row for the state
-               $key = 'state';
-               $dataCol = $this->states[$emConf[$key]];
-               $lines[] = array(
-                       $this->headerCol($key),
-                       $dataCol
-               );
-
-               // row for the shy state
-               $key = 'shy';
-               if ($emConf[$key]) {
-                       $dataCol = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_common.xml:yes');
-               } else {
-                       $dataCol = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_common.xml:no');
-               }
-               $lines[] = array(
-                       $this->headerCol($key),
-                       $dataCol
-               );
-
-               // row for the internal state
-               $key = 'internal';
-               if ($emConf[$key]) {
-                       $dataCol = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_common.xml:yes');
-               } else {
-                       $dataCol = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_common.xml:no');
-               }
-               $lines[] = array(
-                       $this->headerCol($key),
-                       $dataCol
-               );
-
-               // row for the dependencies
-               $headerCol = $GLOBALS['LANG']->getLL('extInfoArray_depends_on');
-               $headerCol = t3lib_BEfunc::wrapInHelp($this->descrTable, 'emconf_dependencies', $headerCol);
-               $dataCol = tx_em_Tools::depToString($emConf['constraints']);
-               $lines[] = array(
-                       $headerCol,
-                       $dataCol
-               );
-
-               // row for the conflicts
-               $headerCol = $GLOBALS['LANG']->getLL('extInfoArray_conflicts_with');
-               $headerCol = t3lib_BEfunc::wrapInHelp($this->descrTable, 'emconf_conflicts', $headerCol);
-               $dataCol = tx_em_Tools::depToString($emConf['constraints'], 'conflicts');
-               $lines[] = array(
-                       $headerCol,
-                       $dataCol
-               );
-
-               // row for the suggestions
-               $headerCol = $GLOBALS['LANG']->getLL('extInfoArray_suggests');
-               $headerCol = t3lib_BEfunc::wrapInHelp($this->descrTable, 'emconf_conflicts', $headerCol);
-               $dataCol = tx_em_Tools::depToString($emConf['constraints'], 'suggests');
-               $lines[] = array(
-                       $this->headerCol('suggests'),
-                       $dataCol
-               );
-
-               if (!$remote) {
-
-                       $key = 'priority';
-                       $lines[] = array(
-                               $this->headerCol($key),
-                               $emConf[$key]
-                       );
-
-                       $headerCol = $GLOBALS['LANG']->getLL('extInfoArray_clear_cache');
-                       $headerCol = t3lib_BEfunc::wrapInHelp($this->descrTable, 'emconf_clearCacheOnLoad', $headerCol);
-                       if ($emConf['clearCacheOnLoad']) {
-                               $dataCol = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_common.xml:yes');
-                       } else {
-                               $dataCol = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_common.xml:no');
-                       }
-                       $lines[] = array(
-                               $headerCol,
-                               $dataCol
-                       );
-
-                       $key = 'module';
-                       $headerCol = $GLOBALS['LANG']->getLL('extInfoArray_incl_modules');
-                       $headerCol = t3lib_BEfunc::wrapInHelp($this->descrTable, 'emconf_module', $headerCol);
-                       $lines[] = array(
-                               $headerCol,
-                               $emConf[$key]
-                       );
-
-                       $key = 'lockType';
-                       $headerCol = $GLOBALS['LANG']->getLL('extInfoArray_lock_type');
-                       $headerCol = t3lib_BEfunc::wrapInHelp($this->descrTable, 'emconf_lockType', $headerCol);
-                       $lines[] = array(
-                               $headerCol,
-                               ($emConf[$key] ? $emConf[$key] : '')
-                       );
-
-                       $key = 'modify_tables';
-                       $headerCol = $GLOBALS['LANG']->getLL('extInfoArray_modifies_tables');
-                       $headerCol = t3lib_BEfunc::wrapInHelp($this->descrTable, 'emconf_modify_tables', $headerCol);
-                       $lines[] = array(
-                               $headerCol,
-                               $emConf[$key]
-                       );
-
-                               // Installation status
-                       $techInfo = $this->install->makeDetailedExtensionAnalysis($extKey, $extInfo, TRUE, FALSE);
-                       $lines[] = array('<tr><td colspan="2">&nbsp;</td></tr>');
-                       $lines[] = array('<tr class="t3-row-header"><td colspan="2"><strong>' . $GLOBALS['LANG']->getLL('extInfoArray_inst_status') . '</strong></td></tr>');
-
-                       $headerCol = $GLOBALS['LANG']->getLL('extInfoArray_inst_type');
-                       $headerCol = t3lib_BEfunc::wrapInHelp($this->descrTable, 'emconf_type', $headerCol);
-                       $dataCol = $this->api->typeLabels[$extInfo['type']] . ' - <em>' . $this->api->typeDescr[$extInfo['type']] . '</em>';
-                       $lines[] = array($headerCol, $dataCol);
-
-                       $headerCol = $GLOBALS['LANG']->getLL('extInfoArray_inst_twice');
-                       $headerCol = t3lib_BEfunc::wrapInHelp($this->descrTable, 'emconf_doubleInstall', $headerCol);
-                       $dataCol = $this->extInformationArray_dbInst($extInfo['doubleInstall'], $extInfo['type']);
-                       $lines[] = array($headerCol, $dataCol);
-
-                       if (is_array($extInfo['files'])) {
-                               sort($extInfo['files']);
-                               $headerCol = $GLOBALS['LANG']->getLL('extInfoArray_root_files');
-                               $headerCol = t3lib_BEfunc::wrapInHelp($this->descrTable, 'emconf_rootfiles', $headerCol);
-                               $dataCol = implode('<br />', $extInfo['files']);
-                               $lines[] = array($headerCol, $dataCol);
-                       }
-
-                       if ($techInfo['tables'] || $techInfo['static'] || $techInfo['fields']) {
-                               if (!$remote && t3lib_extMgm::isLoaded($extKey)) {
-                                       $tableStatus = tx_em_Tools::rfw(($techInfo['tables_error'] ?
-                                                       '<strong>' . $GLOBALS['LANG']->getLL('extInfoArray_table_error') . '</strong><br />' .
-                                                                       $GLOBALS['LANG']->getLL('extInfoArray_missing_fields') : '') .
-                                                       ($techInfo['static_error'] ?
-                                                                       '<strong>' . $GLOBALS['LANG']->getLL('extInfoArray_static_table_error') . '</strong><br />' .
-                                                                                       $GLOBALS['LANG']->getLL('extInfoArray_static_tables_missing_empty') : ''));
-                               } else {
-                                       $tableStatus = $techInfo['tables_error'] || $techInfo['static_error'] ?
-                                                       $GLOBALS['LANG']->getLL('extInfoArray_db_update_needed') : $GLOBALS['LANG']->getLL('extInfoArray_tables_ok');
-                               }
-                       }
-
-                       $headerCol = $GLOBALS['LANG']->getLL('extInfoArray_db_requirements');
-                       $headerCol = t3lib_BEfunc::wrapInHelp($this->descrTable, 'emconf_dbReq', $headerCol);
-                       $dataCol = $this->extInformationArray_dbReq($techInfo, 1);
-                       $lines[] = array($headerCol, $dataCol);
-
-                       $headerCol = $GLOBALS['LANG']->getLL('extInfoArray_db_status');
-                       $headerCol = t3lib_BEfunc::wrapInHelp($this->descrTable, 'emconf_dbStatus', $headerCol);
-                       $lines[] = array($headerCol, $tableStatus);
-
-                       $headerCol = $GLOBALS['LANG']->getLL('extInfoArray_flags');
-                       $headerCol = t3lib_BEfunc::wrapInHelp($this->descrTable, 'emconf_flags', $headerCol);
-                       $dataCol = (is_array($techInfo['flags']) ? implode('<br />', $techInfo['flags']) : '');
-                       $lines[] = array($headerCol, $dataCol);
-
-                       $headerCol = $GLOBALS['LANG']->getLL('extInfoArray_config_template');
-                       $headerCol = t3lib_BEfunc::wrapInHelp($this->descrTable, 'emconf_conf', $headerCol);
-                       $dataCol = ($techInfo['conf'] ? $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_common.xml:yes') : '');
-                       $lines[] = array($headerCol, $dataCol);
-
-                       $headerCol = $GLOBALS['LANG']->getLL('extInfoArray_typoscript_files');
-                       $headerCol = t3lib_BEfunc::wrapInHelp($this->descrTable, 'emconf_TSfiles', $headerCol);
-                       $dataCol = (is_array($techInfo['TSfiles']) ? implode('<br />', $techInfo['TSfiles']) : '');
-                       $lines[] = array($headerCol, $dataCol);
-
-                       $headerCol = $GLOBALS['LANG']->getLL('extInfoArray_language_files');
-                       $headerCol = t3lib_BEfunc::wrapInHelp($this->descrTable, 'emconf_locallang', $headerCol);
-                       $dataCol = (is_array($techInfo['locallang']) ? implode('<br />', $techInfo['locallang']) : '');
-                       $lines[] = array($headerCol, $dataCol);
-
-                       $headerCol = $GLOBALS['LANG']->getLL('extInfoArray_upload_folder');
-                       $headerCol = t3lib_BEfunc::wrapInHelp($this->descrTable, 'emconf_uploadfolder', $headerCol);
-                       $dataCol = ($techInfo['uploadfolder'] ? $techInfo['uploadfolder'] : '');
-                       $lines[] = array($headerCol, $dataCol);
-
-                       $headerCol = $GLOBALS['LANG']->getLL('extInfoArray_create_directories');
-                       $headerCol = t3lib_BEfunc::wrapInHelp($this->descrTable, 'emconf_createDirs', $headerCol);
-                       $dataCol = (is_array($techInfo['createDirs']) ? implode('<br />', $techInfo['createDirs']) : '');
-                       $lines[] = array($headerCol, $dataCol);
-
-                       $headerCol = $GLOBALS['LANG']->getLL('extInfoArray_module_names');
-                       $headerCol = t3lib_BEfunc::wrapInHelp($this->descrTable, 'emconf_moduleNames', $headerCol);
-                       $dataCol = (is_array($techInfo['moduleNames']) ? implode('<br />', $techInfo['moduleNames']) : '');
-                       $lines[] = array($headerCol, $dataCol);
-
-                       $headerCol = $GLOBALS['LANG']->getLL('extInfoArray_class_names');
-                       $headerCol = t3lib_BEfunc::wrapInHelp($this->descrTable, 'emconf_classNames', $headerCol);
-                       $dataCol = (is_array($techInfo['classes']) ? implode('<br />', $techInfo['classes']) : '');
-                       $lines[] = array($headerCol, $dataCol);
-
-                       $currentMd5Array = $this->serverExtensionMD5array($extKey, $extInfo);
-
-                       $msgLines = array();
-                       if (strcmp($extInfo['EM_CONF']['_md5_values_when_last_written'], serialize($currentMd5Array))) {
-                               $msgLines[] = tx_em_Tools::rfw('<br /><strong>' . $GLOBALS['LANG']->getLL('extInfoArray_difference_detected') . '</strong>');
-                               $affectedFiles = tx_em_Tools::findMD5ArrayDiff($currentMd5Array, unserialize($extInfo['EM_CONF']['_md5_values_when_last_written']));
-                               if (count($affectedFiles)) {
-                                       $msgLines[] = '<br /><strong>' . $GLOBALS['LANG']->getLL('extInfoArray_modified_files') . '</strong><br />' .
-                                                       tx_em_Tools::rfw(implode('<br />', $affectedFiles));
-                               }
-                       }
-
-                       $headerCol = $GLOBALS['LANG']->getLL('extInfoArray_files_changed');
-                       $headerCol = t3lib_BEfunc::wrapInHelp($this->descrTable, 'emconf_filesChanged', $headerCol);
-                       $dataCol = implode('<br />', $msgLines);
-                       $lines[] = array($headerCol, $dataCol);
-               }
-
-               $output = '';
-               foreach ($lines as $cols) {
-                       // if it's just one line, we assume it's a headline,
-                       // thus no need to wrap it in HTML table tags
-                       if (count($cols) == 1) {
-                               $output .= $cols[0];
-                       } else {
-                               $output .= '
-                                       <tr class="bgColor4">
-                                               <td>' . $cols[0] . '</td>
-                                               <td>' . $cols[1] . '</td>
-                                       </tr>';
-                       }
-               }
-
-               return '<table border="0" cellpadding="1" cellspacing="2">
-                                       ' . $output . '
-                               </table>';
-       }
-
-       /**
-        * Returns HTML with information about database requirements
-        *
-        * @param       array           Technical information array
-        * @param       boolean         Table header displayed
-        * @return      string          HTML content.
-        */
-       function extInformationArray_dbReq($techInfo, $tableHeader = 0) {
-               return nl2br(trim((is_array($techInfo['tables']) ?
-                               ($tableHeader ?
-                                               "\n\n<strong>" . $GLOBALS['LANG']->getLL('extDumpTables_tables') . "</strong>\n" : '') .
-                                               implode(LF, $techInfo['tables']) : '') .
-                               (is_array($techInfo['static']) ?
-                                               "\n\n<strong>" . $GLOBALS['LANG']->getLL('extBackup_static_tables') . "</strong>\n" .
-                                                               implode(LF, $techInfo['static']) : '') .
-                               (is_array($techInfo['fields']) ?
-                                               "\n\n<strong>" . $GLOBALS['LANG']->getLL('extInfoArray_additional_fields') . "</strong>\n" .
-                                                               implode('<hr />', $techInfo['fields']) : '')));
-       }
-
-       /**
-        * Double install warning.
-        *
-        * @param       string          Double-install string, eg. "LG" etc.
-        * @param       string          Current scope, eg. "L" or "G" or "S"
-        * @return      string          Message
-        */
-       function extInformationArray_dbInst($dbInst, $current) {
-               if (strlen($dbInst) > 1) {
-                       $others = array();
-                       for ($a = 0; $a < strlen($dbInst); $a++) {
-                               if (substr($dbInst, $a, 1) != $current) {
-                                       $others[] = '"' . $this->api->typeLabels[substr($dbInst, $a, 1)] . '"';
-                               }
-                       }
-                       return tx_em_Tools::rfw(
-                               sprintf($GLOBALS['LANG']->getLL('extInfoArray_double_installation_infotext'),
-                                       implode(' ' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_common.xml:and') . ' ', $others),
-                                       $this->api->typeLabels[$current]
-                               )
-                       );
-               } else {
-                       return '';
-               }
-       }
-
-       /**
-        * Returns the header column (for the extension details item), and applies help text if available
-        *
-        * @param       string  field key
-        * @return      string  HTML ready to go
-        */
-       function headerCol($key) {
-               $headerCol = $GLOBALS['LANG']->getLL('extInfoArray_' . $key);
-               return t3lib_BEfunc::wrapInHelp($this->descrTable, 'emconf_' . $key, $headerCol);
-       }
-}
-?>
\ No newline at end of file
diff --git a/typo3/sysext/em/classes/extensions/class.tx_em_extensions_list.php b/typo3/sysext/em/classes/extensions/class.tx_em_extensions_list.php
deleted file mode 100644 (file)
index a5fb864..0000000
+++ /dev/null
@@ -1,958 +0,0 @@
-<?php
-/* **************************************************************
-*  Copyright notice
-*
-*  (c) webservices.nl
-*  (c) 2006-2010 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!
-***************************************************************/
-
-/**
- * This class handles extension listings
- *
- */
-class tx_em_Extensions_List {
-
-
-       protected $parentObject;
-
-       /** @var tx_em_Tools_XmlHandler */
-       protected $xmlHandler;
-
-       protected $categories;
-       protected $types;
-       protected $states;
-
-       /**
-        * Constructor
-        *
-        * @param object $parentObject
-        * @return void
-        */
-       public function __construct($parentObject = NULL) {
-               $this->parentObject = $parentObject;
-               $this->install = t3lib_div::makeInstance('tx_em_Install', $this);
-               $this->xmlHandler = t3lib_div::makeInstance('tx_em_Tools_XmlHandler');
-
-               $this->categories = array(
-                       'be' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_tools_em.xml:category_BE'),
-                       'module' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_tools_em.xml:category_BE_modules'),
-                       'fe' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_tools_em.xml:category_FE'),
-                       'plugin' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_tools_em.xml:category_FE_plugins'),
-                       'misc' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_tools_em.xml:category_miscellanous'),
-                       'services' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_tools_em.xml:category_services'),
-                       'templates' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_tools_em.xml:category_templates'),
-                       'example' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_tools_em.xml:category_examples'),
-                       'doc' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_tools_em.xml:category_documentation')
-               );
-               $this->types = array(
-                       'S' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_tools_em.xml:type_system'),
-                       'G' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_tools_em.xml:type_global'),
-                       'L' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_tools_em.xml:type_local'),
-               );
-               $this->states = tx_em_Tools::getStates();
-       }
-
-
-       /**
-        * Returns the list of available (installed) extensions
-        *
-        * @param       boolean         if set, function will return a flat list only
-        * @return      array           Array with two arrays, list array (all extensions with info) and category index
-        * @see getInstExtList()
-        */
-       function getInstalledExtensions($flatList = FALSE) {
-               $list = array();
-
-               if ($flatList) {
-                       $path = PATH_typo3 . 'sysext/';
-                       $this->getFlatInstExtList($path, $list, 'S');
-
-                       $path = PATH_typo3 . 'ext/';
-                       $this->getFlatInstExtList($path, $list, 'G');
-
-                       $path = PATH_typo3conf . 'ext/';
-                       $this->getFlatInstExtList($path, $list, 'L');
-
-                       return $list;
-               } else {
-                       $cat = tx_em_Tools::getDefaultCategory();
-
-                       $path = PATH_typo3 . 'sysext/';
-                       $this->getInstExtList($path, $list, $cat, 'S');
-
-                       $path = PATH_typo3 . 'ext/';
-                       $this->getInstExtList($path, $list, $cat, 'G');
-
-                       $path = PATH_typo3conf . 'ext/';
-                       $this->getInstExtList($path, $list, $cat, 'L');
-
-                       return array($list, $cat);
-               }
-       }
-
-       /**
-        * Gathers all extensions in $path
-        *
-        * @param       string          Absolute path to local, global or system extensions
-        * @param       array           Array with information for each extension key found. Notice: passed by reference
-        * @param       array           Categories index: Contains extension titles grouped by various criteria.
-        * @param       string          Path-type: L, G or S
-        * @return      void            "Returns" content by reference
-        * @see getInstalledExtensions()
-        */
-       function getInstExtList($path, &$list, &$cat, $type) {
-
-               if (@is_dir($path)) {
-                       $extList = t3lib_div::get_dirs($path);
-                       if (is_array($extList)) {
-                               foreach ($extList as $extKey) {
-                                       if (@is_file($path . $extKey . '/ext_emconf.php')) {
-                                               $emConf = tx_em_Tools::includeEMCONF($path . $extKey . '/ext_emconf.php', $extKey);
-                                               if (is_array($emConf)) {
-                                                       if (is_array($list[$extKey])) {
-                                                               $list[$extKey] = array('doubleInstall' => $list[$extKey]['doubleInstall']);
-                                                       }
-                                                       $list[$extKey]['extkey'] = $extKey;
-                                                       $list[$extKey]['doubleInstall'] .= $type;
-                                                       $list[$extKey]['type'] = $type;
-                                                       $list[$extKey]['installed'] = t3lib_extMgm::isLoaded($extKey);
-                                                       $list[$extKey]['EM_CONF'] = $emConf;
-                                                       $list[$extKey]['files'] = t3lib_div::getFilesInDir($path . $extKey, '', 0, '', $this->excludeForPackaging);
-
-                                                       tx_em_Tools::setCat($cat, $list[$extKey], $extKey);
-                                               }
-                                       }
-                               }
-                       }
-               }
-       }
-
-       /**
-        * Gathers all extensions in $path
-        *
-        * @param       string          Absolute path to local, global or system extensions
-        * @param       array           Array with information for each extension key found. Notice: passed by reference
-        * @param       array           Categories index: Contains extension titles grouped by various criteria.
-        * @param       string          Path-type: L, G or S
-        * @return      void            "Returns" content by reference
-        * @access private
-        * @see getInstalledExtensions()
-        */
-       function getFlatInstExtList($path, &$list, $type) {
-               if (@is_dir($path)) {
-                       $extList = t3lib_div::get_dirs($path);
-                       if (is_array($extList)) {
-                               foreach ($extList as $extKey) {
-                                       $this->singleExtInfo($extKey, $path, $list, $type);
-                               }
-                       }
-               }
-       }
-
-       /**
-        * Gets a single extension info
-        *
-        * @param  $extKey
-        * @param  $path
-        * @param  $list
-        * @param string $type
-        * @return void
-        */
-       public function singleExtInfo($extKey, $path, &$list, $type = '') {
-               if (@is_file($path . $extKey . '/ext_emconf.php')) {
-                       $relPath = '../' . substr($path, strlen(PATH_site));
-                       $directLink = 'mod.php?M=tools_em';
-                       $emConf = tx_em_Tools::includeEMCONF($path . $extKey . '/ext_emconf.php', $extKey);
-                       $manual = $path . $extKey . '/doc/manual.sxw';
-                       $manualRelPath = $relPath . $extKey . '/doc/manual.sxw';
-
-                       if ($type === '') {
-                               $type = tx_em_Tools::getExtTypeFromPath($path);
-                       }
-
-                       if (is_array($emConf)) {
-                               $key = count($list);
-                               $loaded = t3lib_extMgm::isLoaded($extKey);
-
-                               $exist = $this->findIndex($extKey, $list);
-                               if ($exist !== FALSE) {
-                                       $key = $exist;
-                                       $list[$key] = array(
-                                               'doubleInstall' => $list[$key]['doubleInstall'],
-                                               'doubleInstallShort' => $list[$key]['doubleInstallShort'],
-                                       );
-
-                               }
-                               $list[$key]['extkey'] = $extKey;
-                               $list[$key]['path'] = $path . $extKey;
-                               $list[$key]['nodePath'] = substr($path . $extKey, strlen(PATH_site));
-                               $list[$key]['doubleInstall'] = $list[$key]['doubleInstall'] ? $list[$key]['doubleInstall'] . '/' . $this->types[$type] : $this->types[$type];
-                               $list[$key]['doubleInstallShort'] .= $type;
-
-                               $list[$key] = t3lib_div::array_merge_recursive_overrule($list[$key], $emConf);
-
-                               if (@is_file($path . $extKey . '/class.ext_update.php')) {
-                                       $list[$key]['updateModule'] = TRUE;
-                               } else {
-                                       $list[$key]['updateModule'] = FALSE;
-                               }
-                               $list[$key]['type'] = $this->types[$type];
-                               $list[$key]['typeShort'] = $type;
-                               $list[$key]['installed'] = $loaded ? 1 : 0;
-
-                               $state = htmlspecialchars($emConf['state']);
-                               $list[$key]['state'] = $this->states[$state];
-                               $list[$key]['stateCls'] = 'state-' . $state;
-                               $list[$key]['title'] = htmlspecialchars($list[$key]['title']);
-                               $list[$key]['description'] = htmlspecialchars($list[$key]['description']);
-                               $list[$key]['author'] = htmlspecialchars($list[$key]['author']);
-                               $list[$key]['author_email'] = htmlspecialchars($list[$key]['author_email']);
-                               $list[$key]['files'] = t3lib_div::getFilesInDir($path . $extKey, '', 0, '', $this->excludeForPackaging);
-                               $list[$key]['reviewstate'] = $this->xmlHandler->getReviewState($extKey, $list[$key]['version']);
-
-                               $list[$key]['download'] = '<a href="' . htmlspecialchars(
-                                       $directLink .'&CMD[doBackup]=1&SET[singleDetails]=backup&CMD[showExt]=' . $extKey
-                               ) . '" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_common.xml:download') . '">' .
-                                       t3lib_iconWorks::getSpriteIcon('actions-system-extension-download') . '</a>';
-
-                               $list[$key]['doc'] = '';
-                               if ($list[$key]['docPath']) {
-                                       $manual = $path . $extKey . '/' . $list[$key]['docPath'] . '/manual.sxw';
-                                       $manualRelPath = $relPath . $extKey . '/' .  $list[$key]['docPath'] . '/manual.sxw';
-                               }
-
-                               if (@is_file($manual)) {
-                                       $list[$key]['doc'] = '<a href="' . htmlspecialchars($manualRelPath) . '" target="_blank">'
-                                               . t3lib_iconWorks::getSpriteIcon('actions-system-extension-documentation') . '</a>';
-                               }
-                               $list[$key]['icon'] = @is_file($path . $extKey . '/ext_icon.gif') ? '<img src="' . $relPath . $extKey . '/ext_icon.gif" alt="" height="16" />' : '<img src="clear.gif" alt="" width="16" height="16" />';
-
-                               $list[$key]['categoryShort'] = $list[$key]['category'];
-                               $list[$key]['category'] = isset($this->categories[$list[$key]['category']]) ? $this->categories[$list[$key]['category']] : $list[$key]['category'];
-                               $list[$key]['required'] = in_array($extKey, t3lib_extMgm::getRequiredExtensionListArray(), TRUE);
-
-                               $constraints = $this->humanizeConstraints($list[$key]['constraints']);
-                               $list[$key]['depends'] = $constraints['depends'];
-                               $list[$key]['conflicts'] = $constraints['conflicts'];
-                               $list[$key]['suggests'] = $constraints['suggests'];
-
-                               unset($list[$key]['_md5_values_when_last_written']);
-                       }
-               }
-       }
-
-       /**
-        * Make constraints readable
-        *
-        * @param  array $constraints
-        * @return array
-        */
-       public function humanizeConstraints($constraints) {
-               $depends = $conflicts = $suggests = array();
-               $result = array(
-                       'depends' => '',
-                       'conflicts' => '',
-                       'suggests' => ''
-               );
-
-               if (is_array($constraints) && count($constraints)) {
-                       if (is_array($constraints['depends']) && count($constraints['depends'])) {
-                               foreach ($constraints['depends'] as $key => $value) {
-                                       if ($value) {
-                                               $tmp = t3lib_div::trimExplode('-', $value, TRUE);
-                                               if (trim($tmp[1]) && trim($tmp[1]) !== '0.0.0') {
-                                                       $value = $tmp[0] . ' - ' . $tmp[1];
-                                               } else {
-                                                       $value = $tmp[0];
-                                               }
-                                       }
-                                       $depends[] = $key . ($value ? ' (' . $value . ')' : '');
-                               }
-                       }
-                       if (is_array($constraints['conflicts']) && count($constraints['conflicts'])) {
-                               foreach ($constraints['conflicts'] as $key => $value) {
-                                       if ($value) {
-                                               $tmp = t3lib_div::trimExplode('-', $value, TRUE);
-                                               if (trim($tmp[1]) && trim($tmp[1]) !== '0.0.0') {
-                                                       $value = $tmp[0] . ' - ' . $tmp[1];
-                                               } else {
-                                                       $value = $tmp[0];
-                                               }
-                                       }
-                                       $conflicts[] = $key . ($value ? ' (' . $value . ')' : '');
-                               }
-                       }
-                       if (is_array($constraints['suggests']) && count($constraints['suggests'])) {
-                               foreach ($constraints['suggests'] as $key => $value) {
-                                       if ($value) {
-                                               $tmp = t3lib_div::trimExplode('-', $value, TRUE);
-                                               if (trim($tmp[1]) && trim($tmp[1]) !== '0.0.0') {
-                                                       $value = $tmp[0] . ' - ' . $tmp[1];
-                                               } else {
-                                                       $value = $tmp[0];
-                                               }
-                                       }
-                                       $suggests[] = $key . ($value ? ' (' . $value . ')' : '');
-                               }
-                       }
-                       if (count($depends)) {
-                               $result['depends'] = htmlspecialchars(implode(', ', $depends));
-                       }
-                       if (count($conflicts)) {
-                               $result['conflicts'] = htmlspecialchars(implode(', ', $conflicts));
-                       }
-                       if (count($suggests)) {
-                               $result['suggests'] = htmlspecialchars(implode(', ', $suggests));
-                       }
-               }
-               return $result;
-       }
-
-       /**
-        * Listing of loaded (installed) extensions
-        *
-        * @return      void
-        */
-       function extensionList_loaded() {
-               global $TYPO3_LOADED_EXT;
-
-               list($list, $cat) = $this->getInstalledExtensions();
-
-               // Loaded extensions
-               $content = '';
-               $lines = array();
-
-               // Available extensions
-               if (is_array($cat[$this->parentObject->MOD_SETTINGS['listOrder']])) {
-                       $content = '';
-                       $lines = array();
-                       $lines[] = $this->extensionListRowHeader(' class="t3-row-header"', array('<td><img src="clear.gif" width="1" height="1" alt="" /></td>'));
-
-                       foreach ($cat[$this->parentObject->MOD_SETTINGS['listOrder']] as $catName => $extEkeys) {
-
-                               natcasesort($extEkeys);
-                               $extensions = array();
-                               foreach ($extEkeys as $extKey => $data) {
-                                       if (array_key_exists($extKey, $TYPO3_LOADED_EXT) && ($this->parentObject->MOD_SETTINGS['display_shy'] || !$list[$extKey]['EM_CONF']['shy']) && $this->parentObject->searchExtension($extKey, $list[$extKey])) {
-                                               if (in_array($extKey, $this->parentObject->requiredExt)) {
-                                                       $loadUnloadLink = '<strong>' . tx_em_Tools::rfw($GLOBALS['LANG']->getLL('extension_required_short')) . '</strong>';
-                                               } else {
-                                                       $loadUnloadLink = '<a href="' . htmlspecialchars(t3lib_div::linkThisScript(array(
-                                                               'CMD[showExt]' => $extKey,
-                                                               'CMD[remove]' => 1
-                                                       ))) . '">' . tx_em_Tools::removeButton() . '</a>';
-                                               }
-
-                                               $extensions[] = $this->extensionListRow($extKey, $list[$extKey], array('<td class="bgColor">' . $loadUnloadLink . '</td>'));
-
-                                       }
-                               }
-                               if (count($extensions)) {
-                                       $lines[] = '<tr><td colspan="' . (3 + $this->parentObject->detailCols[$this->parentObject->MOD_SETTINGS['display_details']]) . '"><br /></td></tr>';
-                                       $lines[] = '<tr><td colspan="' . (3 + $this->parentObject->detailCols[$this->parentObject->MOD_SETTINGS['display_details']]) . '">' . t3lib_iconWorks::getSpriteIcon('apps-filetree-folder-default') . '<strong>' . htmlspecialchars($this->parentObject->listOrderTitle($this->parentObject->MOD_SETTINGS['listOrder'], $catName)) . '</strong></td></tr>';
-                                       $lines[] = implode(LF, $extensions);
-                               }
-                       }
-               }
-
-               $content .= '<form action="' . $this->parentObject->script . '" method="post" name="lookupform">';
-               $content .= '<label for="lookUp">' . $GLOBALS['LANG']->getLL('look_up') . '</label> <input type="text" id="lookUp" name="lookUp" value="' . htmlspecialchars($this->lookUpStr) . '" /><input type="submit" value="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_common.xml:search') . '" /><br /><br />';
-
-               $content .= '</form>
-
-                       <!-- Loaded Extensions List -->
-                       <table cellspacing="0" class="t3-em-extension-list t3-em-extension-list-loaded">' . implode('', $lines) . '</table>';
-
-               return $content;
-       }
-
-       /**
-        * Listing of available (installed) extensions
-        *
-        * @return      void
-        */
-       function extensionList_installed() {
-
-               list($list, $cat) = $this->getInstalledExtensions();
-
-               // Available extensions
-               if (is_array($cat[$this->parentObject->MOD_SETTINGS['listOrder']])) {
-                       $content = '';
-                       $lines = array();
-                       $lines[] = $this->extensionListRowHeader(' class="t3-row-header"', array('<td><img src="clear.gif" width="18" height="1" alt="" /></td>'));
-
-                       $allKeys = array();
-                       foreach ($cat[$this->parentObject->MOD_SETTINGS['listOrder']] as $catName => $extEkeys) {
-                               if (!$this->parentObject->MOD_SETTINGS['display_obsolete'] && $catName == 'obsolete') {
-                                       continue;
-                               }
-
-                               $allKeys[] = '';
-                               $allKeys[] = 'TYPE: ' . $catName;
-
-                               natcasesort($extEkeys);
-                               $extensions = array();
-                               foreach ($extEkeys as $extKey => $value) {
-                                       $allKeys[] = $extKey;
-                                       if ((!$list[$extKey]['EM_CONF']['shy'] || $this->parentObject->MOD_SETTINGS['display_shy']) &&
-                                                       ($list[$extKey]['EM_CONF']['state'] != 'obsolete' || $this->parentObject->MOD_SETTINGS['display_obsolete'])
-                                                       && $this->parentObject->searchExtension($extKey, $list[$extKey])) {
-                                               $loadUnloadLink = t3lib_extMgm::isLoaded($extKey) ?
-                                                               '<a href="' . htmlspecialchars(t3lib_div::linkThisScript(array(
-                                                                       'CMD[showExt]' => $extKey,
-                                                                       'CMD[remove]' => 1,
-                                                                       'CMD[clrCmd]' => 1,
-                                                                       'SET[singleDetails]' => 'info'
-                                                               ))) . '">' . tx_em_Tools::removeButton() . '</a>' :
-                                                               '<a href="' . htmlspecialchars(t3lib_div::linkThisScript(array(
-                                                                       'CMD[showExt]' => $extKey,
-                                                                       'CMD[load]' => 1,
-                                                                       'CMD[clrCmd]' => 1,
-                                                                       'SET[singleDetails]' => 'info'
-                                                               ))) . '">' . tx_em_Tools::installButton() . '</a>';
-                                               if (in_array($extKey, $this->parentObject->requiredExt)) {
-                                                       $loadUnloadLink = '<strong>' . tx_em_Tools::rfw($GLOBALS['LANG']->getLL('extension_required_short')) . '</strong>';
-                                               }
-                                               $theRowClass = t3lib_extMgm::isLoaded($extKey) ? 'em-listbg1' : 'em-listbg2';
-                                               $extensions[] = $this->extensionListRow($extKey, $list[$extKey], array('<td class="bgColor">' . $loadUnloadLink . '</td>'), $theRowClass);
-                                       }
-                               }
-                               if (count($extensions)) {
-                                       $lines[] = '<tr><td colspan="' . (3 + $this->parentObject->detailCols[$this->parentObject->MOD_SETTINGS['display_details']]) . '"><br /></td></tr>';
-                                       $lines[] = '<tr><td colspan="' . (3 + $this->parentObject->detailCols[$this->parentObject->MOD_SETTINGS['display_details']]) . '">' . t3lib_iconWorks::getSpriteIcon('apps-filetree-folder-default') . '<strong>' . htmlspecialchars($this->parentObject->listOrderTitle($this->parentObject->MOD_SETTINGS['listOrder'], $catName)) . '</strong></td></tr>';
-                                       $lines[] = implode(LF, $extensions);
-                               }
-                       }
-
-                       $content .= '
-
-
-<!--
-EXTENSION KEYS:
-
-' . trim(implode(LF, $allKeys)) . '
-
--->
-
-';
-
-                       $content .= sprintf($GLOBALS['LANG']->getLL('how_to_install'), tx_em_Tools::installButton()) . ' <br />' .
-                                       sprintf($GLOBALS['LANG']->getLL('how_to_uninstall'), tx_em_Tools::removeButton()) . ' <br /><br />';
-                       $content .= '<form action="' . $this->parentObject->script . '" method="post" name="lookupform">';
-                       $content .= '<label for="lookUp">' . $GLOBALS['LANG']->getLL('look_up') . '</label> <input type="text" id="lookUp" name="lookUp" value="' . htmlspecialchars($this->parentObject->lookUpStr) . '" /><input type="submit" value="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_common.xml:search') . '" /></form><br /><br />';
-                       $content .= $this->securityHint . '<br /><br />';
-
-                       $content .= '<table cellspacing="0" class="t3-em-extension-list t3-em-extension-list-installed">' . implode('', $lines) . '</table>';
-
-                       return $content;
-               }
-       }
-
-
-       /**
-        * Prints the header row for the various listings
-        *
-        * @param       string          Attributes for the <tr> tag
-        * @param       array           Preset cells in the beginning of the row. Typically a blank cell with a clear-gif
-        * @param       boolean         If set, the list is coming from remote server.
-        * @return      string          HTML <tr> table row
-        */
-       function extensionListRowHeader($trAttrib, $cells, $import = 0) {
-               $cells[] = '<td></td>';
-               $cells[] = '<td>' . $GLOBALS['LANG']->getLL('extInfoArray_title') . '</td>';
-
-               if (!$this->parentObject->MOD_SETTINGS['display_details']) {
-                       $cells[] = '<td>' . $GLOBALS['LANG']->getLL('extInfoArray_description') . '</td>';
-                       $cells[] = '<td>' . $GLOBALS['LANG']->getLL('extInfoArray_author') . '</td>';
-               } elseif ($this->parentObject->MOD_SETTINGS['display_details'] == 2) {
-                       $cells[] = '<td>' . $GLOBALS['LANG']->getLL('extInfoArray_priority') . '</td>';
-                       $cells[] = '<td>' . $GLOBALS['LANG']->getLL('listRowHeader_modifies_tables_short') . '</td>';
-                       $cells[] = '<td>' . $GLOBALS['LANG']->getLL('listRowHeader_modules') . '</td>';
-                       $cells[] = '<td>' . $GLOBALS['LANG']->getLL('listRowHeader_clear_cache_short') . '</td>';
-                       $cells[] = '<td>' . $GLOBALS['LANG']->getLL('extInfoArray_internal') . '</td>';
-                       $cells[] = '<td>' . $GLOBALS['LANG']->getLL('extInfoArray_shy') . '</td>';
-               } elseif ($this->parentObject->MOD_SETTINGS['display_details'] == 3) {
-                       $cells[] = '<td>' . $GLOBALS['LANG']->getLL('listRowHeader_tables_fields') . '</td>';
-                       $cells[] = '<td>' . $GLOBALS['LANG']->getLL('listRowHeader_ts_files') . '</td>';
-                       $cells[] = '<td>' . $GLOBALS['LANG']->getLL('listRowHeader_affects') . '</td>';
-                       $cells[] = '<td>' . $GLOBALS['LANG']->getLL('listRowHeader_modules') . '</td>';
-                       $cells[] = '<td>' . $GLOBALS['LANG']->getLL('listRowHeader_config') . '</td>';
-                       $cells[] = '<td>' . $GLOBALS['LANG']->getLL('extInfoArray_code_warnings') . '</td>';
-               } elseif ($this->parentObject->MOD_SETTINGS['display_details'] == 4) {
-                       $cells[] = '<td>' . $GLOBALS['LANG']->getLL('listRowHeader_locallang') . '</td>';
-                       $cells[] = '<td>' . $GLOBALS['LANG']->getLL('listRowHeader_classes') . '</td>';
-                       $cells[] = '<td>' . $GLOBALS['LANG']->getLL('extInfoArray_code_warnings') . '</td>';
-                       $cells[] = '<td>' . $GLOBALS['LANG']->getLL('extInfoArray_annoyances') . '</td>';
-               } elseif ($this->parentObject->MOD_SETTINGS['display_details'] == 5) {
-                       $cells[] = '<td>' . $GLOBALS['LANG']->getLL('listRowHeader_changed_files') . '</td>';
-               } else {
-                       $cells[] = '<td>' . $GLOBALS['LANG']->getLL('listRowHeader_ext_key') . '</td>';
-                       $cells[] = '<td>' . $GLOBALS['LANG']->getLL('extInfoArray_version') . '</td>';
-                       if (!$import) {
-                               $cells[] = '<td>' . $GLOBALS['LANG']->getLL('listRowHeader_download_short') . '</td>';
-                               $cells[] = '<td>' . $GLOBALS['LANG']->getLL('listRowHeader_documentation_short') . '</td>';
-                               $cells[] = '<td>' . $GLOBALS['LANG']->getLL('listRowHeader_type') . '</td>';
-                       } else {
-                               $cells[] = '<td' . tx_em_Tools::labelInfo($GLOBALS['LANG']->getLL('listRowHeader_title_upload_date')) . '>' .
-                                               $GLOBALS['LANG']->getLL('listRowHeader_upload_date') . '</td>';
-                               $cells[] = '<td>' . $GLOBALS['LANG']->getLL('extInfoArray_author') . '</td>';
-                               $cells[] = '<td' . tx_em_Tools::labelInfo($GLOBALS['LANG']->getLL('listRowHeader_title_current_version')) . '>' .
-                                               $GLOBALS['LANG']->getLL('listRowHeader_current_version') . '</td>';
-                               $cells[] = '<td' . tx_em_Tools::labelInfo($GLOBALS['LANG']->getLL('listRowHeader_title_current_type')) . '>' .
-                                               $GLOBALS['LANG']->getLL('listRowHeader_current_type') . '</td>';
-                               $cells[] = '<td' . tx_em_Tools::labelInfo($GLOBALS['LANG']->getLL('listRowHeader_title_number_of_downloads')) . '>' .
-                                               $GLOBALS['LANG']->getLL('listRowHeader_download_short') . '</td>';
-                       }
-                       $cells[] = '<td>' . $GLOBALS['LANG']->getLL('extInfoArray_state') . '</td>';
-               }
-               return '
-                       <tr' . $trAttrib . '>
-                               ' . implode('
-                               ', $cells) . '
-                       </tr>';
-       }
-
-
-       /**
-        * Prints a row with data for the various extension listings
-        *
-        * @param       string          Extension key
-        * @param       array           Extension information array
-        * @param       array           Preset table cells, eg. install/uninstall icons.
-        * @param       string          <tr> tag class
-        * @param       array           Array with installed extension keys (as keys)
-        * @param       boolean         If set, the list is coming from remote server.
-        * @param       string          Alternative link URL
-        * @return      string          HTML <tr> content
-        */
-       function extensionListRow($extKey, $extInfo, $cells, $bgColorClass = '', $inst_list = array(), $import = 0, $altLinkUrl = '') {
-               $stateColors = tx_em_Tools::getStateColors();
-
-               // Icon:
-               $imgInfo = @getImageSize(tx_em_Tools::getExtPath($extKey, $extInfo['type']) . '/ext_icon.gif');
-               if (is_array($imgInfo)) {
-                       $cells[] = '<td><img src="' . $GLOBALS['BACK_PATH'] . tx_em_Tools::typeRelPath($extInfo['type']) . $extKey . '/ext_icon.gif' . '" ' . $imgInfo[3] . ' alt="" /></td>';
-               } elseif ($extInfo['_ICON']) {
-                       $cells[] = '<td>' . $extInfo['_ICON'] . '</td>';
-               } else {
-                       $cells[] = '<td><img src="clear.gif" width="1" height="1" alt="" /></td>';
-               }
-
-               // Extension title:
-               $cells[] = '<td nowrap="nowrap"><a href="' . htmlspecialchars($altLinkUrl ? $altLinkUrl : t3lib_div::linkThisScript(array(
-                       'CMD[showExt]' => $extKey,
-                       'SET[singleDetails]' => 'info'
-               ))) . '" title="' . htmlspecialchars($extInfo['EM_CONF']['description']) . '">'
-                               . t3lib_div::fixed_lgd_cs($extInfo['EM_CONF']['title'] ? htmlspecialchars($extInfo['EM_CONF']['title']) : '<em>' . $extKey . '</em>', 40) . '</a></td>';
-
-               // Based on the display mode you will see more or less details:
-               if (!$this->parentObject->MOD_SETTINGS['display_details']) {
-                       $cells[] = '<td>' . htmlspecialchars(t3lib_div::fixed_lgd_cs($extInfo['EM_CONF']['description'], 400)) . '<br /><img src="clear.gif" width="300" height="1" alt="" /></td>';
-                       $cells[] = '<td nowrap="nowrap">' . ($extInfo['EM_CONF']['author_email'] ? '<a href="mailto:' . htmlspecialchars($extInfo['EM_CONF']['author_email']) . '">' : '') . htmlspecialchars($extInfo['EM_CONF']['author']) . (htmlspecialchars($extInfo['EM_CONF']['author_email']) ? '</a>' : '') . ($extInfo['EM_CONF']['author_company'] ? '<br />' . htmlspecialchars($extInfo['EM_CONF']['author_company']) : '') . '</td>';
-               } elseif ($this->parentObject->MOD_SETTINGS['display_details'] == 2) {
-                       $cells[] = '<td nowrap="nowrap">' . $extInfo['EM_CONF']['priority'] . '</td>';
-                       $cells[] = '<td nowrap="nowrap">' . implode('<br />', t3lib_div::trimExplode(',', $extInfo['EM_CONF']['modify_tables'], 1)) . '</td>';
-                       $cells[] = '<td nowrap="nowrap">' . $extInfo['EM_CONF']['module'] . '</td>';
-                       $cells[] = '<td nowrap="nowrap">' . ($extInfo['EM_CONF']['clearCacheOnLoad'] ? $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_common.xml:yes') : '') . '</td>';
-                       $cells[] = '<td nowrap="nowrap">' . ($extInfo['EM_CONF']['internal'] ? $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_common.xml:yes') : '') . '</td>';
-                       $cells[] = '<td nowrap="nowrap">' . ($extInfo['EM_CONF']['shy'] ? $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_common.xml:yes') : '') . '</td>';
-               } elseif ($this->parentObject->MOD_SETTINGS['display_details'] == 3) {
-                       $techInfo = $this->install->makeDetailedExtensionAnalysis($extKey, $extInfo);
-
-                       $cells[] = '<td>' . $this->parentObject->extensionDetails->extInformationArray_dbReq($techInfo) .
-                                       '</td>';
-                       $cells[] = '<td nowrap="nowrap">' . (is_array($techInfo['TSfiles']) ? implode('<br />', $techInfo['TSfiles']) : '') . '</td>';
-                       $cells[] = '<td nowrap="nowrap">' . (is_array($techInfo['flags']) ? implode('<br />', $techInfo['flags']) : '') . '</td>';
-                       $cells[] = '<td nowrap="nowrap">' . (is_array($techInfo['moduleNames']) ? implode('<br />', $techInfo['moduleNames']) : '') . '</td>';
-                       $cells[] = '<td nowrap="nowrap">' . ($techInfo['conf'] ? $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_common.xml:yes') : '') . '</td>';
-                       $cells[] = '<td>' .
-                                       tx_em_Tools::rfw((t3lib_extMgm::isLoaded($extKey) && $techInfo['tables_error'] ?
-                                                       '<strong>' . $GLOBALS['LANG']->getLL('extInfoArray_table_error') . '</strong><br />' .
-                                                                       $GLOBALS['LANG']->getLL('extInfoArray_missing_fields') : '') .
-                                                       (t3lib_extMgm::isLoaded($extKey) && $techInfo['static_error'] ?
-                                                                       '<strong>' . $GLOBALS['LANG']->getLL('extInfoArray_static_table_error') . '</strong><br />' .
-                                                                                       $GLOBALS['LANG']->getLL('extInfoArray_static_tables_missing_empty') : '')) .
-                                       '</td>';
-               } elseif ($this->parentObject->MOD_SETTINGS['display_details'] == 4) {
-                       $techInfo = $this->install->makeDetailedExtensionAnalysis($extKey, $extInfo, 1);
-
-                       $cells[] = '<td>' . (is_array($techInfo['locallang']) ? implode('<br />', $techInfo['locallang']) : '') . '</td>';
-                       $cells[] = '<td>' . (is_array($techInfo['classes']) ? implode('<br />', $techInfo['classes']) : '') . '</td>';
-                       $cells[] = '<td>' . (is_array($techInfo['errors']) ? tx_em_Tools::rfw(implode('<hr />', $techInfo['errors'])) : '') . '</td>';
-                       $cells[] = '<td>' . (is_array($techInfo['NSerrors']) ?
-                                       (!t3lib_div::inList($this->parentObject->nameSpaceExceptions, $extKey) ?
-                                                       t3lib_utility_Debug::viewarray($techInfo['NSerrors']) :
-                                                       tx_em_Tools::dfw($GLOBALS['LANG']->getLL('extInfoArray_exception'))) : '') . '</td>';
-               } elseif ($this->parentObject->MOD_SETTINGS['display_details'] == 5) {
-                       $currentMd5Array = $this->parentObject->extensionDetails->serverExtensionMD5array($extKey, $extInfo);
-                       $affectedFiles = '';
-                       $msgLines = array();
-                       $msgLines[] = $GLOBALS['LANG']->getLL('listRow_files') . ' ' . count($currentMd5Array);
-                       if (strcmp($extInfo['EM_CONF']['_md5_values_when_last_written'], serialize($currentMd5Array))) {
-                               $msgLines[] = tx_em_Tools::rfw('<br /><strong>' . $GLOBALS['LANG']->getLL('extInfoArray_difference_detected') . '</strong>');
-                               $affectedFiles = tx_em_Tools::findMD5ArrayDiff($currentMd5Array, unserialize($extInfo['EM_CONF']['_md5_values_when_last_written']));
-                               if (count($affectedFiles)) {
-                                       $msgLines[] = '<br /><strong>' . $GLOBALS['LANG']->getLL('extInfoArray_modified_files') . '</strong><br />' .
-                                                       tx_em_Tools::rfw(implode('<br />', $affectedFiles));
-                               }
-                       }
-                       $cells[] = '<td>' . implode('<br />', $msgLines) . '</td>';
-               } else {
-                       // Default view:
-                       $verDiff = $inst_list[$extKey] && tx_em_Tools::versionDifference($extInfo['EM_CONF']['version'], $inst_list[$extKey]['EM_CONF']['version'], $this->parentObject->versionDiffFactor);
-
-                       $cells[] = '<td nowrap="nowrap"><em>' . $extKey . '</em></td>';
-                       $cells[] = '<td nowrap="nowrap">' . ($verDiff ? '<strong>' . tx_em_Tools::rfw(htmlspecialchars($extInfo['EM_CONF']['version'])) . '</strong>' : $extInfo['EM_CONF']['version']) . '</td>';
-                       if (!$import) { // Listing extension on LOCAL server:
-                               // Extension Download:
-                               $cells[] = '<td nowrap="nowrap"><a href="' . htmlspecialchars(t3lib_div::linkThisScript(array(
-                                       'CMD[doBackup]' => 1,
-                                       'SET[singleDetails]' => 'backup',
-                                       'CMD[showExt]' => $extKey
-                               ))) . '" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_common.xml:download') . '">' .
-                                               t3lib_iconWorks::getSpriteIcon('actions-system-extension-download') .
-                                               '</a></td>';
-
-                               // Manual download
-                               $manual = tx_em_Tools::typePath($extInfo['type']) . $extKey . '/doc/manual.sxw';
-                               $manualRelPath = t3lib_div::resolveBackPath($this->parentObject->doc->backPath . tx_em_Tools::typeRelPath($extInfo['type'])) . $extKey . '/doc/manual.sxw';
-                               if ($extInfo['EM_CONF']['docPath']) {
-                                       $manual = tx_em_Tools::typePath($extInfo['type']) . $extKey . '/' . $extInfo['EM_CONF']['docPath'] . '/manual.sxw';
-                                       $manualRelPath = t3lib_div::resolveBackPath($this->parentObject->doc->backPath . tx_em_Tools::typeRelPath($extInfo['type'])) . $extKey . '/' . $extInfo['EM_CONF']['docPath'] . '/manual.sxw';
-                               }
-                               $cells[] = '<td nowrap="nowrap">' .
-                                               (tx_em_Tools::typePath($extInfo['type']) && @is_file($manual) ?
-                                                               '<a href="' . htmlspecialchars($manualRelPath) . '" target="_blank" title="' . $GLOBALS['LANG']->getLL('listRow_local_manual') . '">' .
-                                                                               t3lib_iconWorks::getSpriteIcon('actions-system-extension-documentation') . '</a>' : '') .
-                                               '</td>';
-
-                               // Double installation (inclusion of an extension in more than one of system, global or local scopes)
-                               $doubleInstall = '';
-                               if (strlen($extInfo['doubleInstall']) > 1) {
-                                       // Separate the "SL" et al. string into an array and replace L by Local, G by Global etc.
-                                       $doubleInstallations = str_replace(
-                                               array('S', 'G', 'L'),
-                                               array(
-                                                       $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_tools_em.xml:sysext'),
-                                                       $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_tools_em.xml:globalext'),
-                                                       $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_tools_em.xml:localext')
-                                               ),
-                                               str_split($extInfo['doubleInstall'])
-                                       );
-                                       // Last extension is the one actually used
-                                       $usedExtension = array_pop($doubleInstallations);
-                                       // Next extension is overridden
-                                       $overriddenExtensions = array_pop($doubleInstallations);
-                                       // If the array is not yet empty, the extension is actually installed 3 times (SGL)
-                                       if (count($doubleInstallations) > 0) {
-                                               $lastExtension = array_pop($doubleInstallations);
-                                               $overriddenExtensions .= ' ' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_common.xml:and') . ' ' . $lastExtension;
-                                       }
-                                       $doubleInstallTitle = sprintf(
-                                               $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_tools_em.xml:double_inclusion'),
-                                               $usedExtension,
-                                               $overriddenExtensions
-                                       );
-                                       $doubleInstall = ' <strong><abbr title="' . $doubleInstallTitle . '">' . tx_em_Tools::rfw($extInfo['doubleInstall']) . '</abbr></strong>';
-                               }
-                               $cells[] = '<td nowrap="nowrap">' . $this->types[$extInfo['type']] . $doubleInstall . '</td>';
-                       } else { // Listing extensions from REMOTE repository:
-                               $inst_curVer = $inst_list[$extKey]['EM_CONF']['version'];
-                               if (isset($inst_list[$extKey])) {
-                                       if ($verDiff) {
-                                               $inst_curVer = '<strong>' . tx_em_Tools::rfw($inst_curVer) . '</strong>';
-                                       }
-                               }
-                               $cells[] = '<td nowrap="nowrap">' . t3lib_befunc::date($extInfo['EM_CONF']['lastuploaddate']) . '</td>';
-                               $cells[] = '<td nowrap="nowrap">' . htmlspecialchars(t3lib_div::fixed_lgd_cs($extInfo['EM_CONF']['author'], $GLOBALS['BE_USER']->uc[titleLen])) . '</td>';
-                               $cells[] = '<td nowrap="nowrap">' . $inst_curVer . '</td>';
-                               $cells[] = '<td nowrap="nowrap">' . $this->api->typeLabels[$inst_list[$extKey]['type']] . (strlen($inst_list[$extKey]['doubleInstall']) > 1 ? '<strong> ' . tx_em_Tools::rfw($inst_list[$extKey]['doubleInstall']) . '</strong>' : '') . '</td>';
-                               $cells[] = '<td nowrap="nowrap">' . ($extInfo['downloadcounter_all'] ? $extInfo['downloadcounter_all'] : '&nbsp;&nbsp;') . '/' . ($extInfo['downloadcounter'] ? $extInfo['downloadcounter'] : '&nbsp;') . '</td>';
-                       }
-                       $cells[] = '<td nowrap="nowrap" class="extstate" style="background-color:' . $stateColors[$extInfo['EM_CONF']['state']] . ';">' . $this->states[$extInfo['EM_CONF']['state']] . '</td>';
-               }
-
-               // show a different background through a different class for insecure (-1) extensions,
-               // for unreviewed (0) and reviewed extensions (1), just use the regular class
-               if ($this->xmlHandler->getReviewState($extKey, $extInfo['EM_CONF']['version']) < 0) {
-                       $bgclass = ' class="unsupported-ext"';
-               } else {
-                       $bgclass = ' class="' . ($bgColorClass ? $bgColorClass : 'em-listbg1') . '"';
-               }
-
-               return '
-                       <tr' . $bgclass . '>
-                               ' . implode('
-                               ', $cells) . '
-                       </tr>';
-       }
-
-
-       /**
-        *  Displays a list of extensions where a newer version is available
-        *  in the TER than the one that is installed right now
-        *  integrated from the extension "ter_update_check" for TYPO3 4.2 by Christian Welzel
-        *
-        * @return string
-        */
-       function showExtensionsToUpdate() {
-               global $LANG;
-               $extList = $this->getInstalledExtensions();
-
-               $content = '<table cellspacing="0" class="t3-em-extension-list t3-em-extension-list-to-update">' .
-                               '<tr class="t3-row-header">' .
-                               '<td></td>' .
-                               '<td>' . $LANG->sL('LLL:EXT:lang/locallang_mod_tools_em.xml:tab_mod_name') . '</td>' .
-                               '<td>' . $LANG->sL('LLL:EXT:lang/locallang_mod_tools_em.xml:tab_mod_key') . '</td>' .
-                               '<td>' . $LANG->sL('LLL:EXT:lang/locallang_mod_tools_em.xml:tab_mod_loc_ver') . '</td>' .
-                               '<td>' . $LANG->sL('LLL:EXT:lang/locallang_mod_tools_em.xml:tab_mod_rem_ver') . '</td>' .
-                               '<td>' . $LANG->sL('LLL:EXT:lang/locallang_mod_tools_em.xml:tab_mod_location') . '</td>' .
-                               '<td>' . $LANG->sL('LLL:EXT:lang/locallang_mod_tools_em.xml:tab_mod_comment') . '</td>' .
-                               '</tr>';
-
-               foreach ($extList[0] as $name => $data) {
-                       $this->xmlHandler->searchExtensionsXMLExact($name, '', '', TRUE, TRUE);
-                       if (!is_array($this->xmlHandler->extensionsXML[$name])) {
-                               continue;
-                       }
-
-                       $v = $this->xmlHandler->extensionsXML[$name]['versions'];
-                       $versions = array_keys($v);
-                       natsort($versions);
-                       $lastversion = end($versions);
-
-                       if ((t3lib_extMgm::isLoaded($name) || $this->parentObject->MOD_SETTINGS['display_installed']) &&
-                                       ($data['EM_CONF']['shy'] == 0 || $this->parentObject->MOD_SETTINGS['display_shy']) &&
-                                       tx_em_Tools::versionDifference($lastversion, $data['EM_CONF']['version'], 1)) {
-
-                               $imgInfo = @getImageSize(tx_em_Tools::getExtPath($name, $data['type']) . '/ext_icon.gif');
-                               if (is_array($imgInfo)) {
-                                       $icon = '<img src="' . $GLOBALS['BACK_PATH'] . tx_em_Tools::typeRelPath($data['type']) . $name . '/ext_icon.gif' . '" ' . $imgInfo[3] . ' alt="" />';
-                               } elseif ($data['_ICON']) { //TODO: see if this can be removed, seems to be wrong in this context
-                                       $icon = $data['_ICON'];
-                               } else {
-                                       $icon = '<img src="clear.gif" width="1" height="1" alt="" />';
-                               }
-                               $comment = '<table cellpadding="0" cellspacing="0" width="100%">';
-                               foreach ($versions as $vk) {
-                                       $va = & $v[$vk];
-                                       if (t3lib_utility_VersionNumber::convertVersionNumberToInteger($vk) <= t3lib_utility_VersionNumber::convertVersionNumberToInteger($data['EM_CONF']['version'])) {
-                                               continue;
-                                       }
-                                       $comment .= '<tr><td valign="top" style="padding-right:2px;border-bottom:1px dotted gray">' . $vk . '</td>' . '<td valign="top" style="border-bottom:1px dotted gray">' . nl2br($va[uploadcomment]) . '</td></tr>';
-                               }
-                               $comment .= '</table>';
-
-                               $serverMD5Array = $this->parentObject->extensionDetails->serverExtensionMD5array($name, $data);
-                               if (is_array($serverMD5Array)) {
-                                       ksort($serverMD5Array);
-                               }
-                               $currentMD5Array = unserialize($data['EM_CONF']['_md5_values_when_last_written']);
-                               if (is_array($currentMD5Array)) {
-                                       @ksort($currentMD5Array);
-                               }
-                               $warn = '';
-                               if (strcmp(serialize($currentMD5Array), serialize($serverMD5Array))) {
-                                       $warn = '<tr class="bgColor4" style="color:red"><td colspan="7">' . tx_em_Tools::rfw('<br /><strong>' . $name . ': ' . $LANG->sL('LLL:EXT:lang/locallang_mod_tools_em.xml:msg_warn_diff') . '</strong>') . '</td></tr>' . LF;
-                                       if ($this->parentObject->MOD_SETTINGS['display_files'] == 1) {
-                                               $affectedFiles = tx_em_Tools::findMD5ArrayDiff($serverMD5Array, $currentMD5Array);
-                                               if (count($affectedFiles)) {
-                                                       $warn .= '<tr class="bgColor4"><td colspan="7"><strong>' . $LANG->sL('LLL:EXT:lang/locallang_mod_tools_em.xml:msg_modified') . '</strong><br />' . tx_em_Tools::rfw(implode('<br />', $affectedFiles)) . '</td></tr>' . LF;
-                                               }
-                                       }
-                               }
-
-                               $content .= '<tr class="bgColor4"><td valign="top">' . $icon . '</td>' .
-                                               '<td valign="top">' . ($data['EM_CONF']['state'] == 'excludeFromUpdates'
-                                                       ? '<span style="color:#cf7307">' . $data['EM_CONF']['title'] . ' ' . $LANG->sL('LLL:EXT:lang/locallang_mod_tools_em.xml:write_protected') . '</span>'
-                                                       : '<a href="' . t3lib_div::linkThisScript(array(
-                                                               'CMD[importExtInfo]' => $name
-                                                               )) . '">' . $data[EM_CONF][title] . '</a>') . '</td>' .
-                                               '<td valign="top">' . $name . '</td>' .
-                         &nb