Update Form Model
This model retrieves all the data Comfort Updates needs. Most of them come from request to the Update Server.
package | LimeSurvey |
---|---|
subpackage | Backend |
inheritdoc |
backupDb(string $destinationBuild): \stdClass
string
\stdClass
error/success and text message
backupFiles(array<mixed,array> $updateinfos): \stdClass
array<mixed,array>
array of files to updated (needs file field)
\stdClass
error/success and text message
checkAssets(): boolean
boolean
checkUpdateKeyonServer(string $submittedUpdateKey): boolean
string
the submitted update key
boolean
true if it exists, false if it doesn't
createDbBackup(): \stdClass
\stdClass
result of backup
downloadUpdateFile(integer $downloadid,string $tobuild): object
integer
the id of the download on the server
string
object
//TODO $downloadid not used locally
downloadUpdateUpdaterFile(string $tobuild): object
string
object
fileSystemCheck(object $obj): \stdClass
object
an object containing the name of the file/directory to check, and what must be checked
\stdClass
the result of the test
fileSystemCheckAppath(object $obj): \stdClass
SuppressWarnings | (PHPMD.UnusedPrivateMethod) |
---|
object
an object containing the name of the file/directory to check, and what must be checked
\stdClass
the result of the test
fileSystemCheckConfig(object $obj): \stdClass
SuppressWarnings | (PHPMD.UnusedPrivateMethod) |
---|
object
an object containing the name of the file/directory to check, and what must be checked
\stdClass
the result of the test
getChangedFiles(integer $destinationBuild): mixed|\stdClass
integer
mixed|\stdClass
getChangeLog(integer $destinationBuild): mixed|\stdClass
integer
mixed|\stdClass
getCheckedFile(array $file): \stdClass
array
array of files to update (must contain file, type and chekcsum indexes)
\stdClass
containing a list of read only files
getDbChecks(string $destinationBuild): mixed|\stdClass
string
mixed|\stdClass
getDbTotalSize(): string
string
getFileStatus(array $updateinfo): array
array
Array of updated files
array
getFileSystemCheckList(): array
array
containing the list
getLocalChecks(integer $destinationBuild): \stdClass
It calls the server to get the list of files/directories to check
integer
: the id of the destination build
\stdClass
$checks ; an object indexing local checks
getLocalChecksForUpdater(): object
object
$checks
getModuleChecks(integer $build): \stdClass
integer
the buildId to test
\stdClass
the success/error message
getMysqlChecks(integer $build): \stdClass
integer
\stdClass
getProtocol(): string
string
getReadOnlyCheckedFile(array $file): \stdClass
array
a file to update (must contain file and type indexes)
\stdClass
containing a list of read only files
getUpdateInfo(string|boolean $crosscheck = "1"): \stdClass
If any error occurred (server not answering, no curl, server returns error, etc.), the view check_updates/update_buttons/_updatesavailable_error will be rendered by the controller.
string|boolean
if it checks for info for both stable and unstable branches
\stdClass
Contains update information or error object
getUpdateNotification(): object
object
getWelcomeMessage(string $updateKey,string $destinationBuild): string
string
the update key -
string
string
html
init()
inheritdoc | |
---|---|
performDownload(string $getters,string $fileName = 'update'): object
string
request parameters
string
object
containing success = TRUE or error message
performRequest(string $getters,boolean $create_new_cookie_file = false): mixed|\stdClass
string
request parameters
boolean
mixed|\stdClass
the server page answer (json most of the time)
phpVerCheck(integer $build): \stdClass
integer
the buildId to test
\stdClass
the success/error result
removeDeletedFiles(array $updateinfos): object
array
object
removeTmpFile(string $sTmpFile = 'update.zip'): object
string
The name of the file to delete in tmp/ directory
object
republishAssets()
setUpdateKey(string $submittedUpdateKey): \SettingGlobal|\array<string,false|\string>
string
the new key id
\SettingGlobal|\array
the new update key if success, CActiveRecord result if error
TODO : should return same status than server to use the same view render
unzipUpdateFile(string $file_to_unzip = 'update.zip'): object
string
object
NULL if success or message error void (TODO : return status)
unzipUpdateUpdaterFile(): object
object
NULL if success or message error void (TODO : return status)
updateVersion(string $destinationBuild): null
string
the id of the new version
null
: will never fail (file access tested before), or only if user changed it manually
build :string
var | The build id |
---|
string
view :string
var | The view to display : used only for welcome type views to let the server choose which view will be displayed |
---|
string
proxy_host_name :string
var |
---|
string
proxy_host_port :integer
var |
---|
integer
tempdir :string
var |
---|
string
rootdir :string
var |
---|
string
publicdir :string
var |
---|
string