]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Only output attachment if the mobile device is interested
authorSarven Capadisli <csarven@status.net>
Mon, 12 Oct 2009 13:05:19 +0000 (13:05 +0000)
committerSarven Capadisli <csarven@status.net>
Mon, 12 Oct 2009 13:05:19 +0000 (13:05 +0000)
plugins/MobileProfile/MobileProfilePlugin.php

index dada1948f1e376ee2c6d8aef5d82a02e84588509..2b1ccf520ad3970179a07258f721132fc0d81d4c 100644 (file)
@@ -365,12 +365,14 @@ class MobileProfilePlugin extends WAP20Plugin
         }
 
         if (common_config('attachments', 'uploads')) {
-            $form->out->element('label', array('for' => 'notice_data-attach'), _('Attach'));
-            $form->out->element('input', array('id' => 'notice_data-attach',
-                                               'type' => 'file',
-                                               'name' => 'attach',
-                                               'title' => _('Attach a file')));
-            $form->out->hidden('MAX_FILE_SIZE', common_config('attachments', 'file_quota'));
+            if ($this->mobileFeatures['inputfiletype']) {
+                $form->out->element('label', array('for' => 'notice_data-attach'), _('Attach'));
+                $form->out->element('input', array('id' => 'notice_data-attach',
+                                                   'type' => 'file',
+                                                   'name' => 'attach',
+                                                   'title' => _('Attach a file')));
+                $form->out->hidden('MAX_FILE_SIZE', common_config('attachments', 'file_quota'));
+            }
         }
         if ($form->action) {
             $form->out->hidden('notice_return-to', $form->action, 'returnto');