Constants

DEFAULT_CHECK_VERSION_DELAY_HOURS

DEFAULT_CHECK_VERSION_DELAY_HOURS

Properties

$rss_version_link

$rss_version_link : 

Type

$rss_md5file_link_dir

$rss_md5file_link_dir : 

Type

$version_name

$version_name : 

Type

$version_num

$version_num : 

Type

$version_is_modified

$version_is_modified : 

Type

$link

$link : string

Type

string — contains hte url where to download the file

$autoupgrade

$autoupgrade : 

Type

$autoupgrade_module

$autoupgrade_module : 

Type

$autoupgrade_last_version

$autoupgrade_last_version : 

Type

$autoupgrade_module_link

$autoupgrade_module_link : 

Type

$changelog

$changelog : 

Type

$md5

$md5 : 

Type

$need_upgrade

$need_upgrade : boolean

Type

boolean — contains true if last version is not installed

$changed_files

$changed_files : 

Type

$missing_files

$missing_files : 

Type

Methods

__construct()

__construct(  $autoload = false) 

Parameters

$autoload

__get()

__get(  $var) 

Parameters

$var

downloadLast()

downloadLast(string  $dest, string  $filename = 'prestashop.zip') : boolean

downloadLast download the last version of PrestaShop and save it in $dest/$filename

Parameters

string $dest

directory where to save the file

string $filename

new filename

Returns

boolean

isLastVersion()

isLastVersion() 

checkPSVersion()

checkPSVersion(  $force = false) : mixed

checkPSVersion ask to prestashop.com if there is a new version. return an array if yes, false otherwise

Parameters

$force

Returns

mixed

loadFromConfig()

loadFromConfig() : $this

load the last version informations stocked in base

Returns

$this

getChangedFilesList()

getChangedFilesList() : array

return an array of files that the md5file does not match to the original md5file (provided by $rss_md5file_link_dir )

Returns

array

isAuthenticPrestashopVersion()

isAuthenticPrestashopVersion() 

addChangedFile()

addChangedFile(string  $path) 

populate $this->changed_files with $path in sub arrays mail, translation and core items

Parameters

string $path

filepath to add, relative to _PS_ROOTDIR

addMissingFile()

addMissingFile(string  $path) 

populate $this->missing_files with $path

Parameters

string $path

filepath to add, relative to _PS_ROOTDIR

browseXmlAndCompare()

browseXmlAndCompare(  $node,   $current_path = array(),   $level = 1) 

Parameters

$node
$current_path
$level

compareChecksum()

compareChecksum(  $path,   $original_sum) 

Parameters

$path
$original_sum