Follow-up to #16315: Wrong reference to unzip class
authorSteffen Kamper <info@sk-typo3.de>
Sun, 14 Nov 2010 17:55:56 +0000 (17:55 +0000)
committerSteffen Kamper <info@sk-typo3.de>
Sun, 14 Nov 2010 17:55:56 +0000 (17:55 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@9382 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/tsconfig_help/mod1/index.php

index fa15689..9774db9 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-11-14  Steffen Kamper  <steffen@typo3.org>
+
+       * Follow-up to #16315: Wrong reference to unzip class
+
 2010-11-14  Xavier Perseguers  <typo3@perseguers.ch>
 
        * Raised DBAL to version 1.2.0beta1
index d0d9f64..52daf0e 100644 (file)
@@ -28,7 +28,6 @@ unset($MCONF);
 require_once('conf.php');
 require_once($BACK_PATH.'init.php');
 require_once($BACK_PATH.'template.php');
-require_once($BACK_PATH . 'sysext/em/mod1/class.em_unzip.php');
 
 $LANG->includeLLFile('EXT:tsconfig_help/mod1/locallang.xml');
 $BE_USER->modAccess($MCONF,1); // This checks permissions and exits if the users has no permission for entry.
@@ -303,7 +302,11 @@ class tx_tsconfighelp_module1 extends t3lib_SCbase {
        function unzip($file, $path)    {
                        // we use the unzip class of the Extension Manager here
                        // TODO: move unzip class to core
-               $unzip = t3lib_div::makeInstance('em_unzip', $file);
+               if (!t3lib_extMgm::isLoaded('em')) {
+                               //em is not loaded, so include the unzip class
+                       t3lib_div::requireOnce(PATH_typo3 . 'sysext/em/classes/tools/class.tx_em_tools_unzip.php');
+               }
+               $unzip = t3lib_div::makeInstance('tx_em_Tools_Unzip', $file);
                $ret = $unzip->extract(array('add_path'=>$path));
                return (is_array($ret));
        }