diff options
author | Jeffery To <jeffery.to@gmail.com> | 2009-06-24 01:08:44 +0800 |
---|---|---|
committer | Jeffery To <jeffery.to@gmail.com> | 2009-06-24 01:08:44 +0800 |
commit | 3e60160f07f32d109b545db6b73be344b9180de8 (patch) | |
tree | 978f66cfb5f25eda6a01e8d3beaf9921d20e28e1 /lib/noticeform.php | |
parent | 43680ed0c2cf83448d755fa1edff42711d06a82c (diff) | |
parent | eb40fbc17ad1efb0a4c51ee00b1e9408d2af382f (diff) |
Merge branch '0.8.x' into group-rss-empty
Diffstat (limited to 'lib/noticeform.php')
-rw-r--r-- | lib/noticeform.php | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/lib/noticeform.php b/lib/noticeform.php index 3212f382a..4e2a2edd6 100644 --- a/lib/noticeform.php +++ b/lib/noticeform.php @@ -90,7 +90,9 @@ class NoticeForm extends Form $this->user = common_current_user(); } - $this->enctype = 'multipart/form-data'; + if (common_config('attachments', 'uploads')) { + $this->enctype = 'multipart/form-data'; + } } /** @@ -148,12 +150,14 @@ class NoticeForm extends Form $this->out->element('dd', array('id' => 'notice_text-count'), '140'); $this->out->elementEnd('dl'); - $this->out->hidden('MAX_FILE_SIZE', common_config('attachments', 'file_quota')); - $this->out->element('label', array('for' => 'notice_data-attach'), _('Attach')); - $this->out->element('input', array('id' => 'notice_data-attach', - 'type' => 'file', - 'name' => 'attach', - 'title' => _('Attach a file'))); + if (common_config('attachments', 'uploads')) { + $this->out->element('label', array('for' => 'notice_data-attach'),_('Attach')); + $this->out->element('input', array('id' => 'notice_data-attach', + 'type' => 'file', + 'name' => 'attach', + 'title' => _('Attach a file'))); + $this->out->hidden('MAX_FILE_SIZE', common_config('attachments', 'file_quota')); + } if ($this->action) { $this->out->hidden('notice_return-to', $this->action, 'returnto'); } |