X-Git-Url: https://dev.renevier.net/gitweb.cgi?a=blobdiff_plain;f=application%2Fviews%2Fhelpers%2FUriPath.php;fp=application%2Fviews%2Fhelpers%2FUriPath.php;h=8d267d54ba8480ddeff58ff52411e72bd5df6201;hb=627f937d7241dc4b9311759fa446c3738d05f5a9;hp=0000000000000000000000000000000000000000;hpb=bd3de07b5ee90369741ef197230b4744f33eeda1;p=syj.git diff --git a/application/views/helpers/UriPath.php b/application/views/helpers/UriPath.php new file mode 100644 index 0000000..8d267d5 --- /dev/null +++ b/application/views/helpers/UriPath.php @@ -0,0 +1,17 @@ +getRequest()->getRequestUri(); + if (($pos = strpos($uri, '?')) !== false) { + $uri = substr($uri, 0, $pos); + } + if ($encoded) { + $uri = implode('/', array_map('urlencode', explode('/', $uri))); + } + return $uri; + } +}