From fee794f39b0868c6bc90c70d6a9ffdf5b75d4915 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Sat, 10 Nov 2007 15:27:06 +0000 Subject: [PATCH] constants defined twice --- libraries/export/codegen.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/libraries/export/codegen.php b/libraries/export/codegen.php index 45c07cca7..72ef5650d 100644 --- a/libraries/export/codegen.php +++ b/libraries/export/codegen.php @@ -6,11 +6,14 @@ * @version $Id$ */ -define("CG_FORMAT_NHIBERNATE_CS", "NHibernate C# DO"); -define("CG_FORMAT_NHIBERNATE_XML", "NHibernate XML"); +// this gets executed twice so avoid a notice +if (! defined('CG_FORMAT_NHIBERNATE_CS')) { + define("CG_FORMAT_NHIBERNATE_CS", "NHibernate C# DO"); + define("CG_FORMAT_NHIBERNATE_XML", "NHibernate XML"); -define("CG_HANDLER_NHIBERNATE_CS_BODY", "handleNHibernateCSBody"); -define("CG_HANDLER_NHIBERNATE_XML_BODY", "handleNHibernateXMLBody"); + define("CG_HANDLER_NHIBERNATE_CS_BODY", "handleNHibernateCSBody"); + define("CG_HANDLER_NHIBERNATE_XML_BODY", "handleNHibernateXMLBody"); +} $CG_FORMATS = array(CG_FORMAT_NHIBERNATE_CS, CG_FORMAT_NHIBERNATE_XML); $CG_HANDLERS = array(CG_HANDLER_NHIBERNATE_CS_BODY, CG_HANDLER_NHIBERNATE_XML_BODY);