@@ -33,13 +33,13 @@ |
||
33 | 33 | protected $data = array(); |
34 | 34 | |
35 | 35 | /** |
36 | - * Construct |
|
37 | - * |
|
38 | - * @param \phpbb\db\driver\driver_interface $db Database connection |
|
39 | - * @param string $items_table Table name |
|
40 | - * @param string $pk Primary key |
|
41 | - * @param string $sql_where Column restriction |
|
42 | - */ |
|
36 | + * Construct |
|
37 | + * |
|
38 | + * @param \phpbb\db\driver\driver_interface $db Database connection |
|
39 | + * @param string $items_table Table name |
|
40 | + * @param string $pk Primary key |
|
41 | + * @param string $sql_where Column restriction |
|
42 | + */ |
|
43 | 43 | public function __construct(\phpbb\db\driver\driver_interface $db, $items_table, $pk, $sql_where = '') |
44 | 44 | { |
45 | 45 | $this->db = $db; |
@@ -15,12 +15,12 @@ |
||
15 | 15 | class invalid_argument extends base |
16 | 16 | { |
17 | 17 | /** |
18 | - * Translate this exception |
|
19 | - * |
|
20 | - * @param \phpbb\language\language $translator |
|
21 | - * @return array|string |
|
22 | - * @access public |
|
23 | - */ |
|
18 | + * Translate this exception |
|
19 | + * |
|
20 | + * @param \phpbb\language\language $translator |
|
21 | + * @return array|string |
|
22 | + * @access public |
|
23 | + */ |
|
24 | 24 | public function get_message(\phpbb\language\language $translator) |
25 | 25 | { |
26 | 26 | return $this->translate_portions($translator, $this->message_full, 'EXCEPTION_INVALID_ARGUMENT'); |
@@ -56,8 +56,8 @@ discard block |
||
56 | 56 | } |
57 | 57 | |
58 | 58 | /** |
59 | - * {@inheritdoc} |
|
60 | - */ |
|
59 | + * {@inheritdoc} |
|
60 | + */ |
|
61 | 61 | public function to_array() |
62 | 62 | { |
63 | 63 | $attributes = $this->get_attributes(); |
@@ -74,8 +74,8 @@ discard block |
||
74 | 74 | } |
75 | 75 | |
76 | 76 | /** |
77 | - * {@inheritdoc} |
|
78 | - */ |
|
77 | + * {@inheritdoc} |
|
78 | + */ |
|
79 | 79 | public function to_db() |
80 | 80 | { |
81 | 81 | $this->check_required(); |
@@ -14,12 +14,12 @@ |
||
14 | 14 | class nestedset extends builder |
15 | 15 | { |
16 | 16 | /** |
17 | - * Construct |
|
18 | - * |
|
19 | - * @param \phpbb\db\driver\driver_interface $db Database connection |
|
20 | - * @param \phpbb\lock\db $lock Lock class used to lock the table when moving forums around |
|
21 | - * @param string $table_name Table name |
|
22 | - */ |
|
17 | + * Construct |
|
18 | + * |
|
19 | + * @param \phpbb\db\driver\driver_interface $db Database connection |
|
20 | + * @param \phpbb\lock\db $lock Lock class used to lock the table when moving forums around |
|
21 | + * @param string $table_name Table name |
|
22 | + */ |
|
23 | 23 | public function __construct(\phpbb\db\driver\driver_interface $db, \phpbb\lock\db $lock, $table_name) |
24 | 24 | { |
25 | 25 | parent::__construct( |
@@ -191,7 +191,7 @@ |
||
191 | 191 | |
192 | 192 | return $this; |
193 | 193 | } |
194 | - */ |
|
194 | + */ |
|
195 | 195 | |
196 | 196 | /** |
197 | 197 | * Fetch Topic Tracking Info |
@@ -93,16 +93,16 @@ discard block |
||
93 | 93 | |
94 | 94 | $layouts = $this->get_layouts(); |
95 | 95 | |
96 | - $this->template->assign_vars(array( |
|
97 | - 'u_action' => $this->u_action, |
|
96 | + $this->template->assign_vars(array( |
|
97 | + 'u_action' => $this->u_action, |
|
98 | 98 | 'icon_picker' => $this->icon->picker(), |
99 | - 'forum_icon' => $this->config['sm_forum_icon'], |
|
100 | - 'show_forum_nav' => (bool) $this->config['sm_show_forum_nav'], |
|
99 | + 'forum_icon' => $this->config['sm_forum_icon'], |
|
100 | + 'show_forum_nav' => (bool) $this->config['sm_show_forum_nav'], |
|
101 | 101 | 'hide_login' => (bool) $this->config['sm_hide_login'], |
102 | 102 | 'hide_online' => (bool) $this->config['sm_hide_online'], |
103 | 103 | 'hide_birthday' => (bool) $this->config['sm_hide_birthday'], |
104 | - 'styles' => $this->get_styles_data($layouts), |
|
105 | - 'layouts' => $layouts, |
|
104 | + 'styles' => $this->get_styles_data($layouts), |
|
105 | + 'layouts' => $layouts, |
|
106 | 106 | )); |
107 | 107 | |
108 | 108 | $this->util->add_assets(array( |
@@ -119,21 +119,21 @@ discard block |
||
119 | 119 | */ |
120 | 120 | protected function save_settings($form_key) |
121 | 121 | { |
122 | - if ($this->request->is_set_post('submit')) |
|
123 | - { |
|
124 | - $this->check_form_key($form_key); |
|
122 | + if ($this->request->is_set_post('submit')) |
|
123 | + { |
|
124 | + $this->check_form_key($form_key); |
|
125 | 125 | |
126 | 126 | $layout_prefs = $this->request->variable('layouts', array(0 => array('' => ''))); |
127 | - $this->config_text->set('sm_layout_prefs', json_encode($layout_prefs)); |
|
127 | + $this->config_text->set('sm_layout_prefs', json_encode($layout_prefs)); |
|
128 | 128 | |
129 | - $this->config->set('sm_hide_login', $this->request->variable('hide_login', 0)); |
|
130 | - $this->config->set('sm_hide_online', $this->request->variable('hide_online', 0)); |
|
131 | - $this->config->set('sm_hide_birthday', $this->request->variable('hide_birthday', 0)); |
|
132 | - $this->config->set('sm_show_forum_nav', $this->request->variable('show_forum_nav', 0)); |
|
133 | - $this->config->set('sm_forum_icon', $this->request->variable('forum_icon', '')); |
|
129 | + $this->config->set('sm_hide_login', $this->request->variable('hide_login', 0)); |
|
130 | + $this->config->set('sm_hide_online', $this->request->variable('hide_online', 0)); |
|
131 | + $this->config->set('sm_hide_birthday', $this->request->variable('hide_birthday', 0)); |
|
132 | + $this->config->set('sm_show_forum_nav', $this->request->variable('show_forum_nav', 0)); |
|
133 | + $this->config->set('sm_forum_icon', $this->request->variable('forum_icon', '')); |
|
134 | 134 | |
135 | - $this->trigger_error($this->translator->lang('SETTINGS_SAVED') . adm_back_link($this->u_action)); |
|
136 | - } |
|
135 | + $this->trigger_error($this->translator->lang('SETTINGS_SAVED') . adm_back_link($this->u_action)); |
|
136 | + } |
|
137 | 137 | } |
138 | 138 | |
139 | 139 | /** |
@@ -227,9 +227,9 @@ discard block |
||
227 | 227 | protected function check_form_key($form_key) |
228 | 228 | { |
229 | 229 | if (!check_form_key($form_key)) |
230 | - { |
|
231 | - $this->trigger_error('FORM_INVALID'); |
|
232 | - } |
|
230 | + { |
|
231 | + $this->trigger_error('FORM_INVALID'); |
|
232 | + } |
|
233 | 233 | } |
234 | 234 | |
235 | 235 | /** |
@@ -16,23 +16,23 @@ discard block |
||
16 | 16 | class base extends \Exception |
17 | 17 | { |
18 | 18 | /** |
19 | - * Null if the message is a string, array if the message was submitted as an array |
|
20 | - * @var string|array |
|
21 | - */ |
|
19 | + * Null if the message is a string, array if the message was submitted as an array |
|
20 | + * @var string|array |
|
21 | + */ |
|
22 | 22 | protected $message_full; |
23 | 23 | |
24 | 24 | protected $previous; |
25 | 25 | |
26 | 26 | /** |
27 | - * Constructor |
|
28 | - * |
|
29 | - * Different from normal exceptions in that we do not enforce $message to be a string. |
|
30 | - * |
|
31 | - * @param string|array $message |
|
32 | - * @param int $code |
|
33 | - * @param \Exception $previous |
|
34 | - * @access public |
|
35 | - */ |
|
27 | + * Constructor |
|
28 | + * |
|
29 | + * Different from normal exceptions in that we do not enforce $message to be a string. |
|
30 | + * |
|
31 | + * @param string|array $message |
|
32 | + * @param int $code |
|
33 | + * @param \Exception $previous |
|
34 | + * @access public |
|
35 | + */ |
|
36 | 36 | public function __construct($message = null, $code = 0, \Exception $previous = null) |
37 | 37 | { |
38 | 38 | // We're slightly changing the way exceptions work |
@@ -53,18 +53,18 @@ discard block |
||
53 | 53 | } |
54 | 54 | |
55 | 55 | /** |
56 | - * Translate all portions of the message sent to the exception |
|
57 | - * |
|
58 | - * Goes through each element of the array and tries to translate them |
|
59 | - * |
|
60 | - * @param \phpbb\language\language $translator |
|
61 | - * @param string|array $message_portions The message portions to translate |
|
62 | - * @param string|null $parent_message Send a string to translate all of the |
|
63 | - * portions with the parent message (typically used to format a string |
|
64 | - * with the given message portions). Null to ignore. Default: Null |
|
65 | - * @return array|string Array if $parent_message === null else a string |
|
66 | - * @access protected |
|
67 | - */ |
|
56 | + * Translate all portions of the message sent to the exception |
|
57 | + * |
|
58 | + * Goes through each element of the array and tries to translate them |
|
59 | + * |
|
60 | + * @param \phpbb\language\language $translator |
|
61 | + * @param string|array $message_portions The message portions to translate |
|
62 | + * @param string|null $parent_message Send a string to translate all of the |
|
63 | + * portions with the parent message (typically used to format a string |
|
64 | + * with the given message portions). Null to ignore. Default: Null |
|
65 | + * @return array|string Array if $parent_message === null else a string |
|
66 | + * @access protected |
|
67 | + */ |
|
68 | 68 | protected function translate_portions(\phpbb\language\language $translator, $message_portions, $parent_message = null) |
69 | 69 | { |
70 | 70 | // Make sure our language file has been loaded |
@@ -106,12 +106,12 @@ discard block |
||
106 | 106 | } |
107 | 107 | |
108 | 108 | /** |
109 | - * Add our language file |
|
110 | - * |
|
111 | - * @param \phpbb\language\language $translator |
|
112 | - * @return null |
|
113 | - * @access public |
|
114 | - */ |
|
109 | + * Add our language file |
|
110 | + * |
|
111 | + * @param \phpbb\language\language $translator |
|
112 | + * @return null |
|
113 | + * @access public |
|
114 | + */ |
|
115 | 115 | public function add_lang(\phpbb\language\language $translator) |
116 | 116 | { |
117 | 117 | static $is_loaded = false; |
@@ -130,15 +130,15 @@ discard block |
||
130 | 130 | } |
131 | 131 | |
132 | 132 | /** |
133 | - * Output a string of this error message |
|
134 | - * |
|
135 | - * This will hopefully be never called, always catch the expected exceptions |
|
136 | - * and call get_message to translate them into an error that a user can |
|
137 | - * understand |
|
138 | - * |
|
139 | - * @return string |
|
140 | - * @access public |
|
141 | - */ |
|
133 | + * Output a string of this error message |
|
134 | + * |
|
135 | + * This will hopefully be never called, always catch the expected exceptions |
|
136 | + * and call get_message to translate them into an error that a user can |
|
137 | + * understand |
|
138 | + * |
|
139 | + * @return string |
|
140 | + * @access public |
|
141 | + */ |
|
142 | 142 | public function __toString() |
143 | 143 | { |
144 | 144 | return (is_array($this->message_full)) ? var_export($this->message_full, true) : (string) $this->message_full; |
@@ -15,12 +15,12 @@ |
||
15 | 15 | class invalid_argument extends base |
16 | 16 | { |
17 | 17 | /** |
18 | - * Translate this exception |
|
19 | - * |
|
20 | - * @param \phpbb\language\language $translator |
|
21 | - * @return array|string |
|
22 | - * @access public |
|
23 | - */ |
|
18 | + * Translate this exception |
|
19 | + * |
|
20 | + * @param \phpbb\language\language $translator |
|
21 | + * @return array|string |
|
22 | + * @access public |
|
23 | + */ |
|
24 | 24 | public function get_message(\phpbb\language\language $translator) |
25 | 25 | { |
26 | 26 | return $this->translate_portions($translator, $this->message_full, 'EXCEPTION_INVALID_ARGUMENT'); |
@@ -15,12 +15,12 @@ |
||
15 | 15 | class invalid_argument extends base |
16 | 16 | { |
17 | 17 | /** |
18 | - * Translate this exception |
|
19 | - * |
|
20 | - * @param \phpbb\language\language $translator |
|
21 | - * @return array|string |
|
22 | - * @access public |
|
23 | - */ |
|
18 | + * Translate this exception |
|
19 | + * |
|
20 | + * @param \phpbb\language\language $translator |
|
21 | + * @return array|string |
|
22 | + * @access public |
|
23 | + */ |
|
24 | 24 | public function get_message(\phpbb\language\language $translator) |
25 | 25 | { |
26 | 26 | return $this->translate_portions($translator, $this->message_full, 'EXCEPTION_INVALID_ARGUMENT'); |