From 55f9c7031315a9cc47094f6aa2a39a2d2517ffb3 Mon Sep 17 00:00:00 2001
From: ramonn <noreply@pandorafms.org>
Date: Tue, 13 Dec 2011 14:13:29 +0000
Subject: [PATCH] 2011-12-13  Ramon Novoa  <rnovoa@artica.es>

	* DEBIAN/control,
	  DEBIAN/make_deb_package.sh,
	  pandora_server.spec,
	  lib/PandoraFMS/Config.pm,
	  lib/PandoraFMS/Core.pm: Updated version strings.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5252 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
---
 pandora_server/ChangeLog                  | 8 ++++++++
 pandora_server/DEBIAN/control             | 2 +-
 pandora_server/DEBIAN/make_deb_package.sh | 2 +-
 pandora_server/lib/PandoraFMS/Config.pm   | 4 ++--
 pandora_server/lib/PandoraFMS/Core.pm     | 6 +++++-
 pandora_server/pandora_server.spec        | 2 +-
 6 files changed, 18 insertions(+), 6 deletions(-)

diff --git a/pandora_server/ChangeLog b/pandora_server/ChangeLog
index d1b4b6c66e..edd52ebcd6 100644
--- a/pandora_server/ChangeLog
+++ b/pandora_server/ChangeLog
@@ -1,3 +1,11 @@
+2011-12-13  Ramon Novoa  <rnovoa@artica.es>
+
+	* DEBIAN/control,
+	  DEBIAN/make_deb_package.sh,
+	  pandora_server.spec,
+	  lib/PandoraFMS/Config.pm,
+	  lib/PandoraFMS/Core.pm: Updated version strings.
+
 2011-12-12  Sergio Martin <sergio.martin@artica.es>
 
 	* lib/PandoraFMS/Tools.pm
diff --git a/pandora_server/DEBIAN/control b/pandora_server/DEBIAN/control
index 0a9bc9283a..40cc385391 100644
--- a/pandora_server/DEBIAN/control
+++ b/pandora_server/DEBIAN/control
@@ -1,5 +1,5 @@
 package: pandorafms-server
-Version: 4.0
+Version: final
 Architecture: all
 Priority: optional
 Section: admin
diff --git a/pandora_server/DEBIAN/make_deb_package.sh b/pandora_server/DEBIAN/make_deb_package.sh
index 096b1d198e..7a1df487d2 100644
--- a/pandora_server/DEBIAN/make_deb_package.sh
+++ b/pandora_server/DEBIAN/make_deb_package.sh
@@ -14,7 +14,7 @@
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
 
-pandora_version="4.0"
+pandora_version="final"
 
 package_cpan=0
 package_pandora=1
diff --git a/pandora_server/lib/PandoraFMS/Config.pm b/pandora_server/lib/PandoraFMS/Config.pm
index 21380f637e..7681484c1c 100644
--- a/pandora_server/lib/PandoraFMS/Config.pm
+++ b/pandora_server/lib/PandoraFMS/Config.pm
@@ -41,8 +41,8 @@ our @EXPORT = qw(
 	);
 
 # version: Defines actual version of Pandora Server for this module only
-my $pandora_version = "4.0";
-my $pandora_build = "110923";
+my $pandora_version = "final";
+my $pandora_build = "111213";
 our $VERSION = $pandora_version." ".$pandora_build;
 
 # Setup hash
diff --git a/pandora_server/lib/PandoraFMS/Core.pm b/pandora_server/lib/PandoraFMS/Core.pm
index 1be4827951..c1f8769643 100644
--- a/pandora_server/lib/PandoraFMS/Core.pm
+++ b/pandora_server/lib/PandoraFMS/Core.pm
@@ -661,6 +661,7 @@ sub pandora_execute_alert ($$$$$$$$;$) {
 		
 		# Check the action threshold (template_action_threshold takes precedence over action_threshold)
 		my $threshold = 0;
+		$action->{'last_execution'} = 0 unless defined ($action->{'last_execution'});
 		$threshold = $action->{'action_threshold'} if (defined ($action->{'action_threshold'}) && $action->{'action_threshold'} > 0);
 		$threshold = $action->{'module_action_threshold'} if (defined ($action->{'module_action_threshold'}) && $action->{'module_action_threshold'} > 0);
 		if (time () >= ($action->{'last_execution'} + $threshold)) {
@@ -1774,7 +1775,10 @@ sub subst_alert_macros ($$) {
 	my $macro_regexp = join('|', grep { defined $macros->{$_} } keys %{$macros});
 
 	# Macro data may contain HTML entities
-	$string =~ s/($macro_regexp)/decode_entities($macros->{$1})/ige;
+	{
+		no warnings;
+		$string =~ s/($macro_regexp)/decode_entities($macros->{$1})/ige;
+	}
 
 	return $string;
 }
diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec
index edd7e14e06..1b857a2fa0 100644
--- a/pandora_server/pandora_server.spec
+++ b/pandora_server/pandora_server.spec
@@ -2,7 +2,7 @@
 # Pandora FMS Server 
 #
 %define name        pandorafms_server
-%define version     4.0
+%define version     final
 %define release     1
 
 Summary:            Pandora FMS Server