From 967991f31ad3f4eec84777137be7702859c56394 Mon Sep 17 00:00:00 2001
From: Regis Houssin <regis.houssin@capnetworks.com>
Date: Mon, 18 Aug 2014 08:36:58 +0200
Subject: [PATCH] Fix: project builddoc trigger is used now

---
 htdocs/core/modules/project/modules_project.php            | 6 +++---
 htdocs/core/triggers/interface_90_all_Demo.class.php-NORUN | 6 +++++-
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/htdocs/core/modules/project/modules_project.php b/htdocs/core/modules/project/modules_project.php
index 2595485eac1..706a10fc474 100644
--- a/htdocs/core/modules/project/modules_project.php
+++ b/htdocs/core/modules/project/modules_project.php
@@ -1,5 +1,5 @@
 <?php
-/* Copyright (C) 2010 Regis Houssin  <regis.houssin@capnetworks.com>
+/* Copyright (C) 2010-2014	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
@@ -225,10 +225,10 @@ function project_pdf_create($db, $object, $modele, $outputlangs, $hidedetails=0,
 			dol_meta_create($object);
 
 			// Appel des triggers
-			/*include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
+			include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
 			$interface=new Interfaces($db);
 			$result=$interface->run_triggers('PROJECT_BUILDDOC',$object,$user,$langs,$conf);
-			if ($result < 0) { $error++; $this->errors=$interface->errors; }*/
+			if ($result < 0) { $error++; $this->errors=$interface->errors; }
 			// Fin appel triggers
 
 			return 1;
diff --git a/htdocs/core/triggers/interface_90_all_Demo.class.php-NORUN b/htdocs/core/triggers/interface_90_all_Demo.class.php-NORUN
index f0f96961b86..be0ec9346ae 100644
--- a/htdocs/core/triggers/interface_90_all_Demo.class.php-NORUN
+++ b/htdocs/core/triggers/interface_90_all_Demo.class.php-NORUN
@@ -1,6 +1,6 @@
 <?php
 /* Copyright (C) 2005-2011 Laurent Destailleur  <eldy@users.sourceforge.net>
- * Copyright (C) 2005-2011 Regis Houssin        <regis.houssin@capnetworks.com>
+ * Copyright (C) 2005-2014 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
@@ -575,6 +575,10 @@ class InterfaceDemo
         {
             dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
         }
+        elseif ($action == 'PROJECT_BUILDDOC')
+        {
+            dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
+        }
         
         // Project tasks
         elseif ($action == 'TASK_CREATE')
-- 
GitLab