Fix: link was useless with a nofollow tag.
This commit is contained in:
parent
756919de2a
commit
d7c2bdba38
@ -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')
|
||||
{
|
||||
|
||||
@ -16,6 +16,8 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
// 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);
|
||||
?>
|
||||
<!-- BEGIN PHP TEMPLATE LOGIN.TPL.PHP -->
|
||||
|
||||
@ -71,7 +76,13 @@ $(document).ready(function () {
|
||||
<input type="hidden" name="dol_use_jmobile" id="dol_use_jmobile" value="<?php echo $dol_use_jmobile; ?>" />
|
||||
|
||||
<table class="login_table_title center" title="<?php echo dol_escape_htmltag($title); ?>">
|
||||
<tr class="vmenu"><td class="center"><?php echo dol_escape_htmltag($title); ?></td></tr>
|
||||
<tr class="vmenu"><td class="center">
|
||||
<?php
|
||||
if ($disablenofollow) echo '<a href="https://www.dolibarr.org" target="_blank">';
|
||||
echo dol_escape_htmltag($title);
|
||||
if ($disablenofollow) echo '</a>';
|
||||
?>
|
||||
</td></tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
|
||||
@ -993,9 +993,10 @@ function top_httphead()
|
||||
* @param array $arrayofjs Array of complementary js files
|
||||
* @param array $arrayofcss Array of complementary css files
|
||||
* @param int $disablejmobile Disable jmobile
|
||||
* @param int $disablenofollow Disable no follow tag
|
||||
* @return void
|
||||
*/
|
||||
function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $disablejmobile=0)
|
||||
function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $disablejmobile=0, $disablenofollow=0)
|
||||
{
|
||||
global $user, $conf, $langs, $db;
|
||||
|
||||
@ -1017,7 +1018,7 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
|
||||
print "<head>\n";
|
||||
if (GETPOST('dol_basehref')) print '<base href="'.dol_escape_htmltag(GETPOST('dol_basehref')).'">'."\n";
|
||||
// Displays meta
|
||||
print '<meta name="robots" content="noindex,nofollow">'."\n"; // Do not index
|
||||
print '<meta name="robots" content="noindex'.($disablenofollow?'':',nofollow').'">'."\n"; // Do not index
|
||||
print '<meta name="viewport" content="width=device-width, initial-scale=1.0">'; // Scale for mobile device
|
||||
print '<meta name="author" content="Dolibarr Development Team">'."\n";
|
||||
$favicon=dol_buildpath('/theme/'.$conf->theme.'/img/favicon.ico',1);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user