Merge branch 'sprint/221_tianshujie_issue' into 'master'

Sprint/221 tianshujie issue

See merge request easycorp/zentaopms!4810
This commit is contained in:
王怡栋
2022-08-05 02:34:09 +00:00
5 changed files with 24 additions and 54 deletions
+4 -2
View File
@@ -1521,10 +1521,12 @@ class commonModel extends model
public static function printLink($module, $method, $vars = '', $label = '', $target = '', $misc = '', $newline = true, $onlyBody = false, $object = null)
{
/* Add data-app attribute. */
global $app;
global $app, $config;
$currentModule = strtolower($module);
$currentMethod = strtolower($method);
if(strpos($misc, 'data-app') === false) $misc .= ' data-app="' . $app->tab . '"';
if(!commonModel::hasPriv($module, $method, $object)) return false;
if(!commonModel::hasPriv($module, $method, $object) and !in_array("$currentModule.$currentMethod", $config->openMethods)) return false;
echo html::a(helper::createLink($module, $method, $vars, '', $onlyBody), $label, $target, $misc, $newline);
return true;
}