------------------------------------------------------------
revno: 1018
committer: Roger Martin <[email protected]>
branch nick: aikiframework
timestamp: Tue 2012-01-10 23:55:09 +0100
message:
Bug #912632 corrected. [route-local] added
modified:
libs/aiki.php
--
lp:aikiframework
https://code.launchpad.net/~aikiframework-devel/aikiframework/trunk
Your team Aiki Framework Developers is subscribed to branch lp:aikiframework.
To unsubscribe from this branch go to
https://code.launchpad.net/~aikiframework-devel/aikiframework/trunk/+edit-subscription
=== modified file 'libs/aiki.php'
--- libs/aiki.php 2012-01-10 22:33:42 +0000
+++ libs/aiki.php 2012-01-10 22:55:09 +0000
@@ -403,8 +403,8 @@
$language = $aiki->site->language();
$prefix = $aiki->site->prefix();
$view_prefix= $aiki->site->view_prefix();
- $paths[] = $url;
-
+
+ $paths= array();
if ($prefix) {
$paths[] = $prefix;
}
@@ -414,11 +414,13 @@
if ( count($aiki->site->languages()) > 1 ) {
$paths[] = $language;
}
-
+ $paths = implode("/",$paths);
+
if ( isset($_SERVER["HTTPS"])) {
$url = str_replace("http://", "https://", $url);
- }
-
+ }
+ $trimedUrl = preg_replace('#/$#',"",$url); // reg: remove ending /
+
$bufferReplace = array(
'[userid]' => $aiki->membership->userid,
'[full_name]' => $aiki->membership->full_name,
@@ -437,11 +439,12 @@
'current_year' => $current_year,
'current_day' => $current_day,
'[root]' => $url,
- '[root-language]' => $url . "/" . $aiki->site->language(),
+ '[root-language]' => $trimedUrl . "/" . $aiki->site->language(),
'[site_prefix]' => $prefix ,
'[view_prefix]' => $view_prefix ,
- '[route]' => implode("/",$paths) );
-
+ '[route]' => $trimedUrl. "/". $paths,
+ '[route-local]' => $paths );
+
// substitute all [POST[key]] and [GET[key]]
if ( $aiki->config->get("show_gets", true) ){
foreach ( $_GET as $key => $value ){
_______________________________________________
Mailing list: https://launchpad.net/~aikiframework-devel
Post to : [email protected]
Unsubscribe : https://launchpad.net/~aikiframework-devel
More help : https://help.launchpad.net/ListHelp