SOURCES: cacti-add_template.php - use require to catch errors early

glen glen at pld-linux.org
Sun Oct 5 14:21:21 CEST 2008


Author: glen                         Date: Sun Oct  5 12:21:21 2008 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- use require to catch errors early

---- Files affected:
SOURCES:
   cacti-add_template.php (1.2 -> 1.3) 

---- Diffs:

================================================================
Index: SOURCES/cacti-add_template.php
diff -u SOURCES/cacti-add_template.php:1.2 SOURCES/cacti-add_template.php:1.3
--- SOURCES/cacti-add_template.php:1.2	Sun Oct  5 14:19:27 2008
+++ SOURCES/cacti-add_template.php	Sun Oct  5 14:21:16 2008
@@ -2,13 +2,15 @@
 <?php
 /*
 +---------------------------------------------------------------------------+
-| This script import cacti xml template files by command line		    |
-| Author : Jean Francois Masure <jean-francois.masure at arche.fr>		    |
-| Version : 0.1 8 Aug 2005						    |
+| This script import cacti xml template files by command line               |
+| Author : Jean Francois Masure <jean-francois.masure at arche.fr>             |
+| Version : 0.1 8 Aug 2005                                                  |
+| Modified by PLD Linux Team <http://www.pld-linux.org>                     |
 +---------------------------------------------------------------------------+
 */
-include_once("/usr/share/cacti/include/global.php");
-include_once("/usr/share/cacti/lib/import.php"); 
+
+require_once '/usr/share/cacti/include/global.php';
+require_once '/usr/share/cacti/lib/import.php';
 
 // check if we have good number of argument
 if ($argc < 2 || in_array($argv[1], array('--help', '-help', '-h', '-?'))) {
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/cacti-add_template.php?r1=1.2&r2=1.3&f=u



More information about the pld-cvs-commit mailing list