$relativePath = sprintf( 'attachments/%s/%s', $row['directory_name'], $row['stored_filename'] ); $attachmentID = $row['attachment_id']; if (!eval(Hooks::get('FORCE_ATTACHMENT_LOCAL'))) return; $status = $zipFileCreator->addFileFromDisk( $relativePath, $relativePath ); } markCompleted('Adding attachments...'); /* Finalize the zip file and write it to disk. */ setStatusBackup('Writing backup...', 1); $status = $zipFileCreator->finalize(); if (!$status) { setStatusBackup('Error: Failed to write zip file.', 0); die('Failed to add write zip file.'); } /* Update attachment metadata for the zip file now that it's completed. */ $md5sum = @md5_file($zipFilePath); $fileSize = (int) @filesize($zipFilePath) / 1024; $attachments = new Attachments(CATS_ADMIN_SITE);
} elseif (MODE == 'deleteLine') { deleteLine(); } elseif (MODE == 'deleteCharacter') { deleteCharacter(); } elseif (MODE == 'deleteComment') { deleteComment(); } elseif (MODE == 'editCharacterPart1') { editCharacterPart1(); } elseif (MODE == 'editCharacterPart2') { editCharacterPart2(); } elseif (MODE == 'editLinePart1') { editLinePart1(); } elseif (MODE == 'editLinePart2') { editLinePart2(); } elseif (MODE == 'markCompleted') { markCompleted(); } elseif (MODE == 'markUncompleted') { markUncompleted(); } elseif (MODE == 'undeleteCharacter') { undeleteCharacter(); } elseif (MODE == 'undeleteLine') { undeleteLine(); } elseif (MODE == 'tcValidateAll') { tcValidateAll(); } elseif (MODE == 'tcValidateSave') { tcValidateSave(); } } elseif ($_SESSION['listRoleId'] <= 1) { $debug->add('$_SESSION[\'listRoleId\'] is less than 1.'); } if (MODE == 'buildViewOptions') {