#8715: non-admins can not import pages from their own directory
authorMartin Kutschker <martin.t.kutschker@blackbox.net>
Sat, 1 Nov 2008 18:47:50 +0000 (18:47 +0000)
committerMartin Kutschker <martin.t.kutschker@blackbox.net>
Sat, 1 Nov 2008 18:47:50 +0000 (18:47 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@4409 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/impexp/app/index.php

index a7963ae..c0b28ba 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+
+2008-11-01  Martin Kutschker  <masi@typo3.org>
+
+       * Fixed bug #8715: non-admins can not import pages from their own directory (thanks to Johannes Pieper)
+
 2008-11-01  Oliver Hader  <oliver@typo3.org>
 
        * Added feature #6637: Integrate possibility to reverse order of rootline HMENU (thanks to Ralf Hettinger)
index 8565201..287af2c 100755 (executable)
@@ -1126,16 +1126,21 @@ class SC_mod_tools_log_index extends t3lib_SCbase {
                                // OUTPUT creation:
                        $menuItems = array();
 
+                       // Make input selector:
+                       $path = $GLOBALS['TYPO3_CONF_VARS']['BE']['fileadminDir'];      // must have trailing slash.
+                       $filesInDir = t3lib_div::getFilesInDir(PATH_site.$path, 't3d,xml', 1, 1);
+                       
+                       $userPath = $this->userSaveFolder(); //Files from User-Dir
+                       $filesInUserDir = t3lib_div::getFilesInDir($userPath, 't3d,xml', 1, 1);
+                       
+                       $filesInDir = array_merge($filesInUserDir, $filesInDir);
 
-                               // Make input selector:
-                       $path = 'fileadmin/';   // must have trailing slash.
-                       $filesInDir = t3lib_div::getFilesInDir(PATH_site.$path,'t3d,xml',1,1);
                        if (is_dir(PATH_site.$path.'export/'))  {
-                               $filesInDir = array_merge($filesInDir, t3lib_div::getFilesInDir(PATH_site.$path.'export/','t3d,xml',1,1));
+                               $filesInDir = array_merge($filesInDir, t3lib_div::getFilesInDir(PATH_site . $path . 'export/', 't3d,xml', 1, 1));
                        }
                        $tempFolder = $this->userTempFolder();
                        if ($tempFolder)        {
-                               $temp_filesInDir = t3lib_div::getFilesInDir($tempFolder,'t3d,xml',1,1);
+                               $temp_filesInDir = t3lib_div::getFilesInDir($tempFolder, 't3d,xml', 1, 1);
                                $filesInDir = array_merge($filesInDir, $temp_filesInDir);
                        }