PauseAttachmentMaintenance

Description

Temporarily pauses the RepairAttachments function to avoid overloading the server.

Syntax

void PauseAttachmentMaintenance (array $to_fix, int $max_substep)



Parameter $to_fix

Expected type: Array
Description: An array of errors to fix

Array Elements of $to_fix
Key Optional Expected type Description
Auto-incrementing integer no Enumerated String See notes for possible values. Key is auto-generated (0, 1, etc.) and isn't used.



Parameter $max_substep

Expected type: Integer
Description: The maximum number of items that need to be fixed. This is so the substep doesn't get increased beyond the number of items that we need to fix.


Notes

  • These are the error strings used for the to_fix array:
  • missing_thumbnail_parent - a stranded thumbnail (ie one that is not linked to any attachment)
  • parent_missing_thumbnail - an attachment that's missing its thumbnail
  • file_missing_on_disk - a non-existant attachment
  • file_wrong_size - actual filesize is different than the filesize in the database
  • file_size_of_zero - attachment file exists, but filesize is 0
  • attachment_no_msg - an attachment that isn't actually attached to anything
  • avatar_no_member - a stranded avatar (one that isn't linked to any member)
Advertisement: