MDL-54205 backup: loggers close() and destroy()
authorEloy Lafuente (stronk7) <stronk7@moodle.org>
Wed, 11 May 2016 21:57:54 +0000 (23:57 +0200)
committerEloy Lafuente (stronk7) <stronk7@moodle.org>
Thu, 12 May 2016 23:54:28 +0000 (01:54 +0200)
commit53f95c99cbf141633c8374f846d993cf200b4da8
treeebcfddec4fde472847abe71cc8d9699283210843
parente4b5a062d88059391f9f21eefa980cda66803520
MDL-54205 backup: loggers close() and destroy()

Any backup & restore operation may be leaving opened files
if a file logger is being used. This implementes the close()
method, so every logger can close any resource.

Also, the recommended backup_controlled::destroy() method
now calls to new logger::destroy() method in charge of
deleting all the references and closing any resource.

Finally, some internally used controllers, were missing
their destroy call, leading to associated loggers to
remain open. Now all them are explicitly deltroyed.
backup/controller/backup_controller.class.php
backup/controller/restore_controller.class.php
backup/upgrade.txt
backup/util/dbops/restore_dbops.class.php
backup/util/helper/backup_helper.class.php
backup/util/loggers/base_logger.class.php
backup/util/loggers/file_logger.class.php