|
@@ -74,7 +74,7 @@ discard block |
|
|
block discarded – undo |
|
74
|
74
|
|
|
75
|
75
|
if (!empty($custom_tpl)) |
|
76
|
76
|
{ |
|
77
|
|
- $this->tpl_name = ($tpl_name) ? $tpl_name : $content_type . '_' . $view_mode; |
|
|
77
|
+ $this->tpl_name = ($tpl_name) ? $tpl_name : $content_type.'_'.$view_mode; |
|
78
|
78
|
} |
|
79
|
79
|
|
|
80
|
80
|
$this->view_mode = (in_array($view_mode, array('summary', 'detail'))) ? $view_mode : 'summary'; |
|
@@ -96,7 +96,7 @@ discard block |
|
|
block discarded – undo |
|
96
|
96
|
*/ |
|
97
|
97
|
public function show($type, array $topic_data, array $post_data, array $users_cache, array $attachments, array &$update_count, array $topic_tracking_info, array $topic_data_overwrite = array(), $mode = '') |
|
98
|
98
|
{ |
|
99
|
|
- $callable = 'get_' . $this->view_mode . '_template_data'; |
|
|
99
|
+ $callable = 'get_'.$this->view_mode.'_template_data'; |
|
100
|
100
|
$tpl_data = array_merge( |
|
101
|
101
|
$this->{$callable}($type, $topic_data, $post_data, $users_cache, $attachments, $update_count, $topic_tracking_info, $mode), |
|
102
|
102
|
$topic_data_overwrite |
|
@@ -166,7 +166,7 @@ discard block |
|
|
block discarded – undo |
|
166
|
166
|
{ |
|
167
|
167
|
$field_type = $row['field_type']; |
|
168
|
168
|
$field_value = &$post_field_data[$field_name]; |
|
169
|
|
- $field_contents = $this->form_fields[$field_type]->display_field($field_value, $this->view_mode, $tpl_data, $row); |
|
|
169
|
+ $field_contents = $this->form_fields[$field_type]->display_field($field_value, $this->view_mode, $tpl_data, $row); |
|
170
|
170
|
|
|
171
|
171
|
// this essentially hides other fields if the field returns an array |
|
172
|
172
|
if (is_array($field_contents)) |
|
@@ -175,7 +175,7 @@ discard block |
|
|
block discarded – undo |
|
175
|
175
|
break; |
|
176
|
176
|
} |
|
177
|
177
|
|
|
178
|
|
- $fields_data[$field_name] = '<div class="field-label ' . $this->label[$row['field_' . $this->view_mode . '_ldisp']] . '">' . $row['field_label'] . ': </div>' . $field_contents; |
|
|
178
|
+ $fields_data[$field_name] = '<div class="field-label '.$this->label[$row['field_'.$this->view_mode.'_ldisp']].'">'.$row['field_label'].': </div>'.$field_contents; |
|
179
|
179
|
} |
|
180
|
180
|
|
|
181
|
181
|
return $fields_data; |