Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-40528

abstract file_storage trashdir code to pluggable content recovery class

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Deferred
    • Icon: Major Major
    • None
    • 2.5
    • Files API
    • MOODLE_25_STABLE
    • Hide

      1/ execute phpunit tests
      2/ try to deleting some files that are not in any draft area (in PHP code most probably) and verify the file goes to the dataroot/trashdir by default

      Show
      1/ execute phpunit tests 2/ try to deleting some files that are not in any draft area (in PHP code most probably) and verify the file goes to the dataroot/trashdir by default

      Use cases:

      1/ By default everything works as before, the setting defaults to:

       $CFG->file_storage_recovery_classes = array('core_file_storage_trash');
      

      2/ some sites may not want to delete files from $CFG->filedir at all (this helps file-less backups, filedir may be shared by independent moodle instances)

       $CFG->file_storage_recovery_classes = array();
      

      3/ this might be used for continuous external backups

       $CFG->file_storage_recovery_classes = array('core_file_storage_backup');
       $CFG->core_file_storage_backup_filedir = '/some/masterfiledir';
      

      4/ somebody might want to skip the trashdir when deleting files

       $CFG->file_storage_recovery_classes = array('core_file_storage_notrash');
      

      5/ in theory this might be used on cluster nodes where normal $CFG->filedir could be used as local cache only (this is not the primary purpose of this patch)

      6/ this refactoring should also help if anybody decides to reimplement file_storage and stored_file because now it does not have any trashdir logic that might collide with other file storage designs

            skodak Petr Skoda
            skodak Petr Skoda
            Damyon Wiese Damyon Wiese
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.