Completed
Push — develop ( 4a255f...c77227 )
by Daniel
07:47
created
services/form/field/field_interface.php 1 patch
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -67,7 +67,6 @@
 block discarded – undo
67 67
 	 *
68 68
 	 * @param int $topic_id
69 69
 	 * @param mixed $field_value
70
-	 * @param array $field_data
71 70
 	 * @return void
72 71
 	 */
73 72
 	public function save_field($topic_id, $field_value, array $data);
Please login to merge, or discard this patch.
services/form/field/color.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 		$default = is_array($data['field_value']) ? $data['field_value'] : explode("\n", $data['field_value']);
59 59
 		return $this->request->variable($name, $default, true);
60 60
 
61
-		$value =  $this->request->variable($name, array(0 => ''), true);
61
+		$value = $this->request->variable($name, array(0 => ''), true);
62 62
 		return $value ? $value : $default;
63 63
 	}
64 64
 
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
 	 */
104 104
 	protected function make_box($color)
105 105
 	{
106
-		$style = 'display: inline-block; width: 15px; height: 15px; border: 1 solid #fff; border-radius: 4px; background-color: ' . $color;
107
-		return ($color) ? '<div style="' . $style . '" title="' . $color . '"></div>' : '';
106
+		$style = 'display: inline-block; width: 15px; height: 15px; border: 1 solid #fff; border-radius: 4px; background-color: '.$color;
107
+		return ($color) ? '<div style="'.$style.'" title="'.$color.'"></div>' : '';
108 108
 	}
109 109
 }
Please login to merge, or discard this patch.
services/form/field/choice.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 		$this->ptemplate->assign_vars($data);
63 63
 
64 64
 		$tpl_name = ($data['field_type'] === 'select') ? 'select' : 'pickem';
65
-		return $this->ptemplate->render_view('blitze/content', "fields/$tpl_name.html", $data['field_type'] . '_field');
65
+		return $this->ptemplate->render_view('blitze/content', "fields/$tpl_name.html", $data['field_type'].'_field');
66 66
 	}
67 67
 
68 68
 	/**
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 			foreach ($choices as $value => $option)
86 86
 			{
87 87
 				$options[] = array(
88
-					'id'		=> 'smc-'. $name . '-' . $count,
88
+					'id'		=> 'smc-'.$name.'-'.$count,
89 89
 					'label'		=> $this->language->lang($option),
90 90
 					'selected'	=> (int) (in_array($value, $selected)),
91 91
 					'value'		=> $value,
Please login to merge, or discard this patch.
services/form/field/image.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 		$value = $this->request->variable($data['field_name'], $data['field_value']);
38 38
 		$value = $this->get_image_src($value);
39 39
 
40
-		return ($value) ? '[img]' . $value . '[/img]' : '';
40
+		return ($value) ? '[img]'.$value.'[/img]' : '';
41 41
 	}
42 42
 
43 43
 	/**
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 		));
59 59
 
60 60
 		$this->ptemplate->assign_vars($data);
61
-		$field = $this->ptemplate->render_view('blitze/content', "fields/image.html", $field . '_field');
61
+		$field = $this->ptemplate->render_view('blitze/content', "fields/image.html", $field.'_field');
62 62
 
63 63
 		$data['field_value'] = $bbcode_value;
64 64
 
@@ -117,14 +117,14 @@  discard block
 block discarded – undo
117 117
 	 */
118 118
 	private function get_image_html($image, $mode, array $field_props)
119 119
 	{
120
-		$image = $image ?: '<img src="' . $field_props['default'] . '" class="postimage" alt="Image" />';
120
+		$image = $image ?: '<img src="'.$field_props['default'].'" class="postimage" alt="Image" />';
121 121
 
122
-		$html = '<figure class="img-ui">' . $image . '</figure>';
122
+		$html = '<figure class="img-ui">'.$image.'</figure>';
123 123
 		if ($mode !== 'block')
124 124
 		{
125
-			$view_props = array_fill_keys(array($mode . '_size', $mode . '_align'), '');
125
+			$view_props = array_fill_keys(array($mode.'_size', $mode.'_align'), '');
126 126
 			$image_props = array_filter(array_intersect_key($field_props, $view_props));
127
-			$html = '<div class="' . join(' ', $image_props) . '">' . $html . '</div>';
127
+			$html = '<div class="'.join(' ', $image_props).'">'.$html.'</div>';
128 128
 		}
129 129
 		return $html;
130 130
 	}
Please login to merge, or discard this patch.
services/form/builder.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
 		foreach ($fields_data as $field => $value)
145 145
 		{
146 146
 			$value = is_array($value) ? join("\n", $value) : $value;
147
-			$message .= '[smcf=' . $field . ']' . $value . '[/smcf]';
147
+			$message .= '[smcf='.$field.']'.$value.'[/smcf]';
148 148
 		}
149 149
 
150 150
 		return $message;
@@ -196,13 +196,13 @@  discard block
 block discarded – undo
196 196
 		$text = '';
197 197
 		if ($entity = $this->types->get_type($content_type))
198 198
 		{
199
-			$fields_accessor = 'get_' . $view . '_fields';
200
-			$template_accessor = 'get_' . $view . '_tpl';
199
+			$fields_accessor = 'get_'.$view.'_fields';
200
+			$template_accessor = 'get_'.$view.'_tpl';
201 201
 
202 202
 			$this->fields->prepare_to_show($entity, array($post_data['topic_id']), $entity->$fields_accessor(), $entity->$template_accessor(), $view);
203 203
 			$content = $this->fields->build_content(array_change_key_case($post_data, CASE_UPPER));
204 204
 
205
-			$text =  $content['CUSTOM_DISPLAY'] ?: join('', $content['FIELDS']['all']);
205
+			$text = $content['CUSTOM_DISPLAY'] ?: join('', $content['FIELDS']['all']);
206 206
 		}
207 207
 		return $text;
208 208
 	}
@@ -397,8 +397,8 @@  discard block
 block discarded – undo
397 397
 		}
398 398
 		else
399 399
 		{
400
-			$options[ITEM_UNAPPROVED]	= 'STATUS_DISAPPROVE';
401
-			$options[ITEM_APPROVED]		= 'STATUS_APPROVE';
400
+			$options[ITEM_UNAPPROVED] = 'STATUS_DISAPPROVE';
401
+			$options[ITEM_APPROVED] = 'STATUS_APPROVE';
402 402
 		}
403 403
 
404 404
 		return $options;
Please login to merge, or discard this patch.
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -281,8 +281,7 @@  discard block
 block discarded – undo
281 281
 		if (!$field_data['field_mod_only'] || $this->mode === 'mcp')
282 282
 		{
283 283
 			$this->form->add($field, $field_data['field_type'], $field_data, $topic_id);
284
-		}
285
-		else if (!empty($field_data['field_value']))
284
+		} else if (!empty($field_data['field_value']))
286 285
 		{
287 286
 			$this->form->add($field, 'hidden', $field_data, $topic_id);
288 287
 		}
@@ -329,8 +328,7 @@  discard block
 block discarded – undo
329 328
 			{
330 329
 				$data['force_visibility'] = $visibility;
331 330
 			}
332
-		}
333
-		else if ($this->force_state())
331
+		} else if ($this->force_state())
334 332
 		{
335 333
 			$data['force_visibility'] = ($mode == 'edit_first_post') ? ITEM_REAPPROVE : ITEM_UNAPPROVED;
336 334
 		}
@@ -394,8 +392,7 @@  discard block
 block discarded – undo
394 392
 		if ($visibility == ITEM_APPROVED)
395 393
 		{
396 394
 			$options[ITEM_REAPPROVE] = 'STATUS_REAPPROVE';
397
-		}
398
-		else
395
+		} else
399 396
 		{
400 397
 			$options[ITEM_UNAPPROVED]	= 'STATUS_DISAPPROVE';
401 398
 			$options[ITEM_APPROVED]		= 'STATUS_APPROVE';
Please login to merge, or discard this patch.