%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/vacivi36/www2]/suporte/include/upgrader/streams/core/
Upload File :
Create Path :
Current File : /home/vacivi36/www2]/suporte/include/upgrader/streams/core/934954de-f1ccd3bb.task.php

<?php

class FileImport extends MigrationTask {
    var $description = "Import core osTicket attachment files";

    function run($runtime) {
        $i18n = new Internationalization('en_US');
        $files = $i18n->getTemplate('file.yaml')->getData();
        foreach ($files as $f) {
            if (!($file = AttachmentFile::create($f)))
                continue;

            // Ensure the new files are never deleted (attached to Disk)
            $sql ='INSERT INTO '.ATTACHMENT_TABLE
                .' SET object_id=0, `type`=\'D\', inline=1'
                .', file_id='.db_input($file->getId());
            db_query($sql);
        }
    }
}

return 'FileImport';

?>

Zerion Mini Shell 1.0