Commit b1543437 authored by mmn's avatar mmn

Show plain text files on attachment page.

parent a9d18a07
......@@ -169,6 +169,8 @@ class AttachmentListItem extends Widget
default:
unset($thumb); // there's no need carrying this along
switch ($this->attachment->mimetype) {
case 'text/plain':
$this->element('div', ['class'=>'e-content plaintext'], file_get_contents($this->attachment->getPath()));
case 'text/html':
if (!empty($this->attachment->filename)
&& (GNUsocial::isAjax() || common_config('attachments', 'show_html'))) {
......
......@@ -1503,6 +1503,13 @@ font-size:150%;
font-style: normal;
}
div.e-content.plaintext {
border: dashed 1px gray;
font-family: monospace;
padding: 1em;
white-space: pre-line;
}
span.rtl {
display: block;
direction: rtl;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment