22 Commits

Author SHA1 Message Date
David Mudrák
5230f6a720 MDL-38456 Allow colons in paths passed to mdeploy.php utility
The input_manager now accepts colons (:) in TYPE_PATH options, but only
in cases where the colon is used as a part of Windows drive labels, as
in C:\apache.
2013-03-13 12:08:38 +01:00
David Mudrák
8663b090c0 MDL-36963 Do not attempt to remove the root folder of a plugin during the update deployment
There is no need to move the root folder of a plugin during the update
deployment. We just need to operate with its contents. So the web server
process can have the write access for the plugin folder only.
2012-12-06 11:03:35 +08:00
David Mudrák
75879a9e74 MDL-36963 Improve mdeploy worker::remove_directory() method
The additional parameter allows to use this method without actual
removing the root of the path. That is, it is now possible to remove
the content of a folder only.
2012-12-06 11:03:35 +08:00
David Mudrák
b68bbc5ae1 MDL-36963 Improve mdeploy worker::move_directory() method
The additional parameter allows to use this method without actual
removing the root of the source location. That is, it is now possible to
move the content of a folder only.

Also, a small refactoring happened here as we will need a variant of
this method that does not throw exception if the target already exists.
2012-12-06 11:03:35 +08:00
David Mudrák
42c6731c9f MDL-36950 Make mdeploy.php accept proxy related settings 2012-11-30 16:11:52 +01:00
David Mudrák
333048e06b MDL-36903 Add a link to Moodle documentation from mdeploy error pages 2012-11-30 16:09:58 +01:00
David Mudrák
e428b5e0ae MDL-36903 Make mdeploy.php use the custom CA certificate if it exists 2012-11-30 16:09:58 +01:00
David Mudrák
0daa642894 MDL-35238 Inform the admin if the update can not be deployed due to write permissions 2012-11-09 00:20:18 +01:00
David Mudrák
80e9ba96c7 MDL-35238 Improve exceptions handling 2012-11-08 22:33:08 +01:00
David Mudrák
8ffa8d7e48 MDL-35238 Be more verbose if the tilde character is used in TYPE_PATH script options
The tilde character is not generally supported in Moodle. Previously it
was just removed silently and it was difficult to realize what was going
on.
2012-11-08 22:33:07 +01:00
David Mudrák
ec8e1cbce6 MDL-35238 Add simple logging of mdeploy.php execution 2012-11-08 22:33:07 +01:00
David Mudrák
b10b1e728d MDL-35238 Remove the ZIP file after successful decompression 2012-11-08 22:33:07 +01:00
David Mudrák
6b75106a75 MDL-35238 Compare the ZIP package content hash with the expected value
The expected value is returned as a part of available update info
(requires API version 1.1).
2012-11-08 22:33:07 +01:00
David Mudrák
23137c4ac4 MDL-35238 Unzip the downloaded package and redirect to the upgrade page 2012-11-08 22:33:07 +01:00
David Mudrák
4f71de4161 MDL-35238 Backup existing plugin version before replacing it
This is here to save eventual local contributions to the plugin before
we replace the whole directory in the next step.
2012-11-08 22:33:07 +01:00
David Mudrák
4c72f55516 MDL-35238 Fetch the package and store it in a temporary location 2012-11-08 22:33:07 +01:00
David Mudrák
af29dade97 MDL-35238 Reorganise the worker::execute() flow 2012-11-08 22:33:07 +01:00
David Mudrák
3daedb5c5a MDL-35238 Implement deployment authorization
The caller of the mdeploy.php utility is expected to create a file in
the data directory. The name of such file and the passphrase in it are
then sent to mdeploy.php as a part of the request. The submitted and
stored values are then compared.
2012-11-08 22:33:07 +01:00
David Mudrák
c57f18ad06 MDL-35238 Implement HTTP authorization based on passphrase matching 2012-11-08 22:33:06 +01:00
David Mudrák
11c3c579a1 MDL-35238 Fix getting input option value 2012-11-08 22:33:06 +01:00
David Mudrák
c99910bb3a MDL-35238 Print help on the script usage in CLI mode 2012-11-08 22:33:05 +01:00
David Mudrák
89af176511 MDL-35238 Introduce a first version of the mdeploy.php script
This is supposed to serve as a standalone script that accepts parameters
via CLI or HTTP. As no Moodle library can be reliably included, we have
to implement our own input handling, output handling and processing the
actual update/install task.

PHPUnit is used to test the functionality. Although (again), the testing
must not be included as a part of standard Moodle PHPUnit environment
but explicitly.
2012-11-08 22:33:05 +01:00