* adjust check onlybody.

* adjust task-record.
This commit is contained in:
wangyidong
2013-01-21 05:26:47 +00:00
parent 89951d5400
commit 844dc2ae10
9 changed files with 25 additions and 6 deletions
+12 -1
View File
@@ -108,7 +108,7 @@ class helper
}
/* if page has onlybody param then add this param in all link. the param hide header and footer. */
if($onlybody or (isset($_GET['onlybody']) and $_GET['onlybody'] == 'yes'))
if($onlybody or isonlybody())
{
$onlybody = $config->requestType == 'PATH_INFO' ? "?onlybody=yes" : "&onlybody=yes";
$link .= $onlybody;
@@ -543,3 +543,14 @@ function getWebRoot()
{
return substr($_SERVER['SCRIPT_NAME'], 0, (strrpos($_SERVER['SCRIPT_NAME'], '/') + 1));
}
/**
* Check exist onlybody param.
*
* @access public
* @return void
*/
function isonlybody()
{
return (isset($_GET['onlybody']) and $_GET['onlybody'] == 'yes');
}