summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-06-09 21:48:56 -0700
committerEvan Prodromou <evan@controlyourself.ca>2009-06-09 21:48:56 -0700
commited627bb4bd6424325478412055d295b185f9f662 (patch)
treefeb95836538735a5059519293143403079249648 /lib
parentadfb79a9bbdfb43f35c0f022c1de6118b10ce115 (diff)
parent207750e75774c823328889cb4102aad6a0b12281 (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.php1
-rw-r--r--lib/noticeform.php3
-rw-r--r--lib/noticelist.php8
3 files changed, 7 insertions, 5 deletions
diff --git a/lib/common.php b/lib/common.php
index ceb50337c..5aafdfe0e 100644
--- a/lib/common.php
+++ b/lib/common.php
@@ -188,6 +188,7 @@ $config =
'application/vnd.oasis.opendocument.formula-template',
'application/vnd.oasis.opendocument.text-master',
'application/vnd.oasis.opendocument.text-web',
+ 'application/x-zip',
'application/zip',
'text/plain',
'video/mpeg',
diff --git a/lib/noticeform.php b/lib/noticeform.php
index 5a6c7cf38..5d7cf194e 100644
--- a/lib/noticeform.php
+++ b/lib/noticeform.php
@@ -151,7 +151,8 @@ class NoticeForm extends Form
$this->out->element('label', array('for' => 'notice_data-attach'), _('Attach'));
$this->out->element('input', array('id' => 'notice_data-attach',
'type' => 'file',
- 'name' => 'attach'));
+ 'name' => 'attach',
+ 'title' => _('Attach a file')));
if ($this->action) {
$this->out->hidden('notice_return-to', $this->action, 'returnto');
}
diff --git a/lib/noticelist.php b/lib/noticelist.php
index 5513e317e..9ace341d8 100644
--- a/lib/noticelist.php
+++ b/lib/noticelist.php
@@ -364,6 +364,10 @@ class NoticeListItem extends Widget
// versions (>> 0.4.x)
$this->out->raw(common_render_content($this->notice->content, $this->notice));
}
+ $uploaded = $this->notice->getUploadedAttachment();
+ if ($uploaded) {
+ $this->out->element('a', array('href' => $uploaded, 'class' => 'attachment'), $uploaded);
+ }
$this->out->elementEnd('p');
}
@@ -395,10 +399,6 @@ class NoticeListItem extends Widget
'title' => $dt),
common_date_string($this->notice->created));
- $f2p = File_to_post::staticGet('post_id', $this->notice->id);
- if (!empty($f2p)) {
- $this->out->text(_(' (with attachments) '));
- }
$this->out->elementEnd('a');
$this->out->elementEnd('dd');
$this->out->elementEnd('dl');