summaryrefslogtreecommitdiff
path: root/lib/noticeform.php
diff options
context:
space:
mode:
authorJeffery To <jeffery.to@gmail.com>2009-06-24 01:25:55 +0800
committerJeffery To <jeffery.to@gmail.com>2009-06-24 01:25:55 +0800
commit280f8faab4f692ff7f4389f82397adfa6db56325 (patch)
tree94a076bfb3d13c7e6699e0149ee75fff6801880c /lib/noticeform.php
parentbb3361467c002e38aa3a424672f332b32a647e17 (diff)
parenteb40fbc17ad1efb0a4c51ee00b1e9408d2af382f (diff)
Merge branch '0.8.x' into small-fixes
Conflicts: lib/peoplesearchresults.php lib/profilelist.php
Diffstat (limited to 'lib/noticeform.php')
-rw-r--r--lib/noticeform.php18
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');
}