Skip to content

Latest commit

 

History

History
508 lines (238 loc) · 9.91 KB

class.UpgraderCore.md

File metadata and controls

508 lines (238 loc) · 9.91 KB

Class UpgraderCore

Contents

Constants

Properties

Methods

Constants

DEFAULT_CHECK_VERSION_DELAY_HOURS

const DEFAULT_CHECK_VERSION_DELAY_HOURS = 24

Properties

$autoupgrade

public mixed $autoupgrade

$autoupgrade_last_version

public mixed $autoupgrade_last_version

$autoupgrade_module

public mixed $autoupgrade_module

$autoupgrade_module_link

public mixed $autoupgrade_module_link

$changed_files

private mixed $changed_files = array()

$changelog

public mixed $changelog

$link

public string $link

$md5

public mixed $md5

$missing_files

private mixed $missing_files = array()

$need_upgrade

private boolean $need_upgrade = false

$rss_md5file_link_dir

public mixed $rss_md5file_link_dir = 'http://api.prestashop.com/xml/md5/'

$rss_version_link

public mixed $rss_version_link = 'http://api.prestashop.com/xml/upgrader.xml'

$version_is_modified

public mixed $version_is_modified = null

$version_name

public mixed $version_name

$version_num

public mixed $version_num

Methods

__construct

mixed UpgraderCore::__construct($autoload)

Arguments

  • $autoload mixed

__get

mixed UpgraderCore::__get($var)

Arguments

  • $var mixed

addChangedFile

mixed UpgraderCore::addChangedFile(string $path)

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

Arguments

  • $path string - filepath to add, relative to PS_ROOT_DIR

addMissingFile

mixed UpgraderCore::addMissingFile(string $path)

populate $this->missing_files with $path

Arguments

  • $path string - filepath to add, relative to PS_ROOT_DIR

browseXmlAndCompare

mixed UpgraderCore::browseXmlAndCompare($node, $current_path, $level)

Arguments

  • $node mixed
  • $current_path mixed
  • $level mixed

checkPSVersion

mixed UpgraderCore::checkPSVersion($force)

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

Arguments

  • $force mixed

compareChecksum

mixed UpgraderCore::compareChecksum($path, $original_sum)

Arguments

  • $path mixed
  • $original_sum mixed

downloadLast

boolean UpgraderCore::downloadLast(string $dest, string $filename)

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

Arguments

  • $dest string - directory where to save the file
  • $filename string - new filename

getChangedFilesList

void UpgraderCore::getChangedFilesList()

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

isAuthenticPrestashopVersion

mixed UpgraderCore::isAuthenticPrestashopVersion()

isLastVersion

mixed UpgraderCore::isLastVersion()

loadFromConfig

\UpgraderCore UpgraderCore::loadFromConfig()

load the last version informations stocked in base