From baa1f3ed2be8b1d54d6bdf9a61e3b9c85f57ddc2 Mon Sep 17 00:00:00 2001
From: Laurent Destailleur <eldy@destailleur.fr>
Date: Fri, 24 Feb 2017 14:35:20 +0100
Subject: [PATCH] Clean doc about changes in external libraries

---
 build/debian/README.howto                     | 10 ++++++----
 build/makepack-dolibarr.pl                    | 10 ++--------
 dev/dolibarr_changes.txt                      | 19 +------------------
 htdocs/core/class/smtps.class.php             |  2 +-
 htdocs/includes/nusoap/lib/nusoap.php         |  2 +-
 .../framework/Luracast/Restler/AutoLoader.php |  4 ++--
 .../Luracast/Restler/explorer/index.html      |  4 ++--
 7 files changed, 15 insertions(+), 36 deletions(-)

diff --git a/build/debian/README.howto b/build/debian/README.howto
index afc2d391e1e..705899d47c4 100644
--- a/build/debian/README.howto
+++ b/build/debian/README.howto
@@ -339,18 +339,20 @@ To update dolibarr debian package when only files into debian has changed:
 
 To update dolibarr debian package when only files not into debian has changed:
 
-* Manually, add patches into debian/patches and update file debian/series, or do the 2 steps with "quilt import filepatch.patch"
+* Checkout the branch you want to work on: master of debian/...  
+* Manually, add patches into debian/patches and update the file debian/series, or do the 2 steps with "quilt import filepatch.patch"
 * You can test patching of serie with "quilt push" (autant de fois que de patch). Avec "quilt pop -a", on revient a l'état du upstream sans les patch.
+* Update the debian/changelog to add entry of change.
 
 Once files has been prepared, it's time to test:
 
 * Try to build package
 > rm -fr ../build-area;
-> git-buildpackage -us -uc --git-debian-branch=[master|jessie] --git-upstream-branch=[upstream|upstream-3.5.x|3.5.5]
+> git-buildpackage -us -uc --git-debian-branch=[master|jessie] --git-upstream-branch=[upstream|upstream-jessie|upstream-3.5.x|3.5.5]
 ou
-> git-buildpackage -us -uc --git-ignore-branch --git-upstream-branch=[upstream|upstream-3.5.x|3.5.5]
+> git-buildpackage -us -uc --git-ignore-branch --git-upstream-branch=[upstream|upstream-jessie|upstream-3.5.x|3.5.5]
 
-Note: To build an old version, do: git checkout oldtagname -b newbranchname; git-buildpackage -us -uc --git-debian-branch=newbranchname --git-upstream-branch=[upstream|upstream-3.5.x]
+Note: To build an old version, do: git checkout oldtagname -b newbranchname; git-buildpackage -us -uc --git-debian-branch=newbranchname --git-upstream-branch=[upstream|upstream-jessie|upstream-3.5.x|3.5.5]
 Note: You can use git-buildpackage -us -uc --git-ignore-new  if you want to test build with uncommited file
 Note: You can use git-buildpackage -us -uc -d                if you want to test build when dependencies does not match 
 Note: Package is built into directory ../build-area
diff --git a/build/makepack-dolibarr.pl b/build/makepack-dolibarr.pl
index c06d8f0730f..d287afe4b86 100755
--- a/build/makepack-dolibarr.pl
+++ b/build/makepack-dolibarr.pl
@@ -532,8 +532,6 @@ if ($nboftargetok) {
 		$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/themes/oblyon*`;
 		$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/themes/allscreen*`;
 		# Removed other test files
-		$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/themes/eldy/*.new`;
-		$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/public/api/explorer`;				# This is a dev tool
 	    $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/public/test`;
 	    $ret=`rm -fr $BUILDROOT/$PROJECT/test`;
 	    $ret=`rm -fr $BUILDROOT/$PROJECT/Thumbs.db $BUILDROOT/$PROJECT/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/*/*/Thumbs.db`;
@@ -547,8 +545,6 @@ if ($nboftargetok) {
         $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/ckeditor/ckeditor/samples`;		# Keep this removal in case we embed libraries
         #$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/ckeditor/_source`;		# _source must be kept into tarball
    	    
-        $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/datatables/extensions/TableTools/swf`;	# Source of this flash is not available
-        $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/datatables/extras/TableTools/swf`;	    # Source of this flash is not available
         $ret=`rm -f  $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/multiselect/MIT-LICENSE.txt`;
         $ret=`rm -f  $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/select2/release.sh`;
         $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/mike42/escpos-php/doc`;
@@ -566,14 +562,15 @@ if ($nboftargetok) {
         $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpoffice/phpexcel/license.md`;
         $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tcpdf/fonts/dejavu-fonts-ttf-*`;
         $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tcpdf/fonts/freefont-*`;
+        $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tcpdf/fonts/ae_fonts_*`;
         $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tcpdf/fonts/utils`;
         $ret=`rm -f  $BUILDROOT/$PROJECT/htdocs/includes/tcpdf/LICENSE.TXT`;
         $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/fonts/dejavu-fonts-ttf-*`;
         $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/fonts/freefont-*`;
+        $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/fonts/ae_fonts_*`;
         $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/fonts/utils`;
         $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/tools`;
         $ret=`rm -f  $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/LICENSE.TXT`;
-        $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/savant`;
 	}
 
 	# Build package for each target
@@ -892,9 +889,6 @@ if ($nboftargetok) {
 			$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/mike42/escpos-php/LICENSE.md`;
 			$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/mobiledetect/mobiledetectlib/LICENSE.txt`;
 			
-			$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/tecnickcom/tcpdf/fonts/dejavu-fonts-ttf-2.34/LICENSE`;
-			$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/tecnickcom/tcpdf/fonts/freefont-20120503/COPYING`;
-			$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/tecnickcom/tcpdf/fonts/ae_fonts_2.0/COPYING`;
 			# Removed files we don't need
 			$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/ckeditor/ckeditor/_source`;
 			
diff --git a/dev/dolibarr_changes.txt b/dev/dolibarr_changes.txt
index 82f364b0c1f..b4a4d29dce9 100644
--- a/dev/dolibarr_changes.txt
+++ b/dev/dolibarr_changes.txt
@@ -3,11 +3,9 @@ This file describe changes made on external library after beeing included
 in Dolibarr root.
 
 
-
 ALL:
 ----
-Replace "& new" by "new"
-
+Check "DOL_CHANGE"
 
 
 CKEDITOR:
@@ -33,21 +31,6 @@ Replace call to serialize_val with no bugged value
 
 
 
-FPDI:
------
-Replace:
-	$this->_readXref($this->_xref, $this->_findXref());
-with:
-    try {
-	        $this->_readXref($this->_xref, $this->_findXref());
-    }
-    catch(Exception $e)
-    {
-        	print $e->getMessage();
-        	exit;
-    }
-
-
 
 TCPDF:
 ------
diff --git a/htdocs/core/class/smtps.class.php b/htdocs/core/class/smtps.class.php
index e7c7b343ac9..d16d9875fe3 100644
--- a/htdocs/core/class/smtps.class.php
+++ b/htdocs/core/class/smtps.class.php
@@ -1072,7 +1072,7 @@ class SMTPs
 					{
 						foreach ( $this->_msgRecipients[$_host][$_which] as $_addr => $_realName )
 						{
-							if ( $_realName )	// DOL_CHANGE FIX
+							if ( $_realName )	// DOL_CHANGE LDR
 							{
 								$_realName = '"' . $_realName . '"';
 								$_RCPT_list[] = $_realName . ' <' . $_addr . '@' . $_host . '>';
diff --git a/htdocs/includes/nusoap/lib/nusoap.php b/htdocs/includes/nusoap/lib/nusoap.php
index 6defe0e6004..3113a0ee513 100644
--- a/htdocs/includes/nusoap/lib/nusoap.php
+++ b/htdocs/includes/nusoap/lib/nusoap.php
@@ -573,7 +573,7 @@ class nusoap_base {
 	                        }
 							$array_types[$tt] = 1;
 							// TODO: for literal, the name should be $name
-							//DOL_CHANGE This is to have tag name with name reported by wsdl and not "item"
+							// DOL_CHANGE This is to have tag name with name reported by wsdl and not "item"
                             //$xml .= $this->serialize_val($v,'item',false,false,false,false,$use);
 							$tmp=preg_replace('/s$/i','',$name);
                             $xml .= $this->serialize_val($v,$tmp?$tmp:'item',false,false,false,false,$use);
diff --git a/htdocs/includes/restler/framework/Luracast/Restler/AutoLoader.php b/htdocs/includes/restler/framework/Luracast/Restler/AutoLoader.php
index 9639ab44fb7..462cbcd4cc4 100644
--- a/htdocs/includes/restler/framework/Luracast/Restler/AutoLoader.php
+++ b/htdocs/includes/restler/framework/Luracast/Restler/AutoLoader.php
@@ -263,7 +263,7 @@ class AutoLoader
      * @return bool false unless className now exists
      */
     private function loadLastResort($className, $loader = null) {
-        // DOL_LDR Add protection to avoid conflict with other autouploader
+        // DOL_CHANGE LDR Add protection to avoid conflict with other autoloader
         /*print 'Try to load '.$className."\n";
         if (in_array($className, array('Google_Client')))
         {
@@ -307,7 +307,7 @@ class AutoLoader
      */
     private function alias($className, $currentClass)
     {
-        // DOL_LDR 
+        // DOL_CHANGE LDR 
         if ($className == 'Luracast\Restler\string') return;
         if ($className == 'Luracast\Restler\mixed') return;
         
diff --git a/htdocs/includes/restler/framework/Luracast/Restler/explorer/index.html b/htdocs/includes/restler/framework/Luracast/Restler/explorer/index.html
index 214e6f6261c..5ff93006cf4 100644
--- a/htdocs/includes/restler/framework/Luracast/Restler/explorer/index.html
+++ b/htdocs/includes/restler/framework/Luracast/Restler/explorer/index.html
@@ -2,7 +2,7 @@
 <html>
 <head>
   <title>Api Explorer</title>
-  <!-- DOL_LDR_CHANGE <link href='https://fonts.googleapis.com/css?family=Droid+Sans:400,700' rel='stylesheet' type='text/css'/>
+  <!-- DOL_CHANGE LDR Remove external links <link href='https://fonts.googleapis.com/css?family=Droid+Sans:400,700' rel='stylesheet' type='text/css'/>
   <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css" rel="stylesheet">-->
   <link href='css/reset.css' media='screen' rel='stylesheet' type='text/css'/>
   <link href='css/screen.css' media='screen' rel='stylesheet' type='text/css'/>
@@ -55,7 +55,7 @@
       var key = $('#input_apiKey')[0].value;
 
       if(key && key.trim() != "") {
-        /* DOL_LDR_CHANGE */
+        /* DOL_CHANGE LDR We set DOLAPIKEY into header */
         log("added key " + key);
 
         /* Disabled for security reason. We keep only param in header
-- 
GitLab