* adjust for tid.

This commit is contained in:
王怡栋
2021-09-09 16:36:01 +08:00
parent db73472ba7
commit 96eea18e3a
3 changed files with 10 additions and 5 deletions
+6 -4
View File
@@ -597,13 +597,15 @@ class router extends baseRouter
*/
public function getURI($full = false)
{
$URI = !empty($this->rawURI) ? $this->rawURI : $this->URI;
$URI = !empty($this->rawURI) ? $this->rawURI : $this->URI;
$tidParam = ($this->config->requestType == 'PATH_INFO' and helper::isWithTID()) ? "?tid={$_GET['tid']}" : '';
if($full and $this->config->requestType == 'PATH_INFO')
{
if($URI) return $this->config->webRoot . $URI . '.' . $this->viewType;
return $this->config->webRoot;
if($URI) return $this->config->webRoot . $URI . '.' . $this->viewType . $tidParam;
return $this->config->webRoot . $tidParam;
}
return $URI;
return $URI . $tidParam;
}
/**
+1
View File
@@ -487,6 +487,7 @@ class user extends control
{
$this->referer = $this->server->http_referer ? $this->server->http_referer: '';
if(!empty($referer)) $this->referer = helper::safe64Decode($referer);
if($this->post->referer) $this->referer = $this->post->referer;
/* Build zentao link regular. */
$webRoot = $this->config->webRoot;
+3 -1
View File
@@ -54,6 +54,9 @@
}
}
sessionStorage.setItem('TID', _tid);
var link = $.parseLink(window.location.href);
if(!link.tid) window.location.href = convertUrlWithTid(window.location.href, _tid);
}
$.tabSession =
@@ -62,7 +65,6 @@
convertUrlWithTid: convertUrlWithTid,
};
/* Handle all links in page */
$('a').each(function()
{