summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-11-01 20:21:20 +0100
committerAndrey Andreev <narf@bofh.bg>2012-11-01 20:21:20 +0100
commit254735ee011d99f5c7fe3825849d7ec0b54bd4e1 (patch)
tree484a8a077d2f3e230acf42d17767abfbebb81a6b
parentd1097a1dc30f40c68bc4a5c89d3fadb295c55e56 (diff)
Fix issue #122
-rw-r--r--system/core/URI.php9
-rw-r--r--user_guide_src/source/changelog.rst1
2 files changed, 9 insertions, 1 deletions
diff --git a/system/core/URI.php b/system/core/URI.php
index 2f6cade34..e2cac8d89 100644
--- a/system/core/URI.php
+++ b/system/core/URI.php
@@ -696,7 +696,14 @@ class CI_URI {
*/
public function ruri_string()
{
- return implode('/', $this->rsegment_array());
+ global $RTR;
+
+ if (($dir = $RTR->fetch_directory()) === '/')
+ {
+ $dir = '';
+ }
+
+ return $dir.implode('/', $this->rsegment_array());
}
}
diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst
index 8363d2797..a4af27254 100644
--- a/user_guide_src/source/changelog.rst
+++ b/user_guide_src/source/changelog.rst
@@ -411,6 +411,7 @@ Bug fixes for 3.0
- Fixed a bug (#658) - :doc:`Routing <general/routing>` wildcard **:any** didn't work as advertised and matched multiple URI segments instead of all characters within a single segment.
- Fixed a bug (#1938) - :doc:`Email Library <libraries/email>` removed multiple spaces inside a pre-formatted plain text message.
- Fixed a bug (#388, #705) - :doc:`URI Library <libraries/uri>` didn't apply URL-decoding to URI segments that it got from **REQUEST_URI** and/or **QUERY_STRING**.
+- Fixed a bug (#122) - :doc:`URI Library <libraries/uri>` method ``ruri_string()`` didn't include a directory if one is used.
Version 2.1.3
=============