浏览代码

Fix: for avoid error with main context hooks, with $langs object for
example.

Regis Houssin 10 年之前
父节点
当前提交
e82f4c474b
共有 2 个文件被更改,包括 3 次插入2 次删除
  1. 2 1
      htdocs/core/ajax/constantonoff.php
  2. 1 1
      htdocs/main.inc.php

+ 2 - 1
htdocs/core/ajax/constantonoff.php

@@ -1,5 +1,5 @@
 <?php
-/* Copyright (C) 2011-2012 Regis Houssin  <regis.houssin@capnetworks.com>
+/* Copyright (C) 2011-2015 Regis Houssin  <regis.houssin@capnetworks.com>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -26,6 +26,7 @@ if (! defined('NOREQUIREHTML'))  define('NOREQUIREHTML','1');
 if (! defined('NOREQUIREAJAX'))  define('NOREQUIREAJAX','1');
 if (! defined('NOREQUIRESOC'))   define('NOREQUIRESOC','1');
 if (! defined('NOREQUIRETRAN'))  define('NOREQUIRETRAN','1');
+if (! defined('NOREQUIREHOOK'))  define('NOREQUIREHOOK','1');
 
 require '../../main.inc.php';
 require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';

+ 1 - 1
htdocs/main.inc.php

@@ -575,7 +575,7 @@ if (! defined('NOLOGIN'))
             exit;
         }
         else
-       {
+		{
 	       // Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
 	       $hookmanager->initHooks(array('main'));