Clean up post type heritable view arguments

This commit is contained in:
Toby Zerner 2015-05-05 17:29:43 +09:30
parent 11b39605e2
commit a822deaa98
3 changed files with 6 additions and 10 deletions

View File

@ -4,14 +4,12 @@ import icon from 'flarum/helpers/icon';
import humanTime from 'flarum/utils/human-time';
export default class PostActivity extends Post {
view(content, attrs) {
attrs.className = 'post-activity '+(attrs.className || '');
var iconName = attrs.icon;
delete attrs.icon;
view(iconName, content, attrs) {
var post = this.props.post;
attrs = attrs || {};
attrs.className = 'post-activity post-'+post.contentType()+' '+(attrs.className || '');
return super.view([
icon(iconName+' post-icon'),
m('div.post-activity-info', [

View File

@ -6,9 +6,6 @@ export default class PostDiscussionRenamed extends PostActivity {
var oldTitle = post.content()[0];
var newTitle = post.content()[1];
return super.view(['changed the title from ', m('strong.old-title', oldTitle), ' to ', m('strong.new-title', newTitle), '.'], {
className: 'post-discussion-renamed',
icon: 'pencil'
});
return super.view('pencil', ['changed the title from ', m('strong.old-title', oldTitle), ' to ', m('strong.new-title', newTitle), '.']);
}
}

View File

@ -84,6 +84,7 @@ class AssetManager
$lastModTime = max($lastModTime, filemtime($file));
}
$debug = 0;
// $debug = 1;
if (! file_exists($file = $dir.'/'.$this->name.'-'.$revision.'.'.$type)
|| filemtime($file) < $lastModTime