Skip to content

Latest commit

 

History

History
1201 lines (548 loc) · 25.1 KB

class.AdminUpgrade.md

File metadata and controls

1201 lines (548 loc) · 25.1 KB

Class AdminUpgrade

Contents

Properties

Methods

Properties

$_includeContainer

protected mixed $_includeContainer = false

$ajax

public mixed $ajax = false

$autoupgradeDir

public string $autoupgradeDir = 'autoupgrade'

autoupgradeDir

$autoupgradePath

public mixed $autoupgradePath = ''

$backupFileList

public mixed $backupFileList = array()

$backupIgnoreAbsoluteFiles

private mixed $backupIgnoreAbsoluteFiles = array()

$backupIgnoreFiles

private mixed $backupIgnoreFiles = array()

$currentParams

public mixed $currentParams = array()

$destDownloadFilename

public mixed $destDownloadFilename = 'prestashop.zip'

$error

public mixed $error = '0'

$excludeAbsoluteFilesFromUpgrade

private mixed $excludeAbsoluteFilesFromUpgrade = array()

$excludeFilesFromUpgrade

private mixed $excludeFilesFromUpgrade = array()

$latestRootDir

public mixed $latestRootDir = ''

$loopBackupFiles

public mixed $loopBackupFiles = 1000

int loopBackupFiles : if your server has a low memory size, lower this value

$loopRemoveSamples

public mixed $loopRemoveSamples = 1000

intloopRemoveSamples : if your server has a low memory size, lower this value

$loopUpgradeFiles

public mixed $loopUpgradeFiles = 1000

int loopUpgradeFiles : if your server has a low memory size, lower this value

$next

public mixed $next = 'N/A'

$nextDesc

public mixed $nextDesc = '.'

$nextParams

public mixed $nextParams = array()

$nextQuickInfo

public mixed $nextQuickInfo = array()

$nextResponseType

public mixed $nextResponseType = 'json'

$prodRootDir

public mixed $prodRootDir = ''

$rootWritable

public mixed $rootWritable = false

$sampleFileList

public mixed $sampleFileList = array()

$skipAction

public mixed $skipAction

$stepDone

public boolean $stepDone = true

set to false if the current step is a loop

$svnDir

public mixed $svnDir = 'svn'

$toUpgradeFileList

public mixed $toUpgradeFileList = array()

$useSvn

public mixed $useSvn

Methods

ZipExtract

boolean AdminUpgrade::ZipExtract($fromFile, $toDir)

Arguments

  • $fromFile mixed
  • $toDir mixed

__construct

mixed AdminUpgrade::__construct()

_cleanUp

mixed AdminUpgrade::_cleanUp($path)

Arguments

  • $path mixed

_displayRollbackForm

mixed AdminUpgrade::_displayRollbackForm()

_displayUpgraderForm

mixed AdminUpgrade::_displayUpgraderForm()

_getJsErrorMsgs

mixed AdminUpgrade::_getJsErrorMsgs()

_getJsInit

mixed AdminUpgrade::_getJsInit()

_listArchivedFiles

mixed AdminUpgrade::_listArchivedFiles()

_listBackupFiles

mixed AdminUpgrade::_listBackupFiles($dir)

Arguments

  • $dir mixed

_listFilesToUpgrade

mixed AdminUpgrade::_listFilesToUpgrade($dir)

Arguments

  • $dir mixed

_listSampleFiles

void AdminUpgrade::_listSampleFiles(string $dir, string $fileext)

_listSampleFiles will make a recursive call to scandir() function and list all file which match to the $fileext suffixe (this can be an extension or whole filename)

Arguments

  • $dir string - directory to look in
  • $fileext string - suffixe filename

_modelDoUpgrade

void AdminUpgrade::_modelDoUpgrade()

model_doUpgrade prepare the call to doUpgrade.php file (like model.php)

_removeOneSample

mixed AdminUpgrade::_removeOneSample($removeList)

Arguments

  • $removeList mixed

_setFields

void AdminUpgrade::_setFields()

_setFields function to set fields (only when we need it).

_skipFile

mixed AdminUpgrade::_skipFile(\type $file, \type $fullpath, \type $way)

bool _skipFile : check whether a file is in backup or restore skip list

Arguments

  • $file type - : current file or directory name eg:'.svn' , 'settings.inc.php'
  • $fullpath type - : current file or directory fullpath eg:'/home/web/www/prestashop/img'
  • $way type - : 'backup' , 'upgrade'

ajaxPreProcess

mixed AdminUpgrade::ajaxPreProcess()

ajaxProcessBackupDb

mixed AdminUpgrade::ajaxProcessBackupDb()

ajaxProcessBackupFiles

mixed AdminUpgrade::ajaxProcessBackupFiles()

ajaxProcessDesactiveShop

mixed AdminUpgrade::ajaxProcessDesactiveShop()

ajaxProcessDownload

mixed AdminUpgrade::ajaxProcessDownload()

ajaxProcessRemoveSamples

mixed AdminUpgrade::ajaxProcessRemoveSamples()

ajaxProcessRestoreDb

\type AdminUpgrade::ajaxProcessRestoreDb()

try to restore db backup file

ajaxProcessRestoreFiles

boolean AdminUpgrade::ajaxProcessRestoreFiles()

ajaxProcessRestoreFiles restore the previously saved files.

ajaxProcessRollback

mixed AdminUpgrade::ajaxProcessRollback()

ajaxProcessSvnCheckout

mixed AdminUpgrade::ajaxProcessSvnCheckout()

ajaxProcessSvnExport

mixed AdminUpgrade::ajaxProcessSvnExport()

ajaxProcessUnzip

mixed AdminUpgrade::ajaxProcessUnzip()

ajaxProcessUpgradeComplete

mixed AdminUpgrade::ajaxProcessUpgradeComplete()

ajaxProcessUpgradeDb

mixed AdminUpgrade::ajaxProcessUpgradeDb()

ajaxProcessUpgradeFiles

mixed AdminUpgrade::ajaxProcessUpgradeFiles()

ajaxProcessUpgradeNow

mixed AdminUpgrade::ajaxProcessUpgradeNow()

apacheModExists

boolean AdminUpgrade::apacheModExists(string $name)

apacheModExists return true if the apache module $name is loaded

Arguments

  • $name string - module name

buildAjaxResult

mixed AdminUpgrade::buildAjaxResult()

display

mixed AdminUpgrade::display()

displayAjax

mixed AdminUpgrade::displayAjax()

displayConf

void AdminUpgrade::displayConf()

displayConf

getFilePath

void AdminUpgrade::getFilePath()

getFilePath return the path to the zipfile containing prestashop.

init

void AdminUpgrade::init()

init to build informations we need

isUpgradeAllowed

void AdminUpgrade::isUpgradeAllowed()

isUpgradeAllowed checks if all server configuration is valid for upgrade

postProcess

mixed AdminUpgrade::postProcess()

upgradeThisFile

void AdminUpgrade::upgradeThisFile(mixed $file)

upgradeThisFile

Arguments

  • $file mixed