diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html
index d403b7bd28..77c6e500e8 100644
--- a/phpBB/docs/CHANGELOG.html
+++ b/phpBB/docs/CHANGELOG.html
@@ -53,6 +53,7 @@
- Changelog
+ - Changes since RC-7
- Changes since RC-6
- Changes since RC-5
- Changes since RC-4
@@ -83,9 +84,10 @@
- [Fix] Fixed MSSQL related bug in the update system
- [Fix] Display "Return to" links on unwritable forums (Bug #14824)
+ - [Fix] Mitigating different realpath() handling between PHP versions (fixing confirm box redirects)
- 1.i. Changes since 3.0.RC6
+ 1.ii. Changes since 3.0.RC6
- [Fix] Submitting language changes using acp_language (Bug #14736)
@@ -95,7 +97,7 @@
- [Fix] Able to request new password (Bug #14743)
- 1.ii. Changes since 3.0.RC5
+ 1.iii. Changes since 3.0.RC5
- [Feature] Removing constant PHPBB_EMBEDDED in favor of using an exit_handler(); the constant was meant to achive this more or less.
@@ -158,7 +160,7 @@
- [Sec] New password hashing mechanism for storing passwords (#i42)
- 1.iii. Changes since 3.0.RC4
+ 1.iv. Changes since 3.0.RC4
- [Fix] MySQL, PostgreSQL and SQLite related database fixes (Bug #13862)
@@ -209,7 +211,7 @@
- [Fix] odbc_autocommit causing existing result sets to be dropped (Bug #14182)
- 1.iv. Changes since 3.0.RC3
+ 1.v. Changes since 3.0.RC3
- [Fix] Fixing some subsilver2 and prosilver style issues
@@ -318,7 +320,7 @@
- 1.v. Changes since 3.0.RC2
+ 1.vi. Changes since 3.0.RC2
- [Fix] Re-allow searching within the memberlist
@@ -364,7 +366,7 @@
- 1.vi. Changes since 3.0.RC1
+ 1.vii. Changes since 3.0.RC1
- [Fix] (X)HTML issues within the templates (Bug #11255, #11255)
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index f55a5b4d39..80a6faceca 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -683,6 +683,12 @@ if (!function_exists('realpath'))
// Put the slashes back to the native operating systems slashes
$resolved = str_replace('/', DIRECTORY_SEPARATOR, $resolved);
+ // Check for DIRECTORY_SEPARATOR at the end (and remove it!)
+ if (substr($resolved, -1) == DIRECTORY_SEPARATOR)
+ {
+ return substr($resolved, 0, -1);
+ }
+
return $resolved; // We got here, in the end!
}
}
@@ -694,7 +700,15 @@ else
*/
function phpbb_realpath($path)
{
- return realpath($path);
+ $path = realpath($path);
+
+ // Check for DIRECTORY_SEPARATOR at the end (and remove it!)
+ if (substr($path, -1) == DIRECTORY_SEPARATOR)
+ {
+ return substr($path, 0, -1);
+ }
+
+ return $path;
}
}