From 1a2e6280b8094956f11442a258eb23228e883629 Mon Sep 17 00:00:00 2001 From: Jared Hancock <jared@osticket.com> Date: Wed, 22 Apr 2015 12:14:04 -0500 Subject: [PATCH] oops: Fix installing file.yaml on installation --- include/class.file.php | 4 ++++ include/class.i18n.php | 2 +- include/i18n/en_US/file.yaml | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/include/class.file.php b/include/class.file.php index 78cbed9c8..5f4013ff7 100644 --- a/include/class.file.php +++ b/include/class.file.php @@ -437,6 +437,10 @@ class AttachmentFile extends VerySimpleModel { return $f; } + static function __create($file, &$errors) { + return static::create($file); + } + /** * Migrate this file from the current backend to the backend specified. * diff --git a/include/class.i18n.php b/include/class.i18n.php index 27486ba9b..566cf6945 100644 --- a/include/class.i18n.php +++ b/include/class.i18n.php @@ -66,7 +66,7 @@ class Internationalization { 'role.yaml' => 'Role::__create', // Note that group requires department 'group.yaml' => 'Group::__create', - 'file.yaml' => 'AttachmentFile::create', + 'file.yaml' => 'AttachmentFile::__create', 'sequence.yaml' => 'Sequence::__create', ); diff --git a/include/i18n/en_US/file.yaml b/include/i18n/en_US/file.yaml index 0464b6a23..d77bcd3e9 100644 --- a/include/i18n/en_US/file.yaml +++ b/include/i18n/en_US/file.yaml @@ -3,7 +3,7 @@ # # Files initially inserted into the system. Canned responses have their own # method for attachments; however, this file will make it easier to add -# thinkgs like inline images. +# things like inline images. # # NOTE: If the files aren't attached to something by the installer, they # bill be cleaned up shortly after installation (by the autocron). -- GitLab