* Fixed rar support master
authorkraftb <kraftb@735d13b6-9817-0410-8766-e36946ffe9aa>
Fri, 13 Jul 2012 18:42:23 +0000 (18:42 +0000)
committerkraftb <kraftb@735d13b6-9817-0410-8766-e36946ffe9aa>
Fri, 13 Jul 2012 18:42:23 +0000 (18:42 +0000)
* Updated documentation
* Uploaded to TER as version 0.3.2

git-svn-id: https://svn.typo3.org/TYPO3v4/Extensions/kb_packman/trunk@64465 735d13b6-9817-0410-8766-e36946ffe9aa

Changelog
class.tx_kbpackman.php
cm1/index.php
doc/manual.sxw
ext_conf_template.txt
ext_emconf.php
ext_localconf.php

index 51364be..72a7802 100755 (executable)
--- a/Changelog
+++ b/Changelog
@@ -1,3 +1,9 @@
+2012-07-13  Bernhard Kraft  <kraftb@seicht.co.at>
+
+       * Fixed rar support
+       * Updated documentation
+       * Uploaded to TER as version 0.3.2
+
 2010-03-11  Bernhard Kraft  <kraftb@think-open.at>
 
        * Added support for RAR files
index 3608e27..4b2ffd4 100755 (executable)
@@ -85,19 +85,19 @@ class tx_kbpackman  {
         */
        function isCompressed($file)    {
                // Handle ZIP Extensions
-               if (eregi('\.zip$', $file)) {
+               if (preg_match('/\.zip$/', $file)) {
                        return true;
                }
                // Handle RAR Extensions
-               if (eregi('\.rar$', $file)) {
+               if (preg_match('/\.rar$/', $file)) {
                        return true;
                }
                // Handle TAR.GZ Extensions
-               if (eregi('\.tar\.gz$', $file) || eregi('\.tgz$', $file)) {
+               if (preg_match('/\.tar.gz$/', $file) || preg_match('/\.tgz$/', $file)) {
                        return true;
                }
                // Handle TAR.BZ2 Extensions
-               if (eregi('\.tar\.bz2$', $file) || eregi('\.tbz2$', $file)) {
+               if (preg_match('/\.tar.bz2/', $file) || preg_match('/\.tbz2/', $file)) {
                        return true;
                }
                return false;
index 5dc2932..e2addff 100755 (executable)
@@ -70,7 +70,7 @@ require_once (PATH_t3lib.'class.t3lib_basicfilefunc.php');
 
 
 require_once(t3lib_extMgm::extPath('kb_packman').'class.tx_kbpackman.php');
-if ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][$_EXTKEY]['DAMsupport']) {
+if ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][$_EXTKEY]['DAMsupport'] && t3lib_extMgm::isLoaded('dam')) {
        require_once(t3lib_extMgm::extPath('dam').'lib/class.tx_dam_guirenderlist.php');
        require_once(t3lib_extMgm::extPath('dam').'lib/class.tx_dam_scbase.php');
        require_once(t3lib_extMgm::extPath('kb_packman').'class.tx_kbpackman_dam.php');
@@ -142,7 +142,7 @@ class tx_kbpackman_module extends tx_dam_SCbase     {
 
                $this->pageinfo=array('title' => 'File-List','uid'=>0,'pid'=>0);
 
-               $headerSection = $this->doc->getHeader('pages',$this->pageinfo,$this->pageinfo['_thePath']).'<br />'.$LANG->sL('LLL:EXT:lang/locallang_core.php:labels.path').': '.t3lib_div::fixed_lgd_pre($this->pageinfo['_thePath'],50);
+               $headerSection = $this->doc->getHeader('pages',$this->pageinfo,$this->pageinfo['_thePath']).'<br />'.$LANG->sL('LLL:EXT:lang/locallang_core.php:labels.path').': '.t3lib_div::fixed_lgd_cs($this->pageinfo['_thePath'],50);
 
                $this->content.=$this->doc->startPage($LANG->getLL('title'));
                $this->content.=$this->doc->header($LANG->getLL('title'));
index 7a104af..17d7788 100755 (executable)
Binary files a/doc/manual.sxw and b/doc/manual.sxw differ
index 4425933..3a9b566 100755 (executable)
@@ -11,3 +11,9 @@ targetExt = zip
 # cat=basic; type=boolean; label=DAM support: When set and DAM (+dam_index) is installed newly extracted files get indexed automatically
 DAMsupport = 1
 
+# cat=basic; type=string; label=RAR path: Path to the "rar" binary for handling rar archives. When not set default locations get searched for the binary.
+rarPath =
+
+# cat=basic; type=string; label=unRAR path: Path to the "unrar" binary for handling rar archives. When not set default locations get searched for the binary.
+unrarPath =
+
index 751e661..b7115a6 100755 (executable)
@@ -3,7 +3,7 @@
 ########################################################################
 # Extension Manager/Repository config file for ext "kb_packman".
 #
-# Auto generated 11-03-2010 10:08
+# Auto generated 13-07-2012 20:36
 #
 # Manual updates:
 # Only the data in the array - everything else is removed by next
 
 $EM_CONF[$_EXTKEY] = array(
        'title' => 'Packman',
-       'description' => 'Unzips or a zips files and folders (also tar.gz/tar.bz2) file in the fileadmin with a single click.',
+       'description' => 'Unzips or a zips files and folders (also tar.gz/tar.bz2 and rar) file in the fileadmin with a single click.',
        'category' => 'be',
        'shy' => 0,
-       'version' => '0.2.2',
-       'dependencies' => '',
+       'version' => '0.3.2',
+       'dependencies' => 'cms',
        'conflicts' => '',
        'priority' => '',
        'loadOrder' => '',
@@ -28,8 +28,8 @@ $EM_CONF[$_EXTKEY] = array(
        'clearcacheonload' => 0,
        'lockType' => '',
        'author' => 'Bernhard Kraft',
-       'author_email' => 'kraftb@kraftb.at',
-       'author_company' => 'think-open',
+       'author_email' => 'kraftb@seicht.co.at',
+       'author_company' => 'seicht.co.at',
        'CGLcompliance' => '',
        'CGLcompliance_note' => '',
        'constraints' => array(
@@ -43,7 +43,9 @@ $EM_CONF[$_EXTKEY] = array(
                'suggests' => array(
                ),
        ),
-       '_md5_values_when_last_written' => 'a:19:{s:6:"README";s:4:"67e8";s:22:"class.tx_kbpackman.php";s:4:"6e74";s:26:"class.tx_kbpackman_cm1.php";s:4:"645c";s:26:"class.tx_kbpackman_dam.php";s:4:"bf9b";s:21:"ext_conf_template.txt";s:4:"cfbf";s:12:"ext_icon.gif";s:4:"bc6e";s:16:"ext_icon_alt.gif";s:4:"d017";s:17:"ext_localconf.php";s:4:"2595";s:14:"ext_tables.php";s:4:"75ca";s:13:"locallang.php";s:4:"cdb0";s:13:"cm1/clear.gif";s:4:"cc11";s:28:"cm1/cm_icon_compress_dir.gif";s:4:"bd7d";s:29:"cm1/cm_icon_compress_file.gif";s:4:"edb6";s:22:"cm1/cm_icon_unpack.gif";s:4:"8074";s:32:"cm1/cm_icon_unpack_overwrite.gif";s:4:"8074";s:12:"cm1/conf.php";s:4:"b710";s:13:"cm1/index.php";s:4:"63c6";s:17:"cm1/locallang.php";s:4:"6693";s:14:"doc/manual.sxw";s:4:"4159";}',
+       '_md5_values_when_last_written' => 'a:21:{s:9:"Changelog";s:4:"b5e3";s:6:"README";s:4:"67e8";s:22:"class.tx_kbpackman.php";s:4:"9e94";s:26:"class.tx_kbpackman_cm1.php";s:4:"4071";s:26:"class.tx_kbpackman_dam.php";s:4:"84f8";s:16:"ext_autoload.php";s:4:"5884";s:21:"ext_conf_template.txt";s:4:"2ef0";s:12:"ext_icon.gif";s:4:"bc6e";s:16:"ext_icon_alt.gif";s:4:"d017";s:17:"ext_localconf.php";s:4:"6ab2";s:14:"ext_tables.php";s:4:"677a";s:13:"locallang.xml";s:4:"fa40";s:13:"cm1/clear.gif";s:4:"cc11";s:28:"cm1/cm_icon_compress_dir.gif";s:4:"bd7d";s:29:"cm1/cm_icon_compress_file.gif";s:4:"edb6";s:22:"cm1/cm_icon_unpack.gif";s:4:"8074";s:32:"cm1/cm_icon_unpack_overwrite.gif";s:4:"8074";s:12:"cm1/conf.php";s:4:"b710";s:13:"cm1/index.php";s:4:"93b2";s:17:"cm1/locallang.xml";s:4:"169a";s:14:"doc/manual.sxw";s:4:"8501";}',
+       'suggests' => array(
+       ),
 );
 
 ?>
\ No newline at end of file
index 7d48441..748a2a2 100755 (executable)
@@ -31,5 +31,7 @@ $GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][$_EXTKEY]['fileTarget'] = trim($_EXTCONF[
 $GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][$_EXTKEY]['targetExt'] = trim($_EXTCONF['targetExt']);
 $GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][$_EXTKEY]['DAMsupport'] = trim($_EXTCONF['DAMsupport']);
 
+$GLOBALS['TYPO3_CONF_VARS']['BE']['rar_path'] = $GLOBALS['TYPO3_CONF_VARS']['BE']['rar_path']?$GLOBALS['TYPO3_CONF_VARS']['BE']['rar_path']:trim($_EXTCONF['rarPath']);
+$GLOBALS['TYPO3_CONF_VARS']['BE']['unrar_path'] = $GLOBALS['TYPO3_CONF_VARS']['BE']['unrar_path']?$GLOBALS['TYPO3_CONF_VARS']['BE']['unrar_path']:trim($_EXTCONF['unrarPath']);
 
 ?>