summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorZach Copley <zcopley@mekong.(none)>2009-06-17 14:36:33 -0700
committerZach Copley <zcopley@mekong.(none)>2009-06-17 14:36:33 -0700
commitcd1361fe960eb3afbbdb34b14061b8475dea60c8 (patch)
treec043f10b3e73865985f3ce2f9252925e004a46f0 /lib
parent8992e8fa7a3c694cc9d424b3e50cf4d87519fa28 (diff)
parentb58dc5e96117bdb4de899d37c6eb94ebf1c3dfe6 (diff)
Merge branch '0.8.x' of git@gitorious.org:+laconica-developers/laconica/dev into 0.8.x
Diffstat (limited to 'lib')
-rw-r--r--lib/common.php2
-rw-r--r--lib/noticeform.php18
2 files changed, 13 insertions, 7 deletions
diff --git a/lib/common.php b/lib/common.php
index 51204cede..bbd9f78c3 100644
--- a/lib/common.php
+++ b/lib/common.php
@@ -200,9 +200,11 @@ $config =
'file_quota' => 5000000,
'user_quota' => 50000000,
'monthly_quota' => 15000000,
+ 'uploads' => true,
),
'group' =>
array('maxaliases' => 3),
+ 'oohembed' => array('endpoint' => 'http://oohembed.com/oohembed/')
);
$config['db'] = &PEAR::getStaticProperty('DB_DataObject','options');
diff --git a/lib/noticeform.php b/lib/noticeform.php
index 0ad365856..a36b7f31f 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->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 (common_config('attachments', 'uploads')) {
+ $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 ($this->action) {
$this->out->hidden('notice_return-to', $this->action, 'returnto');
}