New: check the real version and remove specific php settings
This commit is contained in:
parent
0bb3aced2f
commit
4bafa13b5a
@ -30,7 +30,7 @@ return "Regis Houssin";
|
|||||||
# script_dolibarr_versions()
|
# script_dolibarr_versions()
|
||||||
sub script_dolibarr_versions
|
sub script_dolibarr_versions
|
||||||
{
|
{
|
||||||
return ( "3.3.0", "3.2.0", "3.1.0", "3.0.1", "2.9.0" );
|
return ( "3.3.0", "3.2.1", "3.1.1" );
|
||||||
}
|
}
|
||||||
|
|
||||||
sub script_dolibarr_category
|
sub script_dolibarr_category
|
||||||
@ -43,13 +43,6 @@ sub script_dolibarr_php_vers
|
|||||||
return ( 5 );
|
return ( 5 );
|
||||||
}
|
}
|
||||||
|
|
||||||
sub script_dolibarr_php_vars
|
|
||||||
{
|
|
||||||
return ( [ 'memory_limit', '64M', '+' ],
|
|
||||||
[ 'upload_max_filesize', '10M', '+' ],
|
|
||||||
[ 'max_execution_time', '60', '+' ] );
|
|
||||||
}
|
|
||||||
|
|
||||||
sub script_dolibarr_php_modules
|
sub script_dolibarr_php_modules
|
||||||
{
|
{
|
||||||
local ($d, $ver, $phpver, $opts) = @_;
|
local ($d, $ver, $phpver, $opts) = @_;
|
||||||
@ -348,21 +341,32 @@ if ($opts->{'newdb'}) {
|
|||||||
return (1, "Dolibarr directory and tables deleted.");
|
return (1, "Dolibarr directory and tables deleted.");
|
||||||
}
|
}
|
||||||
|
|
||||||
# script_dolibarr_latest(version)
|
# script_dolibarr_realversion(&domain, &opts)
|
||||||
# Returns a URL and regular expression or callback func to get the version
|
# Returns the real version number of some script install, or undef if unknown
|
||||||
sub script_dolibarr_latest
|
sub script_dolibarr_realversion
|
||||||
|
{
|
||||||
|
local ($d, $opts, $sinfo) = @_;
|
||||||
|
local $lref = &read_file_lines("$opts->{'dir'}/filefunc.inc.php", 1);
|
||||||
|
foreach my $l (@$lref) {
|
||||||
|
if ($l =~ /'DOL_VERSION','([0-9a-z\.\-]+)'/) {
|
||||||
|
return $1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return undef;
|
||||||
|
}
|
||||||
|
|
||||||
|
# script_dolibarr_check_latest(version)
|
||||||
|
# Checks if some version is the latest for this project, and if not returns
|
||||||
|
# a newer one. Otherwise returns undef.
|
||||||
|
sub script_dolibarr_check_latest
|
||||||
{
|
{
|
||||||
local ($ver) = @_;
|
local ($ver) = @_;
|
||||||
if ($ver >= 3.0) {
|
local @vers = &osdn_package_versions("dolibarr",
|
||||||
return ( "http://sourceforge.net/projects/dolibarr/files/".
|
$ver >= 3 ? "dolibarr\\-(3\\.[0-9\\.]+)\\.tgz" :
|
||||||
"Dolibarr%20ERP-CRM",
|
$ver >= 2.9 ? "dolibarr\\-(2\\.9\\.[0-9\\.]+)\\.tgz" :
|
||||||
"(3\\.[0-9\\.]+)" );
|
"dolibarr\\-(2\\.8\\.[0-9\\.]+)\\.tgz");
|
||||||
}
|
return "Failed to find versions" if (!@vers);
|
||||||
elsif ($ver >= 2.9) {
|
return $ver eq $vers[0] ? undef : $vers[0];
|
||||||
return ( "http://www.dolibarr.fr/files/stable/",
|
|
||||||
"dolibarr\\-(2\\.[0-9\\.]+)" );
|
|
||||||
}
|
|
||||||
return ( );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sub script_dolibarr_site
|
sub script_dolibarr_site
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user