Laurent Destailleur 11 hónapja
szülő
commit
11491bb067
2 módosított fájl, 7 hozzáadás és 7 törlés
  1. 6 6
      build/generate_filelist_xml.php
  2. 1 1
      htdocs/filefunc.inc.php

+ 6 - 6
build/generate_filelist_xml.php

@@ -51,7 +51,7 @@ $buildzip = 0;
 if (empty($argv[1])) {
 	print "Usage:   ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value] [buildzip=1]\n";
 	print "Example: ".$script_file." release=6.0.0 includecustom=1 includeconstant=FR:INVOICE_CAN_ALWAYS_BE_REMOVED:0 includeconstant=all:MAILING_NO_USING_PHPMAIL:1\n";
-	exit -1;
+	exit(1);
 }
 
 
@@ -87,7 +87,7 @@ while ($i < $argc) {
 if (empty($release)) {
 	print "Error: Missing release parameter\n";
 	print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n";
-	exit -1;
+	exit(2);
 }
 
 $savrelease = $release;
@@ -107,21 +107,21 @@ if (empty($includecustom)) {
 		if (DOL_VERSION != $tmpverbis[0] && $savrelease != 'auto') {
 			print 'Error: When parameter "includecustom" is not set and there is no suffix in release parameter, version declared into filefunc.in.php ('.DOL_VERSION.') must be exact same value than "release" parameter ('.$tmpverbis[0].')'."\n";
 			print "Usage:   ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n";
-			exit -1;
+			exit(3);
 		}
 	} else {
 		$tmpverter = explode('-', DOL_VERSION, 2);
 		if ($tmpverter[0] != $tmpverbis[0]) {
 			print 'Error: When parameter "includecustom" is not set, version declared into filefunc.in.php ('.DOL_VERSION.') must have value without prefix ('.$tmpverter[0].') that is exact same value than "release" parameter ('.$tmpverbis[0].')'."\n";
 			print "Usage:   ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n";
-			exit -1;
+			exit(4);
 		}
 	}
 } else {
 	if (!preg_match('/'.preg_quote(DOL_VERSION, '/').'-/', $release)) {
 		print 'Error: When parameter "includecustom" is set, version declared into filefunc.inc.php ('.DOL_VERSION.') must be used with a suffix into "release" parameter (ex: '.DOL_VERSION.'-mydistrib).'."\n";
 		print "Usage:   ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n";
-		exit -1;
+		exit(5);
 	}
 }
 
@@ -147,7 +147,7 @@ $outputfile = $outputdir.'/filelist-'.$release.'.xml';
 $fp = fopen($outputfile, 'w');
 if (empty($fp)) {
 	print 'Failed to open file '.$outputfile."\n";
-	exit(-1);
+	exit(6);
 }
 
 fputs($fp, '<?xml version="1.0" encoding="UTF-8" ?>'."\n");

+ 1 - 1
htdocs/filefunc.inc.php

@@ -207,7 +207,7 @@ define('DOL_DOCUMENT_ROOT', $dolibarr_main_document_root); // Filesystem core ph
 if (!file_exists(DOL_DOCUMENT_ROOT."/core/lib/functions.lib.php")) {
 	print "Error: Dolibarr config file content seems to be not correctly defined.<br>\n";
 	print "Please run dolibarr setup by calling page <b>/install</b>.<br>\n";
-	exit;
+	exit(1);
 }