From 241cd8e28254df06b9f1f93b8710b0797215cf99 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Mon, 5 Apr 2010 17:42:45 +0000 Subject: [PATCH] =?UTF-8?q?Fix:=20switch=20the=20variables=20"$ver"=20and?= =?UTF-8?q?=20=D2$upgrade->{'version'}=D3=20Fix:=20call=20"etape5"=20page?= =?UTF-8?q?=20for=20fix=20the=20new=20version?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build/perl/virtualmin/dolibarr.pl | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/build/perl/virtualmin/dolibarr.pl b/build/perl/virtualmin/dolibarr.pl index 6a0c0f5895d..882695afd39 100644 --- a/build/perl/virtualmin/dolibarr.pl +++ b/build/perl/virtualmin/dolibarr.pl @@ -23,15 +23,29 @@ sub script_dolibarr_longdesc return "Dolibarr ERP/CRM is a powerful Open Source software to manage a professional or foundation activity (small and medium enterprises, freelancers)."; } +sub script_dolibarr_author +{ +return "Regis Houssin"; +} + # script_dolibarr_versions() sub script_dolibarr_versions { -return ( "2.7.1", "2.8.0" ); +return ( "2.8.0", "2.7.1" ); +} + +sub script_dolibarr_can_upgrade +{ +local ($sinfo, $newver) = @_; +if ($newver >= 2.8 && $sinfo->{'version'} < 2.8) { + return 0; + } +return 1; } sub script_dolibarr_category { -return "ERP/CRM"; +return "Commerce"; } sub script_dolibarr_php_vers @@ -179,10 +193,10 @@ local $olddocdir = &transname(); local $url; $path = &script_path_url($d, $opts); if ($path =~ /^https:/) { - $url = "https://$d->{'dom'}"; + $url = "https://www.$d->{'dom'}"; } else { - $url = "http://$d->{'dom'}"; + $url = "http://www.$d->{'dom'}"; } if ($opts->{'path'} =~ /\w/) { $url .= $opts->{'path'}; @@ -331,8 +345,11 @@ return (1, "Dolibarr directory and tables deleted."); sub script_dolibarr_latest { local ($ver) = @_; -return ( "http://www.dolibarr.fr/files/stable/", - "dolibarr\\-(2\\.[0-9\\.]+)" ); +if ($ver >= 2.8) { + return ( "http://www.dolibarr.fr/files/stable/", + "dolibarr\\-(2\\.[0-9\\.]+)" ); + } +return ( ); } sub script_dolibarr_site