diff --git a/htdocs/core/lib/security.lib.php b/htdocs/core/lib/security.lib.php
index 4cfc077f0be..ced20a79ea6 100644
--- a/htdocs/core/lib/security.lib.php
+++ b/htdocs/core/lib/security.lib.php
@@ -339,7 +339,8 @@ function restrictedArea($user, $features, $objectid=0, $tableandshare='', $featu
}
/**
- * Check access by user to object
+ * Check access by user to object.
+ * This function is also called by restrictedArea
*
* @param User $user User to check
* @param array $featuresarray Features/modules to check
@@ -348,8 +349,8 @@ function restrictedArea($user, $features, $objectid=0, $tableandshare='', $featu
* @param string $feature2 Feature to check, second level of permission (optional). Can be or check with 'level1|level2'.
* @param string $dbt_keyfield Field name for socid foreign key if not fk_soc. Not used if objectid is null (optional)
* @param string $dbt_select Field name for select if not rowid. Not used if objectid is null (optional)
- *
* @return bool True if user has access, False otherwise
+ * @see restrictedArea
*/
function checkUserAccessToObject($user, $featuresarray, $objectid=0, $tableandshare='', $feature2='', $dbt_keyfield='', $dbt_select='rowid')
{
diff --git a/htdocs/core/tpl/login.tpl.php b/htdocs/core/tpl/login.tpl.php
index a9d7c73ae1a..b3a2ced1023 100644
--- a/htdocs/core/tpl/login.tpl.php
+++ b/htdocs/core/tpl/login.tpl.php
@@ -16,6 +16,8 @@
* along with this program. If not, see .
*/
+// Need global variable $title to be defined
+
header('Cache-Control: Public, must-revalidate');
header("Content-type: text/html; charset=".$conf->file->character_set_client);
@@ -35,7 +37,10 @@ $arrayofjs=array(
);
$titleofloginpage=$langs->trans('Login').' @ '.$titletruedolibarrversion; // $titletruedolibarrversion is defined by dol_loginfunction in security2.lib.php. We must keep the @, some tools use it to know it is login page and find true dolibarr version.
-print top_htmlhead('',$titleofloginpage,0,0,$arrayofjs);
+$disablenofollow=1;
+if (! preg_match('/'.constant('DOL_APPLICATION_TITLE').'/', $title)) $disablenofollow=0;
+
+print top_htmlhead('', $titleofloginpage, 0, 0, $arrayofjs, array(), 0, $disablenofollow);
?>
@@ -71,7 +76,13 @@ $(document).ready(function () {