]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/noticeform.php
Add notice tags to RSS 1.0 output.
[quix0rs-gnu-social.git] / lib / noticeform.php
index 3212f382ad56e1a33d53263d3c8783df52e34456..4e2a2edd61ff78c085d46e5c7419228e7a83a57a 100644 (file)
@@ -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');
         }