rpms/pnp4nagios/F-13 pnp4nagios-php53.patch, NONE, 1.1 pnp4nagios.spec, 1.9, 1.10

Xavier Bachelot xavierb at fedoraproject.org
Mon Jul 19 01:47:49 UTC 2010


Author: xavierb

Update of /cvs/pkgs/rpms/pnp4nagios/F-13
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv11807/F-13

Modified Files:
	pnp4nagios.spec 
Added Files:
	pnp4nagios-php53.patch 
Log Message:
* Sun Jul 18 2010 Xavier Bachelot <xavier at bachelot.org> 0.4.14-3
- Add patch to fix PHP deprecated warnings with PHP 5.3.
  (Patch from Jan Ondrej - RHBZ#572851)


pnp4nagios-php53.patch:
 function.inc.php |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

--- NEW FILE pnp4nagios-php53.patch ---
--- share/pnp/include/function.inc.php.old	2009-08-27 23:40:59.000000000 +0200
+++ share/pnp/include/function.inc.php	2010-03-12 08:43:28.000000000 +0100
@@ -1029,7 +1029,7 @@
 		}
 	}
 
-	$pdf =& new PDF('P', 'mm', 'A4');
+	$pdf = new PDF('P', 'mm', 'A4');
 	$pdf->AliasNbPages();
         $pdf->SetAutoPageBreak('off');
 	$pdf->SetMargins(12.5,25,10);
@@ -1538,7 +1538,7 @@
                 $NAGIOS['RRD'][$tag][$dsl] = urldecode($value);
             }
 
-            if($level == 2 && $type == "complete" && eregi("^NAGIOS_",$tag)){
+            if($level == 2 && $type == "complete" && preg_match("/^NAGIOS_/i",$tag)){
                 if(isset($xml_elem['value'])){
                     $value = $xml_elem['value'];
                 }else{
@@ -1569,7 +1569,7 @@
 	$PAGE="";
 	$allowed_tags = array("page", "graph");
 	foreach($data as $line){
-		if(ereg('(^#|^;)',$line)) {
+		if(preg_match('/(^#|^;)/',$line)) {
 			continue;
 		}
 


Index: pnp4nagios.spec
===================================================================
RCS file: /cvs/pkgs/rpms/pnp4nagios/F-13/pnp4nagios.spec,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -p -r1.9 -r1.10
--- pnp4nagios.spec	27 Aug 2009 21:36:31 -0000	1.9
+++ pnp4nagios.spec	19 Jul 2010 01:47:49 -0000	1.10
@@ -1,6 +1,6 @@
 Name:           pnp4nagios
 Version:        0.4.14
-Release:        2%{?dist}
+Release:        3%{?dist}
 Summary:        Nagios performance data analysis tool
 
 Group:          Applications/System
@@ -12,6 +12,7 @@ Source2:        pnp4nagios-npcd.sysvinit
 Source3:        pnp4nagios-README.fedora
 Patch1:         pnp4nagios-0.4.14-change_broker_install_location.patch
 Patch2:         pnp4nagios-0.4.14-verify_pnp_config.in_rev654.patch
+Patch3:         pnp4nagios-php53.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:  rrdtool-perl
@@ -38,6 +39,9 @@ and stores them automatically into RRD-d
 # Update verify_pnp_config script for bugfixes
 %patch2 -p1
 
+# Fix PHP deprecated warnings with php 5.3
+%patch3 -p0
+
 # Fix file encoding and end of line
 pushd contrib
 iconv -f iso8859-1 -t utf-8 verify_pnp_config.txt > verify_pnp_config.txt.utf8
@@ -124,6 +128,10 @@ fi
 
 
 %changelog
+* Sun Jul 18 2010 Xavier Bachelot <xavier at bachelot.org> 0.4.14-3
+- Add patch to fix PHP deprecated warnings with PHP 5.3.
+  (Patch from Jan Ondrej - RHBZ#572851)
+
 * Tue Aug 27 2009 Xavier Bachelot <xavier at bachelot.org> 0.4.14-2
 - Ship contrib directory as doc.
 



More information about the scm-commits mailing list