From 97f147bbddf3f00f69842a1f229ce0cfc64f86ed Mon Sep 17 00:00:00 2001 From: Cake Date: Wed, 17 Feb 2010 23:38:30 +0900 Subject: [PATCH] =?utf8?q?=E3=82=A2=E3=83=83=E3=83=97=E3=83=AD=E3=83=BC?= =?utf8?q?=E3=83=89=E3=83=95=E3=82=A1=E3=82=A4=E3=83=AB=E5=90=8D=E3=82=92?= =?utf8?q?=E3=83=8F=E3=83=83=E3=82=B7=E3=83=A5=E3=81=AB=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- app/models/user.php | 2 +- app/plugins/media/models/attachment_ex.php | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 app/plugins/media/models/attachment_ex.php diff --git a/app/models/user.php b/app/models/user.php index 6d44bc8..1198efa 100644 --- a/app/models/user.php +++ b/app/models/user.php @@ -14,7 +14,7 @@ class User extends AppModel { //The Associations below have been created with all possible keys, those that are not needed can be removed var $hasMany = array( 'Attachment' => array( - 'className' => 'Media.Attachment', + 'className' => 'Media.AttachmentEx', 'foreignKey' => 'foreign_key', 'conditions' => array('model' => 'User'), 'fields' => array( diff --git a/app/plugins/media/models/attachment_ex.php b/app/plugins/media/models/attachment_ex.php new file mode 100644 index 0000000..9c48ad2 --- /dev/null +++ b/app/plugins/media/models/attachment_ex.php @@ -0,0 +1,17 @@ +actsAs['Media.Transfer']['destinationFile'] = ':Medium.short::DS::uuid:'.'.'.':Source.extension:'; + + parent::__construct($id, $table, $ds); + } + +} -- 2.11.0