Fix: Check consitency of option NOREQUIREXXX

This commit is contained in:
Laurent Destailleur 2013-02-24 14:54:08 +01:00
parent 0b61c740a9
commit 6b20370ffa
2 changed files with 6 additions and 1 deletions

View File

@ -26,6 +26,7 @@ define('NOLOGIN',1);
if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER',1);
if (! defined('NOREQUIREDB')) define('NOREQUIREDB',1);
if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN',1);
if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU',1);
if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC',1);
if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL',1);

View File

@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2002-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2003 Xavier Dutoit <doli@sydesy.com>
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
@ -137,6 +137,10 @@ function analyse_sql_and_script(&$var, $type)
}
}
// Check consitency of NOREQUIREXXX DEFINES
if ((defined('NOREQUIREDB') || defined('NOREQUIRETRAN')) && ! defined('NOREQUIREMENU')) dol_print_error('','If define NOREQUIREDB or NOREQUIRETRAN are set, you must also set NOREQUIREMENU or not use them');
// Sanity check on URL
if (! empty($_SERVER["PHP_SELF"]))
{