SF.net SVN: phpwiki:[10926] trunk/lib
vargenau--- via phpwiki-checkins <[email protected]> Fri, 21 Jan 2022 16:03:01 +0000
| Newsgroups | gmane.comp.web.wiki.phpwiki.checkins |
|---|---|
| Message-ID | <[email protected]> |
Revision: 10926
http://sourceforge.net/p/phpwiki/code/10926
Author: vargenau
Date: 2022-01-21 16:03:01 +0000 (Fri, 21 Jan 2022)
Log Message:
-----------
Remove old Windows stuff
Modified Paths:
--------------
trunk/lib/Request.php
trunk/lib/loadsave.php
Modified: trunk/lib/Request.php
===================================================================
--- trunk/lib/Request.php 2022-01-21 08:43:24 UTC (rev 10925)
+++ trunk/lib/Request.php 2022-01-21 16:03:01 UTC (rev 10926)
@@ -656,13 +656,6 @@
}
}
-/* Win32 Note:
- [\winnt\php.ini]
- You must set "upload_tmp_dir" = "/tmp/" or "C:/tmp/"
- Best on the same drive as apache, with forward slashes
- and with ending slash!
- Otherwise "\\" => "" and the uploaded file will not be found.
-*/
class Request_UploadedFile
{
function __construct($fileinfo)
@@ -702,29 +695,10 @@
return false;
}
- // With windows/php 4.2.1 is_uploaded_file() always returns false.
- // Be sure that upload_tmp_dir ends with a slash!
if (!is_uploaded_file($fileinfo['tmp_name'])) {
- if (isWindows()) {
- if (!$tmp_file = get_cfg_var('upload_tmp_dir')) {
- $tmp_file = dirname(tempnam('', ''));
- }
- $tmp_file .= '/' . basename($fileinfo['tmp_name']);
- /* ending slash in php.ini upload_tmp_dir is required. */
- if (realpath(preg_replace('#/+#', '/', $tmp_file)) != realpath($fileinfo['tmp_name'])) {
- trigger_error(sprintf("Uploaded tmpfile illegal: %s != %s.", $tmp_file, $fileinfo['tmp_name']) .
- "\n" .
- "Probably illegal TEMP environment or upload_tmp_dir setting. " .
- "Esp. on WINDOWS be sure to set upload_tmp_dir in php.ini to use forward slashes and " .
- "end with a slash. upload_tmp_dir = \"C:/WINDOWS/TEMP/\" is good suggestion.",
- E_USER_ERROR);
- return false;
- }
- } else {
- trigger_error(sprintf("Uploaded tmpfile %s not found.", $fileinfo['tmp_name']) . "\n" .
- " Probably illegal TEMP environment or upload_tmp_dir setting.",
- E_USER_WARNING);
- }
+ trigger_error(sprintf("Uploaded tmpfile %s not found.", $fileinfo['tmp_name']) . "\n" .
+ " Probably illegal TEMP environment or upload_tmp_dir setting.",
+ E_USER_WARNING);
}
return new Request_UploadedFile($fileinfo);
}
Modified: trunk/lib/loadsave.php
===================================================================
--- trunk/lib/loadsave.php 2022-01-21 08:43:24 UTC (rev 10925)
+++ trunk/lib/loadsave.php 2022-01-21 16:03:01 UTC (rev 10926)
@@ -658,9 +658,6 @@
$dirname = dirname($filename);
if ($directory)
mkdir_p($directory . "/" . $dirname);
- // Fails with "XX / YY", "XX" is created, "XX / YY" cannot be written
- // interesting Windows bug: cannot mkdir "bla "
- // Since dumps needs to be copied, we have to disallow this for all platforms.
$filename = preg_replace("/ \//", "/", $filename);
$relative_base = "../";
while ($count > 1) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.