From 56c7bf4aed5ad4d50387d3ef2ef21181554a9ae7 Mon Sep 17 00:00:00 2001
From: raulmateos <noreply@pandorafms.org>
Date: Sat, 5 Dec 2009 11:38:12 +0000
Subject: [PATCH] 2009-12-05 Raul Mateos  <raulofpandora@gmail.com>

	* install.php: Modified description for XML_RPC.

	* extensions/pdate_manager/lib/libupdate_manager_client.php:
	Format error page if XML_PRC not found.

git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2162 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
---
 pandora_console/ChangeLog                     |  7 ++++
 .../lib/libupdate_manager_client.php          | 37 ++++++++++++++++++-
 pandora_console/install.php                   |  2 +-
 3 files changed, 44 insertions(+), 2 deletions(-)

diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog
index cdd0f3e6ef..531c3453b1 100644
--- a/pandora_console/ChangeLog
+++ b/pandora_console/ChangeLog
@@ -1,3 +1,10 @@
+2009-12-05 Raul Mateos  <raulofpandora@gmail.com>
+
+	* install.php: Modified description for XML_RPC.
+
+	* extensions/pdate_manager/lib/libupdate_manager_client.php:
+	Format error page if XML_PRC not found.
+
 2009-12-05 Raul Mateos  <raulofpandora@gmail.com>
 
 	* images/pandora.png, pandora_logo.jpg: Deleted old files.
diff --git a/pandora_console/extensions/update_manager/lib/libupdate_manager_client.php b/pandora_console/extensions/update_manager/lib/libupdate_manager_client.php
index b32fec3138..e8535528ea 100644
--- a/pandora_console/extensions/update_manager/lib/libupdate_manager_client.php
+++ b/pandora_console/extensions/update_manager/lib/libupdate_manager_client.php
@@ -15,7 +15,42 @@
 
 $prev_level = error_reporting (0);
 if ((include_once ('XML/RPC.php')) != 1)
-	die ('<p>PEAR::XML_RPC not found. Please install it with: <pre>pear install XML_RPC</pre></p>');
+	die ('
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<title>Pandora FMS - The Flexible Monitoring System - Console error</title>
+<meta http-equiv="expires" content="0">
+<meta http-equiv="content-type" content="text/html; charset=utf8">
+<meta name="resource-type" content="document">
+<meta name="distribution" content="global">
+<meta name="author" content="Sancho Lerena">
+<meta name="copyright" content="This is GPL software. Created by Sancho Lerena and others">
+<meta name="keywords" content="pandora, monitoring, system, GPL, software">
+<meta name="robots" content="index, follow">
+<link rel="icon" href="images/pandora.ico" type="image/ico">
+<link rel="stylesheet" href="include/styles/pandora.css" type="text/css">
+</head>
+<body>
+<div id="main" style="float:left; margin-left: 100px">
+<div align="center">
+<div id="login_f">
+	<h1 id="log_f" class="error">PEAR::XML_RPC not found</h1>
+	<div>
+		<img src="images/pandora_logo.png" border="0"></a>
+	</div>
+	<div class="msg">
+		<span class="error"><b>ERROR:</b> PEAR::XML_RPC not found</span>
+		<p>
+		Please install it from command line with:
+		<pre>sudo pear install XML_RPC</pre>
+		</p>
+	</div>
+</div>
+</div>
+</body>
+</html>
+');
 error_reporting ($prev_level);
 unset ($prev_level);
 
diff --git a/pandora_console/install.php b/pandora_console/install.php
index c61bfe2437..9b5dbe883b 100644
--- a/pandora_console/install.php
+++ b/pandora_console/install.php
@@ -240,7 +240,7 @@ function install_step2() {
 			$res += check_extension("gettext","PHP gettext extension");
 			$res += check_include("PEAR.php","PEAR PHP Library");
 			$res += check_include("DB.php","PEAR:DB PHP Library");
-			$res += check_include("XML/RPC.php","PEAR XML/RPC.php PHP Library");
+			$res += check_include("XML/RPC.php","PEAR::XML_RPC PHP Library");
 			$res += check_exists ("/usr/bin/twopi","Graphviz Binary");
 
 			echo "</table>