* finish task #902.

This commit is contained in:
wangyidong
2012-11-21 02:27:42 +00:00
parent c31392fdad
commit c290f08bbe
2 changed files with 6 additions and 3 deletions
+5 -2
View File
@@ -200,10 +200,13 @@ class common extends control
* @access public
* @return bool
*/
public static function printLink($module, $method, $vars = '', $label, $target = '', $misc = '', $newline = true)
public static function printLink($module, $method, $vars = '', $label, $target = '', $misc = '', $newline = true, $onlyBody = false)
{
if(!common::hasPriv($module, $method)) return false;
echo html::a(helper::createLink($module, $method, $vars), $label, $target, $misc, $newline);
global $config;
$concat = $config->requestType == 'GET' ? '&' : '?';
$onlyBody = $onlyBody ? $concat . "onlybody=yes" : '';
echo html::a(helper::createLink($module, $method, $vars) . $onlyBody, $label, $target, $misc, $newline);
return true;
}