diff --git a/htdocs/core/antispamimage.php b/htdocs/core/antispamimage.php index cbce684a88d..a8830a5a4eb 100644 --- a/htdocs/core/antispamimage.php +++ b/htdocs/core/antispamimage.php @@ -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); diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 10d67ff3a64..8897df31b6f 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -1,7 +1,7 @@ * Copyright (C) 2003 Xavier Dutoit - * Copyright (C) 2004-2012 Laurent Destailleur + * Copyright (C) 2004-2013 Laurent Destailleur * Copyright (C) 2004 Sebastien Di Cintio * Copyright (C) 2004 Benoit Mortier * Copyright (C) 2005-2012 Regis Houssin @@ -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"])) {