Removed sysext fal
authorSteffen Kamper <info@sk-typo3.de>
Mon, 27 Dec 2010 16:46:46 +0000 (16:46 +0000)
committerSteffen Kamper <info@sk-typo3.de>
Mon, 27 Dec 2010 16:46:46 +0000 (16:46 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@9918 709f56b5-9817-0410-a4d7-c38de5d9e867

84 files changed:
ChangeLog
typo3/sysext/fal/ChangeLog [deleted file]
typo3/sysext/fal/README.txt [deleted file]
typo3/sysext/fal/classes/class.tx_fal_Collection.php [deleted file]
typo3/sysext/fal/classes/class.tx_fal_File.php [deleted file]
typo3/sysext/fal/classes/class.tx_fal_Helper.php [deleted file]
typo3/sysext/fal/classes/class.tx_fal_Indexer.php [deleted file]
typo3/sysext/fal/classes/class.tx_fal_Mount.php [deleted file]
typo3/sysext/fal/classes/class.tx_fal_Repository.php [deleted file]
typo3/sysext/fal/classes/class.tx_fal_tcafunc.php [deleted file]
typo3/sysext/fal/classes/controller/class.tx_fal_migrationcontroller.php [deleted file]
typo3/sysext/fal/classes/dataprovider/class.tx_fal_dataprovider.php [deleted file]
typo3/sysext/fal/classes/dataprovider/class.tx_fal_extfilefunc.php [deleted file]
typo3/sysext/fal/classes/dataprovider/class.tx_fal_list_dataprovider.php [deleted file]
typo3/sysext/fal/classes/dataprovider/class.tx_fal_plupload_dataprovider.php [deleted file]
typo3/sysext/fal/classes/exception/class.tx_fal_exception_filenotfound.php [deleted file]
typo3/sysext/fal/classes/hooks/class.tslib_fe_content_cobjdata_hook.php [deleted file]
typo3/sysext/fal/classes/hooks/class.tslib_fe_rootlinehook.php [deleted file]
typo3/sysext/fal/classes/hooks/class.tx_fal_backendhook.php [deleted file]
typo3/sysext/fal/classes/hooks/class.tx_fal_examplehook.php [deleted file]
typo3/sysext/fal/classes/hooks/class.tx_fal_hooks_browselinks_browserrendering.php [deleted file]
typo3/sysext/fal/classes/hooks/class.tx_fal_hooks_extfilefunchook.php [deleted file]
typo3/sysext/fal/classes/hooks/class.tx_fal_hooks_tceforms_dbfileicons.php [deleted file]
typo3/sysext/fal/classes/iterator/class.tx_fal_databasefieldnameiterator.php [deleted file]
typo3/sysext/fal/classes/iterator/class.tx_fal_recorditerator.php [deleted file]
typo3/sysext/fal/classes/storage/class.tx_fal_storage_filesystemstorage.php [deleted file]
typo3/sysext/fal/classes/storage/interface.tx_fal_storage_interface.php [deleted file]
typo3/sysext/fal/classes/tceforms_wizard.php [deleted file]
typo3/sysext/fal/contrib/plupload/changelog.txt [deleted file]
typo3/sysext/fal/contrib/plupload/js/gears_init.js [deleted file]
typo3/sysext/fal/contrib/plupload/js/jquery.plupload.queue.min.js [deleted file]
typo3/sysext/fal/contrib/plupload/js/plupload.browserplus.min.js [deleted file]
typo3/sysext/fal/contrib/plupload/js/plupload.flash.min.js [deleted file]
typo3/sysext/fal/contrib/plupload/js/plupload.flash.swf [deleted file]
typo3/sysext/fal/contrib/plupload/js/plupload.full.min.js [deleted file]
typo3/sysext/fal/contrib/plupload/js/plupload.full.tmp.js [deleted file]
typo3/sysext/fal/contrib/plupload/js/plupload.gears.min.js [deleted file]
typo3/sysext/fal/contrib/plupload/js/plupload.html4.min.js [deleted file]
typo3/sysext/fal/contrib/plupload/js/plupload.html5.min.js [deleted file]
typo3/sysext/fal/contrib/plupload/js/plupload.min.js [deleted file]
typo3/sysext/fal/contrib/plupload/js/plupload.silverlight.min.js [deleted file]
typo3/sysext/fal/contrib/plupload/license.txt [deleted file]
typo3/sysext/fal/contrib/plupload/readme.md [deleted file]
typo3/sysext/fal/contrib/plupload/readme.txt [deleted file]
typo3/sysext/fal/ds_filesystemstorage.xml [deleted file]
typo3/sysext/fal/ext_autoload.php [deleted file]
typo3/sysext/fal/ext_emconf.php [deleted file]
typo3/sysext/fal/ext_icon.gif [deleted file]
typo3/sysext/fal/ext_localconf.php [deleted file]
typo3/sysext/fal/ext_tables.php [deleted file]
typo3/sysext/fal/ext_tables.sql [deleted file]
typo3/sysext/fal/icon_tx_fal_contentimages.gif [deleted file]
typo3/sysext/fal/icon_tx_fal_sys_files.gif [deleted file]
typo3/sysext/fal/locallang.xml [deleted file]
typo3/sysext/fal/locallang_db.xml [deleted file]
typo3/sysext/fal/mod_extjs/class.tx_fal_list_registry.php [deleted file]
typo3/sysext/fal/mod_extjs/conf.php [deleted file]
typo3/sysext/fal/mod_extjs/index.php [deleted file]
typo3/sysext/fal/mod_extjs/list.gif [deleted file]
typo3/sysext/fal/mod_extjs/locallang.xml [deleted file]
typo3/sysext/fal/mod_extjs/locallang_mod.xml [deleted file]
typo3/sysext/fal/mod_extjs/mod_template.html [deleted file]
typo3/sysext/fal/res/css/fallist.css [deleted file]
typo3/sysext/fal/res/js/Application.js [deleted file]
typo3/sysext/fal/res/js/ComponentRegistry.js [deleted file]
typo3/sysext/fal/res/js/DetailView/Bootstrap.js [deleted file]
typo3/sysext/fal/res/js/DetailView/DetailView.js [deleted file]
typo3/sysext/fal/res/js/FileList/Bootstrap.js [deleted file]
typo3/sysext/fal/res/js/FileList/FileList.js [deleted file]
typo3/sysext/fal/res/js/FolderTree/Bootstrap.js [deleted file]
typo3/sysext/fal/res/js/FolderTree/FolderTree.js [deleted file]
typo3/sysext/fal/res/js/SelectedFilesView/Bootstrap.js [deleted file]
typo3/sysext/fal/res/js/SelectedFilesView/SelectedFilesView.js [deleted file]
typo3/sysext/fal/res/js/Ui/EbBootstrap.js [deleted file]
typo3/sysext/fal/res/js/Ui/ModBootstrap.js [deleted file]
typo3/sysext/fal/res/js/Ui/Ui.js [deleted file]
typo3/sysext/fal/res/js/plupload/ext.ux.plupload.css [deleted file]
typo3/sysext/fal/res/js/plupload/ext.ux.plupload.js [deleted file]
typo3/sysext/fal/res/js/plupload/plupload.js [deleted file]
typo3/sysext/fal/tasks/class.tx_fal_migrationtask.php [deleted file]
typo3/sysext/fal/tasks/class.tx_fal_migrationtask_additionalfieldprovider.php [deleted file]
typo3/sysext/fal/tca.php [deleted file]
typo3/sysext/fal/tests/storage/tx_fal_storage_filesystemstorageTest.php [deleted file]
typo3/sysext/fal/tests/tx_fal_fileTest.php [deleted file]

index 11e1030..b826778 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
 2010-12-27  Steffen Kamper  <steffen@typo3.org>
 
+       * Removed sysext fal
        * Fixed bug #16399: Optimize stdWrap usage for TypoScript content element USER_INT (Thanks to Jo Hasenau)
        * Fixed bug #16400: Optimize stdWrap usage for TypoScript content element TEXT (Thanks to Jo Hasenau)
        * Fixed bug #16401: Optimize stdWrap usage for TypoScript content element TEMPLATE (Thanks to Jo Hasenau)
diff --git a/typo3/sysext/fal/ChangeLog b/typo3/sysext/fal/ChangeLog
deleted file mode 100644 (file)
index 6dae3ff..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-2010-10-15   <>
-
-       * initial code generated with kickstarter
diff --git a/typo3/sysext/fal/README.txt b/typo3/sysext/fal/README.txt
deleted file mode 100644 (file)
index 2b9aebe..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-
-Feel free to add some documentation or simply add a link to the online manual.
diff --git a/typo3/sysext/fal/classes/class.tx_fal_Collection.php b/typo3/sysext/fal/classes/class.tx_fal_Collection.php
deleted file mode 100644 (file)
index fd78686..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-<?php
-/***************************************************************
-*  Copyright notice
-*
-*  (c) 2010 FAL development team <fal@wmdb.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!
-***************************************************************/
-
-/**
- * File Abtraction Layer Collection
- *
- * @author             FAL development team <fal@wmdb.de>
- * @package            TYPO3
- * @subpackage tx_fal
- * @version            $Id$
- */
-class tx_fal_Collection {
-
-       /**
-        * DESCRIPTION
-        *
-        * @var [to be defined]
-        */
-       protected $backend;
-
-       /**
-        * DESCRIPTION
-        *
-        * @param       t3lib_file_backend_Interface    $backend        DESCRIPTION
-        */
-       public function  __construct(t3lib_file_backend_Interface $backend) {
-               $this->backend = $backend;
-       }
-}
-
-if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/fal/classes/class.tx_fal_Collection.php'])) {
-       include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/fal/classes/class.tx_fal_Collection.php']);
-}
-?>
\ No newline at end of file
diff --git a/typo3/sysext/fal/classes/class.tx_fal_File.php b/typo3/sysext/fal/classes/class.tx_fal_File.php
deleted file mode 100644 (file)
index 19f9acf..0000000
+++ /dev/null
@@ -1,348 +0,0 @@
-<?php
-/***************************************************************
-*  Copyright notice
-*
-*  (c) 2010 FAL development team <fal@wmdb.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!
-***************************************************************/
-
-/**
- * File Abtraction Layer File
- *
- * @author             FAL development team <fal@wmdb.de>
- * @package            TYPO3
- * @subpackage tx_fal
- * @version            $Id$
- */
-class tx_fal_File {
-
-       /**
-        * The uid of this file's record
-        *
-        * @var integer
-        */
-       protected $uid;
-
-       /**
-        * The name of this file. This is only the filename without the path
-        *
-        * @var string
-        */
-       protected $filename;
-
-       /**
-        * The mount this file is located in
-        *
-        * @var t3lib_file_Mount
-        */
-       protected $mount;
-
-       /**
-        * The path to this file (inside the file mount)
-        *
-        * @var string
-        */
-       protected $path = NULL;
-
-       /**
-        * The file size
-        *
-        * @var integer
-        */
-       protected $size;
-
-       /**
-        * The SHA-1 hash sum of the file
-        *
-        * @var string
-        */
-       protected $hash;
-
-       /**
-        * DESCRIPTION
-        *
-        * @param       tx_fal_Mount    $mount          DESCRIPTION
-        * @param       array                   $fileData       DESCRIPTION
-        * @return      void
-        */
-       public function  __construct(tx_fal_Mount $mount, array $fileData) {
-               $this->mount = $mount;
-               $this->uid = $fileData['uid'];
-               $this->name = $fileData['file_name'];
-               $this->path = $fileData['file_path'];
-               $this->size = $fileData['file_size'];
-               $this->hash = $fileData['file_hash'];
-       }
-
-       /**
-        * Getter for thumbnail
-        *
-        * @todo Implement tx_fal_File::getThumbnail
-        *
-        * @return      [to be defined]
-        */
-       public function getThumbnail() {
-       }
-
-       /**
-        * Getter for thumbnail url
-        *
-        * @todo Implement tx_fal_File::getThumbnailUrl
-        *
-        * @return      [to be defined]
-        */
-       public function getThumbnailUrl() {
-       }
-
-       /**
-        * Setter for relations
-        *
-        * @todo Implement tx_fal_File::setRelation
-        *
-        * @param       string  $table  DESCRIPTION
-        * @param       integer $uid    DESCRIPTION
-        * @return      void
-        */
-       public function setRelation($table, $uid) {
-       }
-
-       /**
-        * Getter for related records
-        *
-        * @todo Implement tx_fal_File::getRelatedRecords
-        *
-        * @param       string  $table  DESCRIPTION
-        * @return      [to be defined]
-        */
-       public function getRelatedRecords($table = '') {
-       }
-
-       /**
-        * Getter for url of file
-        *
-        * @return      string          DESCRIPTION
-        */
-       public function getUrl() {
-               return $this->path . $this->name;
-       }
-
-       /**
-        *
-        * DESCRIPTION
-        *
-        * @todo Implement tx_fal_File::writeFile
-        *
-        * @param       [to be defined] $content        DESCRIPTION
-        * @return      [to be defined]
-        */
-       public function writeFile($content) {
-       }
-
-       /**
-        * Getter for uid of file in sys_files
-        *
-        * @return      integer         Uid of file in sys_files
-        */
-       public function getUid() {
-               return $this->uid;
-       }
-
-       /**
-        * Getter for name of file in sys_files
-        *
-        * @return      string          Name of file in sys_files
-        */
-       public function getName() {
-               return $this->name;
-       }
-
-       /**
-        * Getter for path of file
-        *
-        * @return      string          Path of file
-        */
-       public function getPath() {
-               return $this->path;
-       }
-
-       /**
-        * Getter for size in bytes of file
-        *
-        * @return      integer         Size in bytes of file
-        */
-       public function getSize() {
-               return $this->size;
-       }
-
-       /**
-        * Getter for hash (which one? SHA? CRC? MD5?) of file
-        *
-        * @return      [to be defined]         Hash (which one? SHA? CRC? MD5?) of file
-        */
-       public function getHash() {
-               return $this->hash;
-       }
-
-       /**
-        * DESCRIPTION
-        *
-        * @return      [to be defined]         DESCRIPTION
-        */
-       public function delete() {
-               $result = $this->mount->getStorageBackend()->delete($this->getUrl());
-
-
-               // @todo:  @todo: <rupert.germann>, 01.12.2010  check if the file was actually deleted
-
-
-               tx_fal_Indexer::deleteFileFromIndex($this->uid);
-
-               return $result;
-       }
-
-       /**
-        * Renames the file. This can not change the path! Use moveInsideMount() or moveToMount() for that
-        *
-        * @param string $newName
-        * @return boolean TRUE if renaming succeeded
-        */
-       public function rename($newName) {
-               $newPath = $this->path . $newName;
-
-               $this->moveInsideMount($newPath);
-       }
-
-       /**
-        * DESCRIPTION
-        *
-        * @param       string          $filePath       DESCRIPTION
-        * @return      [to be defined]                 DESCRIPTION
-        */
-       public function replaceWithLocalFile($filePath) {
-       }
-
-       /**
-        * DESCRIPTION
-        *
-        * @return      [to be defined]                 DESCRIPTION
-        */
-       public function getFileCopyForLocalProcessing() {
-       }
-
-       /**
-        * DESCRIPTION
-        *
-        * @param       string          $newPath        DESCRIPTION
-        * @return      [to be defined]                 DESCRIPTION
-        */
-       public function copyInsideMount($newPath) {
-       }
-
-       /**
-        * DESCRIPTION
-        *
-        * @param       tx_fal_Mount    $mount          DESCRIPTION
-        * @param       string                  $newPath        DESCRIPTION
-        * @return      [to be defined]                         DESCRIPTION
-        */
-       public function copyToMount(tx_fal_Mount $mount, $newPath) {
-       }
-
-       /**
-        * Moves the file to a new location inside its current mount.
-        *
-        * @param string $newPath The path to move the file to
-        * @return boolean
-        */
-       public function moveInsideMount($newPath) {
-               $oldPath = $this->path . $this->name;
-
-               $result = $this->mount->getStorageBackend()->moveFile($oldPath, $newPath);
-
-               // @todo: <rupert.germann>, 26.11.2010 check if the file was actually moved
-
-               $this->name = basename($newPath);
-               $this->path = dirname($newPath);
-               tx_fal_Indexer::updateFileIndex($this);
-
-               return $result;
-       }
-
-       /**
-        * DESCRIPTION
-        *
-        * @param       string          $newPath                DESCRIPTION
-        * @return      [to be defined]                         DESCRIPTION
-        */
-       public function moveFileToFolder($newPath) {
-
-               $basePath = str_replace(PATH_site, '', $this->mount->getStorageBackend()->getBasePath());
-
-               $oldPath = $this->path . $this->name;
-               $relNewPath = str_replace(PATH_site . $basePath, '', $newPath) . $this->name;
-
-               $result = $this->mount->getStorageBackend()->moveFile($oldPath, $relNewPath, 'move');
-
-               // @todo: <rupert.germann>, 26.11.2010 check if the file was actually moved
-
-               $this->path = str_replace(PATH_site . $basePath, '', $newPath);
-               tx_fal_Indexer::updateFileIndex($this);
-
-               return $result;
-       }
-
-       /**
-        * DESCRIPTION
-        *
-        * @todo Implement tx_fal_File::moveToMount
-        *
-        * @param       tx_fal_Mount    $mount          DESCRIPTION
-        * @param       string                  $newPath        DESCRIPTION
-        * @return      [to be defined]         DESCRIPTION
-        */
-       public function moveToMount(tx_fal_Mount $mount, $newPath) {
-       }
-
-       /**
-        * DESCRIPTION
-        *
-        * @todo Implement tx_fal_File::getContents
-        *
-        * @return      [to be defined]         DESCRIPTION
-        */
-       public function getContents() {
-       }
-
-       /**
-        * DESCRIPTION
-        *
-        * @param       [to be defined]         $mode   DESCRIPTION
-        * @return      [to be defined]                         DESCRIPTION
-        */
-       public function getFileHandle($mode) {
-       }
-}
-
-if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/fal/classes/class.tx_fal_File.php'])) {
-       include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/fal/classes/class.tx_fal_File.php']);
-}
-?>
\ No newline at end of file
diff --git a/typo3/sysext/fal/classes/class.tx_fal_Helper.php b/typo3/sysext/fal/classes/class.tx_fal_Helper.php
deleted file mode 100644 (file)
index 5cdd7ae..0000000
+++ /dev/null
@@ -1,105 +0,0 @@
-<?php\r
-/***************************************************************\r
-*  Copyright notice\r
-*\r
-*  (c) 2010 FAL development team <fal@wmdb.de>\r
-*  All rights reserved\r
-*\r
-*  This script is part of the TYPO3 project. The TYPO3 project is\r
-*  free software; you can redistribute it and/or modify\r
-*  it under the terms of the GNU General Public License as published by\r
-*  the Free Software Foundation; either version 2 of the License, or\r
-*  (at your option) any later version.\r
-*\r
-*  The GNU General Public License can be found at\r
-*  http://www.gnu.org/copyleft/gpl.html.\r
-*  A copy is found in the textfile GPL.txt and important notices to the license\r
-*  from the author is found in LICENSE.txt distributed with these scripts.\r
-*\r
-*\r
-*  This script is distributed in the hope that it will be useful,\r
-*  but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
-*  GNU General Public License for more details.\r
-*\r
-*  This copyright notice MUST APPEAR in all copies of the script!\r
-***************************************************************/\r
-\r
-/**\r
- * File Abtraction Layer Helper\r
- *\r
- * @author             FAL development team <fal@wmdb.de>\r
- * @package            TYPO3\r
- * @subpackage tx_fal\r
- * @version            $Id$\r
- */\r
-class tx_fal_Helper {\r
-\r
-       /**\r
-        * DESCRIPTION\r
-        *\r
-        * @static\r
-        * @param       string  $fileNameAndPath        DESCRIPTION\r
-        * @return      void\r
-        */\r
-       public static function getOrCreateFileObjectFromPath($fileNameAndPath) {\r
-               /** @var $fileRepository tx_fal_Repository */\r
-               $fileRepository = t3lib_div::makeInstance('tx_fal_Repository');\r
-               $relativePath = substr($fileNameAndPath, strlen(PATH_site));\r
-\r
-               try {\r
-                       return $fileRepository->getFileByPath($relativePath);\r
-               } catch(tx_fal_exception_FileNotFound $e) {\r
-\r
-                       $mount = self::getMountFromFilePath($relativePath);\r
-                       $fileUid = tx_fal_Indexer::addFileToIndex($mount, $relativePath);\r
-\r
-                       return $fileRepository->getFileById($fileUid);\r
-               }\r
-       }\r
-\r
-       /**\r
-        * Creates a comma separated list of file paths from a list of file objects\r
-        *\r
-        * @todo check how this will work for remote files\r
-        *\r
-        * @static\r
-        * @param       array   $fileObjects    The file objects to iterate over\r
-        * @return      string                                  A comma separated list of paths to the files.\r
-        */\r
-       public static function createCsvListOfFilepaths(array $fileObjects) {\r
-               $csv = array();\r
-               foreach ($fileObjects as $file) {\r
-                       $csv[] = $file->getPath() . $file->getName();\r
-               }\r
-\r
-               return implode(',', $csv);\r
-       }\r
-\r
-       /**\r
-        * Extracts the mount from a FAL file path (<mount>/path/to/file/inside/mount)\r
-        *\r
-        * @static\r
-        * @param       string                                  $filePath       The path to the file\r
-        * @return t3lib_file_Mount|boolean                             Mount object, FALSE if the mount could not be resolved\r
-        */\r
-       public static function getMountFromFilePath($filePath) {\r
-               if (t3lib_div::isAbsPath($filePath)) {\r
-                       $filePath = substr($filePath, strlen(PATH_site));\r
-               }\r
-\r
-               $pathParts = explode('/', $filePath, 2);\r
-               $mountAlias = array_shift($pathParts);\r
-               $mount = tx_fal_Mount::getInstanceForAlias($mountAlias);\r
-\r
-               if (!is_object($mount)) {\r
-                       return FALSE;\r
-               }\r
-               return $mount;\r
-       }\r
-}\r
-\r
-if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/fal/classes/class.tx_fal_Helper.php'])) {\r
-       include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/fal/classes/class.tx_fal_Helper.php']);\r
-}\r
-?>
\ No newline at end of file
diff --git a/typo3/sysext/fal/classes/class.tx_fal_Indexer.php b/typo3/sysext/fal/classes/class.tx_fal_Indexer.php
deleted file mode 100644 (file)
index 447fa09..0000000
+++ /dev/null
@@ -1,141 +0,0 @@
-<?php
-/***************************************************************
-*  Copyright notice
-*
-*  (c) 2010 FAL development team <fal@wmdb.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!
-***************************************************************/
-
-/**
- * File Abtraction Layer Indexer
- *
- * @author             FAL development team <fal@wmdb.de>
- * @package            TYPO3
- * @subpackage tx_fal
- * @version            $Id$
- */
-class tx_fal_Indexer {
-
-       /**
-        * DESCRIPTION
-        *
-        * @todo Implement tx_fal_Indexer::indexDirectory
-        *
-        * @static
-        * @return      [to be defined]         DESCRIPTION
-        */
-       public static function indexDirectory() {
-       }
-
-       /**
-        * Add a file to the index. This only works for files that already reside in the virtual
-        * file system we use; so you have to move the file to a mount manually.
-        *
-        * @todo previous doc comment said, that this method would return a file object
-        *
-        * @static
-        * @param       tx_fal_Mount    $mount          The mount the file resides in.
-        * @param       string                  $filePath       Path to the file, relative to the mount root
-        * @return      integer                                         The file record, if the file could be successfully indexed
-        *
-        * @throws      RuntimeExceptionRuntimeException
-        */
-       public static function addFileToIndex(tx_fal_Mount $mount, $filePath) {
-
-               $backend = $mount->getStorageBackend();
-               $relativePath = substr($filePath, strlen($backend->getBasePath()));
-               if (!$backend->exists($relativePath)) {
-                       throw new RuntimeException("File $relativePath does not exist.");
-               }
-               $fileName = basename($relativePath);
-               $folder = dirname($relativePath) . '/';
-
-
-                       // check, if the index entry already exists
-               $existingEntry = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('*', 'sys_files',
-                       'file_path = "' . $folder . '" AND file_name = "' . $fileName . '" AND mount = ' . intval($mount->getUid) . ' AND deleted=0');
-
-               if ($existingEntry[0]['uid'] > 0) {
-                       return $existingEntry[0]['uid'];
-               } else {
-                       $success = $GLOBALS['TYPO3_DB']->exec_INSERTquery('sys_files', array(
-                               'file_name' => $fileName,
-                               'file_path' => $folder,
-                               'file_size' => $backend->getSize($relativePath),
-                               'file_mtime' => $backend->getModificationTime($relativePath),
-                               'file_hash' => $backend->getFileHash($relativePath),
-                               'mount' => $mount->getUid(),
-                               'crdate' => $GLOBALS['EXEC_TIME'],
-                               'tstamp' => $GLOBALS['EXEC_TIME']
-                       ));
-
-                       if (!$success) {
-                               t3lib_div::devLog(
-                                       'Indexing file ' . $folder . $fileName . ' in mount ' . $mount->getAlias() . ' failed.
-                                        SQL error: ' . $GLOBALS['TYPO3_DB']->sql_error(), 'fal_indexer', 3);
-                       }
-
-                       /** @var $repo tx_fal_Repository */
-                       return $GLOBALS['TYPO3_DB']->sql_insert_id();
-
-               }
-               //$repo = t3lib_div::makeInstance('tx_fal_Repository');
-               //return $repo->getFileById($GLOBALS['TYPO3_DB']->sql_insert_id());
-       }
-
-       /**
-        * DESCRIPTION
-        *
-        * @static
-        * @param       tx_fal_File             $file   DESCRIPTION
-        * @return      [to be defined]                 DESCRIPTION
-        */
-       public static function updateFileIndex(tx_fal_File $file) {
-
-               $updateFields = array(
-                               'file_name' => $file->getName(),
-                               'file_path' => $file->getPath(),
-                               //'file_mtime' => $file->mount->getStorageBackend()->getModificationTime($file->getUrl()),
-                               'tstamp' => $GLOBALS['EXEC_TIME']
-                       );
-
-               $sucess = $GLOBALS['TYPO3_DB']->exec_UPDATEquery('sys_files', 'uid=' . $file->getUid() . ' AND deleted=0', $updateFields);
-       }
-
-       /**
-        * Delete a file from index
-        *
-        * @static
-        * @param               integer         $fileUid        UID of the file record to remove from index
-        * @return              void
-        */
-       public static function deleteFileFromIndex($fileUid) {
-               $sucess = $GLOBALS['TYPO3_DB']->exec_UPDATEquery('sys_files', 'uid=' . $fileUid,
-                       array('deleted' => 1)
-               );
-       }
-}
-
-if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/fal/classes/class.tx_fal_Indexer.php'])) {
-       include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/fal/classes/class.tx_fal_Indexer.php']);
-}
-?>
\ No newline at end of file
diff --git a/typo3/sysext/fal/classes/class.tx_fal_Mount.php b/typo3/sysext/fal/classes/class.tx_fal_Mount.php
deleted file mode 100644 (file)
index 556296e..0000000
+++ /dev/null
@@ -1,271 +0,0 @@
-<?php
-/***************************************************************
-*  Copyright notice
-*
-*  (c) 2010 FAL development team <fal@wmdb.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!
-***************************************************************/
-
-/**
- * File Abtraction Layer Mount
- *
- * @author             FAL development team <fal@wmdb.de>
- * @package            TYPO3
- * @subpackage tx_fal
- * @version            $Id$
- */
-class tx_fal_Mount {
-
-       /**
-        * The backend this mount uses
-        *
-        * @var tx_fal_storage_Interface
-        */
-       protected $storageBackend;
-
-       /**
-        * DESCRIPTION
-        *
-        * @var [to be defined]
-        */
-       protected $basePath;
-
-       /**
-        * DESCRIPTION
-        *
-        * @var [to be defined]
-        */
-       protected $uid;
-
-       /**
-        * DESCRIPTION
-        *
-        * @todo Andy Grunwald, 01.12.2010, why private? protected for access in xclasses?
-        *
-        * @var array<tx_fal_Mount>
-        */
-       private static $instances = array();
-
-       /**
-        * DESCRIPTION
-        *
-        * @param       [to be defined]         $mountInformation       DESCRIPTION
-        */
-       public function __construct($mountInformation) {
-               $this->uid = $mountInformation['uid'];
-               $this->alias = $mountInformation['alias'];
-       }
-
-       /**
-        * DESCRIPTION
-        *
-        * @static
-        * @param       integer                 $mountUid       DESCRIPTION
-        * @return      [to be defined]                         DESCRIPTION
-        *
-        * @throws RuntimeException
-        */
-       public static function getInstanceForUid($mountUid) {
-               if (is_null($mountUid)) {
-                       $mountUid = 0;
-               }
-               if (count(self::$instances) == 0) {
-                       self::loadMountsFromDatabase();
-               }
-
-               if (self::$instances[$mountUid]) {
-                       return self::$instances[$mountUid];
-               }
-
-               throw new RuntimeException("Mount with uid $mountUid was not found.");
-       }
-
-       /**
-        * Returns an instance of a file mount by its alias
-        *
-        * @static
-        * @param       string  $alias  DESCRIPTION
-        * @return      void
-        *
-        * @throws RuntimeException
-        */
-       public static function getInstanceForAlias($alias) {
-               if (count(self::$instances) == 0) {
-                       self::loadMountsFromDatabase();
-               }
-
-               foreach (self::$instances as $instance) {
-                       if ($instance->getAlias() == $alias) {
-                               return $instance;
-                       }
-               }
-
-               throw new RuntimeException("FAL mount $alias was not found.");
-       }
-
-       /**
-        * Loads all existing FAL mounts from the database and initializes them for later use.
-        *
-        * @static
-        * @return      void
-        */
-       protected static function loadMountsFromDatabase() {
-               $mountRecord = array('alias' => 'fileadmin', 'uid' => 0, 'storage_backend' => 'tx_fal_storage_FileSystemStorage');
-               $storageConfiguration = array('relative' => TRUE, 'path' => 'fileadmin/');
-
-               self::$instances[0] = self::mountObjectFactory($mountRecord, $storageConfiguration);
-
-               $mountRecords = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('*', 'sys_files_mounts', 'deleted=0');
-               foreach ($mountRecords as $mountRecord) {
-                       $storageConfiguration = t3lib_div::xml2array($mountRecord['backend_configuration']);
-                       $storageConfiguration = self::extractValuesFromFlexformArray($storageConfiguration['data']);
-
-                       self::$instances[$mountRecord['uid']] = self::mountObjectFactory($mountRecord, $storageConfiguration);
-               }
-       }
-
-       /**
-        * Factory method for mount objects.
-        *
-        * @static
-        * @param       [to be defined]         $mountRecord                    DESCRIPTION
-        * @param       [to be defined]         $storageConfiguration   DESCRIPTION
-        * @return      [to be defined]                                                         DESCRIPTION
-        *
-        * @throws RuntimeException
-        */
-       protected static function mountObjectFactory($mountRecord, $storageConfiguration) {
-               $storageBackendClass = $mountRecord['storage_backend'];
-               if (!class_exists($storageBackendClass)) {
-                       throw new RuntimeException("Class $storageBackendClass does not exist.");
-               }
-               $storageBackend = t3lib_div::makeInstance($storageBackendClass, $storageConfiguration);
-
-               $mountObject = new tx_fal_Mount($mountRecord);
-               $mountObject->setStorageBackend($storageBackend);
-
-               return $mountObject;
-       }
-
-       /**
-        * Helper function to ease unit testing. Ignore in normal operation.
-        *
-        * @static
-        * @param       array   $instances      DESCRIPTION
-        * @return      void
-        */
-       public static function _setInstances(array $instances) {
-               self::$instances = $instances;
-       }
-
-       /**
-        * DESCRIPTION
-        *
-        * @static
-        * @param       array   $flexformArray  DESCRIPTION
-        * @return      [to be defined]                 DESCRIPTION
-        */
-       protected static function extractValuesFromFlexformArray(array $flexformArray) {
-               foreach ($flexformArray as $sheet) {
-                       foreach ($sheet as $language) {
-                               foreach ($language as $fieldName => $fieldValue) {
-                                       $values[$fieldName] = $fieldValue['vDEF'];
-                               }
-                       }
-               }
-
-               return $values;
-       }
-
-       /**
-        * DESCRIPTION
-        *
-        * @param       tx_fal_storage_Interface        $storageBackend         The backend to use
-        */
-       public function setStorageBackend(tx_fal_storage_Interface $storageBackend) {
-               $this->storageBackend = $storageBackend;
-       }
-
-       /**
-        * Returns the storage backend used by this file mount.
-        *
-        * @return      tx_fal_storage_Interface
-        */
-       public function getStorageBackend() {
-               return $this->storageBackend;
-       }
-
-       /**
-        * Creates a directory inside this mount. Success of this operation depends - among other things - on the directory
-        * support by the backend.
-        *
-        * @param       [to be defined]         $path                   The path to create the directory in
-        * @param       [to be defined]         $directoryName  The directory to create
-        * @return      boolean                                                         TRUE if the directory could be created
-        */
-       public function createDirectory($path, $directoryName) {
-               return $this->storageBackend->createDirectory($path, $directoryName);
-       }
-
-       /**
-        * DESCRIPTION
-        *
-        * @todo Implement tx_fal_Mount::getDirectoryListing
-        *
-        * @param       [to be defined]         $path           DESCRIPTION
-        * @return      [to be defined]                                 DESCRIPTION
-        */
-       public function getDirectoryListing($path) {
-       }
-
-       /**
-        * Getter for mount uid
-        *
-        * @return      integer         DESCRIPTION
-        */
-       public function getUid() {
-               return $this->uid;
-       }
-
-       /**
-        * DESCRIPTION
-        *
-        * @return      [to be defined]
-        */
-       public function getAlias() {
-               return $this->alias;
-       }
-
-       /**
-        * DESCRIPTION
-        *
-        * @return      [to be defined]
-        */
-       public function getBasePath() {
-               return $this->basePath;
-       }
-}
-
-if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/fal/classes/class.tx_fal_Mount.php'])) {
-       include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/fal/classes/class.tx_fal_Mount.php']);
-}
-?>
\ No newline at end of file
diff --git a/typo3/sysext/fal/classes/class.tx_fal_Repository.php b/typo3/sysext/fal/classes/class.tx_fal_Repository.php
deleted file mode 100644 (file)
index df7ae04..0000000
+++ /dev/null
@@ -1,162 +0,0 @@
-<?php
-/***************************************************************
-*  Copyright notice
-*
-*  (c) 2010 FAL development team <fal@wmdb.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!
-***************************************************************/
-
-/**
- * File Abtraction Layer Repository
- *
- * @author             FAL development team <fal@wmdb.de>
- * @package            TYPO3
- * @subpackage tx_fal
- * @version            $Id$
- */
-class tx_fal_Repository implements t3lib_Singleton {
-
-       /**
-        * Get the file by ID
-        *
-        * @param       integer                         $uid    UID of the file record
-        * @return      t3lib_file_File                         A file object instance
-        */
-       public function getFileById($uid) {
-               $recordData = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('*', 'sys_files', 'uid=' . $uid . ' AND deleted=0');
-
-               if (count($recordData) == 0) {
-                       throw new tx_fal_exception_FileNotFound();
-               }
-
-               $mount = $this->getMountForFile($recordData);
-
-               return new tx_fal_File($mount, $recordData[0]);
-       }
-
-       /**
-        * DESCRIPTION
-        *
-        * @param       string                          $field          TCA field name
-        * @param       string                          $table          TCA table name
-        * @param       integer                         $recordUid      Uid of record for $table
-        * @return      array/tx_fal_File                               Array of tx_fal_File-objects for the defined relation ($field, $table, $recordUid)
-        */
-       public function getFilesFromRelation($field, $table, $recordUid) {
-                       // @todo: Check if constant name and value TYPO3_MODE === 'FE' are correct for checking for FE.
-               if(TYPO3_MODE === 'FE') {
-                       $GLOBALS['TSFE']->includeTCA();
-               }
-               t3lib_div::loadTCA($table);
-
-               $assetObjects = array();
-
-               // get column definition
-               $MMfieldTCA = $GLOBALS['TCA'][$table]['columns'][$field]['config'];
-
-               $dbGroup = t3lib_div::makeInstance('t3lib_loadDBGroup');
-               $dbGroup->start($recordUid, 'sys_files', $MMfieldTCA['MM'], intval($recordUid), $table, $MMfieldTCA);
-               $assetIds = $dbGroup->tableArray['sys_files'];
-               if (is_array($assetIds)) {
-                       foreach ($assetIds as $key => $uid) {
-                               $assetObjects[] = $this->getFileById($uid);
-                       }
-               }
-               return $assetObjects;
-       }
-
-       /**
-        * Returns a file object by the file's complete path.
-        *
-        * @param       string                          $filePath       The path to the file. May contain the alias of the mount if this is not given as the second parameter.
-        * @param       tx_fal_Mount            $mount          The mount the file is located in (optional). If this is not given, the mount is extracted from the first part of the path.
-        * @return      tx_fal_File                                             tx_fal_File object of file
-        *
-        * @throws      tx_fal_exception_FileNotFound
-        */
-       public function getFileByPath($filePath, $mount = NULL) {
-               if ($mount == NULL) {
-                       $pathParts = explode('/', $filePath, 2);
-                       $mountAlias = array_shift($pathParts);
-                       $mount = tx_fal_Mount::getInstanceForAlias($mountAlias);
-               }
-
-               $fileName = substr($filePath, strrpos($filePath, '/') + 1);
-               $folderPath = substr($filePath, 0, strrpos($filePath, '/') + 1);
-
-               $recordData = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('*', 'sys_files',
-                       'file_path = "' . $folderPath . '" AND file_name = "' . $fileName . '" AND mount = ' . intval($mount->getUid));
-
-               if (count($recordData) == 0) {
-                       throw new tx_fal_exception_FileNotFound();
-               }
-               $mount = $this->getMountForFile($recordData);
-
-               return new tx_fal_File($mount, $recordData[0]);
-       }
-
-       /**
-        * Returns the mount record for a specified file.
-        *
-        * @param       array   $fileRecord             DESC
-        * @return      void
-        */
-       protected function getMountForFile(array $fileRecord) {
-               $mount = $fileRecord['mount'];
-
-               return tx_fal_Mount::getInstanceForUid($mount);
-       }
-
-       /**
-        * Returns an array of tx_fal_File objects for all files in defined path $filePath
-        *
-        * @todo: respect file mount (extract it from the path or take it as parameter - both ways should be supported)
-        *
-        * @param       string                          $filePath       File path
-        * @return      array/tx_fal_File                               Array of tx_fal_File objects
-        *
-        * @throws      tx_fal_exception_FileNotFound
-        */
-       public function getAllInPath($filePath) {
-
-                       // @todo fix sql injection / dbal incomp. -> use t3lib_db quote string
-               $recordData = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('*', 'sys_files',
-                       'file_path = "' . $filePath . '" AND deleted=0');
-
-
-               if (count($recordData) == 0) {
-                       throw new tx_fal_exception_FileNotFound();
-               }
-               $mount = $this->getMountForFile($recordData[0]);
-
-               $files = array();
-               foreach ($recordData as $data) {
-                       $files[] = new tx_fal_File($mount, $data);
-               }
-               return $files;
-       }
-}
-
-if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/fal/classes/class.tx_fal_Repository.php'])) {
-       include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/fal/classes/class.tx_fal_Repository.php']);
-}
-?>
\ No newline at end of file
diff --git a/typo3/sysext/fal/classes/class.tx_fal_tcafunc.php b/typo3/sysext/fal/classes/class.tx_fal_tcafunc.php
deleted file mode 100644 (file)
index 69ec128..0000000
+++ /dev/null
@@ -1,114 +0,0 @@
-<?php
-/***************************************************************
-*  Copyright notice
-*
-*  (c) 2010 FAL development team <fal@wmdb.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!
-***************************************************************/
-
-/**
- * File Abtraction Layer tcafunc
- *
- * @todo Andy Grunwald, 01.12.2010, matching the class nam econvention? new name tx_fal_TCAFunc ?
- *
- * @author             FAL development team <fal@wmdb.de>
- * @package            TYPO3
- * @subpackage tx_fal
- * @version            $Id$
- */
-class tx_fal_tcafunc {
-
-       /**
-        * Get field TCA configuration (only "config" part) for File Abstraction Layer
-        * fields.
-        *
-        * @param       string          $fieldName                      Field name
-        * @param       string          $tableName                      Table name of field
-        * @param       string          $fieldToOverlay         Field name of field to replace. For example "media" in "pages" ("media" => "media_rel")
-        * @param       string          $allowedFileTypes       Comma list of allowed file extensions (e.g. "jpg,gif,png"). By default, it's allowing TYPO3_CONF_VARS[GFX][imagefile_ext].
-        * @param       array           $overrideArray          Array to override or add configuration options
-        * @return      array                                                   Field TCA configuration "config" section for the field
-        */
-       public static function getFileFieldTCAConfig($fieldName, $tableName, $fieldToOverlay = '', $allowedFileTypes = '', array $overrideArray = array()) {
-               if(!$allowedFileTypes) {
-                       $allowedFileTypes = $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'];
-               }
-
-               /**
-                * Write mapping overlay for tables.
-                * Syntax is:
-                * Table > fieldToOverlay => FAL field
-                * See code to get the idea
-                */
-               if ($fieldToOverlay === '') {
-                       $fieldToOverlay = $fieldName;
-               }
-               $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['fal']['tableAndFieldMapping'][$tableName][$fieldToOverlay] = $fieldName;
-
-               $TCAFieldConfig = t3lib_div::array_merge_recursive_overrule(array(
-                       'type' => 'group',
-                       'internal_type' => 'db',
-                       'allowed' => 'sys_files',
-                       'internal_subtype' => 'file_record',
-                       'internal_subtype_allowed' => $allowedFileTypes,
-                       'prepend_tname' => 1,
-                       'show_thumbs' => 1,
-                       'size' => 5,
-                       'minitems' => 0,
-                       'MM_opposite_field' => 'file_usage',
-                       'MM' => 'sys_files_usage_mm',
-                       'MM_match_fields' => array('ident' => $fieldName),
-               ), $overrideArray);
-
-               return $TCAFieldConfig;
-       }
-
-       /**
-        * Checks if the incomming $field in the incomming $table is a field for FAL
-        *
-        * @param       string  $field          Field name of TCA definition
-        * @param       string  $table          Table name of TCA definition
-        * @return      bool                            DESCRIPTION
-        */
-       public static function isFieldAFalField($field, $table) {
-               $result = FALSE;
-
-               $mappingArray = $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['fal']['tableAndFieldMapping'][$table];
-               if (!is_array($mappingArray)) {
-                       return $result;
-               }
-
-               foreach ($mappingArray as $falField) {
-                       if ($field === $falField) {
-                               $result = TRUE;
-                               break;
-                       }
-               }
-
-               return $result;
-       }
-}
-
-if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/fal/classes/class.tx_fal_tcafunc.php'])) {
-       include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/fal/classes/class.tx_fal_tcafunc.php']);
-}
-?>
\ No newline at end of file
diff --git a/typo3/sysext/fal/classes/controller/class.tx_fal_migrationcontroller.php b/typo3/sysext/fal/classes/controller/class.tx_fal_migrationcontroller.php
deleted file mode 100644 (file)
index 5b6b919..0000000
+++ /dev/null
@@ -1,358 +0,0 @@
-<?php
-/***************************************************************
-*  Copyright notice
-*
-*  (c) 2010 FAL development team <fal@wmdb.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!
-***************************************************************/
-
-/**
- * File Abtraction Layer Migration controller
- *
- * @author             FAL development team <fal@wmdb.de>
- * @package            TYPO3
- * @subpackage tx_fal
- * @version            $Id: $
- */
-class tx_fal_MigrationController {
-
-       /**
-        * Iterator to use
-        *
-        * @var tx_fal_DatabaseFieldnameIterator
-        */
-       protected $fieldnameIterator = null;
-
-       /**
-        * Limit for iterations
-        *
-        * @var integer
-        */
-       protected $limit = 500;
-
-       /**
-        * Iteration count on how many references were checked
-        *
-        * @var integer
-        */
-       protected $fileReferencesIteration = 0;
-
-       /**
-        * Mount to use as base for the index
-        *
-        * @var tx_fal_Mount
-        */
-       protected $mount = null;
-
-       /**
-        * Contructor of the controller
-        *
-        * @return      void
-        */
-       public function __construct() {
-               $this->mount = tx_fal_Mount::getInstanceForUid(0);
-       }
-
-       /**
-        * Setter for fieldname iterator
-        *
-        * @param       array/tx_fal_DatabaseFieldnameIterator  $fieldnameIterator      DESCRIPTION
-        * @return      tx_fal_MigrationController                                                                      DESCRIPTION
-        */
-       public function setFieldnameIterator($fieldnameIterator) {
-               $this->fieldnameIterator = $fieldnameIterator;
-
-               return $this;
-       }
-
-       /**
-        * Setter for record iterator
-        *
-        * @param       array/tx_fal_RecordIterator             $recordIterator         DESCRIPTION
-        * @return      tx_fal_MigrationController                                                      DESCRIPTION
-        */
-       public function setRecordIterator($recordIterator) {
-               $this->recordIterator = $recordIterator;
-
-               return $this;
-       }
-
-       /**
-        * Setter for limit
-        *
-        * @param       integer         $limit                          DESCRIPTION
-        * @return      tx_fal_MigrationController              DESCRIPTION
-        */
-       public function setLimit($limit) {
-               $this->limit = $limit;
-
-               return $this;
-       }
-
-       /**
-        * Execution of the migration
-        *
-        * @return      void
-        */
-       public function execute() {
-                       // fetch combination of tablename and fieldname
-               foreach ($this->fieldnameIterator as $tableName => $fieldName) {
-                       $sourcePath = $this->getSourcePath($tableName, $fieldName);
-                               // fetch records for tablename and fieldname and loop over them
-                       $this->recordIterator->fetchRecordsForTableAndField($tableName, $fieldName);
-                       foreach ($this->recordIterator as $recordUid => $filenameList) {
-
-                                       // explode filenameList and check each name
-                               $fileNames = t3lib_div::trimExplode(',', $filenameList);
-                               foreach ($fileNames as $filenamePosition => $fileName) {
-                                       $assetUid = 0;
-                                       $duplicateRecord = $this->fetchDuplicateRecord($fileName, $sourcePath, $tableName, $fieldName);
-
-                                       if ($duplicateRecord == FALSE) {
-                                               $destinationPath = $this->getDestinationPath($tableName, $fieldName, $recordUid);
-                                               if (is_file($sourcePath . $fileName)) {
-
-                                                       @copy($sourcePath . $fileName, $destinationPath . $fileName);
-
-                                                       t3lib_div::fixPermissions($destinationPath . $fileName);
-                                                       $newfile = tx_fal_Indexer::addFileToIndex($this->mount, $destinationPath . $fileName);
-
-                                                       $assetUid = $newfile;
-                                                       $this->fileMoved++;
-                                               } else {
-                                                       t3lib_div::devLog('copy file ', __CLASS__, 1, array('FILE NOT FOUND'));
-                                               }
-                                       } else {
-                                               $assetUid = $duplicateRecord['uid'];
-                                               $this->doublicatedFound++;
-                                       }
-
-                                       if ($assetUid) {
-                                               $sorting = $filenamePosition + 1;
-                                               #t3lib_div::devLog('create reference ', __CLASS__, 1, array($tableName, $fieldName, $recordUid, $assetUid, $sorting));
-                                               $this->createReference($tableName, $fieldName, $recordUid, $assetUid, $sorting);
-                                       }
-
-                                       $this->fileReferencesIteration++;
-                                       if ($this->fileReferencesIteration >= $this->limit) {
-                                               break 3;
-                                       }
-                               }
-
-                                       // after migrating ever file for this field cound the references and write them back
-                               $referenceCount = $this->fetchReferenceCount($tableName, $fieldName, $recordUid);
-                               $this->updateReferenceCount($tableName, $fieldName, $recordUid, $referenceCount);
-                       }
-               }
-       }
-
-       /**
-        * Render the destination path
-        *
-        * @param       string  $tableName              DESCRIPTION
-        * @param       string  $fieldName              DESCRIPTION
-        * @param       string  $recordUid              DESCRIPTION
-        * @return      string                                  DESCRIPTION
-        */
-       protected function getDestinationPath($tableName, $fieldName, $recordUid) {
-               $fileadminDir = PATH_site . $GLOBALS['TYPO3_CONF_VARS']['BE']['fileadminDir'];
-               // fix folder
-               if ($fileadminDir{strlen($fileadminDir)-1} == '/') {
-                       $fileadminDir = substr($fileadminDir, 0, strlen($fileadminDir) - 1);
-               }
-               $destinationPath = $fileadminDir . '/FAL_Migration/' . $tableName . '/' . $fieldName;
-
-               if (is_array($GLOBALS ['TYPO3_CONF_VARS']['SC_OPTIONS']['fal/classes/controller/class.tx_fal_migrationcontroller.php']['copyFileToPath'])) {
-                       $params = array(
-                               'tableName' => $tableName,
-                               'fieldName' => $fieldName,
-                               'recordUid' => $recordUid,
-                       );
-
-                       foreach ($GLOBALS ['TYPO3_CONF_VARS']['SC_OPTIONS']['fal/classes/controller/class.tx_fal_migrationcontroller.php']['copyFileToPath'] as $hookReference) {
-                               $hookObject =& t3lib_div::getUserObj($hookReference);
-                               if (method_exists($hookObject, 'copyFileToPath')) {
-                                       $destinationPath = $hookObject->copyFileToPath($params, $destinationPath, $this);
-                               }
-                       }
-               }
-
-               if (strpos($destinationPath, $fileadminDir . '/FAL_Migration/') === false) {
-                       $destinationPath = $fileadminDir . '/FAL_Migration/' . $destinationPath;
-               }
-
-               if (!is_dir($destinationPath)) {
-                       t3lib_div::mkdir_deep(PATH_site, str_replace(PATH_site, '', $destinationPath));
-               }
-
-               return $destinationPath;
-       }
-
-       /**
-        * Fetch path from tca for tablename and field
-        *
-        * @param       string  $tableName              DESCRIPTION
-        * @param       string  $fieldName              DESCRIPTION
-        * @return      string                                  DESCRIPTION
-        */
-       protected function getSourcePath($tableName, $fieldName) {
-               $pathFromTCA = $GLOBALS['TCA'][$tableName]['columns'][$fieldName]['config']['uploadfolder'];
-               // make sure a trailing slash is there
-               $pathParts = t3lib_div::trimExplode('/', $pathFromTCA);
-               $fixedPath = implode('/', $pathParts) . '/';
-               return PATH_site . $fixedPath;
-       }
-
-       /**
-        * Check if a sys_file is already available with the same sha1 hash
-        *
-        * @param       [to be defined] $fileName       DESCRIPTION
-        * @return      boolean                                         DESCRIPTION
-        */
-       protected function fetchDuplicateRecord($fileName, $filePath, $table, $fieldName) {
-               $GLOBALS['TYPO3_DB']->debugOutput = 1;
-               $result = FALSE;
-               if(isset($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['fal']['tableAndFieldMapping'][$table][$fieldName])) {
-                       $fieldName = $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['fal']['tableAndFieldMapping'][$table][$fieldName];
-               }
-               $fileHash = $this->getFileHash($fileName, $filePath);
-
-               $res = $GLOBALS['TYPO3_DB']->exec_SELECT_mm_query(
-                       'sys_files.*',
-                       'sys_files',
-                       'sys_files_usage_mm',
-                       $table,
-                       'AND sys_files.file_hash = \'' . $fileHash . '\' AND sys_files_usage_mm.tablenames = \''.$table.'\' AND sys_files_usage_mm.ident = \''.$fieldName.'\''
-               );
-               // if files with same filehash are found
-               while ($fileRecord = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
-                       if(count($fileRecord) > 1) {
-                               $result = $fileRecord;
-                               break;
-                       }
-               }
-               return $result;
-       }
-
-       /**
-        * Remove filename additions like _01 _02
-        *
-        * @param       string  $fileName               DESCRIPTION
-        * @return      string                                  DESCRIPTION
-        */
-       protected function makeFilenameUnique($fileName) {
-               // get extension
-               $fileInfo = pathinfo($fileName);
-               $fileName = str_replace('.' . $fileInfo['extension'], '', $fileName);
-               $fileNameParts = explode('_', $fileName);
-               $void = array_pop($fileNameParts);
-               return implode('_', $fileNameParts) . '.' . $fileInfo['extension'];
-       }
-
-       /**
-        * Fetches the filehash and returns it
-        *
-        * @param       string  $fileName       DESCRIPTION
-        * @param       string  $filePath       DESCRIPTION
-        * @return      string                          DESCRIPTION
-        */
-       protected function getFileHash($fileName, $filePath) {
-               return sha1_file($filePath . '/' . $fileName);
-       }
-
-       /**
-        * Create reference between record and asset
-        *
-        * @param       string  $tableName      DESCRIPTION
-        * @param       string  $fieldName      DESCRIPTION
-        * @param       integer $recordUid      DESCRIPTION
-        * @param       integer $assetUid       DESCRIPTION
-        * @param       integer $sorting        DESCRIPTION
-        * @return      void
-        */
-       protected function createReference($tableName, $fieldName, $recordUid, $assetUid, $sorting) {
-               // get real fieldname
-               if(isset($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['fal']['tableAndFieldMapping'][$tableName][$fieldName])) {
-                       $fieldName = $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['fal']['tableAndFieldMapping'][$tableName][$fieldName];
-               }
-               $count = $GLOBALS['TYPO3_DB']->exec_SELECTcountRows(
-                       '*',
-                       'sys_files_usage_mm',
-                       'uid_local = ' . $assetUid .
-                               ' AND uid_foreign = ' . $recordUid .
-                               ' AND tablenames = \'' . $tableName . '\'' .
-                               ' AND ident = \'' . $fieldName . '\'' .
-                               ' AND sorting = ' . $sorting
-               );
-
-               if (!$count) {
-                       $GLOBALS['TYPO3_DB']->exec_INSERTquery(
-                               'sys_files_usage_mm',
-                               array(
-                                       'uid_local' => $assetUid,
-                                       'uid_foreign' => $recordUid,
-                                       'tablenames' => $tableName,
-                                       'ident' => $fieldName,
-                                       'sorting' => $sorting,
-                               )
-                       );
-               }
-       }
-
-       /**
-        * Count the references for combination of asset, record, tablename, fieldname
-        *
-        * @param       string  $tableName      DESCRIPTION
-        * @param       string  $fieldName      DESCRIPTION
-        * @param       integer $recordUid      DESCRIPTION
-        * @param       integer $assetUid       DESCRIPTION
-        * @return      integer                         DESCRIPTION
-        */
-       protected function fetchReferenceCount($tableName, $fieldName, $recordUid) {
-               return $GLOBALS['TYPO3_DB']->exec_SELECTcountRows(
-                       '*',
-                       'sys_files_usage_mm',
-                       'uid_foreign = ' . $recordUid .
-                               ' AND tablenames = \'' . $tableName . '\'' .
-                               ' AND ident = \'' . $fieldName . '\''
-               );
-       }
-
-       /**
-        * Update the reference count to table
-        *
-        * @param       integer $referenceCount         DESCRIPTION
-        * @return      void
-        */
-       protected function updateReferenceCount($tableName, $fieldName, $recordUid, $referenceCount) {
-               $GLOBALS['TYPO3_DB']->exec_UPDATEquery(
-                       $tableName,
-                       'uid = ' . $recordUid,
-                       array($fieldName . '_rel' => $referenceCount)
-               );
-       }
-}
-
-if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/fal/classes/controller/class.tx_fal_migrationcontroller.php'])) {
-       include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/fal/classes/controller/class.tx_fal_migrationcontroller.php']);
-}
-?>
\ No newline at end of file
diff --git a/typo3/sysext/fal/classes/dataprovider/class.tx_fal_dataprovider.php b/typo3/sysext/fal/classes/dataprovider/class.tx_fal_dataprovider.php
deleted file mode 100644 (file)
index 44fcfb3..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-<?php\r
-/***************************************************************\r
-*  Copyright notice\r
-*\r
-*  (c) 2010 FAL development team <fal@wmdb.de>\r
-*  All rights reserved\r
-*\r
-*  This script is part of the TYPO3 project. The TYPO3 project is\r
-*  free software; you can redistribute it and/or modify\r
-*  it under the terms of the GNU General Public License as published by\r
-*  the Free Software Foundation; either version 2 of the License, or\r
-*  (at your option) any later version.\r
-*\r
-*  The GNU General Public License can be found at\r
-*  http://www.gnu.org/copyleft/gpl.html.\r
-*  A copy is found in the textfile GPL.txt and important notices to the license\r
-*  from the author is found in LICENSE.txt distributed with these scripts.\r
-*\r
-*\r
-*  This script is distributed in the hope that it will be useful,\r
-*  but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
-*  GNU General Public License for more details.\r
-*\r
-*  This copyright notice MUST APPEAR in all copies of the script!\r
-***************************************************************/\r
-\r
-/**\r
- * File Abtraction Layer Data provider\r
- *\r
- * @author             FAL development team <fal@wmdb.de>\r
- * @package            TYPO3\r
- * @subpackage tx_fal\r
- * @version            $Id: $\r
- */\r
-class tx_fal_dataprovider {\r
-\r
-       /**\r
-        * testing the creating of a file object\r
-        *\r
-        * @param       string                          $filePathAndName        the filepath and the filename\r
-        * @return      integer                         the uid of the fal record\r
-        */\r
-       public function test($filePathAndName) {\r
-               $fileObject = tx_fal_Helper::getOrCreateFileObjectFromPath($filePathAndName);\r
-               return $fileObject->getUid();\r
-       }\r
-\r
-}\r
-\r
-if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/fal/classes/dataprovider/class.tx_fal_dataprovider.php'])) {\r
-       include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/fal/classes/dataprovider/class.tx_fal_dataprovider.php']);\r
-}\r
-?>
\ No newline at end of file
diff --git a/typo3/sysext/fal/classes/dataprovider/class.tx_fal_extfilefunc.php b/typo3/sysext/fal/classes/dataprovider/class.tx_fal_extfilefunc.php
deleted file mode 100644 (file)
index faeef58..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-<?php
-/***************************************************************
-*  Copyright notice
-*
-*  (c) 2010 FAL development team <fal@wmdb.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!
-***************************************************************/
-
-/**
- * File Abtraction Layer extension for class.ext_filefunc
- *
- * @author             FAL development team <fal@wmdb.de>
- * @package            TYPO3
- * @subpackage tx_fal
- * @version            $Id: class.tx_fal_extfilefunc.php 9520 2010-11-23 22:58:16Z rupi $
- */
-class tx_fal_extfilefunc extends t3lib_extFileFunctions {
-       /**
-        * Upload of files (action=1)
-        *
-        * @param       array           $cmds['data'] is the ID-number (points to the global var that holds the filename-ref  ($_FILES['upload_'.$id]['name']). $cmds['target'] is the target directory, $cmds['charset'] is the the character set of the file name (utf-8 is needed for JS-interaction)
-        * @return      string          Returns the new filename upon success
-        */
-       function func_upload($cmds)     {
-               if (!$this->isInit) return FALSE;
-               $id = $cmds['data'];
-               if ($_FILES['upload_'.$id]['name'])     {
-                       $theFile = $_FILES['upload_'.$id]['tmp_name'];                          // filename of the uploaded file
-                       $theFileSize = $_FILES['upload_'.$id]['size'];                          // filesize of the uploaded file
-                       $theName = $this->cleanFileName(stripslashes($_FILES['upload_'.$id]['name']), (isset($cmds['charset']) ? $cmds['charset'] : ''));       // The original filename
-                       if (is_file($theFile) && $theName)      {       // Check the file
-                               if ($this->actionPerms['uploadFile'])   {
-                                       if ($theFileSize<($this->maxUploadFileSize*1024))       {
-                                               $fI = t3lib_div::split_fileref($theName);
-                                               $theTarget = $this->is_directory($cmds['target']);      // Check the target dir
-                                               if ($theTarget && $this->checkPathAgainstMounts($theTarget.'/'))        {
-                                                       if ($this->checkIfAllowed($fI['fileext'], $theTarget, $fI['file'])) {
-                                                               $theNewFile = $this->getUniqueName($theName, $theTarget, $this->dontCheckForUnique);
-                                                               if ($theNewFile)        {
-                                                                       t3lib_div::upload_copy_move($theFile,$theNewFile);
-                                                                       clearstatcache();
-                                                                       if (@is_file($theNewFile))      {
-                                                                               $this->internalUploadMap[$id] = $theNewFile;
-                                                                               $this->writelog(1,0,1,'Uploading file "%s" to "%s"',Array($theName,$theNewFile, $id));
-                                                                               return $theNewFile;
-                                                                       } else $this->writelog(1,1,100,'Uploaded file could not be moved! Write-permission problem in "%s"?',Array($theTarget.'/'));
-                                                               } else $this->writelog(1,1,101,'No unique filename available in "%s"!',Array($theTarget.'/'));
-                                                       } else $this->writelog(1,1,102,'Extension of file name "%s" is not allowed in "%s"!',Array($fI['file'], $theTarget.'/'));
-                                               } else $this->writelog(1,1,103,'Destination path "%s" was not within your mountpoints!',Array($theTarget.'/'));
-                                       } else $this->writelog(1,1,104,'The uploaded file exceeds the size-limit of %s bytes',Array($this->maxUploadFileSize*1024));
-                               } else $this->writelog(1,1,105,'You are not allowed to upload files!','');
-                       } else $this->writelog(1,2,106,'The upload has failed, no uploaded file found!','');
-               } else $this->writelog(1,2,108,'No file was uploaded!','');
-       }
-}
-
-if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/fal/classes/dataprovider/class.tx_fal_extfilefunc.php'])) {
-       include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/fal/classes/dataprovider/class.tx_fal_extfilefunc.php']);
-}
-?>
\ No newline at end of file
diff --git a/typo3/sysext/fal/classes/dataprovider/class.tx_fal_list_dataprovider.php b/typo3/sysext/fal/classes/dataprovider/class.tx_fal_list_dataprovider.php
deleted file mode 100644 (file)
index 79c3c3c..0000000
+++ /dev/null
@@ -1,670 +0,0 @@
-<?php
-/***************************************************************
-*  Copyright notice
-*
-*  (c) 2010 FAL development team <fal@wmdb.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!
-***************************************************************/
-
-/**
- * File Abtraction Layer dataprovider for filelists
- *
- * @author             FAL development team <fal@wmdb.de>
- * @package            TYPO3
- * @subpackage tx_fal
- * @version            $Id:  $
- */
-
-class tx_fal_list_DataProvider {
-
-       /**
-        * generates a file tree
-        *
-        * @todo: <rupert.germann>, 01.12.2010: should be in storage backend
-        *
-        * @param object $parameters
-        * @return array
-        */
-       public function getExtFileTree($parameter) {
-               $ext = array();
-               $fileArray = array();
-               $filemounts = $GLOBALS['BE_USER']->returnFilemounts();
-               $filepermissions = $GLOBALS['BE_USER']->getFileoperationPermissions();
-               // check be user file permissions
-               $actionPerms['uploadFile'] = FALSE;
-               $actionPerms['copyFile'] = FALSE;
-               $actionPerms['moveFile'] = FALSE;
-               $actionPerms['deleteFile'] = FALSE;
-               $actionPerms['renameFile'] = FALSE;
-               $actionPerms['editFile'] = FALSE;
-               $actionPerms['newFile'] = FALSE;
-               $actionPerms['unzipFile'] = FALSE;
-               $actionPerms['moveFolder'] = FALSE;
-               $actionPerms['deleteFolder'] = FALSE;
-               $actionPerms['renameFolder'] = FALSE;
-               $actionPerms['newFolder'] = FALSE;
-               $actionPerms['copyFolder'] = FALSE;
-               $actionPerms['deleteFolderRecursively'] = FALSE;
-
-
-               if (($filepermissions &1) == 1) {               // Files: Upload,Copy,Move,Delete,Rename
-                       $actionPerms['uploadFile'] = TRUE;
-                       $actionPerms['copyFile'] = TRUE;
-                       $actionPerms['moveFile'] = TRUE;
-                       $actionPerms['deleteFile'] = TRUE;
-                       $actionPerms['renameFile'] = TRUE;
-                       $actionPerms['editFile'] = TRUE;
-                       $actionPerms['newFile'] = TRUE;
-               }
-               if (($filepermissions &2) == 2) {               // Files: Unzip
-                       $actionPerms['unzipFile'] = TRUE;
-               }
-               if (($filepermissions &4) == 4) {               // Directory: Move,Delete,Rename,New
-                       $actionPerms['moveFolder'] = TRUE;
-                       $actionPerms['deleteFolder'] = TRUE;
-                       $actionPerms['renameFolder'] = TRUE;
-                       $actionPerms['newFolder'] = TRUE;
-               }
-               if (($filepermissions &8) == 8) {               // Directory: Copy
-                       $actionPerms['copyFolder'] = TRUE;
-               }
-               if (($filepermissions &16) == 16)       {               // Directory: Delete recursively (rm -Rf)
-                       $actionPerms['deleteFolderRecursively'] = TRUE;
-               }
-
-               if($parameter->node === 'FILE_MOUNTS') {
-                       foreach ($filemounts as $mountIdent => $mountInfo) {
-                               $icon = 't3-icon t3-icon-apps t3-icon-apps-filetree t3-icon-filetree-mount';
-                               if ($mountInfo['path'] == PATH_site.'fileadmin/') {
-                                       $icon = 't3-icon t3-icon-apps t3-icon-apps-pagetree t3-icon-pagetree-root';
-                               }
-                               $fileArray[] = array(
-                                       'id' => $mountInfo['path'],
-                                       'text' => htmlspecialchars($mountInfo['name']),
-                                       'leaf' => FALSE,
-                                       'permissions' => $actionPerms,
-                                       'qtip' => '',
-                                       'iconCls' => $icon,
-                               );
-                       }
-               } else {
-                       $path = preg_replace('|/$|', '', $parameter->node);
-                       $dirs = t3lib_div::get_dirs($path);
-                       foreach ($dirs as $dir) {
-                               if ($dir{0} !== '.') {
-                                       $fileArray[] = array(
-                                               'id' => $path . '/' . $dir . '/',
-                                               'text' => htmlspecialchars($dir),
-                                               'leaf' => FALSE,
-                                               'permissions' => $actionPerms,
-                                               'qtip' => '',
-                                               'iconCls' => 't3-icon t3-icon-apps t3-icon-apps-filetree t3-icon-filetree-folder-temp'
-                                       );
-                               }
-                       }
-               }
-               return $fileArray;
-       }
-
-
-       /**
-        * returns all files and folders in a given path
-        *
-        * @todo: <rupert.germann>, 01.12.2010: should be in storage backend
-        *
-        * @param       object          $parameters             object of parameters
-        * @return      array           Array of file arrays
-        */
-       public function getAllInPath($parameters){
-               $files = t3lib_div::getFilesInDir($parameters->path, '', TRUE, '', '');
-               $folders = t3lib_div::get_dirs($parameters->path);
-               if (!is_array($folders)) {
-                       $folders = array();
-               }
-               $filesArray = array();
-               foreach ($folders as $folder){
-                       if ($folder{0} !== '.') {
-                               $filesArray[] = array(
-                                       'sys_files_id' => $parameters->path . $folder,
-                                       'file_name' => $folder,
-                                       'file_type' => 'DIR'
-                               );
-                       }
-               }
-
-               /** @var $repo tx_fal_Repository */
-               $repo = t3lib_div::makeInstance('tx_fal_Repository');
-
-               foreach ($files as $file) {
-                       $mount = tx_fal_Helper::getMountFromFilePath(dirname($file));
-                       try {
-                               $fileObject = $repo->getFileByPath($file,$mount);
-                       //should never be the case (index out of sync) - fix it:
-                       }catch(tx_fal_exception_FileNotFound $e){
-                               $uid = tx_fal_Indexer::addFileToIndex($mount, $file);
-                               $fileObject = $repo->getFileById($uid);
-                       }
-                       /* @var $fileObject tx_fal_File */
-                       $pI = pathinfo($file);
-                       $filesArray[] = array(
-                               'sys_files_id' => $fileObject->getUid(),
-                               'file_path' => PATH_site . 'fileadmin/' . $fileObject->getPath(),
-                               'file_name' => $fileObject->getName(),
-                               'file_size' => $fileObject->getSize(),
-                               'file_mtime' => filemtime($file),
-                               'file_type' => strtoupper($pI['extension'])
-                       );
-               }
-               return array('data' => $filesArray);
-       }
-
-       /**
-        * copies a file to clipboard
-        *
-        * @todo implement
-        *
-        * @param       object          $parameter              object of parameters
-        * @return      void
-        */
-       public function copyFileToClipboard($parameter) {
-               // @todo implement
-               return '';
-       }
-
-
-       /**
-        * dispatcher for all move/rename operations for single and multiple files and folders
-        * is initiated either by clickmenu actions or by drag&drop
-        *
-        * @param       object          $parameter              object of parameters
-        * @return      array           result array containing either success=true or succes=false and the reason why it failed
-        */
-       public function updateFile($parameter) {
-
-               /** @var $repo tx_fal_Repository */
-               $repo = t3lib_div::makeInstance('tx_fal_Repository');
-
-               $resultsArray = array();
-               $sys_files_id = $parameter->data->sys_files_id;
-
-               if (is_numeric($sys_files_id)) {
-                               // case: rename or move single file
-
-                       $fileObject = $repo->getFileById($sys_files_id);
-
-                       /**
-                        * @todo: Rupert 25.11.2010
-                        * how to detect if a file is moved between different mounts (=Storage engines)?
-                        */
-
-                       if (isset($parameter->data->file_name)) {
-                                       // rename file inside folder
-                               $resultsArray[$sys_files_id] = $fileObject->rename($parameter->data->file_name);
-                       } else {
-                                       // move file to another folder
-                               $resultsArray[$sys_files_id] = $fileObject->moveFileToFolder($parameter->data->file_path);
-                       }
-
-               } elseif (is_string($sys_files_id)) {
-                               // case: rename or move directory
-                       if (isset($parameter->data->file_name)) {
-                                       // rename folder
-                               $resultsArray[$sys_files_id] = $this->renameFolder($sys_files_id, $parameter->data->file_name);
-                       } else {
-                                       // move folder per Drag&drop
-                               /**
-                                * @todo: <rupert.germann>, 30.11.2010
-                                *
-                                * implement
-                                */
-
-                               t3lib_div::devLog('ToDo: implement moving of directories', __CLASS__, 2);
-                       }
-               } elseif (is_array($parameter->data)) {
-                       // case: move multiple files or directories
-
-                       foreach ($parameter->data as $item) {
-                               if (is_numeric($item->sys_files_id)) {
-                                       // case: move file
-                                       $fileObject = $repo->getFileById($item->sys_files_id);
-                                       if (isset($item->file_name)) {
-                                                       // rename file inside folder
-                                               $resultsArray[$item->sys_files_id] = $fileObject->renameFile($item->file_name);
-                                       } else {
-                                                       // move file to another folder
-                                               $resultsArray[$item->sys_files_id] = $fileObject->moveFileToFolder($item->file_path);
-                                       }
-
-                               } elseif (is_string($item->sys_files_id)) {
-                                       // case: move directory
-
-                                       if (isset($item->file_name)) {
-                                               $resultsArray[$item->sys_files_id] = $this->renameFolder($item->sys_files_id, $item->file_name);
-                                       } else {
-                                               /**
-                                                * @todo: <rupert.germann>, 30.11.2010
-                                                *
-                                                * implement
-                                                */
-
-                                               t3lib_div::devLog('ToDo: implement moving of multiple directories', __CLASS__, 2);
-                                       }
-                               }
-                       }
-
-               } else {
-                       t3lib_div::devLog('ERROR: unhandled case' . __FUNCTION__, 'fal', 3, array(
-                               '$parameter' => $parameter
-                       ));
-               }
-
-
-               if (count($resultsArray)) {
-                       $msg = array();
-                       $success = TRUE;
-                       foreach ($resultsArray as $k => $v) {
-                               if ($v['success'] == FALSE) {
-                                       $msg[] = array('uid' => $k, 'msg' => $v['msg']);
-                                       $success = FALSE;
-                               }
-                       }
-                       if ($success == FALSE) {
-                               $result = array('data' => array('success' => false, 'msg' => $msg));
-                       } else {
-                               $result = array('data' => array('success' => true));
-                       }
-               }
-
-
-/**
-
-
-
-case: move file via drag&drop
-stdClass('data'=>stdClass('file_path' => '/var/www/_USR_DEV/rupi/fal/www/fileadmin/default/', 'sys_files_id'=>'236'))
-
-case: rename file
-stdClass('data'=>stdClass('file_name'=>'Tulips.jpg', 'sys_files_id'=>'236'))
-
-case: rename directory
-stdClass('data'=>stdClass('file_name'=>'igz7', 'sys_files_id'=>'/var/www/_USR_DEV/rupi/fal/www/fileadmin/igz7+'))
-
-case: move multiple files
-stdClass('data'=>array(
-       '0'=>stdClass('file_path'=>'/var/www/_USR_DEV/rupi/fal/www/fileadmin/user_upload/', 'sys_files_id'=>'294'),
-       '1'=>stdClass('file_path'=>'/var/www/_USR_DEV/rupi/fal/www/fileadmin/user_upload/', 'sys_files_id'=>'295')
-))
-
-case: move multiple directories
-stdClass('data'=>array(
-       '0'=>stdClass('file_path'=>'/var/www/_USR_DEV/rupi/fal/www/fileadmin/user_upload/', 'sys_files_id'=>'/var/www/_USR_DEV/rupi/fal/www/fileadmin/default'),
-       '1'=>stdClass('file_path'=>'/var/www/_USR_DEV/rupi/fal/www/fileadmin/user_upload/', 'sys_files_id'=>'/var/www/_USR_DEV/rupi/fal/www/fileadmin/igz7+')
-))
-
-*/
-
-
-       /**
-        * all methdos in dataprovider must return an answer like this:
-        *
-        * return array('data' => array('success' => true));
-        *
-        * or:
-        *
-         return array(
-               'data' => array(
-                       'success' => false,
-                       array(
-                               'uid' => 123,
-                               'msg' => 'EPIC FAIL!'
-                       )
-               )
-         );
-        *
-        */
-//t3lib_div::devLog('$result', __CLASS__, 1, $result);
-               return $result;
-       }
-
-       /**
-        * delete a file
-        *
-        * @param       object          $parameter              object of parameters
-        * @return      array           result array containing either success=true or succes=false and the reason why it failed
-        */
-       public function deleteFile($parameter) {
-
-
-/**
-
-case: delete a single file
-stdClass Object (
-       [data] => 4
-)
-
-
-case: deleting multiple files
-stdClass Object (
-       [data] => Array(
-               [0] => 5
-               [1] => 17
-               [2] => 9
-       )
-)
-
-
-*/
-               /** @var $repo tx_fal_Repository */
-               $repo = t3lib_div::makeInstance('tx_fal_Repository');
-               $resultsArray = array();
-
-               if (is_array($parameter->data)) {
-                       foreach ($parameter->data as $sys_files_id) {
-                               $fileObject = $repo->getFileById($sys_files_id);
-                               $resultsArray[] = $fileObject->delete();
-                       }
-               } else {
-                       $fileObject = $repo->getFileById($parameter->data);
-                       $resultsArray[] = $fileObject->delete();
-               }
-
-
-//             t3lib_div::devLog('deleteFile ', __CLASS__, 1, array($fileObject,$sys_files_id));
-
-               if (count($resultsArray)) {
-                       $msg = array();
-                       $success = TRUE;
-                       foreach ($resultsArray as $k => $v) {
-                               if ($v['success'] == FALSE) {
-                                       $msg[] = array('uid' => $k, 'msg' => $v['msg']);
-                                       $success = FALSE;
-                               }
-                       }
-                       if ($success == FALSE) {
-                               $result = array('data' => array('success' => false, 'msg' => $msg));
-                       } else {
-                               $result = array('data' => array('success' => true));
-                       }
-               }
-
-//             t3lib_div::devLog('$result', __CLASS__, 1, $result);
-               return $result;
-       }
-
-
-       /**
-        * delete a folder
-        *
-        * @todo <rupert.germann>, 01.12.2010: implement
-        *
-        *
-        * @param       object          $parameter              object of parameters
-        * @return      array           result array containing either success=true or succes=false and the reason why it failed
-        */
-       public function deleteFolder($parameter) {
-
-       }
-
-       /**
-        * copy a file
-        *
-        * @todo <rupert.germann>, 01.12.2010: implement
-        *
-        *
-        * @param       object          $parameter              object of parameters
-        * @return      array           result array containing either success=true or succes=false and the reason why it failed
-        */
-       public function copyFile($parameter) {
-
-       }
-
-
-       /**
-        * helper function to rename a folder in the filesystem
-        * updates the index of a concerned files
-        *
-        * @todo <rupert.germann>, 01.12.2010: move this to the storage backend
-        *
-        *
-        * @param       string          $sys_files_id           path to folder which is renamed
-        * @param       string          $file_name              new name of the folder
-        * @return      array           result array containing either success=true or succes=false and the reason why it failed
-        */
-       protected function renameFolder($sys_files_id, $file_name) {
-
-               /**
-                * @todo: <rupert.germann>, 29.11.2010
-                * how to get the mount?
-                */
-
-               $mount = 'fileadmin/';
-               $mountUid = 0;
-
-                       // get affected folders
-               $folders = t3lib_div::getAllFilesAndFoldersInPath(array(), $sys_files_id . '/', '', 1);
-               if (!is_array($folders)) {
-                       $folders = array();
-               }
-
-               $oldpath_array = t3lib_div::trimExplode('/', str_replace(PATH_site . $mount, '', $sys_files_id),1);
-
-               $pos = count($oldpath_array) - 1;
-
-               foreach ($folders as $folder) {
-
-                       /**
-                        * @todo: <rupert.germann>, 30.11.2010
-                        * use the delimiter constant (windows compatibility)
-                        */
-
-                               // check. if entry is a folder
-                       if ($folder{strlen($folder)-1} == '/') {
-
-                               $file_path = str_replace(PATH_site . $mount, '', $folder);
-
-                               $path_array = t3lib_div::trimExplode('/', $file_path,1);
-                               $path_array[$pos] = $file_name;
-                               $newFolder = implode('/', $path_array) . '/';
-
-                               $table = 'sys_files';
-                               $where = 'file_path = ' . $GLOBALS['TYPO3_DB']->fullQuoteStr($file_path, $table) . '
-                                                       AND mount = ' . $mountUid . ' AND deleted=0';
-                               $updateFields = array('file_path' => $newFolder);
-
-                               $error = FALSE;
-
-                               if ($GLOBALS['TYPO3_DB']->exec_UPDATEquery($table, $where, $updateFields)) {
-
-                               } else {
-                                       t3lib_div::devLog('ERROR: Database update failed' . __FUNCTION__, 'fal', 3, array(
-                                               'oldfolder'=>$file_path,
-                                               'newFolder' => $updateFields
-                                       ));
-                                       $error = TRUE;
-                               }
-
-
-                               t3lib_div::devLog('', __CLASS__, 1, array(
-                                       'oldfolder'=>$file_path,
-                                       $path_array,
-                                       '$newFolder'=>$updateFields,
-                                       ));
-                       }
-               }
-
-               if (!$error) {
-                       // rename directory
-
-                       $altName = 0; // do not create new files if the file already exists
-                       $FILE = array(
-                               'rename' => array(
-                                       array(
-                                               'data' =>  $file_name,
-                                               'target' => $sys_files_id,
-                                               'altName' => $altName
-                                       )
-                               )
-                       );
-
-
-                       $fileProcessor = t3lib_div::makeInstance('t3lib_extFileFunctions');
-                       $fileProcessor->init($GLOBALS['FILEMOUNTS'], $GLOBALS['TYPO3_CONF_VARS']['BE']['fileExtensions']);
-                       $fileProcessor->init_actionPerms($GLOBALS['BE_USER']->getFileoperationPermissions());
-
-                       $fileProcessor->start($FILE);
-                       $fileProcessor->processData();
-                       $fileProcessor->printLogErrorMessages();
-
-                               // catch flashmessages from class.t3lib_extfilefunc and return them via dataprovider
-                       $tmpFlashMessage = t3lib_FlashMessageQueue::getAllMessagesAndFlush();
-
-                               // take only the last message (needed because extfilefunc returns all messages from the same EXEC_TIME)
-                       $flashMessages = array_pop($tmpFlashMessage);
-
-
-
-               } else {
-                       $flashMessages = array('SQL Error while updating index.');
-               }
-
-
-               if (empty($flashMessages)) {
-                       $result = array('success' => true);
-               } else {
-                       $result = array(
-                                       'success' => false,
-                                       'msg' => $flashMessages
-                       );
-               }
-
-               return $result;
-       }
-
-       /**
-        * move/rename a file
-        *
-        * @todo <rupert.germann>, 01.12.2010: currently not needed because moving files is handled by function updateFile()
-        *
-        *
-        * @param       object          $parameter              object of parameters
-        * @return      void
-        */
-       public function moveFile($parameter) {
-
-       }
-
-       /**
-        * move/rename a folder
-        *
-        * @todo <rupert.germann>, 01.12.2010: currently not needed because moving folders is handled by function updateFile()
-        *
-        *
-        * @param       object          $parameter              object of parameters
-        * @return      void
-        */
-       public function moveFolder($parameter) {
-
-       }
-
-       /**
-        * upload a file
-        *
-        * @todo <rupert.germann>, 01.12.2010: implement
-        *
-        *
-        * @param       object          $parameter              object of parameters
-        * @return      void
-        */
-       public function upload($parameters) {
-
-       }
-
-       /**
-        * edit a file
-        *
-        * @todo <rupert.germann>, 01.12.2010: implement
-        *
-        *
-        * @param       object          $parameter              object of parameters
-        * @return      void
-        */
-       public function editFile($parameters) {
-
-       }
-
-       /**
-        * creates a folder
-        *
-        * @todo <rupert.germann>, 01.12.2010: implement
-        *
-        *
-        * @param       object          $parameter              object of parameters
-        * @return      void
-        */
-       public function addFolder($parameters) {
-
-       }
-
-       /**
-        * creates a file
-        *
-        * @todo <rupert.germann>, 01.12.2010: implement
-        *
-        *
-        * @param       object          $parameter              object of parameters
-        * @return      void
-        */
-       public function addFile($parameters) {
-
-       }
-
-       /**
-        * unzips an uploaded zip file
-        *
-        * @todo <rupert.germann>, 01.12.2010: implement
-        *
-        *
-        * @param       object          $parameter              object of parameters
-        * @return      void
-        */
-       public function unzip($parameters) {
-
-       }
-
-
-       /**
-        * Enter description here ...
-        *
-        *
-        *
-        * @param       object          $parameter              object of parameters
-        * @return      object          object of parameters
-        */
-       public function getDetails($parameters){
-               return $parameters;
-       }
-}
-
-if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/fal/classes/dataprovider/class.tx_fal_list_dataprovider.php'])) {
-       include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/fal/classes/dataprovider/class.tx_fal_list_dataprovider.php']);
-}
-?>
\ No newline at end of file
diff --git a/typo3/sysext/fal/classes/dataprovider/class.tx_fal_plupload_dataprovider.php b/typo3/sysext/fal/classes/dataprovider/class.tx_fal_plupload_dataprovider.php
deleted file mode 100644 (file)
index b034a68..0000000
+++ /dev/null
@@ -1,159 +0,0 @@
-<?php
-/***************************************************************
-*  Copyright notice
-*
-*  (c) 2010 FAL development team <fal@wmdb.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!
-***************************************************************/
-
-/**
- * File Abtraction Layer dataprovider for pluploader
- *
- * @author             FAL development team <fal@wmdb.de>
- * @package            TYPO3
- * @subpackage tx_fal
- * @version            $Id:  $
- */
-
-
-
-require_once(PATH_typo3 . 'classes/class.typo3_tcefile.php');
-
-class tx_fal_plupload_dataprovider extends TYPO3_tcefile {
-
-       /**
-        * Performing the file admin action:
-        * Initializes the objects, setting permissions, sending data to object.
-        *
-        * @return      void
-        */
-       public function main() {
-                       // Initializing:
-               $this->fileProcessor = t3lib_div::makeInstance('tx_fal_extfilefunc');
-               $this->fileProcessor->init($GLOBALS['FILEMOUNTS'], $GLOBALS['TYPO3_CONF_VARS']['BE']['fileExtensions']);
-               $this->fileProcessor->init_actionPerms($GLOBALS['BE_USER']->getFileoperationPermissions());
-               $this->fileProcessor->dontCheckForUnique = ($this->overwriteExistingFiles ? 1 : 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') {
-                       $this->fileProcessor->writeLog(0, 2, 1, 'Referer host "%s" and server host "%s" did not match!', array($refInfo['host'], $httpHost));
-               } else {
-                       $this->fileProcessor->start($this->file);
-                       $this->fileData = $this->fileProcessor->processData();
-               }
-       }
-
-       /**
-        * Handles the actual process from within the ajaxExec function
-        * therefore, it does exactly the same as the real typo3/tce_file.php
-        * but without calling the "finish" method, thus makes it simpler to deal with the
-        * actual return value
-        *
-        *
-        * @param string $params        always empty.
-        * @param string $ajaxObj       The Ajax object used to return content and set content types
-        * @return void
-        */
-       public function processAjaxRequest(array $params, TYPO3AJAX $ajaxObj) {
-               $this->init();
-               $this->processBinaryStream();
-               $this->main();
-
-               $response = array();
-               $error = null;
-               foreach ($this->fileData['upload'] as $uploaded) {
-                       // $uploaded would contain the absolute file path, if it worked
-                       if ($uploaded === null) {
-                               $error = $this->fileProcessor->lastError;
-                               break;
-                       }
-               }
-               if (strlen($error)) {
-                       $response['message'] = $error;
-                       $response['success'] = FALSE;
-               } else {
-                       $response['result'] = $this->fileData;
-                       if ($this->redirect) {
-                               $response['redirect'] = $this->redirect;
-                       }
-                       $response['success'] = TRUE;
-               }
-               $ajaxObj->setContentFormat('plain');
-               $ajaxObj->setContent(array(json_encode($response)));
-       }
-
-       /**
-        * File upload can be as multipart or as binary stream.
-        *
-        * This method first checks, if upload is not a multipart upload and then
-        * converts the received data into the expected structures.
-        *
-        * @return void
-        */
-       protected function processBinaryStream() {
-
-                       // Look for the content type header
-               if (isset($_SERVER['HTTP_CONTENT_TYPE'])) {
-                       $contentType = $_SERVER['HTTP_CONTENT_TYPE'];
-               }
-
-               if (isset($_SERVER['CONTENT_TYPE'])) {
-                       $contentType = $_SERVER['CONTENT_TYPE'];
-               }
-
-               if (strpos($contentType, "multipart") === FALSE) {
-                       $tempFile = tempnam('/tmp', 'upload');
-
-                               // ppen temp file
-                       $out = fopen($tempFile, 'wb');
-                       if ($out) {
-                                       // read binary input stream and append it to temp file
-                               $in = fopen("php://input", "rb");
-
-                               if ($in) {
-                                       while ($buff = fread($in, 4096))
-                                               fwrite($out, $buff);
-                               } else
-                                       die('{"jsonrpc" : "2.0", "error" : {"code": 101, "message": "Failed to open input stream."}, "id" : "id"}');
-                               fclose($out);
-                               $_FILES['upload_1'] = array(
-                                       'name' => $_GET['file']['upload']['1']['name'],
-                                       'tmp_name' => $tempFile,
-                                       'size' => filesize($tempFile),
-                                       'relativeTarget' => $_GET['file']['upload']['1']['relativeTarget'],
-                               );
-                       } else
-                               die('{"jsonrpc" : "2.0", "error" : {"code": 102, "message": "Failed to open output stream."}, "id" : "id"}');
-               }
-       }
-
-}
-
-if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/fal/classes/dataprovider/class.tx_fal_plupload_dataprovider.php'])) {
-       include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/fal/classes/dataprovider/class.tx_fal_plupload_dataprovider.php']);
-}
-?>
\ No newline at end of file
diff --git a/typo3/sysext/fal/classes/exception/class.tx_fal_exception_filenotfound.php b/typo3/sysext/fal/classes/exception/class.tx_fal_exception_filenotfound.php
deleted file mode 100644 (file)
index 98263f6..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-<?php
-/***************************************************************
-*  Copyright notice
-*
-*  (c) 2010 FAL development team <fal@wmdb.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!
-***************************************************************/
-
-/**
- * File Abtraction Layer fileNotFound exception
- *
- * @author             FAL development team <fal@wmdb.de>
- * @package            TYPO3
- * @subpackage tx_fal
- * @version            $Id:  $
- */
-
-
-class tx_fal_exception_FileNotFound extends RuntimeException {
-}
-
-if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/fal/classes/exception/class.tx_fal_exception_filenotfound.php'])) {
-       include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/fal/classes/exception/class.tx_fal_exception_filenotfound.php']);
-}
-?>
\ No newline at end of file
diff --git a/typo3/sysext/fal/classes/hooks/class.tslib_fe_content_cobjdata_hook.php b/typo3/sysext/fal/classes/hooks/class.tslib_fe_content_cobjdata_hook.php
deleted file mode 100644 (file)
index 2eb257b..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-<?php
-/***************************************************************
-*  Copyright notice
-*
-*  (c) 2010 FAL development team <fal@wmdb.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!
-***************************************************************/
-
-/**
- * File Abtraction Layer: hook method for class.tslib_cobj
- *
- * @author             FAL development team <fal@wmdb.de>
- * @package            TYPO3
- * @subpackage tx_fal
- * @version            $Id:  $
- */
-
-class tx_fal_cobjdata_hook {
-
-       /**
-        * modifies a database record in order to use fal records instead of images
-        *
-        *
-        * @param array $row    The row
-        * @param string $table the table
-        * @return void
-        */
-       public function modifyDBRow(&$row, $table) {
-               if (isset($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['fal']['tableAndFieldMapping'][$table])) {
-                       $repo = t3lib_div::makeInstance('tx_fal_Repository');
-                       foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['fal']['tableAndFieldMapping'][$table] as $overlayField => $fieldName) {
-                               $references = $repo->getFilesFromRelation($fieldName, $table, intval($row['uid']));
-                               $references = tx_fal_Helper::createCsvListOfFilepaths($references);
-                               $row[$fieldName] = $references;
-                               $row[$overlayField] = $references;
-                       };
-               }
-       }
-}
-
-if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/fal/classes/hooks/class.tslib_fe_content_cobjdata_hook.php'])) {
-       include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/fal/classes/hooks/class.tslib_fe_content_cobjdata_hook.php']);
-}
-?>
\ No newline at end of file
diff --git a/typo3/sysext/fal/classes/hooks/class.tslib_fe_rootlinehook.php b/typo3/sysext/fal/classes/hooks/class.tslib_fe_rootlinehook.php
deleted file mode 100644 (file)
index b526360..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-<?php
-/***************************************************************
-*  Copyright notice
-*
-*  (c) 2010 FAL development team <fal@wmdb.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!
-***************************************************************/
-
-/**
- * File Abtraction Layer: hook for modifying the rootline array
- *
- * @author             FAL development team <fal@wmdb.de>
- * @package            TYPO3
- * @subpackage tx_fal
- * @version            $Id:  $
- */
-class tx_fal_tslibfe_rootlinehook {
-
-       /**
-        * modifies the rootline to get the uid of a language overlay record
-        *
-        *
-        * @param array $params         not used
-        * @param string $pObj  the parent object
-        * @return void
-        */
-       function modifyRootline(&$params, $pObj) {
-               if (is_array($pObj->tmpl->rootLine)) {
-                       $repo = t3lib_div::makeInstance('tx_fal_Repository');
-                       foreach ($pObj->tmpl->rootLine as $rLk => $value) {
-                               // check if language overlay exists
-                               if (isset($value['_PAGES_OVERLAY_UID'])) {
-                                       $referenceUid = $value['_PAGES_OVERLAY_UID'];
-                                       $referenceTable = 'pages_language_overlay';
-                               } else {
-                                       $referenceUid = $value['uid'];
-                                       $referenceTable = 'pages';
-                               }
-                               if (intval($referenceUid) > 0) {
-                                       $references = $repo->getFilesFromRelation('media_rel', $referenceTable, $referenceUid);
-                                       $value['media'] = tx_fal_Helper::createCsvListOfFilepaths($references);
-                               }
-                               $pObj->tmpl->rootLine[$rLk] = $value;
-                       }
-               }
-       }
-}
-
-if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/fal/classes/hooks/class.tslib_fe_rootlinehook.php'])) {
-       include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/fal/classes/hooks/class.tslib_fe_rootlinehook.php']);
-}
-?>
\ No newline at end of file
diff --git a/typo3/sysext/fal/classes/hooks/class.tx_fal_backendhook.php b/typo3/sysext/fal/classes/hooks/class.tx_fal_backendhook.php
deleted file mode 100644 (file)
index 15ddc13..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-<?php
-/***************************************************************
-*  Copyright notice
-*
-*  (c) 2010 FAL development team <fal@wmdb.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!
-***************************************************************/
-
-/**
- * backend post construct hook
- *
- * @author             FAL development team <fal@wmdb.de>
- * @package            TYPO3
- * @subpackage tx_fal
- * @version            $Id:  $
- */
-
-
-class tx_fal_backendhook {
-       /**
-        * adds a part of the extjs filelist module to the global
-        * framework if fal is loaded to be used in fal references
-        * tce forms upload dialog
-        * @param unknown_type $params
-        * @param TYPO3backend $parentObject
-        */
-       function constructPostProcess($params, TYPO3backend $parentObject) {
-               global $TYPO3_CONF_VARS;
-               $falPath = t3lib_extMgm::extRelPath('fal');
-               /** @var t3lib_PageRenderer $pageRenderer */
-               $pageRenderer = $GLOBALS['TBE_TEMPLATE']->getPageRenderer();
-               $pageRenderer->addJsFile('ajax.php?ajaxID=ExtDirect::getAPI&namespace=TYPO3.FILELIST', NULL, FALSE);
-               $parentObject->addJavascriptFile($falPath . 'contrib/plupload/js/gears_init.js');
-               $parentObject->addJavascriptFile($falPath . 'contrib/plupload/js/plupload.full.min.js');
-               $parentObject->addJavascriptFile($falPath . 'res/js/plupload/ext.ux.plupload.js');
-               $parentObject->addCssFile('ext.ux.plupload', $falPath . 'res/js/plupload/ext.ux.plupload.css');
-               $parentObject->addJavascriptFile($falPath . 'res/js/plupload/plupload.js');
-
-               tx_fal_list_Registry::addEbExtDirectNamespacesToPage($pageRenderer);
-               tx_fal_list_Registry::addEbJsComponentsToPage($pageRenderer);
-               tx_fal_list_Registry::addEbCssComponentsToPage($pageRenderer);
-
-       }
-}
-
-if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/fal/classes/hooks/class.tx_fal_backendhook.php'])) {
-       include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/fal/classes/hooks/class.tx_fal_backendhook.php']);
-}
-?>
\ No newline at end of file
diff --git a/typo3/sysext/fal/classes/hooks/class.tx_fal_examplehook.php b/typo3/sysext/fal/classes/hooks/class.tx_fal_examplehook.php
deleted file mode 100644 (file)
index aa57425..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-<?php
-/***************************************************************
-*  Copyright notice
-*
-*  (c) 2010 FAL development team <fal@wmdb.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!
-***************************************************************/
-
-/**
- * Example hook
- *
- * @author             FAL development team <fal@wmdb.de>
- * @package            TYPO3
- * @subpackage tx_fal
- * @version            $Id:  $
- */
-
-class tx_fal_ExampleHook {
-       /**
-        * Name of the tables where the file was present
-        *
-        * @var string
-        */
-       protected $tableName;
-
-       /**
-        * Name of the field where the file was present
-        *
-        * @var string
-        */
-       protected $fieldName;
-
-       /**
-        * Data of the row
-        *
-        * @var array
-        */
-       protected $record;
-
-       /**
-        * Render an alternative path to move file to
-        * Remember that fileadmin/ will be prepended if not present
-        *
-        * @param       array   $params
-        * @param       tx_fal_MigrationController $pObj
-        * @return      string
-        */
-       public function copyFileToPath($params, $path, $pObj) {
-               $this->tableName = $params['tableName'];
-               $this->fieldName = $params['fieldName'];
-               $this->recordUid = $params['recordUid'];
-
-               $titleField = $GLOBALS['TCA'][$this->tableName]['ctrl']['label'];
-               return $this->tableName . '/' . $this->fieldName . '/';
-       }
-}
-
-if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/fal/classes/hooks/class.tx_fal_examplehook.php'])) {
-       include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/fal/classes/hooks/class.tx_fal_examplehook.php']);
-}
-?>
\ No newline at end of file
diff --git a/typo3/sysext/fal/classes/hooks/class.tx_fal_hooks_browselinks_browserrendering.php b/typo3/sysext/fal/classes/hooks/class.tx_fal_hooks_browselinks_browserrendering.php
deleted file mode 100644 (file)
index 62e3e23..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-<?php
-/***************************************************************
-*  Copyright notice
-*
-*  (c) 2010 FAL development team <fal@wmdb.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!
-***************************************************************/
-
-/**
- * Hook into SC_browse_links::main
- *
- * @author             FAL development team <fal@wmdb.de>
- * @package            TYPO3
- * @subpackage tx_fal
- * @version            $Id:  $
- */
-
-class tx_fal_hooks_browseLinks_browserRendering {
-
-       /**
-        * DESCRIPTION
-        *
-        * @param       string  $mode
-        * @param       object/SC_browse_links $parentObject the parent object
-        * @return      boolean
-        */
-       public function isValid($mode, SC_browse_links $parentObject) {
-               $result = FALSE;
-
-               switch($mode) {
-                       case 'sys_files':
-                               $result = TRUE;
-                               break;
-               }
-
-               return $result;
-       }
-
-       /**
-        * DESCRIPTION
-        *
-        * @param       string  $mode
-        * @param       object/SC_browse_links $parentObject the parent object
-        * @return      string  a string which describes very diplomatically which element browser modes are missing ;-)
-        */
-       public function render($mode, SC_browse_links $parentObject) {
-               $content = 'Give me the fuckin element browser for mode ' . $mode .
-                       '<br />Have a look at ' . __FILE__ . ' to implement me ;(';
-
-               return $content;
-       }
-}
-
-if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/fal/classes/hooks/class.tx_fal_hooks_browselinks_browserrendering.php'])) {
-       include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/fal/classes/hooks/class.tx_fal_hooks_browselinks_browserrendering.php']);
-}
-?>
\ No newline at end of file
diff --git a/typo3/sysext/fal/classes/hooks/class.tx_fal_hooks_extfilefunchook.php b/typo3/sysext/fal/classes/hooks/class.tx_fal_hooks_extfilefunchook.php
deleted file mode 100644 (file)
index dd65b29..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-<?php
-/***************************************************************
-*  Copyright notice
-*
-*  (c) 2010 FAL development team <fal@wmdb.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!
-***************************************************************/
-
-/**
- * File Abtraction Layer hook for class.t3lib_extfilefunc.php
- *
- * @author             FAL development team <fal@wmdb.de>
- * @package            TYPO3
- * @subpackage tx_fal
- * @version            $Id $
- */
-
-class tx_fal_hooks_ExtFileFuncHook implements t3lib_extFileFunctions_processDataHook {
-       /**
-        * Post-process a file action.
-        *
-        * @param string The action
-        * @param array The parameter sent to the action handler
-        * @param array The results of all calls to the action handler
-        * @param t3lib_extFileFunctions Parent t3lib_extFileFunctions object
-        * @return void
-        */
-       public function processData_postProcessAction($action, array $cmdArr, array $result, t3lib_extFileFunctions $parentObject) {
-//             t3lib_div::devLog('processData_postProcessAction', 'tx_fal');
-               switch($action) {
-                       case 'upload':
-                               foreach ($result as $filePath) {
-                                       //if ($fileName) {
-                                               t3lib_div::devLog('processData_postProcessAction[upload]: ' . $filePath, 'tx_fal');
-                                               $mount = tx_fal_Helper::getMountFromFilePath($filePath);
-                                               tx_fal_Indexer::addFileToIndex($mount, $filePath);
-                                       //}
-                               }
-               }
-       }
-
-}
-
-if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/fal/classes/hooks/class.tx_fal_hooks_extfilefunchook.php'])) {
-       include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/fal/classes/hooks/class.tx_fal_hooks_extfilefunchook.php']);
-}
-?>
\ No newline at end of file
diff --git a/typo3/sysext/fal/classes/hooks/class.tx_fal_hooks_tceforms_dbfileicons.php b/typo3/sysext/fal/classes/hooks/class.tx_fal_hooks_tceforms_dbfileicons.php
deleted file mode 100644 (file)
index 650c655..0000000
+++ /dev/null
@@ -1,101 +0,0 @@
-<?php
-/***************************************************************
-*  Copyright notice
-*
-*  (c) 2010 FAL development team <fal@wmdb.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!
-***************************************************************/
-
-/**
- * Hook into t3lib_TCEforms::dbFileIcons
- *
- * @author             FAL development team <fal@wmdb.de>
- * @package TYPO3
- * @subpackage tx_fal
- */
-class tx_fal_hooks_TCEforms_dbFileIcons implements t3lib_TCEforms_dbFileIconsHook {
-
-       /**
-        * Modifies the parameters for selector box form-field for the db/file/select elements (multiple)
-        *
-        * @param       array                   $params                         An array of additional parameters, eg: "size", "info", "headers" (array with "selector" and "items"), "noBrowser", "thumbnails"
-        * @param       string                  $selector                       Alternative selector box.
-        * @param       string                  $thumbnails                     Thumbnail view of images. Only filled if there are images only. This images will be shown under the selectorbox.
-        * @param       array                   $icons                          Defined icons next to the selector box.
-        * @param       string                  $rightbox                       Thumbnail view of images. Only filled if there are other types as images. This images will be shown right next to the selectorbox.
-        * @param       string                  $fName                          Form element name
-        * @param       array                   $uidList                        The array of item-uids. Have a look at t3lib_TCEforms::dbFileIcons parameter "$itemArray"
-        * @param       array                   $additionalParams       Array with additional parameters which are be available at method call. Includes $mode, $allowed, $itemArray, $onFocus, $table, $field, $uid. For more information have a look at PHPDoc-Comment of t3lib_TCEforms::dbFileIcons
-        * @param       t3lib_TCEforms  $parentObject           parent t3lib_TCEforms object
-        * @return      void
-        */
-       public function dbFileIcons_postProcess(array &$params, &$selector, &$thumbnails, array &$icons, &$rightbox, &$fName, array &$uidList, array $additionalParams, t3lib_TCEforms $parentObject) {
-
-               if (tx_fal_tcafunc::isFieldAFalField($additionalParams['field'], $additionalParams['table']) === TRUE) {
-                       $icons['R'] = array();
-                       if (!$params['readOnly'] && !$params['noList']) {
-                               if (!$params['noBrowser'])      {
-
-                                       //load needed js-libs:
-                                       $pageRenderer = &$GLOBALS['SOBE']->doc->getPageRenderer();
-                                       //disableCompressJavascript is required to make $pageRenderer respect
-                                       //ajax.php?ajaxID=ExtDirect::getAPI&namespace=
-                                       $pageRenderer->disableCompressJavascript();
-                                       $pageRenderer->addExtOnReadyCode("
-                                                       Ext.state.Manager.setProvider(new Ext.state.CookieProvider());
-                                       ");
-
-                                       $pageRenderer->addJsInlineCode('loadFalElementBrowser',"
-                                       loadFalElementBrowser = function(fName){
-                                               var l = document.getElementsByName(fName+'_list')[0],
-                                                       h = document.getElementsByName(fName)[0];
-                                               top.TYPO3.Components.filelist.loadElementBrowser(l,h);
-                                       }
-                                       ");
-
-                                       //render EB-Icon:
-                                       $table = $additionalParams['table'];
-                                       $field = $additionalParams['field'];
-
-                                       // check against inline uniqueness
-                                       $inlineParent = $parentObject->inline->getStructureLevel(-1);
-                                       if(is_array($inlineParent) && $inlineParent['uid']) {
-                                               if ($inlineParent['config']['foreign_table'] == $table && $inlineParent['config']['foreign_unique'] == $field) {
-                                                       $objectPrefix = $parentObject->inline->inlineNames['object'].'['.$table.']';
-                                                       $aOnClickInline = $objectPrefix.'|inline.checkUniqueElement|inline.setUniqueElement';
-                                                       $rOnClickInline = 'inline.revertUnique(\''.$objectPrefix.'\',null,\''.$uid.'\');';
-                                               }
-                                       }
-                                       $aOnClick='loadFalElementBrowser(\''.$fName.'\',\''.$allowed.'\',\''.$aOnClickInline.'\'); return false;';
-                                       $icons['R'][]='<a href="#" onclick="'.htmlspecialchars($aOnClick).'">'.
-                                                       t3lib_iconWorks::getSpriteIcon('actions-insert-record', array('title' => htmlspecialchars($parentObject->getLL('l_browse_' . ($mode == 'db' ? 'db' : 'file'))))) .
-                                       '</a>';
-                               }
-                       }
-               }
-       }
-}
-
-if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/fal/classes/hooks/class.tx_fal_hooks_tceforms_dbfileicons.php'])) {
-       include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/fal/classes/hooks/class.tx_fal_hooks_tceforms_dbfileicons.php']);
-}
-?>
\ No newline at end of file
diff --git a/typo3/sysext/fal/classes/iterator/class.tx_fal_databasefieldnameiterator.php b/typo3/sysext/fal/classes/iterator/class.tx_fal_databasefieldnameiterator.php
deleted file mode 100644 (file)
index a1a7bfe..0000000
+++ /dev/null
@@ -1,175 +0,0 @@
-<?php
-/***************************************************************
-*  Copyright notice
-*
-*  (c) 2010 FAL development team <fal@wmdb.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!
-***************************************************************/
-
-/**
- * File Abtraction Layer Database Fieldname Iterator
- *
- * @todo Andy Grunwald, 01.12.2010, matching the class name convention? new name tx_fal_iterator_DatabaseFieldnameIterator ?
- *
- * @author             FAL development team <fal@wmdb.de>
- * @package            TYPO3
- * @subpackage tx_fal
- * @version            $Id$
- */
-class tx_fal_DatabaseFieldnameIterator implements Iterator {
-
-       /**
-        * All pathes that should be iterated over
-        *
-        * @var array
-        */
-       protected $tablesAndFieldsToIterate = array();
-
-       /**
-        * Tablenames
-        *
-        * @var array
-        */
-       protected $tableNames = array();
-
-       /**
-        * Points to the current table
-        *
-        * @var integer
-        */
-       protected $tablenamePointer = 0;
-
-       /**
-        * Points to the current fieldname
-        *
-        * @var integer
-        */
-       protected $fieldnamePointer = 0;
-
-       /**
-        * Constructor of the file iterator
-        *
-        * @return      void
-        */
-       public function __construct() {
-               foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['fal']['tablesAndFieldsToMigrate'] as $extKey => $tableAndFields) {
-                       foreach ($tableAndFields as $table => $fields) {
-                               if (!isset($this->tablesAndFieldsToIterate[$table])) {
-                                       $this->tablesAndFieldsToIterate[$table] = array();
-                               }
-
-                               $this->tablesAndFieldsToIterate[$table] = array_merge(
-                                       $this->tablesAndFieldsToIterate[$table],
-                                       (array) $fields
-                               );
-                       }
-               }
-
-               $this->tableNames = array_keys($this->tablesAndFieldsToIterate);
-       }
-
-       /**
-        * Getter for tableNames
-        *
-        * @return      array   DESCRIPTION
-        */
-       public function getTableNames() {
-               return $this->tableNames;
-       }
-
-       /**
-        * Only keep tableNames that are given and reindex the array
-        *
-        * @param       array   $keepTableNames         DESCRIPTION
-        * @return      void
-        */
-       public function limitTablesTo(array $keepTableNames) {
-               $this->tableNames = array_values(array_intersect($this->tableNames, $keepTableNames));
-       }
-
-       /**
-        * Get the current fieldname
-        *
-        * @return      string          DESCRIPTION
-        */
-       public function current() {
-               return $this->tablesAndFieldsToIterate[$this->tableNames[$this->tablenamePointer]][$this->fieldnamePointer];
-       }
-
-       /**
-        * Get the current tablename
-        *
-        * @return      string          DESCRIPTION
-        */
-       public function key() {
-               return $this->tableNames[$this->tablenamePointer];
-       }
-
-       /**
-        * Get next result
-        *
-        * @return      void
-        */
-       public function next() {
-               $tableName = $this->tableNames[$this->tablenamePointer];
-
-               if ($this->fieldnamePointer < count($this->tablesAndFieldsToIterate[$tableName]) - 1) {
-                       $this->fieldnamePointer++;
-               } else {
-                       $this->tablenamePointer++;
-                       $this->fieldnamePointer = 0;
-               }
-       }
-
-       /**
-        * Reset all pointers to begin new
-        *
-        * @return      void
-        */
-       public function rewind() {
-               $this->tablenamePointer = 0;
-               $this->fieldnamePointer = 0;
-       }
-
-       /**
-        * Check if more iterations are possible
-        *
-        * @return      boolean         DESCRIPTION
-        */
-       public function valid() {
-               $result = FALSE;
-
-               if ($this->tablenamePointer < count($this->tableNames) - 1) {
-                       $result = TRUE;
-               } elseif (isset($this->tableNames[$this->tablenamePointer]) AND
-                               $this->fieldnamePointer < count($this->tablesAndFieldsToIterate[$this->tableNames[$this->tablenamePointer]])) {
-                       $result = TRUE;
-               }
-
-               return $result;
-       }
-}
-
-if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/fal/classes/iterator/class.tx_fal_databasefieldnameiterator.php'])) {
-       include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/fal/classes/iterator/class.tx_fal_databasefieldnameiterator.php']);
-}
-?>
\ No newline at end of file
diff --git a/typo3/sysext/fal/classes/iterator/class.tx_fal_recorditerator.php b/typo3/sysext/fal/classes/iterator/class.tx_fal_recorditerator.php
deleted file mode 100644 (file)
index a5634d2..0000000
+++ /dev/null
@@ -1,185 +0,0 @@
-<?php
-/***************************************************************
-*  Copyright notice
-*
-*  (c) 2010 FAL development team <fal@wmdb.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!
-***************************************************************/
-
-/**
- * File Abtraction Layer Record Iterator
- *
- * @todo Andy Grunwald, 01.12.2010, matching the class name convention? new name tx_fal_iterator_RecordIterator ?
- *
- * @author             FAL development team <fal@wmdb.de>
- * @package            TYPO3
- * @subpackage tx_fal
- * @version            $Id$
- */
-class tx_fal_RecordIterator implements Iterator {
-
-       /**
-        * Contains records
-        *
-        * @var array
-        */
-       protected $records = array();
-
-       /**
-        * Points to the current record
-        *
-        * @var integer
-        */
-       protected $recordPointer = 0;
-
-       /**
-        * Tablename of the table the current selection is based on
-        *
-        * @var string
-        */
-       protected $tableName = '';
-
-       /**
-        * Fieldname of the field the current selection is based on
-        *
-        * @var string
-        */
-       protected $fieldName = '';
-
-       /**
-        * Limit for records to be read
-        *
-        * @var integer
-        */
-       protected $limit = 500;
-
-       /**
-        * Constructor of the file iterator
-        *
-        * @return      void
-        */
-       public function __construct() {
-       }
-
-       /**
-        * Setter for limit
-        *
-        * @param       integer $limit  DESCRIPTION
-        * @return      void
-        */
-       public function setLimit($limit) {
-               $this->limit = (int) $limit;
-       }
-
-       /**
-        * Fetch records from database for table and fieldname
-        *
-        * @param       string  $tableName      DESCRIPTION
-        * @param       string  $fieldName      DESCRIPTION
-        * @return      void
-        */
-       public function fetchRecordsForTableAndField($tableName, $fieldName) {
-               $this->tableName = $tableName;
-               $this->fieldName = $fieldName;
-               $this->records = array();
-               $this->recordPointer = 0;
-
-               if (isset($TCA['pages']['ctrl']['delete'])) {
-                       $enableFields = ' AND ' . $TCA['pages']['ctrl']['delete'] . '=0';
-               }
-
-                       // only fetch records that has files in the field attached and has no reference count set
-                       // if reference count is set in FAL_fieldname then the migration for this records was successful earlier
-               $this->records = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows(
-                       '*',
-                       $tableName,
-                       $fieldName . ' <> \'\' AND '. $fieldName . '_rel = 0' . $enableFields,
-                       '',
-                       '',
-                       $this->limit
-               );
-       }
-
-       /**
-        * Get the current fieldname
-        *
-        * @return      string  DESCRIPTION
-        */
-       public function current() {
-               return $this->records[$this->recordPointer][$this->fieldName];
-       }
-
-       /**
-        * Get the current tablename
-        *
-        * @return      string  DESCRIPTION
-        */
-       public function key() {
-               $key = 0;
-
-               if (isset($this->records[$this->recordPointer]['uid'])) {
-                       $key = $this->records[$this->recordPointer]['uid'];
-               } else {
-                       $key = $this->recordPointer;
-               }
-
-               return $key;
-       }
-
-       /**
-        * Get next result
-        *
-        * @return      void
-        */
-       public function next() {
-               $this->recordPointer++;
-       }
-
-       /**
-        * Reset all pointers to begin new
-        *
-        * @return      void
-        */
-       public function rewind() {
-               $this->recordPointer = 0;
-       }
-
-       /**
-        * Check if more iterations are possible
-        *
-        * @return      boolean
-        */
-       public function valid() {
-               $result = FALSE;
-
-               if ($this->recordPointer < count($this->records)) {
-                       $result = TRUE;
-               }
-
-               return $result;
-       }
-}
-
-if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/fal/classes/iterator/class.tx_fal_recorditerator.php'])) {
-       include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/fal/classes/iterator/class.tx_fal_recorditerator.php']);
-}
-?>
\ No newline at end of file
diff --git a/typo3/sysext/fal/classes/storage/class.tx_fal_storage_filesystemstorage.php b/typo3/sysext/fal/classes/storage/class.tx_fal_storage_filesystemstorage.php
deleted file mode 100644 (file)
index 34a9b4c..0000000
+++ /dev/null
@@ -1,344 +0,0 @@
-<?php
-/***************************************************************
-*  Copyright notice
-*
-*  (c) 2010 FAL development team <fal@wmdb.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!
-***************************************************************/
-
-/**
- * File Abtraction Layer File System Storage
- *
- * @author             FAL development team <fal@wmdb.de>
- * @package            TYPO3
- * @subpackage tx_fal
- * @version            $Id$
- */
-class tx_fal_storage_FileSystemStorage implements tx_fal_storage_Interface {
-
-       /**
-        * The configuration for this backend
-        *
-        * @var array
-        */
-       protected $configuration;
-
-       /**
-        * DESCRIPTION
-        *
-        * @var string
-        */
-       protected $basePath;
-
-       /**
-        * DESCRIPTION
-        *
-        * @param       array   $configuration          The configuration for the backend
-        */
-       public function __construct($configuration) {
-               $this->configuration = $configuration;
-
-               if ($configuration['relative']) {
-                       $this->basePath = t3lib_div::resolveBackPath(PATH_site . $configuration['path']);
-               } else {
-                       $this->basePath = $configuration['path'];
-               }
-               $this->basePath = rtrim($this->basePath, '/') . '/';
-
-               // @todo throw exception if $this->basePath does not exist
-       }
-
-       /**
-        * @see tx_fal_storage_Interface::read()
-        */
-       public function read($path) {
-               return file_get_contents($this->basePath . $path);
-       }
-
-       /**
-        * @see tx_fal_storage_Interface::write()
-        */
-       public function write($path, $content) {
-               return file_put_contents($this->basePath . $path, $content);
-       }
-
-       /**
-        * @see tx_fal_storage_Interface::delete()
-        */
-       public function delete($path) {
-               $errorMessages = false;
-
-               if ($this->exists($path)) {
-                       if (@unlink($this->basePath . $path)) {
-                               t3lib_div::devLog('file "' . $path . '" was deleted ', 'fal', 1, array('path' => $this->basePath . $path));
-                       } else {
-                               t3lib_div::devLog('ERROR: File "' . $path . '" could not be deleted!', 'fal', 3, array('path' => $this->basePath . $path));
-                               $errorMessages[$path] = 'ERROR: File "' . $path . '" could not be deleted!';
-                       }
-               } else {
-                       $errorMessages[$path] = 'ERROR: File "' . $path . '" not found!';
-               }
-
-               if (empty($errorMessages)) {
-                       return array('success' => true);
-               } else {
-                       return array(
-                                       'success' => false,
-                                       'msg' => $errorMessages
-                       );
-               }
-       }
-
-       /**
-        * @see tx_fal_storage_Interface::exists()
-        */
-       public function exists($path) {
-               return file_exists($this->basePath . $path);
-       }
-
-       /**
-        * @see tx_fal_storage_Interface::getModificationTime()
-        */
-       public function getModificationTime($path) {
-               if ($this->exists($path)) {
-                       return filemtime($this->basePath . $path);
-               }
-       }
-
-       /**
-        * @see tx_fal_storage_Interface::getFileHash()
-        */
-       public function getFileHash($path) {
-               if ($this->exists($path)) {
-                       return sha1_file($this->basePath . $path);
-               }
-       }
-
-       /**
-        * @see tx_fal_storage_Interface::getSize()
-        */
-       public function getSize($path) {
-               if ($this->exists($path)) {
-                       return filesize($this->basePath . $path);
-               }
-       }
-
-       /**
-        * @see tx_fal_storage_Interface::getBasePath()
-        */
-       public function getBasePath() {
-               return $this->basePath;
-       }
-
-       /**
-        * @see tx_fal_storage_Interface::open()
-        * @todo Implement tx_fal_storage_FileSystemStorage::open ?
-        */
-       public function open($path, $mode) {}
-
-
-       /**
-        * Copies a file inside this storage. All parameters are relative to the base of this storage
-        *
-        * @todo Andy Grunwald, 01.12.2010, move to interface
-        *
-        * @param       [to be defined] $path           DESCRIPTION
-        * @param       [to be defined] $newPath        DESCRIPTION
-        * @return      void
-        */
-       public function copyFile($path, $newPath) {
-               $path = $this->basePath . $path;
-               $newPath = $this->basePath . $newPath;
-               if (!file_exists($path)) {
-                       throw new InvalidArgumentException('Source file does not exist.');
-               }
-
-               if (!copy($path, $newPath)) {
-                       throw new RuntimeException("Copying file '$path' to '$newPath' failed.");
-               }
-       }
-
-       /**
-        * Moves a file inside this storage.
-        *
-        * @todo Andy Grunwald, 01.12.2010, move to interface
-        *
-        * @param       string  $oldPath        The file to move
-        * @param       string  $newPath        The location to move to
-        * @return      array                           With either success=true or success=false and a message why the action failed
-        */
-       public function moveFile($oldPath, $newPath, $action='rename') {
-
-               $oldPath = $this->basePath . $oldPath;
-               $newPath = $this->basePath . $newPath;
-
-               if (!file_exists($oldPath)) {
-//                     throw new InvalidArgumentException('Source file does not exist.');
-                       t3lib_div::devLog('ERROR: Source file does not exist. ' . __FUNCTION__, 'fal', 3, array(
-                               $oldPath
-                       ));
-               }
-               if (file_exists($newPath)) {
-//                     throw new InvalidArgumentException('Target file already exists.');
-                       t3lib_div::devLog('ERROR: Target file already exists. ' . __FUNCTION__, 'fal', 3, array(
-                               $newPath
-                       ));
-               }
-
-               /**
-                * @todo: <rupert.germann>, 26.11.2010
-                * implement overwriteExistingFiles switch ('altName'=1)
-                */
-
-               $altName = 0;
-
-               if ($action == 'rename') {
-                       $FILE = array(
-                               $action => array(
-                                       array(
-                                               'data' =>  basename($newPath),
-                                               'target' => $oldPath,
-                                               'altName' => $altName
-                                       )
-                               )
-                       );
-               }
-
-               if ($action == 'move') {
-                       $FILE = array(
-                               $action => array(
-                                       array(
-                                               'data' => $oldPath,
-                                               'target' => str_replace(basename($newPath), '', $newPath),
-                                               'altName' => $altName
-                                       )
-                               )
-                       );
-               }
-
-               $fileProcessor = t3lib_div::makeInstance('t3lib_extFileFunctions');
-               $fileProcessor->init($GLOBALS['FILEMOUNTS'], $GLOBALS['TYPO3_CONF_VARS']['BE']['fileExtensions']);
-               $fileProcessor->init_actionPerms($GLOBALS['BE_USER']->getFileoperationPermissions());
-
-               $fileProcessor->start($FILE);
-               $fileProcessor->processData();
-               $fileProcessor->printLogErrorMessages();
-
-                       // catch flashmessages from class.t3lib_extfilefunc and return them via dataprovider
-               $tmpFlashMessage = t3lib_FlashMessageQueue::getAllMessagesAndFlush();
-
-                       // take only the last message (needed because extfilefunc returns all messages from the same EXEC_TIME)
-               $flashMessages = array_pop($tmpFlashMessage);
-
-
-
-
-//             t3lib_div::devLog('$result ' . __FUNCTION__, 'fal', 1, array(
-//     '$$flashMessages' => $flashMessages,
-////   '$result' => $result,
-//));
-
-               if (empty($flashMessages)) {
-                       return array('success' => true);
-               } else {
-                       return array(
-                                       'success' => false,
-                                       'msg' => $flashMessages
-                       );
-               }
-       }
-
-       /**
-        * Creates a directory inside a path
-        *
-        * @todo Andy Grunwald, 01.12.2010, move to interface
-        *
-        * @return      boolean
-        */
-       public function createDirectory($path, $directoryName) {
-               $path = rtrim($this->basePath . $path, '/') . '/';
-
-               return mkdir($path . $directoryName);
-       }
-
-       /**
-        * Returns a list of all files and directories inside a path
-        *
-        * @todo Andy Grunwald, 01.12.2010, move to interface
-        *
-        * @param       string  $path   DESCRIPTION
-        * @return      void
-        */
-       public function getListing($path) {
-               return t3lib_div::array_merge_recursive_overrule(
-                       $this->getDirectoriesInPath($path),
-                       $this->getFilesInPath($path)
-               );
-       }
-
-       /**
-        * Returns a list of directories in a path.
-        *
-        * @param  $path
-        * @return array
-        */
-       public function getDirectoriesInPath($path) {
-               $folders = t3lib_div::get_dirs($this->basePath . $path);
-
-               $foldersArray = array();
-               foreach ($folders as $folder) {
-                       if ($folder{0} !== '.') {
-                               $foldersArray[$folder] = array(
-                                       'name' => $folder,
-                                       'type' => 'dir'
-                               );
-                       }
-               }
-
-               return $foldersArray;
-       }
-
-       /**
-        * Returns a list of files in a path.
-        *
-        * @param  $path
-        * @return array
-        */
-       public function getFilesInPath($path) {
-               $files = t3lib_div::getFilesInDir($this->basePath . $path, '', FALSE, '', '');
-
-               $filesArray = array();
-               foreach ($files as $file) {
-                       $filesArray[$file] = array(
-                               'name' => $file,
-                               'type' => 'file'
-                       );
-               }
-
-               return $filesArray;
-       }
-}
-
-if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/fal/classes/storage/class.tx_fal_storage_filesystemstorage.php'])) {
-       include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/fal/classes/storage/class.tx_fal_storage_filesystemstorage.php']);
-}
-?>
\ No newline at end of file
diff --git a/typo3/sysext/fal/classes/storage/interface.tx_fal_storage_interface.php b/typo3/sysext/fal/classes/storage/interface.tx_fal_storage_interface.php
deleted file mode 100644 (file)
index 4d40e2d..0000000
+++ /dev/null
@@ -1,161 +0,0 @@
-<?php
-/***************************************************************
-*  Copyright notice
-*
-*  (c) 2010 FAL development team <fal@wmdb.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!
-***************************************************************/
-
-/**
- * File Abtraction Layer Storage Interface
- *
- * @todo Andy Grunwald, 01.12.2010, update needed methods
- *
- * @author             FAL development team <fal@wmdb.de>
- * @package            TYPO3
- * @subpackage tx_fal
- * @version            $Id$
- */
-interface tx_fal_storage_Interface {
-
-       /**
-        * DESCRIPTION
-        */
-       public function getBasePath();
-
-       /**
-        * DESCRIPTION
-        *
-        * @param       [to be defined]         $path   DESCRIPTION
-        * @param       [to be defined]         $mode   DESCRIPTION
-        */
-       public function open($path, $mode);
-
-       /**
-        * Read the contents of a file
-        *
-        * @param       string  $path   Absolute path to the file
-        * @return      string                  File contents
-        */
-       public function read($path);
-
-       /**
-        * Write data into a file
-        *
-        * @param       string          $path           Absolute path to the file
-        * @param       string          $content        File contents
-        * @return      boolean                                 Success of operation
-        */
-       public function write($path, $content);
-
-       /**
-        * Delete the file
-        *
-        * @param       string  $path   Absolute path to the file
-        * @return      void
-        */
-       public function delete($path);
-
-       /**
-        * Check if file or directory exists
-        *
-        * @param       string  $path   Absolute path to the file
-        * @return      boolean                 True if the file or folder exists, false otherwise
-        */
-       public function exists($path);
-
-       /**
-        * Get timestamp of when the file was last modified
-        *
-        * @param       string  $path   Absolute path to the file
-        * @return      integer                 Timestamp
-        */
-       public function getModificationTime($path);
-
-       /**
-        * Get the sha1 hash of the file
-        *
-        * @param       string  $path   Absolute path to the file
-        * @return      string                  Hash of the content
-        */
-       public function getFileHash($path);
-
-       /**
-        * Get the file size of the content
-        *
-        * @param       string  $path   Absolute path to the file
-        * @return      integer                 Size of the file in bytes
-        */
-       public function getSize($path);
-
-       /**
-        * DESCRIPTION
-        *
-        * @param       [to be defined]         $path           DESCRIPTION
-        * @param       [to be defined]         $newPath        DESCRIPTION
-        * @return      [to be defined]                                 DESCRIPTION
-        */
-       public function copyFile($path, $newPath);
-
-       /**
-        * DESCRIPTION
-        *
-        * @param       [to be defined]         $oldPath        DESCRIPTION
-        * @param       [to be defined]         $newPath        DESCRIPTION
-        * @return      [to be defined]                                 DESCRIPTION
-        */
-       public function moveFile($oldPath, $newPath);
-
-       /**
-        * Creates a directory inside a path
-        *
-        * @param       [to be defined]         $path                   DESCRIPTION
-        * @param       [to be defined]         $directoryName  DESCRIPTION
-        * @return      boolean                                         TRUE if the directory could be created
-        */
-       public function createDirectory($path, $directoryName);
-
-       /**
-        * Returns a list of all files and directories inside a path
-        *
-        * @param       string  $path   DESCRIPTION
-        * @return      void
-        */
-       public function getListing($path);
-
-       /**
-        * Returns a list of directories in a path.
-        *
-        * @param  $path
-        * @return array
-        */
-       public function getDirectoriesInPath($path);
-
-       /**
-        * Returns a list of files in a path.
-        *
-        * @param  $path
-        * @return array
-        */
-       public function getFilesInPath($path);
-}
-?>
\ No newline at end of file
diff --git a/typo3/sysext/fal/classes/tceforms_wizard.php b/typo3/sysext/fal/classes/tceforms_wizard.php
deleted file mode 100644 (file)
index 8d98a28..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-<?php
-/***************************************************************
-*  Copyright notice
-*
-*  (c) 2010 FAL development team <fal@wmdb.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!
-***************************************************************/
-
-/**
- * File Abtraction Layer TCEForms wizard
- *
- * @todo Andy Grunwald, 01.12.2010, matching the class nam econvention? new name tx_fal_TCEForms_Wizard ?
- *
- * @author             FAL development team <fal@wmdb.de>
- * @package            TYPO3
- * @subpackage tx_fal
- * @version            $Id$
- */
-class tx_fal_tceforms_wizard {
-
-       /**
-        * DESCRIPTION
-        *
-        * @todo I will make this A LOT cooler than now
-        *
-        * @param       [to be defined]         $params         DESCRIPTION
-        * @param       [to be defined]         $pObj           DESCRIPTION
-        * @return      [to be defined]                                 DESCRIPTION
-        */
-       public function tx_fal_fieldwizard($params, $pObj) {
-               $content .= t3lib_BEfunc::thumbCode($params['row'], $params['table'], $params['field']);
-
-               return $content;
-       }
-}
-
-if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/fal/classes/tceforms_wizard.php'])) {
-       include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/fal/classes/tceforms_wizard.php']);
-}
-?>
\ No newline at end of file
diff --git a/typo3/sysext/fal/contrib/plupload/changelog.txt b/typo3/sysext/fal/contrib/plupload/changelog.txt
deleted file mode 100644 (file)
index b2b5dfd..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-Version 1.2.x (2010-xx-xx)\r
-       Added support for crossdomain loading of the XAP and SWF files and crossdomain upload.\r
-       Added preinit/init options to to ease up the binding of custom events to queueWidget and the Uploader class.\r
-       Added drag/drop support for Safari kind of a hack until they release official drag/drop support like Chrome.\r
-       Added events example file that show how to bind all events and display event specific data.\r
-       Fixed logic issue with the upload.php example file. Chunking wasn't working correctly.\r
-       Fixed issue with HTML4 not handling the form encoding correctly on older IE versions. Patch contributed by jinxdone.\r
-       Fixed so the HTML4 runtime only submits the defined multipart_params arguments.\r
-       Fixes issue where it wasn't possible to dynamically override url or mutlipart_params for the HTML4 runtime.\r
-       Fixed so all runtimes pass the name, chunk and chunks parameters as multipart parameters instead of querystring parameters.\r
-       Fixed so files are read using the newer FileReader class if it's available if not it tries the older getAsXXX on Gecko.\r
-       Fixed bug where IE 9 beta 1 wouldn't render Silverlight properly.\r
-Version 1.2.4 (2010-09-08)\r
-       Added new BeforeUpload event to make it easier to override settings before a file is uploaded.\r
-       Added new automatic usage of FileReference in Flash if it's possible. Contributed by Marcel Jackwerth.\r
-       Added new chunking support for Chrome 5 and Firefox 3.6 using the HTML 5 runtime.\r
-       Added new multipart upload support for WebKit using the HTML 5 runtime and the FormData object.\r
-       Added new image scaling method for the Flash runtime contributed by rcoopman.\r
-       Added new alert error message if the user selected invalid files.\r
-       Added new automatic unique name generation to the example.php script. Contributed by Brandon Kelly.\r
-       Changed so the default upload method is multipart and the default chunk size is 0.\r
-       Fixed progress issue with the HTML5 runtime running on Gecko.\r
-       Fixed so longer extensions can be used such as .tar.gz.\r
-       Fixed so the file extension is retained when using the unique_names option.\r
-Version 1.2.3 (2010-05-27)\r
-       Added new drag/drop support for HTML5 running on Chrome beta.\r
-       Added new multipart state for the features object. It's now possible to detect multipart support.\r
-       Added new getFeatures function to all runtime. Basic concept by Javier Martinez Fernandez.\r
-       Fixed bug where runtimes where initialized even if they didn't match the required_features setting.\r
-Version 1.2.2.1 (2010-05-04)\r
-       Added new headers option, enables you to set custom headers for the upload requests.\r
-       Fixed bug where the file extension checking was case sensitive.\r
-Version 1.2.2 (2010-04-26)\r
-       Added new file_data_name option that enables you to set the multipart file data param. Patch contributed by Alex Ganov.\r
-       Added new FILE_SIZE_ERROR type that will be triggered if the user selected a file that is to large or zero bytes.\r
-       Added new FILE_EXTENSION_ERROR type that will be triggered if you add a file with an invalid file extension.\r
-       Added new required_features setting, enables you to specify a list of required features that the runtime must have.\r
-       Fixed so the plupload.buildUrl function uses the UTF compatible encodeURIComponent method instead of escape.\r
-       Fixed so that all file types can be selected if you don't specify a filter setting.\r
-       Fixed so more valid HTTP status codes are accepted as valid responses.\r
-       Fixed so all runtimes fills the features object with available features.\r
-       Fixed some issues with the HTML4 runtime if there wasn't any existing forms on the page.\r
-       Fixed some conflict issues with HTML4 runtime and forms with the input names of action or target.\r
-       Fixed bug where some Gecko versions would produce exceptions when checking the HTTP status of a XHR.\r
-Version 1.2.1 (2010-03-22)\r
-       Fixed bug with incorrect aspect ratio in Flash image scaling.\r
-       Fixed bug where chunked uploads could get scrambled in the Flash runtime. Patch contributed by Grady Werner.\r
-       Fixed bug where a beta version of Chrome wouldn't handle drag/drop correctly because of missing drag effect.\r
-       Fixed so the HTML 4 runtime displays N/A for file sizes and the progress is based on uploaded files instead of bytes.\r
-       Fixed so chunking can be disabled properly in Flash but that will affect the progress bar.\r
-       Fixed so queue widget displays the drag/drop message if file queue is emptied.\r
-       Fixed small files are uploaded as one single chunk and not forced into 4 chunks in the Flash runtime.\r
-Version 1.2 (2010-03-09)\r
-       Added new rename file support for jQuery queue widget, click on a file name to rename it if it's enabled.\r
-       Added official ChunkUploaded event, it similar to FileUploaded but executed for each chunk.\r
-       Added bytes per second support to total queue progress.\r
-       Added better error handling to core API using the new Error event.\r
-       Added better error handling to jQuery queue widget.\r
-       Fixed so chunking uploads is dispatch from JS not from inside Flash/Silverlight.\r
-Version 1.1.1 (2010-02-25)\r
-       Added new setup setting to queue widget. Makes it easier to bind custom events to uploader instance.\r
-       Fixed so it's possible to disable chunking compleatly. It's now disabled by default.\r
-       Fixed bug where multipart mode was enabled all the time in the Flash runtime.\r
-       Fixed bug where chunked uploading in Silverlight would fail.\r
-       Fixed bug where the delete button was visible while uploading.\r
-       Fixed bug where unique_names setting wasn't working when the core API was used.\r
-       Fixed bug where the queue widget wouldn't display the currently uploaded file if the unique_names was enabled.\r
-Version 1.1 (2010-02-24)\r
-       Added new multipart and multipart_params support.\r
-       Added new container option, enables you to specify where flash/silverlight objects would be added.\r
-       Added chunking support to BrowserPlus runtime, contributed by Steve Spencer.\r
-       Added FileUploaded event that fires when a file is uploaded.\r
-       Added more easily understandable buttons to queue widget.\r
-       Added html4 runtime, contributed by Ryan Demmer.\r
-       Fixed issues with i18n support and added a Swedish and Danish language pack.\r
-       Fixed bug where the Flash runtime could do empty requests if the image was scaled down.\r
-       Fixed bug where uploading small images in Silverlight would produce an exception.\r
-       Fixed so the runtime list can include whitespace or missing runtimes. Patch contributed by √ėyvind Sean Kinsey.\r
-       Fixed so to large files are ignored and never dispatched to the FilesAdded event.\r
-Version 1.0 (2010-02-03)\r
-       First official release of Plupload.\r
diff --git a/typo3/sysext/fal/contrib/plupload/js/gears_init.js b/typo3/sysext/fal/contrib/plupload/js/gears_init.js
deleted file mode 100644 (file)
index 5f44f09..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-// Copyright 2007, Google Inc.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-//  1. Redistributions of source code must retain the above copyright notice,
-//     this list of conditions and the following disclaimer.
-//  2. Redistributions in binary form must reproduce the above copyright notice,
-//     this list of conditions and the following disclaimer in the documentation
-//     and/or other materials provided with the distribution.
-//  3. Neither the name of Google Inc. nor the names of its contributors may be
-//     used to endorse or promote products derived from this software without
-//     specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
-// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
-// EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
-// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Sets up google.gears.*, which is *the only* supported way to access Gears.
-//
-// Circumvent this file at your own risk!
-//
-// In the future, Gears may automatically define google.gears.* without this
-// file. Gears may use these objects to transparently fix bugs and compatibility
-// issues. Applications that use the code below will continue to work seamlessly
-// when that happens.
-
-(function() {
-  // We are already defined. Hooray!
-  if (window.google && google.gears) {
-    return;
-  }
-
-  var factory = null;
-
-  // Firefox
-  if (typeof GearsFactory != 'undefined') {
-    factory = new GearsFactory();
-  } else {
-    // IE
-    try {
-      factory = new ActiveXObject('Gears.Factory');
-      // privateSetGlobalObject is only required and supported on WinCE.
-      if (factory.getBuildInfo().indexOf('ie_mobile') != -1) {
-        factory.privateSetGlobalObject(this);
-      }
-    } catch (e) {
-      // Safari
-      if ((typeof navigator.mimeTypes != 'undefined')
-           && navigator.mimeTypes["application/x-googlegears"]) {
-        factory = document.createElement("object");
-        factory.style.display = "none";
-        factory.width = 0;
-        factory.height = 0;
-        factory.type = "application/x-googlegears";
-        document.documentElement.appendChild(factory);
-      }
-    }
-  }
-
-  // *Do not* define any objects if Gears is not installed. This mimics the
-  // behavior of Gears defining the objects in the future.
-  if (!factory) {
-    return;
-  }
-
-  // Now set up the objects, being careful not to overwrite anything.
-  //
-  // Note: In Internet Explorer for Windows Mobile, you can't add properties to
-  // the window object. However, global objects are automatically added as
-  // properties of the window object in all browsers.
-  if (!window.google) {
-    google = {};
-  }
-
-  if (!google.gears) {
-    google.gears = {factory: factory};
-  }
-})();
diff --git a/typo3/sysext/fal/contrib/plupload/js/jquery.plupload.queue.min.js b/typo3/sysext/fal/contrib/plupload/js/jquery.plupload.queue.min.js
deleted file mode 100644 (file)
index 2ef814c..0000000
+++ /dev/null
@@ -1 +0,0 @@
-(function(c){var d={};function a(e){return plupload.translate(e)||e}function b(f,e){e.contents().each(function(g,h){h=c(h);if(!h.is(".plupload")){h.remove()}});e.prepend('<div class="plupload_wrapper plupload_scroll"><div id="'+f+'_container" class="plupload_container"><div class="plupload"><div class="plupload_header"><div class="plupload_header_content"><div class="plupload_header_title">'+a("Select files")+'</div><div class="plupload_header_text">'+a("Add files to the upload queue and click the start button.")+'</div></div></div><div class="plupload_content"><div class="plupload_filelist_header"><div class="plupload_file_name">'+a("Filename")+'</div><div class="plupload_file_action">&nbsp;</div><div class="plupload_file_status"><span>'+a("Status")+'</span></div><div class="plupload_file_size">'+a("Size")+'</div><div class="plupload_clearer">&nbsp;</div></div><ul id="'+f+'_filelist" class="plupload_filelist"></ul><div class="plupload_filelist_footer"><div class="plupload_file_name"><div class="plupload_buttons"><a href="#" class="plupload_button plupload_add">'+a("Add files")+'</a><a href="#" class="plupload_button plupload_start">'+a("Start upload")+'</a></div><span class="plupload_upload_status"></span></div><div class="plupload_file_action"></div><div class="plupload_file_status"><span class="plupload_total_status">0%</span></div><div class="plupload_file_size"><span class="plupload_total_file_size">0 b</span></div><div class="plupload_progress"><div class="plupload_progress_container"><div class="plupload_progress_bar"></div></div></div><div class="plupload_clearer">&nbsp;</div></div></div></div></div><input type="hidden" id="'+f+'_count" name="'+f+'_count" value="0" /></div>')}c.fn.pluploadQueue=function(e){if(e){this.each(function(){var j,i,k;i=c(this);k=i.attr("id");if(!k){k=plupload.guid();i.attr("id",k)}j=new plupload.Uploader(c.extend({dragdrop:true,container:k},e));if(e.preinit){e.preinit(j)}d[k]=j;function h(l){var m;if(l.status==plupload.DONE){m="plupload_done"}if(l.status==plupload.FAILED){m="plupload_failed"}if(l.status==plupload.QUEUED){m="plupload_delete"}if(l.status==plupload.UPLOADING){m="plupload_uploading"}c("#"+l.id).attr("class",m).find("a").css("display","block")}function f(){c("span.plupload_total_status",i).html(j.total.percent+"%");c("div.plupload_progress_bar",i).css("width",j.total.percent+"%");c("span.plupload_upload_status",i).text("Uploaded "+j.total.uploaded+"/"+j.files.length+" files");if(j.total.uploaded==j.files.length){j.stop()}}function g(){var m=c("ul.plupload_filelist",i).html(""),n=0,l;c.each(j.files,function(p,o){l="";if(o.status==plupload.DONE){if(o.target_name){l+='<input type="hidden" name="'+k+"_"+n+'_tmpname" value="'+plupload.xmlEncode(o.target_name)+'" />'}l+='<input type="hidden" name="'+k+"_"+n+'_name" value="'+plupload.xmlEncode(o.name)+'" />';l+='<input type="hidden" name="'+k+"_"+n+'_status" value="'+(o.status==plupload.DONE?"done":"failed")+'" />';n++;c("#"+k+"_count").val(n)}m.append('<li id="'+o.id+'"><div class="plupload_file_name"><span>'+o.name+'</span></div><div class="plupload_file_action"><a href="#"></a></div><div class="plupload_file_status">'+o.percent+'%</div><div class="plupload_file_size">'+plupload.formatSize(o.size)+'</div><div class="plupload_clearer">&nbsp;</div>'+l+"</li>");h(o);c("#"+o.id+".plupload_delete a").click(function(q){c("#"+o.id).remove();j.removeFile(o);q.preventDefault()})});c("span.plupload_total_file_size",i).html(plupload.formatSize(j.total.size));if(j.total.queued===0){c("span.plupload_add_text",i).text(a("Add files."))}else{c("span.plupload_add_text",i).text(j.total.queued+" files queued.")}c("a.plupload_start",i).toggleClass("plupload_disabled",j.files.length===0);m[0].scrollTop=m[0].scrollHeight;f();if(!j.files.length&&j.features.dragdrop&&j.settings.dragdrop){c("#"+k+"_filelist").append('<li class="plupload_droptext">'+a("Drag files here.")+"</li>")}}j.bind("UploadFile",function(l,m){c("#"+m.id).addClass("plupload_current_file")});j.bind("Init",function(l,m){b(k,i);if(!e.unique_names&&e.rename){c("#"+k+"_filelist div.plupload_file_name span",i).live("click",function(s){var q=c(s.target),o,r,n,p="";o=l.getFile(q.parents("li")[0].id);n=o.name;r=/^(.+)(\.[^.]+)$/.exec(n);if(r){n=r[1];p=r[2]}q.hide().after('<input type="text" />');q.next().val(n).focus().blur(function(){q.show().next().remove()}).keydown(function(u){var t=c(this);if(u.keyCode==13){u.preventDefault();o.name=t.val()+p;q.text(o.name);t.blur()}})})}c("a.plupload_add",i).attr("id",k+"_browse");l.settings.browse_button=k+"_browse";if(l.features.dragdrop&&l.settings.dragdrop){l.settings.drop_element=k+"_filelist";c("#"+k+"_filelist").append('<li class="plupload_droptext">'+a("Drag files here.")+"</li>")}c("#"+k+"_container").attr("title","Using runtime: "+m.runtime);c("a.plupload_start",i).click(function(n){if(!c(this).hasClass("plupload_disabled")){j.start()}n.preventDefault()});c("a.plupload_stop",i).click(function(n){j.stop();n.preventDefault()});c("a.plupload_start",i).addClass("plupload_disabled")});j.init();j.bind("Error",function(l,o){var m=o.file,n;if(m){n=o.message;if(o.details){n+=" ("+o.details+")"}if(o.code==plupload.FILE_SIZE_ERROR){alert(a("Error: File to large: ")+m.name)}if(o.code==plupload.FILE_EXTENSION_ERROR){alert(a("Error: Invalid file extension: ")+m.name)}c("#"+m.id).attr("class","plupload_failed").find("a").css("display","block").attr("title",n)}});j.bind("StateChanged",function(){if(j.state===plupload.STARTED){c("li.plupload_delete a,div.plupload_buttons",i).hide();c("span.plupload_upload_status,div.plupload_progress,a.plupload_stop",i).css("display","block");c("span.plupload_upload_status",i).text("Uploaded 0/"+j.files.length+" files")}else{c("a.plupload_stop,div.plupload_progress",i).hide();c("a.plupload_delete",i).css("display","block")}});j.bind("QueueChanged",g);j.bind("StateChanged",function(l){if(l.state==plupload.STOPPED){g()}});j.bind("FileUploaded",function(l,m){h(m)});j.bind("UploadProgress",function(l,m){c("#"+m.id+" div.plupload_file_status",i).html(m.percent+"%");h(m);f()});if(e.setup){e.setup(j)}});return this}else{return d[c(this[0]).attr("id")]}}})(jQuery);
\ No newline at end of file
diff --git a/typo3/sysext/fal/contrib/plupload/js/plupload.browserplus.min.js b/typo3/sysext/fal/contrib/plupload/js/plupload.browserplus.min.js
deleted file mode 100644 (file)
index 19f3fc9..0000000
+++ /dev/null
@@ -1 +0,0 @@
-(function(a){a.runtimes.BrowserPlus=a.addRuntime("browserplus",{getFeatures:function(){return{dragdrop:true,jpgresize:true,pngresize:true,chunks:true,progress:true,multipart:true}},init:function(g,i){var e=window.BrowserPlus,h={},d=g.settings,c=d.resize;function f(n){var m,l,j=[],k,o;for(l=0;l<n.length;l++){k=n[l];o=a.guid();h[o]=k;j.push(new a.File(o,k.name,k.size))}if(l){g.trigger("FilesAdded",j)}}function b(){g.bind("PostInit",function(){var m,k=d.drop_element,o=g.id+"_droptarget",j=document.getElementById(k),l;function p(r,q){e.DragAndDrop.AddDropTarget({id:r},function(s){e.DragAndDrop.AttachCallbacks({id:r,hover:function(t){if(!t&&q){q()}},drop:function(t){if(q){q()}f(t)}},function(){})})}function n(){document.getElementById(o).style.top="-1000px"}if(j){if(document.attachEvent&&(/MSIE/gi).test(navigator.userAgent)){m=document.createElement("div");m.setAttribute("id",o);a.extend(m.style,{position:"absolute",top:"-1000px",background:"red",filter:"alpha(opacity=0)",opacity:0});document.body.appendChild(m);a.addEvent(j,"dragenter",function(r){var q,s;q=document.getElementById(k);s=a.getPos(q);a.extend(document.getElementById(o).style,{top:s.y+"px",left:s.x+"px",width:q.offsetWidth+"px",height:q.offsetHeight+"px"})});p(o,n)}else{p(k)}}a.addEvent(document.getElementById(d.browse_button),"click",function(v){var t=[],r,q,u=d.filters,s;v.preventDefault();for(r=0;r<u.length;r++){s=u[r].extensions.split(",");for(q=0;q<s.length;q++){t.push(a.mimeTypes[s[q]])}}e.FileBrowse.OpenBrowseDialog({mimeTypes:t},function(w){if(w.success){f(w.value)}})});j=m=null});g.bind("UploadFile",function(n,k){var m=h[k.id],j={},l=n.settings.chunk_size,o,p=[];function r(s,u){var t;if(k.status==a.FAILED){return}j.name=k.target_name||k.name;if(l){j.chunk=s;j.chunks=u}t=p.shift();e.Uploader.upload({url:a.buildUrl(n.settings.url,j),files:{file:t},cookies:document.cookies,postvars:n.settings.multipart_params,progressCallback:function(x){var w,v=0;o[s]=parseInt(x.filePercent*t.size/100,10);for(w=0;w<o.length;w++){v+=o[w]}k.loaded=v;n.trigger("UploadProgress",k)}},function(w){var v,x;if(w.success){v=w.value.statusCode;if(l){n.trigger("ChunkUploaded",k,{chunk:s,chunks:u,response:w.value.body,status:v})}if(p.length>0){r(++s,u)}else{k.status=a.DONE;n.trigger("FileUploaded",k,{response:w.value.body,status:v});if(v>=400){n.trigger("Error",{code:a.HTTP_ERROR,message:"HTTP Error.",file:k,status:v})}}}else{n.trigger("Error",{code:a.GENERIC_ERROR,message:"Generic Error.",file:k,details:w.error})}})}function q(s){k.size=s.size;if(l){e.FileAccess.chunk({file:s,chunkSize:l},function(v){if(v.success){var w=v.value,t=w.length;o=Array(t);for(var u=0;u<t;u++){o[u]=0;p.push(w[u])}r(0,t)}})}else{o=Array(1);p.push(s);r(0,1)}}if(c&&/\.(png|jpg|jpeg)$/i.test(k.name)){BrowserPlus.ImageAlter.transform({file:m,quality:c.quality||90,actions:[{scale:{maxwidth:c.width,maxheight:c.height}}]},function(s){if(s.success){q(s.value.file)}})}else{q(m)}});i({success:true})}if(e){e.init(function(k){var j=[{service:"Uploader",version:"3"},{service:"DragAndDrop",version:"1"},{service:"FileBrowse",version:"1"},{service:"FileAccess",version:"2"}];if(c){j.push({service:"ImageAlter",version:"4"})}if(k.success){e.require({services:j},function(l){if(l.success){b()}else{i()}})}else{i()}})}else{i()}}})})(plupload);
\ No newline at end of file
diff --git a/typo3/sysext/fal/contrib/plupload/js/plupload.flash.min.js b/typo3/sysext/fal/contrib/plupload/js/plupload.flash.min.js
deleted file mode 100644 (file)
index d8a06a0..0000000
+++ /dev/null
@@ -1 +0,0 @@
-(function(c){var a={};function b(){var d;try{d=navigator.plugins["Shockwave Flash"];d=d.description}catch(f){try{d=new ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version")}catch(e){d="0.0"}}d=d.match(/\d+/g);return parseFloat(d[0]+"."+d[1])}c.flash={trigger:function(f,d,e){setTimeout(function(){var j=a[f],h,g;if(j){j.trigger("Flash:"+d,e)}},0)}};c.runtimes.Flash=c.addRuntime("flash",{getFeatures:function(){return{jpgresize:true,pngresize:true,chunks:true,progress:true,multipart:true}},init:function(g,l){var k,f,h,e,m=0,d=document.body;if(b()<10){l({success:false});return}a[g.id]=g;k=document.getElementById(g.settings.browse_button);f=document.createElement("div");f.id=g.id+"_flash_container";c.extend(f.style,{position:"absolute",top:"0px",background:g.settings.shim_bgcolor||"transparent",zIndex:99999,width:"100%",height:"100%"});f.className="plupload flash";if(g.settings.container){d=document.getElementById(g.settings.container);d.style.position="relative"}d.appendChild(f);h="id="+escape(g.id);f.innerHTML='<object id="'+g.id+'_flash" width="100%" height="100%" style="outline:0" type="application/x-shockwave-flash" data="'+g.settings.flash_swf_url+'"><param name="movie" value="'+g.settings.flash_swf_url+'" /><param name="flashvars" value="'+h+'" /><param name="wmode" value="transparent" /><param name="allowscriptaccess" value="always" /></object>';function j(){return document.getElementById(g.id+"_flash")}function i(){if(m++>5000){l({success:false});return}if(!e){setTimeout(i,1)}}i();k=f=null;g.bind("Flash:Init",function(){var p={},o,n=g.settings.resize||{};e=true;j().setFileFilters(g.settings.filters,g.settings.multi_selection);g.bind("UploadFile",function(q,r){var s=q.settings;j().uploadFile(p[r.id],c.buildUrl(s.url,{name:r.target_name||r.name}),{chunk_size:s.chunk_size,width:n.width,height:n.height,quality:n.quality||90,multipart:s.multipart,multipart_params:s.multipart_params,file_data_name:s.file_data_name,format:/\.(jpg|jpeg)$/i.test(r.name)?"jpg":"png",headers:s.headers,urlstream_upload:s.urlstream_upload})});g.bind("Flash:UploadProcess",function(r,q){var s=r.getFile(p[q.id]);if(s.status!=c.FAILED){s.loaded=q.loaded;s.size=q.size;r.trigger("UploadProgress",s)}});g.bind("Flash:UploadChunkComplete",function(q,s){var t,r=q.getFile(p[s.id]);t={chunk:s.chunk,chunks:s.chunks,response:s.text};q.trigger("ChunkUploaded",r,t);if(r.status!=c.FAILED){j().uploadNextChunk()}if(s.chunk==s.chunks-1){r.status=c.DONE;q.trigger("FileUploaded",r,{response:s.text})}});g.bind("Flash:SelectFiles",function(q,t){var s,r,u=[],v;for(r=0;r<t.length;r++){s=t[r];v=c.guid();p[v]=s.id;p[s.id]=v;u.push(new c.File(v,s.name,s.size))}if(u.length){g.trigger("FilesAdded",u)}});g.bind("Flash:SecurityError",function(q,r){g.trigger("Error",{code:c.SECURITY_ERROR,message:"Security error.",details:r.message,file:g.getFile(p[r.id])})});g.bind("Flash:GenericError",function(q,r){g.trigger("Error",{code:c.GENERIC_ERROR,message:"Generic error.",details:r.message,file:g.getFile(p[r.id])})});g.bind("Flash:IOError",function(q,r){g.trigger("Error",{code:c.IO_ERROR,message:"IO error.",details:r.message,file:g.getFile(p[r.id])})});g.bind("QueueChanged",function(q){g.refresh()});g.bind("FilesRemoved",function(q,s){var r;for(r=0;r<s.length;r++){j().removeFile(p[s[r].id])}});g.bind("StateChanged",function(q){g.refresh()});g.bind("Refresh",function(q){var r,s,t;j().setFileFilters(g.settings.filters,g.settings.multi_selection);r=document.getElementById(q.settings.browse_button);s=c.getPos(r,document.getElementById(q.settings.container));t=c.getSize(r);c.extend(document.getElementById(q.id+"_flash_container").style,{top:s.y+"px",left:s.x+"px",width:t.w+"px",height:t.h+"px"})});l({success:true})})}})})(plupload);
\ No newline at end of file
diff --git a/typo3/sysext/fal/contrib/plupload/js/plupload.flash.swf b/typo3/sysext/fal/contrib/plupload/js/plupload.flash.swf
deleted file mode 100644 (file)
index b5ab53d..0000000
Binary files a/typo3/sysext/fal/contrib/plupload/js/plupload.flash.swf and /dev/null differ
diff --git a/typo3/sysext/fal/contrib/plupload/js/plupload.full.min.js b/typo3/sysext/fal/contrib/plupload/js/plupload.full.min.js
deleted file mode 100644 (file)
index 304321c..0000000
+++ /dev/null
@@ -1 +0,0 @@
-(function(){var c=0,h=[],j={},f={},a={"<":"lt",">":"gt","&":"amp",'"':"quot","'":"#39"},i=/[<>&\"\']/g,b;function e(){this.returnValue=false}function g(){this.cancelBubble=true}(function(k){var l=k.split(/,/),m,o,n;for(m=0;m<l.length;m+=2){n=l[m+1].split(/ /);for(o=0;o<n.length;o++){f[n[o]]=l[m]}}})("application/msword,doc dot,application/pdf,pdf,application/pgp-signature,pgp,application/postscript,ps ai eps,application/rtf,rtf,application/vnd.ms-excel,xls xlb,application/vnd.ms-powerpoint,ppt pps pot,application/zip,zip,application/x-shockwave-flash,swf swfl,application/vnd.openxmlformats,docx pptx xlsx,audio/mpeg,mpga mpega mp2 mp3,audio/x-wav,wav,image/bmp,bmp,image/gif,gif,image/jpeg,jpeg jpg jpe,image/png,png,image/svg+xml,svg svgz,image/tiff,tiff tif,text/html,htm html xhtml,text/rtf,rtf,video/mpeg,mpeg mpg mpe,video/quicktime,qt mov,video/x-flv,flv,video/vnd.rn-realvideo,rv,text/plain,asc txt text diff log,application/octet-stream,exe");var d={STOPPED:1,STARTED:2,QUEUED:1,UPLOADING:2,FAILED:4,DONE:5,GENERIC_ERROR:-100,HTTP_ERROR:-200,IO_ERROR:-300,SECURITY_ERROR:-400,INIT_ERROR:-500,FILE_SIZE_ERROR:-600,FILE_EXTENSION_ERROR:-700,mimeTypes:f,extend:function(k){d.each(arguments,function(l,m){if(m>0){d.each(l,function(o,n){k[n]=o})}});return k},cleanName:function(k){var l,m;m=[/[\300-\306]/g,"A",/[\340-\346]/g,"a",/\307/g,"C",/\347/g,"c",/[\310-\313]/g,"E",/[\350-\353]/g,"e",/[\314-\317]/g,"I",/[\354-\357]/g,"i",/\321/g,"N",/\361/g,"n",/[\322-\330]/g,"O",/[\362-\370]/g,"o",/[\331-\334]/g,"U",/[\371-\374]/g,"u"];for(l=0;l<m.length;l+=2){k=k.replace(m[l],m[l+1])}k=k.replace(/\s+/g,"_");k=k.replace(/[^a-z0-9_\-\.]+/gi,"");return k},addRuntime:function(k,l){l.name=k;h[k]=l;h.push(l);return l},guid:function(){var k=new Date().getTime().toString(32),l;for(l=0;l<5;l++){k+=Math.floor(Math.random()*65535).toString(32)}return(d.guidPrefix||"p")+k+(c++).toString(32)},buildUrl:function(l,k){var m="";d.each(k,function(o,n){m+=(m?"&":"")+encodeURIComponent(n)+"="+encodeURIComponent(o)});if(m){l+=(l.indexOf("?")>0?"&":"?")+m}return l},each:function(n,o){var m,l,k;if(n){m=n.length;if(m===b){for(l in n){if(n.hasOwnProperty(l)){if(o(n[l],l)===false){return}}}}else{for(k=0;k<m;k++){if(o(n[k],k)===false){return}}}}},formatSize:function(k){if(k===b){return d.translate("N/A")}if(k>1048576){return Math.round(k/1048576,1)+" MB"}if(k>1024){return Math.round(k/1024,1)+" KB"}return k+" b"},getPos:function(l,p){var q=0,o=0,s,r=document,m,n;l=l;p=p||r.body;function k(w){var u,v,t=0,z=0;if(w){v=w.getBoundingClientRect();u=r.compatMode==="CSS1Compat"?r.documentElement:r.body;t=v.left+u.scrollLeft;z=v.top+u.scrollTop}return{x:t,y:z}}if(l.getBoundingClientRect&&(navigator.userAgent.indexOf("MSIE")>0&&r.documentMode!==8)){m=k(l);n=k(p);return{x:m.x-n.x,y:m.y-n.y}}s=l;while(s&&s!=p&&s.nodeType){q+=s.offsetLeft||0;o+=s.offsetTop||0;s=s.offsetParent}s=l.parentNode;while(s&&s!=p&&s.nodeType){q-=s.scrollLeft||0;o-=s.scrollTop||0;s=s.parentNode}return{x:q,y:o}},getSize:function(k){return{w:k.clientWidth||k.offsetWidth,h:k.clientHeight||k.offsetHeight}},parseSize:function(k){var l;if(typeof(k)=="string"){k=/^([0-9]+)([mgk]+)$/.exec(k.toLowerCase().replace(/[^0-9mkg]/g,""));l=k[2];k=+k[1];if(l=="g"){k*=1073741824}if(l=="m"){k*=1048576}if(l=="k"){k*=1024}}return k},xmlEncode:function(k){return k?(""+k).replace(i,function(l){return a[l]?"&"+a[l]+";":l}):k},toArray:function(m){var l,k=[];for(l=0;l<m.length;l++){k[l]=m[l]}return k},addI18n:function(k){return d.extend(j,k)},translate:function(k){return j[k]||k},addEvent:function(l,k,m){if(l.attachEvent){l.attachEvent("on"+k,function(){var n=window.event;if(!n.target){n.target=n.srcElement}n.preventDefault=e;n.stopPropagation=g;m(n)})}else{if(l.addEventListener){l.addEventListener(k,m,false)}}}};d.Uploader=function(n){var l={},q,p=[],r,m;q=new d.QueueProgress();n=d.extend({chunk_size:0,multipart:true,multi_selection:true,file_data_name:"file",filters:[]},n);function o(){var s;if(this.state==d.STARTED&&r<p.length){s=p[r++];if(s.status==d.QUEUED){this.trigger("BeforeUpload",s);this.trigger("UploadFile",s)}else{o.call(this)}}else{this.stop()}}function k(){var t,s;q.reset();for(t=0;t<p.length;t++){s=p[t];if(s.size!==b){q.size+=s.size;q.loaded+=s.loaded}else{q.size=b}if(s.status==d.DONE){q.uploaded++}else{if(s.status==d.FAILED){q.failed++}else{q.queued++}}}if(q.size===b){q.percent=p.length>0?Math.ceil(q.uploaded/p.length*100):0}else{q.bytesPerSec=Math.ceil(q.loaded/((+new Date()-m||1)/1000));q.percent=q.size>0?Math.ceil(q.loaded/q.size*100):0}}d.extend(this,{state:d.STOPPED,features:{},files:p,settings:n,total:q,id:d.guid(),init:function(){var x=this,y,u,t,w=0,v;n.page_url=n.page_url||document.location.pathname.replace(/\/[^\/]+$/g,"/");if(!/^(\w+:\/\/|\/)/.test(n.url)){n.url=n.page_url+n.url}n.chunk_size=d.parseSize(n.chunk_size);n.max_file_size=d.parseSize(n.max_file_size);x.bind("FilesAdded",function(z,C){var B,A,E=0,F,D=n.filters;if(D&&D.length){F=[];d.each(D,function(G){d.each(G.extensions.split(/,/),function(H){F.push("\\."+H.replace(new RegExp("["+("/^$.*+?|()[]{}\\".replace(/./g,"\\$&"))+"]","g"),"\\$&"))})});F=new RegExp(F.join("|")+"$","i")}for(B=0;B<C.length;B++){A=C[B];A.loaded=0;A.percent=0;A.status=d.QUEUED;if(F&&!F.test(A.name)){z.trigger("Error",{code:d.FILE_EXTENSION_ERROR,message:"File extension error.",file:A});continue}if(A.size!==b&&A.size>n.max_file_size){z.trigger("Error",{code:d.FILE_SIZE_ERROR,message:"File size error.",file:A});continue}p.push(A);E++}if(E){x.trigger("QueueChanged");x.refresh()}});if(n.unique_names){x.bind("UploadFile",function(z,A){var C=A.name.match(/\.([^.]+)$/),B="tmp";if(C){B=C[1]}A.target_name=A.id+"."+B})}x.bind("UploadProgress",function(z,A){if(A.status==d.QUEUED){A.status=d.UPLOADING}A.percent=A.size>0?Math.ceil(A.loaded/A.size*100):100;k()});x.bind("StateChanged",function(z){if(z.state==d.STARTED){m=(+new Date())}});x.bind("QueueChanged",k);x.bind("Error",function(z,A){if(A.file){A.file.status=d.FAILED;k();window.setTimeout(function(){o.call(x)})}});x.bind("FileUploaded",function(z,A){A.status=d.DONE;A.loaded=A.size;z.trigger("UploadProgress",A);o.call(x)});if(n.runtimes){u=[];v=n.runtimes.split(/\s?,\s?/);for(y=0;y<v.length;y++){if(h[v[y]]){u.push(h[v[y]])}}}else{u=h}function s(){var C=u[w++],B,z,A;if(C){B=C.getFeatures();z=x.settings.required_features;if(z){z=z.split(",");for(A=0;A<z.length;A++){if(!B[z[A]]){s();return}}}C.init(x,function(D){if(D&&D.success){x.features=B;x.trigger("Init",{runtime:C.name});x.trigger("PostInit");x.refresh()}else{s()}})}else{x.trigger("Error",{code:d.INIT_ERROR,message:"Init error."})}}s()},refresh:function(){this.trigger("Refresh")},start:function(){if(this.state!=d.STARTED){r=0;this.state=d.STARTED;this.trigger("StateChanged");o.call(this)}},stop:function(){if(this.state!=d.STOPPED){this.state=d.STOPPED;this.trigger("StateChanged")}},getFile:function(t){var s;for(s=p.length-1;s>=0;s--){if(p[s].id===t){return p[s]}}},removeFile:function(t){var s;for(s=p.length-1;s>=0;s--){if(p[s].id===t.id){return this.splice(s,1)[0]}}},splice:function(u,s){var t;t=p.splice(u,s);this.trigger("FilesRemoved",t);this.trigger("QueueChanged");return t},trigger:function(t){var v=l[t.toLowerCase()],u,s;if(v){s=Array.prototype.slice.call(arguments);s[0]=this;for(u=0;u<v.length;u++){if(v[u].func.apply(v[u].scope,s)===false){return false}}}return true},bind:function(s,u,t){var v;s=s.toLowerCase();v=l[s]||[];v.push({func:u,scope:t||this});l[s]=v},unbind:function(s,u){var v=l[s.toLowerCase()],t;if(v){for(t=v.length-1;t>=0;t--){if(v[t].func===u){v.splice(t,1)}}}}})};d.File=function(n,l,m){var k=this;k.id=n;k.name=l;k.size=m;k.loaded=0;k.percent=0;k.status=0};d.Runtime=function(){this.getFeatures=function(){};this.init=function(k,l){}};d.QueueProgress=function(){var k=this;k.size=0;k.loaded=0;k.uploaded=0;k.failed=0;k.queued=0;k.percent=0;k.bytesPerSec=0;k.reset=function(){k.size=k.loaded=k.uploaded=k.failed=k.queued=k.percent=k.bytesPerSec=0}};d.runtimes={};window.plupload=d})();(function(b){var c={};function a(i,e,k,j,d){var l,g,f,h;g=google.gears.factory.create("beta.canvas");g.decode(i);h=Math.min(e/g.width,k/g.height);if(h<1){e=Math.round(g.width*h);k=Math.round(g.height*h)}else{e=g.width;k=g.height}g.resize(e,k);return g.encode(d,{quality:j/100})}b.runtimes.Gears=b.addRuntime("gears",{getFeatures:function(){return{dragdrop:true,jpgresize:true,pngresize:true,chunks:true,progress:true,multipart:true}},init:function(g,i){var h;if(!window.google||!google.gears){return i({success:false})}try{h=google.gears.factory.create("beta.desktop")}catch(f){return i({success:false})}function d(k){var j,e,l=[],m;for(e=0;e<k.length;e++){j=k[e];m=b.guid();c[m]=j.blob;l.push(new b.File(m,j.name,j.blob.length))}g.trigger("FilesAdded",l)}g.bind("PostInit",function(){var j=g.settings,e=document.getElementById(j.drop_element);if(e){b.addEvent(e,"dragover",function(k){h.setDropEffect(k,"copy");k.preventDefault()});b.addEvent(e,"drop",function(l){var k=h.getDragData(l,"application/x-gears-files");if(k){d(k.files)}l.preventDefault()});e=0}b.addEvent(document.getElementById(j.browse_button),"click",function(o){var n=[],l,k,m;o.preventDefault();for(l=0;l<j.filters.length;l++){m=j.filters[l].extensions.split(",");for(k=0;k<m.length;k++){n.push("."+m[k])}}h.openFiles(d,{singleFile:!j.multi_selection,filter:n})})});g.bind("UploadFile",function(o,l){var q=0,p,m,n=0,k=o.settings.resize,e;m=o.settings.chunk_size;e=m>0;p=Math.ceil(l.size/m);if(!e){m=l.size;p=1}if(k&&/\.(png|jpg|jpeg)$/i.test(l.name)){c[l.id]=a(c[l.id],k.width,k.height,k.quality||90,/\.png$/i.test(l.name)?"image/png":"image/jpeg")}l.size=c[l.id].length;function j(){var u,w,s=o.settings.multipart,r=0,v={name:l.target_name||l.name};function t(y){var x,C="----pluploadboundary"+b.guid(),A="--",B="\r\n",z;if(s){u.setRequestHeader("Content-Type","multipart/form-data; boundary="+C);x=google.gears.factory.create("beta.blobbuilder");b.each(o.settings.multipart_params,function(E,D){x.append(A+C+B+'Content-Disposition: form-data; name="'+D+'"'+B+B);x.append(E+B)});x.append(A+C+B+'Content-Disposition: form-data; name="'+o.settings.file_data_name+'"; filename="'+l.name+'"'+B+"Content-Type: application/octet-stream"+B+B);x.append(y);x.append(B+A+C+A+B);z=x.getAsBlob();r=z.length-y.length;y=z}u.send(y)}if(l.status==b.DONE||l.status==b.FAILED||o.state==b.STOPPED){return}if(e){v.chunk=q;v.chunks=p}w=Math.min(m,l.size-(q*m));u=google.gears.factory.create("beta.httprequest");u.open("POST",b.buildUrl(o.settings.url,v));if(!s){u.setRequestHeader("Content-Disposition",'attachment; filename="'+l.name+'"');u.setRequestHeader("Content-Type","application/octet-stream")}b.each(o.settings.headers,function(y,x){u.setRequestHeader(x,y)});u.upload.onprogress=function(x){l.loaded=n+x.loaded-r;o.trigger("UploadProgress",l)};u.onreadystatechange=function(){var x;if(u.readyState==4){if(u.status==200){x={chunk:q,chunks:p,response:u.responseText,status:u.status};o.trigger("ChunkUploaded",l,x);if(x.cancelled){l.status=b.FAILED;return}n+=w;if(++q>=p){l.status=b.DONE;o.trigger("FileUploaded",l,{response:u.responseText,status:u.status})}else{j()}}else{o.trigger("Error",{code:b.HTTP_ERROR,message:"HTTP Error.",file:l,chunk:q,chunks:p,status:u.status})}}};if(q<p){t(c[l.id].slice(q*m,w))}}j()});i({success:true})}})})(plupload);(function(c){var a={};function b(l){var k,j=typeof l,h,e,g,f;if(j==="string"){k="\bb\tt\nn\ff\rr\"\"''\\\\";return'"'+l.replace(/([\u0080-\uFFFF\x00-\x1f\"])/g,function(n,m){var i=k.indexOf(m);if(i+1){return"\\"+k.charAt(i+1)}n=m.charCodeAt().toString(16);return"\\u"+"0000".substring(n.length)+n})+'"'}if(j=="object"){e=l.length!==h;k="";if(e){for(g=0;g<l.length;g++){if(k){k+=","}k+=b(l[g])}k="["+k+"]"}else{for(f in l){if(l.hasOwnProperty(f)){if(k){k+=","}k+=b(f)+":"+b(l[f])}}k="{"+k+"}"}return k}if(l===h){return"null"}return""+l}function d(o){var r=false,f=null,k=null,g,h,i,q,j,m=0;try{try{k=new ActiveXObject("AgControl.AgControl");if(k.IsVersionSupported(o)){r=true}k=null}catch(n){var l=navigator.plugins["Silverlight Plug-In"];if(l){g=l.description;if(g==="1.0.30226.2"){g="2.0.30226.2"}h=g.split(".");while(h.length>3){h.pop()}while(h.length<4){h.push(0)}i=o.split(".");while(i.length>4){i.pop()}do{q=parseInt(i[m],10);j=parseInt(h[m],10);m++}while(m<i.length&&q===j);if(q<=j&&!isNaN(q)){r=true}}}}catch(p){r=false}return r}c.silverlight={trigger:function(j,f){var h=a[j],g,e;if(h){e=c.toArray(arguments).slice(1);e[0]="Silverlight:"+f;setTimeout(function(){h.trigger.apply(h,e)},0)}}};c.runtimes.Silverlight=c.addRuntime("silverlight",{getFeatures:function(){return{jpgresize:true,pngresize:true,chunks:true,progress:true,multipart:true}},init:function(l,m){var k,h="",j=l.settings.filters,g,f=document.body;if(!d("2.0.31005.0")||(window.opera&&window.opera.buildNumber)){m({success:false});return}a[l.id]=l;k=document.createElement("div");k.id=l.id+"_silverlight_container";c.extend(k.style,{position:"absolute",top:"0px",background:l.settings.shim_bgcolor||"transparent",zIndex:99999,width:"100px",height:"100px",overflow:"hidden",opacity:l.settings.shim_bgcolor?"":0.01});k.className="plupload silverlight";if(l.settings.container){f=document.getElementById(l.settings.container);f.style.position="relative"}f.appendChild(k);for(g=0;g<j.length;g++){h+=(h!=""?"|":"")+j[g].title+" | *."+j[g].extensions.replace(/,/g,";*.")}k.innerHTML='<object id="'+l.id+'_silverlight" data="data:application/x-silverlight," type="application/x-silverlight-2" style="outline:none;" width="1024" height="1024"><param name="source" value="'+l.settings.silverlight_xap_url+'"/><param name="background" value="Transparent"/><param name="windowless" value="true"/><param name="initParams" value="id='+l.id+",filter="+h+'"/></object>';function e(){return document.getElementById(l.id+"_silverlight").content.Upload}l.bind("Silverlight:Init",function(){var i,n={};l.bind("Silverlight:StartSelectFiles",function(o){i=[]});l.bind("Silverlight:SelectFile",function(o,r,p,q){var s;s=c.guid();n[s]=r;n[r]=s;i.push(new c.File(s,p,q))});l.bind("Silverlight:SelectSuccessful",function(){if(i.length){l.trigger("FilesAdded",i)}});l.bind("Silverlight:UploadChunkError",function(o,r,p,s,q){l.trigger("Error",{code:c.IO_ERROR,message:"IO Error.",details:q,file:o.getFile(n[r])})});l.bind("Silverlight:UploadFileProgress",function(o,s,p,r){var q=o.getFile(n[s]);if(q.status!=c.FAILED){q.size=r;q.loaded=p;o.trigger("UploadProgress",q)}});l.bind("Refresh",function(o){var p,q,r;p=document.getElementById(o.settings.browse_button);q=c.getPos(p,document.getElementById(o.settings.container));r=c.getSize(p);c.extend(document.getElementById(o.id+"_silverlight_container").style,{top:q.y+"px",left:q.x+"px",width:r.w+"px",height:r.h+"px"})});l.bind("Silverlight:UploadChunkSuccessful",function(o,r,p,u,t){var s,q=o.getFile(n[r]);s={chunk:p,chunks:u,response:t};o.trigger("ChunkUploaded",q,s);if(q.status!=c.FAILED){e().UploadNextChunk()}if(p==u-1){q.status=c.DONE;o.trigger("FileUploaded",q,{response:t})}});l.bind("Silverlight:UploadSuccessful",function(o,r,p){var q=o.getFile(n[r]);q.status=c.DONE;o.trigger("FileUploaded",q,{response:p})});l.bind("FilesRemoved",function(o,q){var p;for(p=0;p<q.length;p++){e().RemoveFile(n[q[p].id])}});l.bind("UploadFile",function(o,q){var r=o.settings,p=r.resize||{};e().UploadFile(n[q.id],c.buildUrl(o.settings.url,{name:q.target_name||q.name}),b({chunk_size:r.chunk_size,image_width:p.width,image_height:p.height,image_quality:p.quality||90,multipart:!!r.multipart,multipart_params:r.multipart_params||{},headers:r.headers}))});m({success:true})})}})})(plupload);(function(c){var a={};function b(){var d;try{d=navigator.plugins["Shockwave Flash"];d=d.description}catch(f){try{d=new ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version")}catch(e){d="0.0"}}d=d.match(/\d+/g);return parseFloat(d[0]+"."+d[1])}c.flash={trigger:function(f,d,e){setTimeout(function(){var j=a[f],h,g;if(j){j.trigger("Flash:"+d,e)}},0)}};c.runtimes.Flash=c.addRuntime("flash",{getFeatures:function(){return{jpgresize:true,pngresize:true,chunks:true,progress:true,multipart:true}},init:function(g,l){var k,f,h,e,m=0,d=document.body;if(b()<10){l({success:false});return}a[g.id]=g;k=document.getElementById(g.settings.browse_button);f=document.createElement("div");f.id=g.id+"_flash_container";c.extend(f.style,{position:"absolute",top:"0px",background:g.settings.shim_bgcolor||"transparent",zIndex:99999,width:"100%",height:"100%"});f.className="plupload flash";if(g.settings.container){d=document.getElementById(g.settings.container);d.style.position="relative"}d.appendChild(f);h="id="+escape(g.id);f.innerHTML='<object id="'+g.id+'_flash" width="100%" height="100%" style="outline:0" type="application/x-shockwave-flash" data="'+g.settings.flash_swf_url+'"><param name="movie" value="'+g.settings.flash_swf_url+'" /><param name="flashvars" value="'+h+'" /><param name="wmode" value="transparent" /><param name="allowscriptaccess" value="always" /></object>';function j(){return document.getElementById(g.id+"_flash")}function i(){if(m++>5000){l({success:false});return}if(!e){setTimeout(i,1)}}i();k=f=null;g.bind("Flash:Init",function(){var p={},o,n=g.settings.resize||{};e=true;j().setFileFilters(g.settings.filters,g.settings.multi_selection);g.bind("UploadFile",function(q,r){var s=q.settings;j().uploadFile(p[r.id],c.buildUrl(s.url,{name:r.target_name||r.name}),{chunk_size:s.chunk_size,width:n.width,height:n.height,quality:n.quality||90,multipart:s.multipart,multipart_params:s.multipart_params,file_data_name:s.file_data_name,format:/\.(jpg|jpeg)$/i.test(r.name)?"jpg":"png",headers:s.headers,urlstream_upload:s.urlstream_upload})});g.bind("Flash:UploadProcess",function(r,q){var s=r.getFile(p[q.id]);if(s.status!=c.FAILED){s.loaded=q.loaded;s.size=q.size;r.trigger("UploadProgress",s)}});g.bind("Flash:UploadChunkComplete",function(q,s){var t,r=q.getFile(p[s.id]);t={chunk:s.chunk,chunks:s.chunks,response:s.text};q.trigger("ChunkUploaded",r,t);if(r.status!=c.FAILED){j().uploadNextChunk()}if(s.chunk==s.chunks-1){r.status=c.DONE;q.trigger("FileUploaded",r,{response:s.text})}});g.bind("Flash:SelectFiles",function(q,t){var s,r,u=[],v;for(r=0;r<t.length;r++){s=t[r];v=c.guid();p[v]=s.id;p[s.id]=v;u.push(new c.File(v,s.name,s.size))}if(u.length){g.trigger("FilesAdded",u)}});g.bind("Flash:SecurityError",function(q,r){g.trigger("Error",{code:c.SECURITY_ERROR,message:"Security error.",details:r.message,file:g.getFile(p[r.id])})});g.bind("Flash:GenericError",function(q,r){g.trigger("Error",{code:c.GENERIC_ERROR,message:"Generic error.",details:r.message,file:g.getFile(p[r.id])})});g.bind("Flash:IOError",function(q,r){g.trigger("Error",{code:c.IO_ERROR,message:"IO error.",details:r.message,file:g.getFile(p[r.id])})});g.bind("QueueChanged",function(q){g.refresh()});g.bind("FilesRemoved",function(q,s){var r;for(r=0;r<s.length;r++){j().removeFile(p[s[r].id])}});g.bind("StateChanged",function(q){g.refresh()});g.bind("Refresh",function(q){var r,s,t;j().setFileFilters(g.settings.filters,g.settings.multi_selection);r=document.getElementById(q.settings.browse_button);s=c.getPos(r,document.getElementById(q.settings.container));t=c.getSize(r);c.extend(document.getElementById(q.id+"_flash_container").style,{top:s.y+"px",left:s.x+"px",width:t.w+"px",height:t.h+"px"})});l({success:true})})}})})(plupload);(function(a){a.runtimes.BrowserPlus=a.addRuntime("browserplus",{getFeatures:function(){return{dragdrop:true,jpgresize:true,pngresize:true,chunks:true,progress:true,multipart:true}},init:function(g,i){var e=window.BrowserPlus,h={},d=g.settings,c=d.resize;function f(n){var m,l,j=[],k,o;for(l=0;l<n.length;l++){k=n[l];o=a.guid();h[o]=k;j.push(new a.File(o,k.name,k.size))}if(l){g.trigger("FilesAdded",j)}}function b(){g.bind("PostInit",function(){var m,k=d.drop_element,o=g.id+"_droptarget",j=document.getElementById(k),l;function p(r,q){e.DragAndDrop.AddDropTarget({id:r},function(s){e.DragAndDrop.AttachCallbacks({id:r,hover:function(t){if(!t&&q){q()}},drop:function(t){if(q){q()}f(t)}},function(){})})}function n(){document.getElementById(o).style.top="-1000px"}if(j){if(document.attachEvent&&(/MSIE/gi).test(navigator.userAgent)){m=document.createElement("div");m.setAttribute("id",o);a.extend(m.style,{position:"absolute",top:"-1000px",background:"red",filter:"alpha(opacity=0)",opacity:0});document.body.appendChild(m);a.addEvent(j,"dragenter",function(r){var q,s;q=document.getElementById(k);s=a.getPos(q);a.extend(document.getElementById(o).style,{top:s.y+"px",left:s.x+"px",width:q.offsetWidth+"px",height:q.offsetHeight+"px"})});p(o,n)}else{p(k)}}a.addEvent(document.getElementById(d.browse_button),"click",function(v){var t=[],r,q,u=d.filters,s;v.preventDefault();for(r=0;r<u.length;r++){s=u[r].extensions.split(",");for(q=0;q<s.length;q++){t.push(a.mimeTypes[s[q]])}}e.FileBrowse.OpenBrowseDialog({mimeTypes:t},function(w){if(w.success){f(w.value)}})});j=m=null});g.bind("UploadFile",function(n,k){var m=h[k.id],j={},l=n.settings.chunk_size,o,p=[];function r(s,u){var t;if(k.status==a.FAILED){return}j.name=k.target_name||k.name;if(l){j.chunk=s;j.chunks=u}t=p.shift();e.Uploader.upload({url:a.buildUrl(n.settings.url,j),files:{file:t},cookies:document.cookies,postvars:n.settings.multipart_params,progressCallback:function(x){var w,v=0;o[s]=parseInt(x.filePercent*t.size/100,10);for(w=0;w<o.length;w++){v+=o[w]}k.loaded=v;n.trigger("UploadProgress",k)}},function(w){var v,x;if(w.success){v=w.value.statusCode;if(l){n.trigger("ChunkUploaded",k,{chunk:s,chunks:u,response:w.value.body,status:v})}if(p.length>0){r(++s,u)}else{k.status=a.DONE;n.trigger("FileUploaded",k,{response:w.value.body,status:v});if(v>=400){n.trigger("Error",{code:a.HTTP_ERROR,message:"HTTP Error.",file:k,status:v})}}}else{n.trigger("Error",{code:a.GENERIC_ERROR,message:"Generic Error.",file:k,details:w.error})}})}function q(s){k.size=s.size;if(l){e.FileAccess.chunk({file:s,chunkSize:l},function(v){if(v.success){var w=v.value,t=w.length;o=Array(t);for(var u=0;u<t;u++){o[u]=0;p.push(w[u])}r(0,t)}})}else{o=Array(1);p.push(s);r(0,1)}}if(c&&/\.(png|jpg|jpeg)$/i.test(k.name)){BrowserPlus.ImageAlter.transform({file:m,quality:c.quality||90,actions:[{scale:{maxwidth:c.width,maxheight:c.height}}]},function(s){if(s.success){q(s.value.file)}})}else{q(m)}});i({success:true})}if(e){e.init(function(k){var j=[{service:"Uploader",version:"3"},{service:"DragAndDrop",version:"1"},{service:"FileBrowse",version:"1"},{service:"FileAccess",version:"2"}];if(c){j.push({service:"ImageAlter",version:"4"})}if(k.success){e.require({services:j},function(l){if(l.success){b()}else{i()}})}else{i()}})}else{i()}}})})(plupload);(function(b){function a(i,l,j,c,k){var e,d,h,g,f;e=document.createElement("canvas");e.style.display="none";document.body.appendChild(e);d=e.getContext("2d");h=new Image();h.onload=function(){var o,m,n;f=Math.min(l/h.width,j/h.height);if(f<1){o=Math.round(h.width*f);m=Math.round(h.height*f)}else{o=h.width;m=h.height}e.width=o;e.height=m;d.drawImage(h,0,0,o,m);g=e.toDataURL(c);g=g.substring(g.indexOf("base64,")+7);g=atob(g);e.parentNode.removeChild(e);k({success:true,data:g})};h.src=i}b.runtimes.Html5=b.addRuntime("html5",{getFeatures:function(){var g,d,f,e,c;d=f=e=c=false;if(window.XMLHttpRequest){g=new XMLHttpRequest();f=!!g.upload;d=!!(g.sendAsBinary||g.upload)}if(d){e=!!(File&&File.prototype.getAsDataURL);c=!!(File&&File.prototype.slice)}return{html5:d,dragdrop:window.mozInnerScreenX!==undefined||c,jpgresize:e,pngresize:e,multipart:e||!!window.FileReader||!!window.FormData,progress:f,chunking:c||e}},init:function(f,g){var c={},d;function e(l){var j,h,k=[],m;for(h=0;h<l.length;h++){j=l[h];m=b.guid();c[m]=j;k.push(new b.File(m,j.fileName,j.fileSize))}if(k.length){f.trigger("FilesAdded",k)}}d=this.getFeatures();if(!d.html5){g({success:false});return}f.bind("Init",function(m){var q,o=[],l,p,j=m.settings.filters,k,n,h=document.body;q=document.createElement("div");q.id=m.id+"_html5_container";for(l=0;l<j.length;l++){k=j[l].extensions.split(/,/);for(p=0;p<k.length;p++){n=b.mimeTypes[k[p]];if(n){o.push(n)}}}b.extend(q.style,{position:"absolute",background:f.settings.shim_bgcolor||"transparent",width:"100px",height:"100px",overflow:"hidden",zIndex:99999,opacity:f.settings.shim_bgcolor?"":0});q.className="plupload html5";if(f.settings.container){h=document.getElementById(f.settings.container);h.style.position="relative"}h.appendChild(q);q.innerHTML='<input id="'+f.id+'_html5" style="width:100%;" type="file" accept="'+o.join(",")+'" '+(f.settings.multi_selection?'multiple="multiple"':"")+" />";document.getElementById(f.id+"_html5").onchange=function(){e(this.files);this.value=""}});f.bind("PostInit",function(){var h=document.getElementById(f.settings.drop_element);if(h){b.addEvent(h,"dragover",function(i){i.preventDefault()});b.addEvent(h,"drop",function(j){var i=j.dataTransfer;if(i&&i.files){e(i.files)}j.preventDefault()})}});f.bind("Refresh",function(h){var i,j,k;i=document.getElementById(f.settings.browse_button);j=b.getPos(i,document.getElementById(h.settings.container));k=b.getSize(i);b.extend(document.getElementById(f.id+"_html5_container").style,{top:j.y+"px",left:j.x+"px",width:k.w+"px",height:k.h+"px"})});f.bind("UploadFile",function(h,j){var k=h.settings,m,i;function l(n){var q=0,p=0;function o(){var u=n,C,D,y,z,A=0,r="----pluploadboundary"+b.guid(),t,w,s="--",B="\r\n",x="";if(j.status==b.DONE||j.status==b.FAILED||h.state==b.STOPPED){return}z={name:j.target_name||j.name};if(k.chunk_size&&d.chunking){t=k.chunk_size;y=Math.ceil(j.size/t);w=Math.min(t,j.size-(q*t));if(typeof(n)=="string"){u=n.substring(q*t,q*t+w)}else{u=n.slice(q*t,w)}z.chunk=q;z.chunks=y}else{w=j.size}C=new XMLHttpRequest();D=C.upload;if(D){D.onprogress=function(E){j.loaded=Math.min(j.size,p+E.loaded-A);h.trigger("UploadProgress",j)}}C.open("post",b.buildUrl(h.settings.url,z),true);C.onreadystatechange=function(){var E,G;if(C.readyState==4){try{E=C.status}catch(F){E=0}if(E>=400){h.trigger("Error",{code:b.HTTP_ERROR,message:"HTTP Error.",file:j,status:E})}else{if(y){G={chunk:q,chunks:y,response:C.responseText,status:E};h.trigger("ChunkUploaded",j,G);p+=w;if(G.cancelled){j.status=b.FAILED;return}j.loaded=Math.min(j.size,(q+1)*t)}else{j.loaded=j.size}h.trigger("UploadProgress",j);if(!y||++q>=y){j.status=b.DONE;h.trigger("FileUploaded",j,{response:C.responseText,status:E})}else{o()}}}};b.each(h.settings.headers,function(F,E){C.setRequestHeader(E,F)});if(h.settings.multipart&&d.multipart){if(!C.sendAsBinary){var v=new FormData();b.each(h.settings.multipart_params,function(F,E){v.append(E,F)});v.append(h.settings.file_data_name,u);C.send(v);return}C.setRequestHeader("Content-Type","multipart/form-data; boundary="+r);b.each(h.settings.multipart_params,function(F,E){x+=s+r+B+'Content-Disposition: form-data; name="'+E+'"'+B+B;x+=F+B});x+=s+r+B+'Content-Disposition: form-data; name="'+h.settings.file_data_name+'"; filename="'+j.name+'"'+B+"Content-Type: application/octet-stream"+B+B+u+B+s+r+s+B;A=x.length-u.length;u=x}else{C.setRequestHeader("Content-Type","application/octet-stream")}if(C.sendAsBinary){C.sendAsBinary(u)}else{C.send(u)}}o()}m=c[j.id];i=h.settings.resize;if(d.jpgresize){if(i&&/\.(png|jpg|jpeg)$/i.test(j.name)){a(m.getAsDataURL(),i.width,i.height,/\.png$/i.test(j.name)?"image/png":"image/jpeg",function(n){if(n.success){j.size=n.data.length;l(n.data)}else{l(m.getAsBinary())}})}else{l(m.getAsBinary())}}else{l(m)}});g({success:true})}})})(plupload);(function(a){a.runtimes.Html4=a.addRuntime("html4",{getFeatures:function(){return{multipart:true}},init:function(f,g){var d={},c,b;function e(l){var k,j,m=[],n,h;h=l.value.replace(/\\/g,"/");h=h.substring(h.length,h.lastIndexOf("/")+1);n=a.guid();k=new a.File(n,h);d[n]=k;k.input=l;m.push(k);if(m.length){f.trigger("FilesAdded",m)}}f.bind("Init",function(p){var h,x,v,t=[],o,u,m=p.settings.filters,l,s,r=/MSIE/.test(navigator.userAgent),k="javascript",w,j=document.body,n;if(f.settings.container){j=document.getElementById(f.settings.container);j.style.position="relative"}c=(typeof p.settings.form=="string")?document.getElementById(p.settings.form):p.settings.form;if(!c){n=document.getElementById(f.settings.browse_button);for(;n;n=n.parentNode){if(n.nodeName=="FORM"){c=n}}}if(!c){c=document.createElement("form");c.style.display="inline";n=document.getElementById(f.settings.container);n.parentNode.insertBefore(c,n);c.appendChild(n)}c.setAttribute("method","post");c.setAttribute("enctype","multipart/form-data");a.each(p.settings.multipart_params,function(z,y){var i=document.createElement("input");a.extend(i,{type:"hidden",name:y,value:z});c.appendChild(i)});b=document.createElement("iframe");b.setAttribute("src",k+':""');b.setAttribute("name",p.id+"_iframe");b.setAttribute("id",p.id+"_iframe");b.style.display="none";a.addEvent(b,"load",function(B){var C=B.target,z=f.currentfile,A;try{A=C.contentWindow.document||C.contentDocument||window.frames[C.id].document}catch(y){p.trigger("Error",{code:a.SECURITY_ERROR,message:"Security error.",file:z});return}if(A.location.href=="about:blank"||!z){return}var i=A.documentElement.innerText||A.documentElement.textContent;if(i!=""){z.status=a.DONE;z.loaded=1025;z.percent=100;if(z.input){z.input.removeAttribute("name")}p.trigger("UploadProgress",z);p.trigger("FileUploaded",z,{response:i});if(c.tmpAction){c.setAttribute("action",c.tmpAction)}if(c.tmpTarget){c.setAttribute("target",c.tmpTarget)}}});c.appendChild(b);if(r){window.frames[b.id].name=b.name}x=document.createElement("div");x.id=p.id+"_iframe_container";for(o=0;o<m.length;o++){l=m[o].extensions.split(/,/);for(u=0;u<l.length;u++){s=a.mimeTypes[l[u]];if(s){t.push(s)}}}a.extend(x.style,{position:"absolute",background:"transparent",width:"100px",height:"100px",overflow:"hidden",zIndex:99999,opacity:0});w=f.settings.shim_bgcolor;if(w){a.extend(x.style,{background:w,opacity:1})}x.className="plupload_iframe";j.appendChild(x);function q(){v=document.createElement("input");v.setAttribute("type","file");v.setAttribute("accept",t.join(","));v.setAttribute("size",1);a.extend(v.style,{width:"100%",height:"100%",opacity:0});if(r){a.extend(v.style,{filter:"alpha(opacity=0)"})}a.addEvent(v,"change",function(i){var y=i.target;if(y.value){q();y.style.display="none";e(y)}});x.appendChild(v);return true}q()});f.bind("Refresh",function(h){var i,j,k;i=document.getElementById(f.settings.browse_button);j=a.getPos(i,document.getElementById(h.settings.container));k=a.getSize(i);a.extend(document.getElementById(f.id+"_iframe_container").style,{top:j.y+"px",left:j.x+"px",width:k.w+"px",height:k.h+"px"})});f.bind("UploadFile",function(h,i){if(i.status==a.DONE||i.status==a.FAILED||h.state==a.STOPPED){return}if(!i.input){i.status=a.ERROR;return}i.input.setAttribute("name",h.settings.file_data_name);c.tmpAction=c.getAttribute("action");c.setAttribute("action",a.buildUrl(h.settings.url,{name:i.target_name||i.name}));c.tmpTarget=c.getAttribute("target");c.setAttribute("target",b.name);this.currentfile=i;c.submit()});f.bind("FilesRemoved",function(h,k){var j,l;for(j=0;j<k.length;j++){l=k[j].input;if(l){l.parentNode.removeChild(l)}}});g({success:true})}})})(plupload);
\ No newline at end of file
diff --git a/typo3/sysext/fal/contrib/plupload/js/plupload.full.tmp.js b/typo3/sysext/fal/contrib/plupload/js/plupload.full.tmp.js
deleted file mode 100644 (file)
index 0e17539..0000000
+++ /dev/null
@@ -1,3447 +0,0 @@
-/**\r
- * plupload.js\r
- *\r
- * Copyright 2009, Moxiecode Systems AB\r
- * Released under GPL License.\r
- *\r
- * License: http://www.plupload.com/license\r
- * Contributing: http://www.plupload.com/contributing\r
- */\r
-\r
-// JSLint defined globals\r
-/*global window:false, escape:false */\r
-\r
-(function() {\r
-       var count = 0, runtimes = [], i18n = {}, mimes = {},\r
-               xmlEncodeChars = {'<' : 'lt', '>' : 'gt', '&' : 'amp', '"' : 'quot', '\'' : '#39'},\r
-               xmlEncodeRegExp = /[<>&\"\']/g, undef, delay = window.setTimeout;\r
-\r
-       // IE W3C like event funcs\r
-       function preventDefault() {\r
-               this.returnValue = false;\r
-       }\r
-\r
-       function stopPropagation() {\r
-               this.cancelBubble = true;\r
-       }\r
-\r
-       // Parses the default mime types string into a mimes lookup map\r
-       (function(mime_data) {\r
-               var items = mime_data.split(/,/), i, y, ext;\r
-\r
-               for (i = 0; i < items.length; i += 2) {\r
-                       ext = items[i + 1].split(/ /);\r
-\r
-                       for (y = 0; y < ext.length; y++) {\r
-                               mimes[ext[y]] = items[i];\r
-                       }\r
-               }\r
-       })(\r
-               "application/msword,doc dot," +\r
-               "application/pdf,pdf," +\r
-               "application/pgp-signature,pgp," +\r
-               "application/postscript,ps ai eps," +\r
-               "application/rtf,rtf," +\r
-               "application/vnd.ms-excel,xls xlb," +\r
-               "application/vnd.ms-powerpoint,ppt pps pot," +\r
-               "application/zip,zip," +\r
-               "application/x-shockwave-flash,swf swfl," +\r
-               "application/vnd.openxmlformats,docx pptx xlsx," +\r
-               "audio/mpeg,mpga mpega mp2 mp3," +\r
-               "audio/x-wav,wav," +\r
-               "image/bmp,bmp," +\r
-               "image/gif,gif," +\r
-               "image/jpeg,jpeg jpg jpe," +\r
-               "image/png,png," +\r
-               "image/svg+xml,svg svgz," +\r
-               "image/tiff,tiff tif," +\r
-               "text/html,htm html xhtml," +\r
-               "text/rtf,rtf," +\r
-               "video/mpeg,mpeg mpg mpe," +\r
-               "video/quicktime,qt mov," +\r
-               "video/x-flv,flv," +\r
-               "video/vnd.rn-realvideo,rv," +\r
-               "text/plain,asc txt text diff log," +\r
-               "application/octet-stream,exe"\r
-       );\r
-\r
-       /**\r
-        * Plupload class with some global constants and functions.\r
-        *\r
-        * @example\r
-        * // Encode entities\r
-        * console.log(plupload.xmlEncode("My string &lt;&gt;"));\r
-        *\r
-        * // Generate unique id\r
-        * console.log(plupload.guid());\r
-        *\r
-        * @static\r
-        * @class plupload\r
-        */\r
-       var plupload = {\r
-               /**\r
-                * Inital state of the queue and also the state ones it's finished all it's uploads.\r
-                *\r
-                * @property STOPPED\r
-                * @final\r
-                */\r
-               STOPPED : 1,\r
-\r
-               /**\r
-                * Upload process is running\r
-                *\r
-                * @property STARTED\r
-                * @final\r
-                */\r
-               STARTED : 2,\r
-\r
-               /**\r
-                * File is queued for upload\r
-                *\r
-                * @property QUEUED\r
-                * @final\r
-                */\r
-               QUEUED : 1,\r
-\r
-               /**\r
-                * File is being uploaded\r
-                *\r
-                * @property UPLOADING\r
-                * @final\r
-                */\r
-               UPLOADING : 2,\r
-\r
-               /**\r
-                * File has failed to be uploaded\r
-                *\r
-                * @property FAILED\r
-                * @final\r
-                */\r
-               FAILED : 4,\r
-\r
-               /**\r
-                * File has been uploaded successfully\r
-                *\r
-                * @property DONE\r
-                * @final\r
-                */\r
-               DONE : 5,\r
-\r
-               // Error constants used by the Error event\r
-\r
-               /**\r
-                * Generic error for example if an exception is thrown inside Silverlight.\r
-                *\r
-                * @property GENERIC_ERROR\r
-                * @final\r
-                */\r
-               GENERIC_ERROR : -100,\r
-\r
-               /**\r
-                * HTTP transport error. For example if the server produces a HTTP status other than 200.\r
-                *\r
-                * @property HTTP_ERROR\r
-                * @final\r
-                */\r
-               HTTP_ERROR : -200,\r
-\r
-               /**\r
-                * Generic I/O error. For exampe if it wasn't possible to open the file stream on local machine.\r
-                *\r
-                * @property IO_ERROR\r
-                * @final\r
-                */\r
-               IO_ERROR : -300,\r
-\r
-               /**\r
-                * Generic I/O error. For exampe if it wasn't possible to open the file stream on local machine.\r
-                *\r
-                * @property SECURITY_ERROR\r
-                * @final\r
-                */\r
-               SECURITY_ERROR : -400,\r
-\r
-               /**\r
-                * Initialization error. Will be triggered if no runtime was initialized.\r
-                *\r
-                * @property INIT_ERROR\r
-                * @final\r
-                */\r
-               INIT_ERROR : -500,\r
-\r
-               /**\r
-                * File size error. If the user selects a file that is to large it will be blocked and an error of this type will be triggered.\r
-                *\r
-                * @property FILE_SIZE_ERROR\r
-                * @final\r
-                */\r
-               FILE_SIZE_ERROR : -600,\r
-\r
-               /**\r
-                * File extension error. If the user selects a file that isn't valid according to the filters setting.\r
-                *\r
-                * @property FILE_EXTENSION_ERROR\r
-                * @final\r
-                */\r
-               FILE_EXTENSION_ERROR : -700,\r
-\r
-               /**\r
-                * Mime type lookup table.\r
-                *\r
-                * @property mimeTypes\r
-                * @type Object\r
-                * @final\r
-                */\r
-               mimeTypes : mimes,\r
-\r
-               /**\r
-                * Extends the specified object with another object.\r
-                *\r
-                * @method extend\r
-                * @param {Object} target Object to extend.\r
-                * @param {Object..} obj Multiple objects to extend with.\r
-                * @return {Object} Same as target, the extended object.\r
-                */\r
-               extend : function(target) {\r
-                       plupload.each(arguments, function(arg, i) {\r
-                               if (i > 0) {\r
-                                       plupload.each(arg, function(value, key) {\r
-                                               target[key] = value;\r
-                                       });\r
-                               }\r
-                       });\r
-\r
-                       return target;\r
-               },\r
-\r
-               /**\r
-                * Cleans the specified name from national characters (diacritics). The result will be a name with only a-z, 0-9 and _.\r
-                *\r
-                * @method cleanName\r
-                * @param {String} s String to clean up.\r
-                * @return {String} Cleaned string.\r
-                */\r
-               cleanName : function(name) {\r
-                       var i, lookup;\r
-\r
-                       // Replace diacritics\r
-                       lookup = [\r
-                               /[\300-\306]/g, 'A', /[\340-\346]/g, 'a',\r
-                               /\307/g, 'C', /\347/g, 'c',\r
-                               /[\310-\313]/g, 'E', /[\350-\353]/g, 'e',\r
-                               /[\314-\317]/g, 'I', /[\354-\357]/g, 'i',\r
-                               /\321/g, 'N', /\361/g, 'n',\r
-                               /[\322-\330]/g, 'O', /[\362-\370]/g, 'o',\r
-                               /[\331-\334]/g, 'U', /[\371-\374]/g, 'u'\r
-                       ];\r
-\r
-                       for (i = 0; i < lookup.length; i += 2) {\r
-                               name = name.replace(lookup[i], lookup[i + 1]);\r
-                       }\r
-\r
-                       // Replace whitespace\r
-                       name = name.replace(/\s+/g, '_');\r
-\r
-                       // Remove anything else\r
-                       name = name.replace(/[^a-z0-9_\-\.]+/gi, '');\r
-\r
-                       return name;\r
-               },\r
-\r
-               /**\r
-                * Adds a specific upload runtime like for example flash or gears.\r
-                *\r
-                * @method addRuntime\r
-                * @param {String} name Runtime name for example flash.\r
-                * @param {Object} obj Object containing init/destroy method.\r
-                */\r
-               addRuntime : function(name, runtime) {\r
-                       runtime.name = name;\r
-                       runtimes[name] = runtime;\r
-                       runtimes.push(runtime);\r
-\r
-                       return runtime;\r
-               },\r
-\r
-               /**\r
-                * Generates an unique ID. This is 99.99% unique since it takes the current time and 5 random numbers.\r
-                * The only way a user would be able to get the same ID is if the two persons at the same exact milisecond manages\r
-                * to get 5 the same random numbers between 0-65535 it also uses a counter so each call will be guaranteed to be page unique.\r
-                * It's more probable for the earth to be hit with an ansteriod. You can also if you want to be 100% sure set the plupload.guidPrefix property\r
-                * to an user unique key.\r
-                *\r
-                * @method guid\r
-                * @return {String} Virtually unique id.\r
-                */\r
-               guid : function() {\r
-                       var guid = new Date().getTime().toString(32), i;\r
-\r
-                       for (i = 0; i < 5; i++) {\r
-                               guid += Math.floor(Math.random() * 65535).toString(32);\r
-                       }\r
-\r
-                       return (plupload.guidPrefix || 'p') + guid + (count++).toString(32);\r
-               },\r
-\r
-               /**\r
-                * Builds a full url out of a base URL and an object with items to append as query string items.\r
-                *\r
-                * @param {String} url Base URL to append query string items to.\r
-                * @param {Object} items Name/value object to serialize as a querystring.\r
-                * @return {String} String with url + serialized query string items.\r
-                */\r
-               buildUrl : function(url, items) {\r
-                       var query = '';\r
-\r
-                       plupload.each(items, function(value, name) {\r
-                               query += (query ? '&' : '') + encodeURIComponent(name) + '=' + encodeURIComponent(value);\r
-                       });\r
-\r
-                       if (query) {\r
-                               url += (url.indexOf('?') > 0 ? '&' : '?') + query;\r
-                       }\r
-\r
-                       return url;\r
-               },\r
-\r
-               /**\r
-                * Executes the callback function for each item in array/object. If you return false in the\r
-                * callback it will break the loop.\r
-                *\r
-                * @param {Object} obj Object to iterate.\r
-                * @param {function} callback Callback function to execute for each item.\r
-                */\r
-               each : function(obj, callback) {\r
-                       var length, key, i;\r
-\r
-                       if (obj) {\r
-                               length = obj.length;\r
-\r
-                               if (length === undef) {\r
-                                       // Loop object items\r
-                                       for (key in obj) {\r
-                                               if (obj.hasOwnProperty(key)) {\r
-                                                       if (callback(obj[key], key) === false) {\r
-                                                               return;\r
-                                                       }\r
-                                               }\r
-                                       }\r
-                               } else {\r
-                                       // Loop array items\r
-                                       for (i = 0; i < length; i++) {\r
-                                               if (callback(obj[i], i) === false) {\r
-                                                       return;\r
-                                               }\r
-                                       }\r
-                               }\r
-                       }\r
-               },\r
-\r
-               /**\r
-                * Formats the specified number as a size string for example 1024 becomes 1 KB.\r
-                *\r
-                * @method formatSize\r
-                * @param {Number} size Size to format as string.\r
-                * @return {String} Formatted size string.\r
-                */\r
-               formatSize : function(size) {\r
-                       if (size === undef) {\r
-                               return plupload.translate('N/A');\r
-                       }\r
-\r
-                       // MB\r
-                       if (size > 1048576) {\r
-                               return Math.round(size / 1048576, 1) + " MB";\r
-                       }\r
-\r
-                       // KB\r
-                       if (size > 1024) {\r
-                               return Math.round(size / 1024, 1) + " KB";\r
-                       }\r
-\r
-                       return size + " b";\r
-               },\r
-\r
-               /**\r
-                * Returns the absolute x, y position of an Element. The position will be returned in a object with x, y fields.\r
-                *\r
-                * @method getPos\r
-                * @param {Element} node HTML element or element id to get x, y position from.\r
-                * @param {Element} root Optional root element to stop calculations at.\r
-                * @return {object} Absolute position of the specified element object with x, y fields.\r
-                */\r
-                getPos : function(node, root) {\r
-                       var x = 0, y = 0, parent, doc = document, nodeRect, rootRect;\r
-\r
-                       node = node;\r
-                       root = root || doc.body;\r
-\r
-                       // Returns the x, y cordinate for an element on IE 6 and IE 7\r
-                       function getIEPos(node) {\r
-                               var bodyElm, rect, x = 0, y = 0;\r
-\r
-                               if (node) {\r
-                                       rect = node.getBoundingClientRect();\r
-                                       bodyElm = doc.compatMode === "CSS1Compat" ? doc.documentElement : doc.body;\r
-                                       x = rect.left + bodyElm.scrollLeft;\r
-                                       y = rect.top + bodyElm.scrollTop;\r
-                               }\r
-\r
-                               return {\r
-                                       x : x,\r
-                                       y : y\r
-                               };\r
-                       }\r
-\r
-                       // Use getBoundingClientRect on IE 6 and IE 7 but not on IE 8 in standards mode\r
-                       if (node.getBoundingClientRect && (navigator.userAgent.indexOf('MSIE') > 0 && doc.documentMode !== 8)) {\r
-                               nodeRect = getIEPos(node);\r
-                               rootRect = getIEPos(root);\r
-\r
-                               return {\r
-                                       x : nodeRect.x - rootRect.x,\r
-                                       y : nodeRect.y - rootRect.y\r
-                               };\r
-                       }\r
-\r
-                       parent = node;\r
-                       while (parent && parent != root && parent.nodeType) {\r
-                               x += parent.offsetLeft || 0;\r
-                               y += parent.offsetTop || 0;\r
-                               parent = parent.offsetParent;\r
-                       }\r
-\r
-                       parent = node.parentNode;\r
-                       while (parent && parent != root && parent.nodeType) {\r
-                               x -= parent.scrollLeft || 0;\r
-                               y -= parent.scrollTop || 0;\r
-                               parent = parent.parentNode;\r
-                       }\r
-\r
-                       return {\r
-                               x : x,\r
-                               y : y\r
-                       };\r
-               },\r
-\r
-               /**\r
-                * Returns the size of the specified node in pixels.\r
-                *\r
-                * @param {Node} node Node to get the size of.\r
-                * @return {Object} Object with a w and h property.\r
-                */\r
-               getSize : function(node) {\r
-                       return {\r
-                               w : node.clientWidth || node.offsetWidth,\r
-                               h : node.clientHeight || node.offsetHeight\r
-                       };\r
-               },\r
-\r
-               /**\r
-                * Parses the specified size string into a byte value. For example 10kb becomes 10240.\r
-                *\r
-                * @method parseSize\r
-                * @param {String/Number} size String to parse or number to just pass through.\r
-                * @return {Number} Size in bytes.\r
-                */\r
-               parseSize : function(size) {\r
-                       var mul;\r
-\r
-                       if (typeof(size) == 'string') {\r
-                               size = /^([0-9]+)([mgk]+)$/.exec(size.toLowerCase().replace(/[^0-9mkg]/g, ''));\r
-                               mul = size[2];\r
-                               size = +size[1];\r
-\r
-                               if (mul == 'g') {\r
-                                       size *= 1073741824;\r
-                               }\r
-\r
-                               if (mul == 'm') {\r
-                                       size *= 1048576;\r
-                               }\r
-\r
-                               if (mul == 'k') {\r
-                                       size *= 1024;\r
-                               }\r
-                       }\r
-\r
-                       return size;\r
-               },\r
-\r
-               /**\r
-                * Encodes the specified string.\r
-                *\r
-                * @method xmlEncode\r
-                * @param {String} s String to encode.\r
-                * @return {String} Encoded string.\r
-                */\r
-               xmlEncode : function(str) {\r
-                       return str ? ('' + str).replace(xmlEncodeRegExp, function(chr) {\r
-                               return xmlEncodeChars[chr] ? '&' + xmlEncodeChars[chr] + ';' : chr;\r
-                       }) : str;\r
-               },\r
-\r
-               /**\r
-                * Forces anything into an array.\r
-                *\r
-                * @method toArray\r
-                * @param {Object} obj Object with length field.\r
-                * @return {Array} Array object containing all items.\r
-                */\r
-               toArray : function(obj) {\r
-                       var i, arr = [];\r
-\r
-                       for (i = 0; i < obj.length; i++) {\r
-                               arr[i] = obj[i];\r
-                       }\r
-\r
-                       return arr;\r
-               },\r
-\r
-               /**\r
-                * Extends the language pack object with new items.\r
-                *\r
-                * @param {Object} pack Language pack items to add.\r
-                * @return {Object} Extended language pack object.\r
-                */\r
-               addI18n : function(pack) {\r
-                       return plupload.extend(i18n, pack);\r
-               },\r
-\r
-               /**\r
-                * Translates the specified string by checking for the english string in the language pack lookup.\r
-                *\r
-                * @param {String} str String to look for.\r
-                * @reutrn {String} Translated string or the input string if it wasn't found.\r
-                */\r
-               translate : function(str) {\r
-                       return i18n[str] || str;\r
-               },\r
-\r
-               /**\r
-                * Adds an event handler to the specified object.\r
-                *\r
-                * @param {Object} obj DOM element like object to add handler to.\r
-                * @param {String} name Name to add event listener to.\r
-                * @param {function} callback Function to call when event occurs.\r
-                */\r
-               addEvent : function(obj, name, callback) {\r
-                       if (obj.attachEvent) {\r
-                               obj.attachEvent('on' + name, function() {\r
-                                       var evt = window.event;\r
-\r
-                                       if (!evt.target) {\r
-                                               evt.target = evt.srcElement;\r
-                                       }\r
-\r
-                                       evt.preventDefault = preventDefault;\r
-                                       evt.stopPropagation = stopPropagation;\r
-\r
-                                       callback(evt);\r
-                               });\r
-                       } else if (obj.addEventListener) {\r
-                               obj.addEventListener(name, callback, false);\r
-                       }\r
-               }\r
-       };\r
-\r
-       /**\r
-        * Uploader class, an instance of this class will be created for each upload field.\r
-        *\r
-        * @example\r
-        * var uploader = new plupload.Uploader({\r
-        *     runtimes : 'gears,html5,flash',\r
-        *     browse_button : 'button_id'\r
-        * });\r
-        *\r
-        * uploader.bind('Init', function(up) {\r
-        *     alert('Supports drag/drop: ' + (!!up.features.dragdrop));\r
-        * });\r
-        *\r
-        * uploader.bind('FilesAdded', function(up, files) {\r
-        *     alert('Selected files: ' + files.length);\r
-        * });\r
-        *\r
-        * uploader.bind('QueueChanged', function(up) {\r
-        *     alert('Queued files: ' + uploader.files.length);\r
-        * });\r
-        *\r
-        * uploader.init();\r
-        *\r
-        * @class plupload.Uploader\r
-        */\r
-\r
-       /**\r
-        * Constructs a new uploader instance.\r
-        *\r
-        * @constructor\r
-        * @method Uploader\r
-        * @param {Object} settings Initialization settings, to be used by the uploader instance and runtimes.\r
-        */\r
-       plupload.Uploader = function(settings) {\r
-               var events = {}, total, files = [], fileIndex, startTime;\r
-\r
-               // Inital total state\r
-               total = new plupload.QueueProgress();\r
-\r
-               // Default settings\r
-               settings = plupload.extend({\r
-                       chunk_size : 0,\r
-                       multipart : true,\r
-                       multi_selection : true,\r
-                       file_data_name : 'file',\r
-                       filters : []\r
-               }, settings);\r
-\r
-               // Private methods\r
-               function uploadNext() {\r
-                       var file;\r
-\r
-                       if (this.state == plupload.STARTED && fileIndex < files.length) {\r
-                               file = files[fileIndex++];\r
-\r
-                               if (file.status == plupload.QUEUED) {\r
-                                       this.trigger('BeforeUpload', file);\r
-                                       this.trigger("UploadFile", file);\r
-                               } else {\r
-                                       uploadNext.call(this);\r
-                               }\r
-                       } else {\r
-                               this.stop();\r
-                       }\r
-               }\r
-\r
-               function calc() {\r
-                       var i, file;\r
-\r
-                       // Reset stats\r
-                       total.reset();\r
-\r
-                       // Check status, size, loaded etc on all files\r
-                       for (i = 0; i < files.length; i++) {\r
-                               file = files[i];\r
-\r
-                               if (file.size !== undef) {\r
-                                       total.size += file.size;\r
-                                       total.loaded += file.loaded;\r
-                               } else {\r
-                                       total.size = undef;\r
-                               }\r
-\r
-                               if (file.status == plupload.DONE) {\r
-                                       total.uploaded++;\r
-                               } else if (file.status == plupload.FAILED) {\r
-                                       total.failed++;\r
-                               } else {\r
-                                       total.queued++;\r
-                               }\r
-                       }\r
-\r
-                       // If we couldn't calculate a total file size then use the number of files to calc percent\r
-                       if (total.size === undef) {\r
-                               total.percent = files.length > 0 ? Math.ceil(total.uploaded / files.length * 100) : 0;\r
-                       } else {\r
-                               total.bytesPerSec = Math.ceil(total.loaded / ((+new Date() - startTime || 1) / 1000.0));\r
-                               total.percent = total.size > 0 ? Math.ceil(total.loaded / total.size * 100) : 0;\r
-                       }\r
-               }\r
-\r
-               // Add public methods\r
-               plupload.extend(this, {\r
-                       /**\r
-                        * Current state of the total uploading progress. This one can either be plupload.STARTED or plupload.STOPPED.\r
-                        * These states are controlled by the stop/start methods. The default value is STOPPED.\r
-                        *\r
-                        * @property state\r
-                        * @type Number\r
-                        */\r
-                       state : plupload.STOPPED,\r
-\r
-                       /**\r
-                        * Map of features that are available for the uploader runtime. Features will be filled\r
-                        * before the init event is called, these features can then be used to alter the UI for the end user.\r
-                        * Some of the current features that might be in this map is: dragdrop, chunks, jpgresize, pngresize.\r
-                        *\r
-                        * @property features\r
-                        * @type Object\r
-                        */\r
-                       features : {},\r
-\r
-                       /**\r
-                        * Current upload queue, an array of File instances.\r
-                        *\r
-                        * @property files\r
-                        * @type Array\r
-                        * @see plupload.File\r
-                        */\r
-                       files : files,\r
-\r
-                       /**\r
-                        * Object with name/value settings.\r
-                        *\r
-                        * @property settings\r
-                        * @type Object\r
-                        */\r
-                       settings : settings,\r
-\r
-                       /**\r
-                        * Total progess information. How many files has been uploaded, total percent etc.\r
-                        *\r
-                        * @property total\r
-                        * @type plupload.QueueProgress\r
-                        */\r
-                       total : total,\r
-\r
-                       /**\r
-                        * Unique id for the Uploader instance.\r
-                        *\r
-                        * @property id\r
-                        * @type String\r
-                        */\r
-                       id : plupload.guid(),\r
-\r
-                       /**\r
-                        * Initializes the Uploader instance and adds internal event listeners.\r
-                        *\r
-                        * @method init\r
-                        */\r
-                       init : function() {\r
-                               var self = this, i, runtimeList, a, runTimeIndex = 0, items;\r
-\r
-                               if (typeof(settings.preinit) == "function") {\r
-                                       settings.preinit(self);\r
-                               } else {\r
-                                       plupload.each(settings.preinit, function(func, name) {\r
-                                               self.bind(name, func);\r
-                                       });\r
-                               }\r
-\r
-                               settings.page_url = settings.page_url || document.location.pathname.replace(/\/[^\/]+$/g, '/');\r
-\r
-                               // If url is relative force it absolute to the current page\r
-                               if (!/^(\w+:\/\/|\/)/.test(settings.url)) {\r
-                                       settings.url = settings.page_url + settings.url;\r
-                               }\r
-\r
-                               // Convert settings\r
-                               settings.chunk_size = plupload.parseSize(settings.chunk_size);\r
-                               settings.max_file_size = plupload.parseSize(settings.max_file_size);\r
-\r
-                               // Add files to queue\r
-                               self.bind('FilesAdded', function(up, selected_files) {\r
-                                       var i, file, count = 0, extensionsRegExp, filters = settings.filters;\r
-\r
-                                       // Convert extensions to regexp\r
-                                       if (filters && filters.length) {\r
-                                               extensionsRegExp = [];\r
-                                               \r
-                                               plupload.each(filters, function(filter) {\r
-                                                       plupload.each(filter.extensions.split(/,/), function(ext) {\r
-                                                               extensionsRegExp.push('\\.' + ext.replace(new RegExp('[' + ('/^$.*+?|()[]{}\\'.replace(/./g, '\\$&')) + ']', 'g'), '\\$&'));\r
-                                                       });\r
-                                               });\r
-\r
-                                               extensionsRegExp = new RegExp(extensionsRegExp.join('|') + '$', 'i');\r
-                                       }\r
-\r
-                                       for (i = 0; i < selected_files.length; i++) {\r
-                                               file = selected_files[i];\r
-                                               file.loaded = 0;\r
-                                               file.percent = 0;\r
-                                               file.status = plupload.QUEUED;\r
-\r
-                                               // Invalid file extension\r
-                                               if (extensionsRegExp && !extensionsRegExp.test(file.name)) {\r
-                                                       up.trigger('Error', {\r
-                                                               code : plupload.FILE_EXTENSION_ERROR,\r
-                                                               message : 'File extension error.',\r
-                                                               file : file\r
-                                                       });\r
-\r
-                                                       continue;\r
-                                               }\r
-\r
-                                               // Invalid file size\r
-                                               if (file.size !== undef && file.size > settings.max_file_size) {\r
-                                                       up.trigger('Error', {\r
-                                                               code : plupload.FILE_SIZE_ERROR,\r
-                                                               message : 'File size error.',\r
-                                                               file : file\r
-                                                       });\r
-\r
-                                                       continue;\r
-                                               }\r
-\r
-                                               // Add valid file to list\r
-                                               files.push(file);\r
-                                               count++;\r
-                                       }\r
-\r
-                                       // Only trigger QueueChanged event if any files where added\r
-                                       if (count) {\r
-                                               delay(function() {\r
-                                                       self.trigger("QueueChanged");\r
-                                                       self.refresh();\r
-                                               });\r
-                                       } else {\r
-                                               return false; // Stop the FilesAdded event from immediate propagation\r
-                                       }\r
-                               });\r
-\r
-                               // Generate unique target filenames\r
-                               if (settings.unique_names) {\r
-                                       self.bind("UploadFile", function(up, file) {\r
-                                               var matches = file.name.match(/\.([^.]+)$/), ext = "tmp";\r
-\r
-                                               if (matches) {\r
-                                                       ext = matches[1];\r
-                                               }\r
-\r
-                                               file.target_name = file.id + '.' + ext;\r
-                                       });\r
-                               }\r
-\r
-                               self.bind('UploadProgress', function(up, file) {\r
-                                       if (file.status == plupload.QUEUED) {\r
-                                               file.status = plupload.UPLOADING;\r
-                                       }\r
-\r
-                                       file.percent = file.size > 0 ? Math.ceil(file.loaded / file.size * 100) : 100;\r
-                                       calc();\r
-                               });\r
-\r
-                               self.bind('StateChanged', function(up) {\r
-                                       if (up.state == plupload.STARTED) {\r
-                                               // Get start time to calculate bps\r
-                                               startTime = (+new Date());\r
-                                       }\r
-                               });\r
-\r
-                               self.bind('QueueChanged', calc);\r
-\r
-                               self.bind("Error", function(up, err) {\r
-                                       // Set failed status if an error occured on a file\r
-                                       if (err.file) {\r
-                                               err.file.status = plupload.FAILED;\r
-                                               calc();\r
-\r
-                                               // Upload next file but detach it from the error event\r
-                                               // since other custom listeners might want to stop the queue\r
-                                               delay(function() {\r
-                                                       uploadNext.call(self);\r
-                                               });\r
-                                       }\r
-                               });\r
-\r
-                               self.bind("FileUploaded", function(up, file) {\r
-                                       file.status = plupload.DONE;\r
-                                       file.loaded = file.size;\r
-                                       up.trigger('UploadProgress', file);\r
-\r
-                                       // Upload next file but detach it from the error event\r
-                                       // since other custom listeners might want to stop the queue\r
-                                       delay(function() {\r
-                                               uploadNext.call(self);\r
-                                       });\r
-                               });\r
-\r
-                               // Setup runtimeList\r
-                               if (settings.runtimes) {\r
-                                       runtimeList = [];\r
-                                       items = settings.runtimes.split(/\s?,\s?/);\r
-\r
-                                       for (i = 0; i < items.length; i++) {\r
-                                               if (runtimes[items[i]]) {\r
-                                                       runtimeList.push(runtimes[items[i]]);\r
-                                               }\r
-                                       }\r
-                               } else {\r
-                                       runtimeList = runtimes;\r
-                               }\r
-\r
-                               // Call init on each runtime in sequence\r
-                               function callNextInit() {\r
-                                       var runtime = runtimeList[runTimeIndex++], features, requiredFeatures, i;\r
-\r
-                                       if (runtime) {\r
-                                               features = runtime.getFeatures();\r
-\r
-                                               // Check if runtime supports required features\r
-                                               requiredFeatures = self.settings.required_features;\r
-                                               if (requiredFeatures) {\r
-                                                       requiredFeatures = requiredFeatures.split(',');\r
-\r
-                                                       for (i = 0; i < requiredFeatures.length; i++) {\r
-                                                               // Specified feature doesn't exist\r
-                                                               if (!features[requiredFeatures[i]]) {\r
-                                                                       callNextInit();\r
-                                                                       return;\r
-                                                               }\r
-                                                       }\r
-                                               }\r
-\r
-                                               // Try initializing the runtime\r
-                                               runtime.init(self, function(res) {\r
-                                                       if (res && res.success) {\r
-                                                               // Successful initialization\r
-                                                               self.features = features;\r
-                                                               self.trigger('Init', {runtime : runtime.name});\r
-                                                               self.trigger('PostInit');\r
-                                                               self.refresh();\r
-                                                       } else {\r
-                                                               callNextInit();\r
-                                                       }\r
-                                               });\r
-                                       } else {\r
-                                               // Trigger an init error if we run out of runtimes\r
-                                               self.trigger('Error', {\r
-                                                       code : plupload.INIT_ERROR,\r
-                                                       message : 'Init error.'\r
-                                               });\r
-                                       }\r
-                               }\r
-\r
-                               callNextInit();\r
-\r
-                               if (typeof(settings.init) == "function") {\r
-                                       settings.init(self);\r
-                               } else {\r
-                                       plupload.each(settings.init, function(func, name) {\r
-                                               self.bind(name, func);\r
-                                       });\r
-                               }\r
-                       },\r
-\r
-                       /**\r
-                        * Refreshes the upload instance by dispatching out a refresh event to all runtimes.\r
-                        * This would for example reposition flash/silverlight shims on the page.\r
-                        *\r
-                        * @method refresh\r
-                        */\r
-                       refresh : function() {\r
-                               this.trigger("Refresh");\r
-                       },\r
-\r
-                       /**\r
-                        * Starts uploading the queued files.\r
-                        *\r
-                        * @method start\r
-                        */\r
-                       start : function() {\r
-                               if (this.state != plupload.STARTED) {\r
-                                       fileIndex = 0;\r
-\r
-                                       this.state = plupload.STARTED;\r
-                                       this.trigger("StateChanged");\r
-\r
-                                       uploadNext.call(this);\r
-                               }\r
-                       },\r
-\r
-                       /**\r
-                        * Stops the upload of the queued files.\r
-                        *\r
-                        * @method stop\r
-                        */\r
-                       stop : function() {\r
-                               if (this.state != plupload.STOPPED) {\r
-                                       this.state = plupload.STOPPED;\r
-                                       this.trigger("StateChanged");\r
-                               }\r
-                       },\r
-\r
-                       /**\r
-                        * Returns the specified file object by id.\r
-                        *\r
-                        * @method getFile\r
-                        * @param {String} id File id to look for.\r
-                        * @return {plupload.File} File object or undefined if it wasn't found;\r
-                        */\r
-                       getFile : function(id) {\r
-                               var i;\r
-\r
-                               for (i = files.length - 1; i >= 0; i--) {\r
-                                       if (files[i].id === id) {\r
-                                               return files[i];\r
-                                       }\r
-                               }\r
-                       },\r
-\r
-                       /**\r
-                        * Removes a specific file.\r
-                        *\r
-                        * @method removeFile\r
-                        * @param {plupload.File} file File to remove from queue.\r
-                        */\r
-                       removeFile : function(file) {\r
-                               var i;\r
-\r
-                               for (i = files.length - 1; i >= 0; i--) {\r
-                                       if (files[i].id === file.id) {\r
-                                               return this.splice(i, 1)[0];\r
-                                       }\r
-                               }\r
-                       },\r
-\r
-                       /**\r
-                        * Removes part of the queue and returns the files removed. This will also trigger the FilesRemoved and QueueChanged events.\r
-                        *\r
-                        * @method splice\r
-                        * @param {Number} start (Optional) Start index to remove from.\r
-                        * @param {Number} length (Optional) Lengh of items to remove.\r
-                        * @return {Array} Array of files that was removed.\r
-                        */\r
-                       splice : function(start, length) {\r
-                               var removed;\r
-\r
-                               // Splice and trigger events\r
-                               removed = files.splice(start === undef ? 0 : start, length === undef ? files.length : length);\r
-\r
-                               this.trigger("FilesRemoved", removed);\r
-                               this.trigger("QueueChanged");\r
-\r
-                               return removed;\r
-                       },\r
-\r
-                       /**\r
-                        * Dispatches the specified event name and it's arguments to all listeners.\r
-                        *\r
-                        *\r
-                        * @method trigger\r
-                        * @param {String} name Event name to fire.\r
-                        * @param {Object..} Multiple arguments to pass along to the listener functions.\r
-                        */\r
-                       trigger : function(name) {\r
-                               var list = events[name.toLowerCase()], i, args;\r
-\r
-                               // console.log(name, arguments);\r
-\r
-                               if (list) {\r
-                                       // Replace name with sender in args\r
-                                       args = Array.prototype.slice.call(arguments);\r
-                                       args[0] = this;\r
-\r
-                                       // Dispatch event to all listeners\r
-                                       for (i = 0; i < list.length; i++) {\r
-                                               // Fire event, break chain if false is returned\r
-                                               if (list[i].func.apply(list[i].scope, args) === false) {\r
-                                                       return false;\r
-                                               }\r
-                                       }\r
-                               }\r
-\r
-                               return true;\r
-                       },\r
-\r
-                       /**\r
-                        * Adds an event listener by name.\r
-                        *\r
-                        * @method bind\r
-                        * @param {String} name Event name to listen for.\r
-                        * @param {function} func Function to call ones the event gets fired.\r
-                        * @param {Object} scope Optional scope to execute the specified function in.\r
-                        */\r
-                       bind : function(name, func, scope) {\r
-                               var list;\r
-\r
-                               name = name.toLowerCase();\r
-                               list = events[name] || [];\r
-                               list.push({func : func, scope : scope || this});\r
-                               events[name] = list;\r
-                       },\r
-\r
-                       /**\r
-                        * Removes the specified event listener.\r
-                        *\r
-                        * @method unbind\r
-                        * @param {String} name Name of event to remove.\r
-                        * @param {function} func Function to remove from listener.\r
-                        */\r
-                       unbind : function(name, func) {\r
-                               var list = events[name.toLowerCase()], i;\r
-\r
-                               if (list) {\r
-                                       for (i = list.length - 1; i >= 0; i--) {\r
-                                               if (list[i].func === func) {\r
-                                                       list.splice(i, 1);\r
-                                               }\r
-                                       }\r
-                               }\r
-                       }\r
-\r
-                       /**\r
-                        * Fires when the current RunTime has been initialized.\r
-                        *\r
-                        * @event Init\r
-                        * @param {plupload.Uploader} uploader Uploader instance sending the event.\r
-                        */\r
-\r
-                       /**\r
-                        * Fires after the init event incase you need to perform actions there.\r
-                        *\r
-                        * @event PostInit\r
-                        * @param {plupload.Uploader} uploader Uploader instance sending the event.\r
-                        */\r
-\r
-                       /**\r
-                        * Fires when the silverlight/flash or other shim needs to move.\r
-                        *\r
-                        * @event Refresh\r
-                        * @param {plupload.Uploader} uploader Uploader instance sending the event.\r
-                        */\r
-       \r
-                       /**\r
-                        * Fires when the overall state is being changed for the upload queue.\r
-                        *\r
-                        * @event StateChanged\r
-                        * @param {plupload.Uploader} uploader Uploader instance sending the event.\r
-                        */\r
-\r
-                       /**\r
-                        * Fires when a file is to be uploaded by the runtime.\r
-                        *\r
-                        * @event UploadFile\r
-                        * @param {plupload.Uploader} uploader Uploader instance sending the event.\r
-                        * @param {plupload.File} file File to be uploaded.\r
-                        */\r
-\r
-                       /**\r
-                        * Fires when just before a file is uploaded. This event enables you to override settings\r
-                        * on the uploader instance before the file is uploaded.\r
-                        *\r
-                        * @event BeforeUpload\r
-                        * @param {plupload.Uploader} uploader Uploader instance sending the event.\r
-                        * @param {plupload.File} file File to be uploaded.\r
-                        */\r
-\r
-                       /**\r
-                        * Fires when the file queue is changed. In other words when files are added/removed to the files array of the uploader instance.\r
-                        *\r
-                        * @event QueueChanged\r
-                        * @param {plupload.Uploader} uploader Uploader instance sending the event.\r
-                        */\r
-       \r
-                       /**\r
-                        * Fires while a file is being uploaded. Use this event to update the current file upload progress.\r
-                        *\r
-                        * @event UploadProgress\r
-                        * @param {plupload.Uploader} uploader Uploader instance sending the event.\r
-                        * @param {plupload.File} file File that is currently being uploaded.\r
-                        */\r
-\r
-                       /**\r
-                        * Fires while a file was removed from queue.\r
-                        *\r
-                        * @event FilesRemoved\r
-                        * @param {plupload.Uploader} uploader Uploader instance sending the event.\r
-                        * @param {Array} files Array of files that got removed.\r
-                        */\r
-\r
-                       /**\r
-                        * Fires while when the user selects files to upload.\r
-                        *\r
-                        * @event FilesAdded\r
-                        * @param {plupload.Uploader} uploader Uploader instance sending the event.\r
-                        * @param {Array} files Array of file objects that was added to queue/selected by the user.\r
-                        */\r
-\r
-                       /**\r
-                        * Fires when a file is successfully uploaded.\r
-                        *\r
-                        * @event FileUploaded\r
-                        * @param {plupload.Uploader} uploader Uploader instance sending the event.\r
-                        * @param {plupload.File} file File that was uploaded.\r
-                        * @param {Object} response Object with response properties.\r
-                        */\r
-\r
-                       /**\r
-                        * Fires when file chunk is uploaded.\r
-                        *\r
-                        * @event ChunkUploaded\r
-                        * @param {plupload.Uploader} uploader Uploader instance sending the event.\r
-                        * @param {plupload.File} file File that the chunk was uploaded for.\r
-                        * @param {Object} response Object with response properties.\r
-                        */\r
-\r
-                       /**\r
-                        * Fires when a error occurs.\r
-                        *\r
-                        * @event Error\r
-                        * @param {plupload.Uploader} uploader Uploader instance sending the event.\r
-                        * @param {Object} error Contains code, message and sometimes file and other details.\r
-                        */\r
-               });\r
-       };\r
-\r
-       /**\r
-        * File instance.\r
-        *\r
-        * @class plupload.File\r
-        * @param {String} name Name of the file.\r
-        * @param {Number} size File size.\r
-        */\r
-\r
-       /**\r
-        * Constructs a new file instance.\r
-        *\r
-        * @constructor\r
-        * @method File\r
-        * @param {String} id Unique file id.\r
-        * @param {String} name File name.\r
-        * @param {Number} size File size in bytes.\r
-        */\r
-       plupload.File = function(id, name, size) {\r
-               var self = this; // Setup alias for self to reduce code size when it's compressed\r
-\r
-               /**\r
-                * File id this is a globally unique id for the specific file.\r
-                *\r
-                * @property id\r
-                * @type String\r
-                */\r
-               self.id = id;\r
-\r
-               /**\r
-                * File name for example "myfile.gif".\r
-                *\r
-                * @property name\r
-                * @type String\r
-                */\r
-               self.name = name;\r
-\r
-               /**\r
-                * File size in bytes.\r
-                *\r
-                * @property size\r
-                * @type Number\r
-                */\r
-               self.size = size;\r
-\r
-               /**\r
-                * Number of bytes uploaded of the files total size.\r
-                *\r
-                * @property loaded\r
-                * @type Number\r
-                */\r
-               self.loaded = 0;\r
-\r
-               /**\r
-                * Number of percentage uploaded of the file.\r
-                *\r
-                * @property percent\r
-                * @type Number\r
-                */\r
-               self.percent = 0;\r
-\r
-               /**\r
-                * Status constant matching the plupload states QUEUED, UPLOADING, FAILED, DONE.\r
-                *\r
-                * @property status\r
-                * @type Number\r
-                * @see plupload\r
-                */\r
-               self.status = 0;\r
-       };\r
-\r
-       /**\r
-        * Runtime class gets implemented by each upload runtime.\r
-        *\r
-        * @class plupload.Runtime\r
-        * @static\r
-        */\r
-       plupload.Runtime = function() {\r
-               /**\r
-                * Returns a list of supported features for the runtime.\r
-                *\r
-                * @return {Object} Name/value object with supported features.\r
-                */\r
-               this.getFeatures = function() {\r
-               };\r
-\r
-               /**\r
-                * Initializes the upload runtime. This method should add necessary items to the DOM and register events needed for operation. \r
-                *\r
-                * @method init\r
-                * @param {plupload.Uploader} uploader Uploader instance that needs to be initialized.\r
-                * @param {function} callback Callback function to execute when the runtime initializes or fails to initialize. If it succeeds an object with a parameter name success will be set to true.\r
-                */\r
-               this.init = function(uploader, callback) {\r
-               };\r
-       };\r
-\r
-       /**\r
-        * Runtime class gets implemented by each upload runtime.\r
-        *\r
-        * @class plupload.QueueProgress\r
-        */\r
-\r
-       /**\r
-        * Constructs a queue progress.\r
-        *\r
-        * @constructor\r
-        * @method QueueProgress\r
-        */\r
-        plupload.QueueProgress = function() {\r
-               var self = this; // Setup alias for self to reduce code size when it's compressed\r
-\r
-               /**\r
-                * Total queue file size.\r
-                *\r
-                * @property size\r
-                * @type Number\r
-                */\r
-               self.size = 0;\r
-\r
-               /**\r
-                * Total bytes uploaded.\r
-                *\r
-                * @property loaded\r
-                * @type Number\r
-                */\r
-               self.loaded = 0;\r
-\r
-               /**\r
-                * Number of files uploaded.\r
-                *\r
-                * @property uploaded\r
-                * @type Number\r
-                */\r
-               self.uploaded = 0;\r
-\r
-               /**\r
-                * Number of files failed to upload.\r
-                *\r
-                * @property failed\r
-                * @type Number\r
-                */\r
-               self.failed = 0;\r
-\r
-               /**\r
-                * Number of files yet to be uploaded.\r
-                *\r
-                * @property queued\r
-                * @type Number\r
-                */\r
-               self.queued = 0;\r
-\r
-               /**\r
-                * Total percent of the uploaded bytes.\r
-                *\r
-                * @property percent\r
-                * @type Number\r
-                */\r
-               self.percent = 0;\r
-\r
-               /**\r
-                * Bytes uploaded per second.\r
-                *\r
-                * @property bytesPerSec\r
-                * @type Number\r
-                */\r
-               self.bytesPerSec = 0;\r
-\r
-               /**\r
-                * Resets the progress to it's initial values.\r
-                *\r
-                * @method reset\r
-                */\r
-               self.reset = function() {\r
-                       self.size = self.loaded = self.uploaded = self.failed = self.queued = self.percent = self.bytesPerSec = 0;\r
-               };\r
-       };\r
-\r
-       // Create runtimes namespace\r
-       plupload.runtimes = {};\r
-\r
-       // Expose plupload namespace\r
-       window.plupload = plupload;\r
-})();\r
-/**\r
- * plupload.gears.js\r
- *\r
- * Copyright 2009, Moxiecode Systems AB\r
- * Released under GPL License.\r
- *\r
- * License: http://www.plupload.com/license\r
- *