Apply standard licensing + install-completion installer script pattern #202
Reference in New Issue
Block a user
Delete Branch "chore/installer-script-template"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Applies the
Template-Joomla/samples/script/script_package.phppattern tosource/script.phpfor download-key handling and install completion, while preserving every MokoSuiteBackup-specific postflight step (plugin enable, webcron secret, default scheduled task, submenu items,client_idfix, icon sync,backup_dirmigration, review-settings notice).Licensing / key handling
preflight(update) →backupDownloadKey()caches the baredlidvalue from the update site.postflight(update) →restoreDownloadKey()re-writesextra_queryasdlid=<key>on the (possibly re-registered) update site.{REPONAME}→MokoSuiteBackup,{PACKAGENAME}→pkg_mokosuitebackup.Joomla\CMS\Log\Loginstead oferror_log.Install completion
installSuccessful()info notice shows on install and update.warnMissingLicenseKey()prompt shows on install only — a fresh install never carries a key, so the previous always-run "is a key already present?" guard is removed.Notes
preflight_saveKey()was renamed tobackupDownloadKey()(now private) per the template.main; does not overlap the branding (#200) or manifest (#201) PRs.Test plan
php -lpasses (verified locally).3ec56906a3to1758694893