From 2220f7f6f2ebe6fb2eef2b21b6187b250dd6323a Mon Sep 17 00:00:00 2001
From: Laurent Destailleur <eldy@destailleur.fr>
Date: Fri, 25 Mar 2016 15:31:28 +0100
Subject: [PATCH] Revert "NEW Converted Form::formconfirm function to a static
 function and removed deprecated function Form::form_confirm"

This reverts commit a0926abd13d474b69db3c8772a2728e3c64bd88d.
---
 htdocs/core/class/html.form.class.php | 23 ++++++++++++++++++++++-
 1 file changed, 22 insertions(+), 1 deletion(-)

diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index fc2284cfc65..501a5766054 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -3164,6 +3164,27 @@ class Form
 		return $output;
     }
 
+    /**
+     *     Show a confirmation HTML form or AJAX popup
+     *
+     *     @param	string		$page        	   	Url of page to call if confirmation is OK
+     *     @param	string		$title       	   	Title
+     *     @param	string		$question    	   	Question
+     *     @param 	string		$action      	   	Action
+     *	   @param	array		$formquestion	   	An array with forms complementary inputs
+     * 	   @param	string		$selectedchoice		"" or "no" or "yes"
+     * 	   @param	int			$useajax		   	0=No, 1=Yes, 2=Yes but submit page with &confirm=no if choice is No, 'xxx'=preoutput confirm box with div id=dialog-confirm-xxx
+     *     @param	int			$height          	Force height of box
+     *     @param	int			$width				Force width of box
+     *     @return 	void
+     *     @deprecated
+     *     @see formconfirm()
+     */
+    function form_confirm($page, $title, $question, $action, $formquestion='', $selectedchoice="", $useajax=0, $height=170, $width=500)
+    {
+        print $this->formconfirm($page, $title, $question, $action, $formquestion, $selectedchoice, $useajax, $height, $width);
+    }
+
     /**
      *     Show a confirmation HTML form or AJAX popup.
      *     Easiest way to use this is with useajax=1.
@@ -3186,7 +3207,7 @@ class Form
      *     @param	int			$width				Force width of bow
      *     @return 	string      	    			HTML ajax code if a confirm ajax popup is required, Pure HTML code if it's an html form
      */
-    public static function formconfirm($page, $title, $question, $action, $formquestion='', $selectedchoice="", $useajax=0, $height=170, $width=500)
+    function formconfirm($page, $title, $question, $action, $formquestion='', $selectedchoice="", $useajax=0, $height=170, $width=500)
     {
         global $langs,$conf;
         global $useglobalvars;
-- 
GitLab