* adjust for add tid for session.
This commit is contained in:
@@ -160,9 +160,12 @@ class baseHelper
|
||||
public static function processOnlyBodyParam($link, $onlyBody = false)
|
||||
{
|
||||
global $config;
|
||||
if(!$onlyBody and !self::inOnlyBodyMode()) return $link;
|
||||
$onlybodyString = strpos($link, '?') === false ? "?onlybody=yes" : "&onlybody=yes";
|
||||
return $link . $onlybodyString;
|
||||
|
||||
$sign = strpos($link, '?') === false ? "?" : "&";
|
||||
$appendString = '';
|
||||
if($onlyBody or self::inOnlyBodyMode()) $appendString = $sign . "onlybody=yes";
|
||||
if(self::isWithTID()) $appendString .= empty($appendString) ? "{$sign}tid={$_GET['tid']}" : "&tid={$_GET['tid']}";
|
||||
return $link . $appendString;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -177,6 +180,18 @@ class baseHelper
|
||||
return (isset($_GET['onlybody']) and $_GET['onlybody'] == 'yes');
|
||||
}
|
||||
|
||||
/**
|
||||
* Is with tid.
|
||||
*
|
||||
* @static
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
public static function isWithTID()
|
||||
{
|
||||
return (!empty($config->tabSession) and isset($_GET['tid']));
|
||||
}
|
||||
|
||||
/**
|
||||
* 使用helper::import()来引入文件,不要直接使用include或者require.
|
||||
* Using helper::import() to import a file, instead of include or require.
|
||||
|
||||
Reference in New Issue
Block a user