Fix a page with NOLOGIN const set to 1 must be into "public" dir.

This commit is contained in:
Laurent Destailleur 2020-05-04 16:55:53 +02:00
parent f6e0553093
commit f4a9490e7f
2 changed files with 5 additions and 5 deletions

View File

@ -155,9 +155,9 @@ if ($conf->global->TAKEPOS_AUTO_ORDER)
print '<tr class="oddeven value"><td>';
print $langs->trans("Table")." ".$row['label'];
print '<td>';
print "<a target='_blank' href='".$urlwithroot."/takepos/auto_order.php?key=".dol_encode($row['rowid'])."'>".$urlwithroot."/takepos/auto_order.php?key=".dol_encode($row['rowid'])."</a>";
print "<a target='_blank' href='".$urlwithroot."/takepos/public/auto_order.php?key=".dol_encode($row['rowid'])."'>".$urlwithroot."/takepos/public/auto_order.php?key=".dol_encode($row['rowid'])."</a>";
print '<td>';
print "<img src='../genimg/qr.php?id=".dol_encode($row['rowid'])."' height='42' width='42'>";
print "<img src='".DOL_DOCUMENT_ROOT."/takepos/genimg/qr.php?id=".dol_encode($row['rowid'])."' height='42' width='42'>";
print '</td></tr>';
}

View File

@ -16,14 +16,14 @@
*/
/**
* \file htdocs/takepos/auto_order.php
* \file htdocs/takepos/public/auto_order.php
* \ingroup takepos
* \brief Public orders for customers
*/
if (!defined("NOLOGIN")) define("NOLOGIN", '1'); // If this page is public (can be called outside logged session)
if (!defined('NOIPCHECK')) define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip
if (!defined('NOIPCHECK')) define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip
$_SESSION["basiclayout"] = 1;
$_SESSION["publicterminal"] = true; // Is a public customer
require 'phone.php';
require '../phone.php';