@@ -55,19 +55,19 @@ discard block |
||
55 | 55 | protected $errors = array(); |
56 | 56 | |
57 | 57 | /** |
58 | - * Constructor |
|
59 | - * |
|
60 | - * @param \phpbb\template\template $template Template object |
|
61 | - * @param \phpbb\user $user User object |
|
62 | - * @param \phpbb\request\request $request Request object |
|
63 | - * @param \phpbb\ads\ad\manager $manager Advertisement manager object |
|
64 | - * @param \phpbb\ads\location\manager $location_manager Template location manager object |
|
65 | - * @param \phpbb\log\log $log The phpBB log system |
|
66 | - * @param \phpbb\config\db_text $config_text Config text object |
|
67 | - * @param \phpbb\config\config $config Config object |
|
68 | - * @param string $php_ext PHP extension |
|
69 | - * @param string $ext_path Path to this extension |
|
70 | - */ |
|
58 | + * Constructor |
|
59 | + * |
|
60 | + * @param \phpbb\template\template $template Template object |
|
61 | + * @param \phpbb\user $user User object |
|
62 | + * @param \phpbb\request\request $request Request object |
|
63 | + * @param \phpbb\ads\ad\manager $manager Advertisement manager object |
|
64 | + * @param \phpbb\ads\location\manager $location_manager Template location manager object |
|
65 | + * @param \phpbb\log\log $log The phpBB log system |
|
66 | + * @param \phpbb\config\db_text $config_text Config text object |
|
67 | + * @param \phpbb\config\config $config Config object |
|
68 | + * @param string $php_ext PHP extension |
|
69 | + * @param string $ext_path Path to this extension |
|
70 | + */ |
|
71 | 71 | public function __construct(\phpbb\template\template $template, \phpbb\user $user, \phpbb\request\request $request, \phpbb\ads\ad\manager $manager, \phpbb\ads\location\manager $location_manager, \phpbb\log\log $log, \phpbb\config\db_text $config_text, \phpbb\config\config $config, $php_ext, $ext_path) |
72 | 72 | { |
73 | 73 | $this->template = $template; |
@@ -83,10 +83,10 @@ discard block |
||
83 | 83 | } |
84 | 84 | |
85 | 85 | /** |
86 | - * Process user request for manage mode |
|
87 | - * |
|
88 | - * @return void |
|
89 | - */ |
|
86 | + * Process user request for manage mode |
|
87 | + * |
|
88 | + * @return void |
|
89 | + */ |
|
90 | 90 | public function mode_manage() |
91 | 91 | { |
92 | 92 | $this->setup(); |
@@ -103,10 +103,10 @@ discard block |
||
103 | 103 | } |
104 | 104 | |
105 | 105 | /** |
106 | - * Process user request for settings mode |
|
107 | - * |
|
108 | - * @return void |
|
109 | - */ |
|
106 | + * Process user request for settings mode |
|
107 | + * |
|
108 | + * @return void |
|
109 | + */ |
|
110 | 110 | public function mode_settings() |
111 | 111 | { |
112 | 112 | $this->setup(); |
@@ -154,31 +154,31 @@ discard block |
||
154 | 154 | } |
155 | 155 | |
156 | 156 | /** |
157 | - * Set page url |
|
158 | - * |
|
159 | - * @param string $u_action Custom form action |
|
160 | - * @return void |
|
161 | - */ |
|
157 | + * Set page url |
|
158 | + * |
|
159 | + * @param string $u_action Custom form action |
|
160 | + * @return void |
|
161 | + */ |
|
162 | 162 | public function set_page_url($u_action) |
163 | 163 | { |
164 | 164 | $this->u_action = $u_action; |
165 | 165 | } |
166 | 166 | |
167 | 167 | /** |
168 | - * Get ACP page title for Ads module |
|
169 | - * |
|
170 | - * @return string Language string for Ads ACP module |
|
171 | - */ |
|
168 | + * Get ACP page title for Ads module |
|
169 | + * |
|
170 | + * @return string Language string for Ads ACP module |
|
171 | + */ |
|
172 | 172 | public function get_page_title() |
173 | 173 | { |
174 | 174 | return $this->user->lang('ACP_PHPBB_ADS_TITLE'); |
175 | 175 | } |
176 | 176 | |
177 | 177 | /** |
178 | - * Add an advertisement |
|
179 | - * |
|
180 | - * @return void |
|
181 | - */ |
|
178 | + * Add an advertisement |
|
179 | + * |
|
180 | + * @return void |
|
181 | + */ |
|
182 | 182 | public function action_add() |
183 | 183 | { |
184 | 184 | $preview = $this->request->is_set_post('preview'); |
@@ -221,10 +221,10 @@ discard block |
||
221 | 221 | } |
222 | 222 | |
223 | 223 | /** |
224 | - * Edit an advertisement |
|
225 | - * |
|
226 | - * @return void |
|
227 | - */ |
|
224 | + * Edit an advertisement |
|
225 | + * |
|
226 | + * @return void |
|
227 | + */ |
|
228 | 228 | public function action_edit() |
229 | 229 | { |
230 | 230 | $ad_id = $this->request->variable('id', 0); |
@@ -283,30 +283,30 @@ discard block |
||
283 | 283 | } |
284 | 284 | |
285 | 285 | /** |
286 | - * Enable an advertisement |
|
287 | - * |
|
288 | - * @return void |
|
289 | - */ |
|
286 | + * Enable an advertisement |
|
287 | + * |
|
288 | + * @return void |
|
289 | + */ |
|
290 | 290 | public function action_enable() |
291 | 291 | { |
292 | 292 | $this->ad_enable(true); |
293 | 293 | } |
294 | 294 | |
295 | 295 | /** |
296 | - * Disable an advertisement |
|
297 | - * |
|
298 | - * @return void |
|
299 | - */ |
|
296 | + * Disable an advertisement |
|
297 | + * |
|
298 | + * @return void |
|
299 | + */ |
|
300 | 300 | public function action_disable() |
301 | 301 | { |
302 | 302 | $this->ad_enable(false); |
303 | 303 | } |
304 | 304 | |
305 | 305 | /** |
306 | - * Delete an advertisement |
|
307 | - * |
|
308 | - * @return void |
|
309 | - */ |
|
306 | + * Delete an advertisement |
|
307 | + * |
|
308 | + * @return void |
|
309 | + */ |
|
310 | 310 | public function action_delete() |
311 | 311 | { |
312 | 312 | $ad_id = $this->request->variable('id', 0); |
@@ -349,10 +349,10 @@ discard block |
||
349 | 349 | } |
350 | 350 | |
351 | 351 | /** |
352 | - * Display the ads |
|
353 | - * |
|
354 | - * @return void |
|
355 | - */ |
|
352 | + * Display the ads |
|
353 | + * |
|
354 | + * @return void |
|
355 | + */ |
|
356 | 356 | public function list_ads() |
357 | 357 | { |
358 | 358 | foreach ($this->manager->get_all_ads() as $row) |
@@ -382,10 +382,10 @@ discard block |
||
382 | 382 | } |
383 | 383 | |
384 | 384 | /** |
385 | - * Perform general tasks |
|
386 | - * |
|
387 | - * @return void |
|
388 | - */ |
|
385 | + * Perform general tasks |
|
386 | + * |
|
387 | + * @return void |
|
388 | + */ |
|
389 | 389 | protected function setup() |
390 | 390 | { |
391 | 391 | $this->user->add_lang_ext('phpbb/ads', 'acp'); |
@@ -394,11 +394,11 @@ discard block |
||
394 | 394 | } |
395 | 395 | |
396 | 396 | /** |
397 | - * Enable/disable an advertisement |
|
398 | - * |
|
399 | - * @param bool $enable Enable or disable the advertisement? |
|
400 | - * @return void |
|
401 | - */ |
|
397 | + * Enable/disable an advertisement |
|
398 | + * |
|
399 | + * @param bool $enable Enable or disable the advertisement? |
|
400 | + * @return void |
|
401 | + */ |
|
402 | 402 | protected function ad_enable($enable) |
403 | 403 | { |
404 | 404 | $ad_id = $this->request->variable('id', 0); |
@@ -429,11 +429,11 @@ discard block |
||
429 | 429 | } |
430 | 430 | |
431 | 431 | /** |
432 | - * Get admin form data. |
|
433 | - * |
|
434 | - * @param string $form_name The form name. |
|
435 | - * @return array Form data |
|
436 | - */ |
|
432 | + * Get admin form data. |
|
433 | + * |
|
434 | + * @param string $form_name The form name. |
|
435 | + * @return array Form data |
|
436 | + */ |
|
437 | 437 | protected function get_form_data($form_name) |
438 | 438 | { |
439 | 439 | $data = array( |
@@ -484,11 +484,11 @@ discard block |
||
484 | 484 | } |
485 | 485 | |
486 | 486 | /** |
487 | - * Assign form data to the template. |
|
488 | - * |
|
489 | - * @param array $data The form data. |
|
490 | - * @return void |
|
491 | - */ |
|
487 | + * Assign form data to the template. |
|
488 | + * |
|
489 | + * @param array $data The form data. |
|
490 | + * @return void |
|
491 | + */ |
|
492 | 492 | protected function assign_form_data($data) |
493 | 493 | { |
494 | 494 | $this->template->assign_vars(array( |
@@ -504,11 +504,11 @@ discard block |
||
504 | 504 | } |
505 | 505 | |
506 | 506 | /** |
507 | - * Prepare end date for display |
|
508 | - * |
|
509 | - * @param mixed $end_date End date. |
|
510 | - * @return string End date prepared for display. |
|
511 | - */ |
|
507 | + * Prepare end date for display |
|
508 | + * |
|
509 | + * @param mixed $end_date End date. |
|
510 | + * @return string End date prepared for display. |
|
511 | + */ |
|
512 | 512 | protected function prepare_end_date($end_date) |
513 | 513 | { |
514 | 514 | if (empty($end_date)) |
@@ -525,11 +525,11 @@ discard block |
||
525 | 525 | } |
526 | 526 | |
527 | 527 | /** |
528 | - * Assign template locations data to the template. |
|
529 | - * |
|
530 | - * @param mixed $data The form data or nothing. |
|
531 | - * @return void |
|
532 | - */ |
|
528 | + * Assign template locations data to the template. |
|
529 | + * |
|
530 | + * @param mixed $data The form data or nothing. |
|
531 | + * @return void |
|
532 | + */ |
|
533 | 533 | protected function assign_locations($data = false) |
534 | 534 | { |
535 | 535 | foreach ($this->location_manager->get_all_locations() as $location_id => $location_data) |
@@ -544,43 +544,43 @@ discard block |
||
544 | 544 | } |
545 | 545 | |
546 | 546 | /** |
547 | - * Prepare advertisement preview |
|
548 | - * |
|
549 | - * @param string $code Ad code to preview |
|
550 | - * @return void |
|
551 | - */ |
|
547 | + * Prepare advertisement preview |
|
548 | + * |
|
549 | + * @param string $code Ad code to preview |
|
550 | + * @return void |
|
551 | + */ |
|
552 | 552 | protected function ad_preview($code) |
553 | 553 | { |
554 | 554 | $this->template->assign_var('PREVIEW', htmlspecialchars_decode($code)); |
555 | 555 | } |
556 | 556 | |
557 | 557 | /** |
558 | - * Print success message. |
|
559 | - * |
|
560 | - * It takes arguments in the form of a language key, followed by language substitution values. |
|
561 | - */ |
|
558 | + * Print success message. |
|
559 | + * |
|
560 | + * It takes arguments in the form of a language key, followed by language substitution values. |
|
561 | + */ |
|
562 | 562 | protected function success() |
563 | 563 | { |
564 | 564 | trigger_error(call_user_func_array(array($this->user, 'lang'), func_get_args()) . adm_back_link($this->u_action)); |
565 | 565 | } |
566 | 566 | |
567 | 567 | /** |
568 | - * Print error message. |
|
569 | - * |
|
570 | - * It takes arguments in the form of a language key, followed by language substitution values. |
|
571 | - */ |
|
568 | + * Print error message. |
|
569 | + * |
|
570 | + * It takes arguments in the form of a language key, followed by language substitution values. |
|
571 | + */ |
|
572 | 572 | protected function error() |
573 | 573 | { |
574 | 574 | trigger_error(call_user_func_array(array($this->user, 'lang'), func_get_args()) . adm_back_link($this->u_action), E_USER_WARNING); |
575 | 575 | } |
576 | 576 | |
577 | 577 | /** |
578 | - * Log action |
|
579 | - * |
|
580 | - * @param string $action Performed action in uppercase |
|
581 | - * @param string $ad_name Advertisement name |
|
582 | - * @return void |
|
583 | - */ |
|
578 | + * Log action |
|
579 | + * |
|
580 | + * @param string $action Performed action in uppercase |
|
581 | + * @param string $ad_name Advertisement name |
|
582 | + * @return void |
|
583 | + */ |
|
584 | 584 | protected function log($action, $ad_name) |
585 | 585 | { |
586 | 586 | $this->log->add('admin', $this->user->data['user_id'], $this->user->ip, 'ACP_PHPBB_ADS_' . $action . '_LOG', time(), array($ad_name)); |
@@ -13,26 +13,26 @@ |
||
13 | 13 | class m7_adblocker extends \phpbb\db\migration\migration |
14 | 14 | { |
15 | 15 | /** |
16 | - * {@inheritDoc} |
|
17 | - */ |
|
16 | + * {@inheritDoc} |
|
17 | + */ |
|
18 | 18 | public function effectively_installed() |
19 | 19 | { |
20 | 20 | return $this->config->offsetExists('phpbb_ads_adblocker_message'); |
21 | 21 | } |
22 | 22 | |
23 | 23 | /** |
24 | - * {@inheritDoc} |
|
25 | - */ |
|
24 | + * {@inheritDoc} |
|
25 | + */ |
|
26 | 26 | static public function depends_on() |
27 | 27 | { |
28 | 28 | return array('\phpbb\ads\migrations\v10x\m1_initial_schema'); |
29 | 29 | } |
30 | 30 | |
31 | 31 | /** |
32 | - * Add phpbb_ads_adblocker_message config |
|
33 | - * |
|
34 | - * @return array Array of data update instructions |
|
35 | - */ |
|
32 | + * Add phpbb_ads_adblocker_message config |
|
33 | + * |
|
34 | + * @return array Array of data update instructions |
|
35 | + */ |
|
36 | 36 | public function update_data() |
37 | 37 | { |
38 | 38 | return array( |
@@ -13,27 +13,27 @@ discard block |
||
13 | 13 | class m8_priority extends \phpbb\db\migration\migration |
14 | 14 | { |
15 | 15 | /** |
16 | - * {@inheritDoc} |
|
17 | - */ |
|
16 | + * {@inheritDoc} |
|
17 | + */ |
|
18 | 18 | public function effectively_installed() |
19 | 19 | { |
20 | 20 | return $this->db_tools->sql_column_exists($this->table_prefix . 'ads', 'ad_priority'); |
21 | 21 | } |
22 | 22 | |
23 | 23 | /** |
24 | - * {@inheritDoc} |
|
25 | - */ |
|
24 | + * {@inheritDoc} |
|
25 | + */ |
|
26 | 26 | static public function depends_on() |
27 | 27 | { |
28 | 28 | return array('\phpbb\ads\migrations\v10x\m1_initial_schema'); |
29 | 29 | } |
30 | 30 | |
31 | 31 | /** |
32 | - * Add the priority to ads table |
|
33 | - * |
|
34 | - * @return array Array of table schema |
|
35 | - * @access public |
|
36 | - */ |
|
32 | + * Add the priority to ads table |
|
33 | + * |
|
34 | + * @return array Array of table schema |
|
35 | + * @access public |
|
36 | + */ |
|
37 | 37 | public function update_schema() |
38 | 38 | { |
39 | 39 | return array( |
@@ -51,11 +51,11 @@ discard block |
||
51 | 51 | } |
52 | 52 | |
53 | 53 | /** |
54 | - * Drop the priority from ads table |
|
55 | - * |
|
56 | - * @return array Array of table schema |
|
57 | - * @access public |
|
58 | - */ |
|
54 | + * Drop the priority from ads table |
|
55 | + * |
|
56 | + * @return array Array of table schema |
|
57 | + * @access public |
|
58 | + */ |
|
59 | 59 | public function revert_schema() |
60 | 60 | { |
61 | 61 | return array( |
@@ -22,12 +22,12 @@ discard block |
||
22 | 22 | protected $ad_locations_table; |
23 | 23 | |
24 | 24 | /** |
25 | - * Constructor |
|
26 | - * |
|
27 | - * @param \phpbb\db\driver\driver_interface $db DB driver interface |
|
28 | - * @param string $ads_table Ads table |
|
29 | - * @param string $ad_locations_table Ad locations table |
|
30 | - */ |
|
25 | + * Constructor |
|
26 | + * |
|
27 | + * @param \phpbb\db\driver\driver_interface $db DB driver interface |
|
28 | + * @param string $ads_table Ads table |
|
29 | + * @param string $ad_locations_table Ad locations table |
|
30 | + */ |
|
31 | 31 | public function __construct(\phpbb\db\driver\driver_interface $db, $ads_table, $ad_locations_table) |
32 | 32 | { |
33 | 33 | $this->db = $db; |
@@ -36,11 +36,11 @@ discard block |
||
36 | 36 | } |
37 | 37 | |
38 | 38 | /** |
39 | - * Get specific ad |
|
40 | - * |
|
41 | - * @param int $ad_id Advertisement ID |
|
42 | - * @return mixed Array with advertisement data, false if ad doesn't exist |
|
43 | - */ |
|
39 | + * Get specific ad |
|
40 | + * |
|
41 | + * @param int $ad_id Advertisement ID |
|
42 | + * @return mixed Array with advertisement data, false if ad doesn't exist |
|
43 | + */ |
|
44 | 44 | public function get_ad($ad_id) |
45 | 45 | { |
46 | 46 | $sql = 'SELECT * |
@@ -54,11 +54,11 @@ discard block |
||
54 | 54 | } |
55 | 55 | |
56 | 56 | /** |
57 | - * Get one ad per every location |
|
58 | - * |
|
59 | - * @param array $ad_locations List of ad locations to fetch ads for |
|
60 | - * @return array List of ad codes for each location |
|
61 | - */ |
|
57 | + * Get one ad per every location |
|
58 | + * |
|
59 | + * @param array $ad_locations List of ad locations to fetch ads for |
|
60 | + * @return array List of ad codes for each location |
|
61 | + */ |
|
62 | 62 | public function get_ads($ad_locations) |
63 | 63 | { |
64 | 64 | $sql = 'SELECT location_id, ad_code |
@@ -82,10 +82,10 @@ discard block |
||
82 | 82 | } |
83 | 83 | |
84 | 84 | /** |
85 | - * Get all advertisements |
|
86 | - * |
|
87 | - * @return array List of all ads |
|
88 | - */ |
|
85 | + * Get all advertisements |
|
86 | + * |
|
87 | + * @return array List of all ads |
|
88 | + */ |
|
89 | 89 | public function get_all_ads() |
90 | 90 | { |
91 | 91 | $sql = 'SELECT ad_id, ad_name, ad_enabled, ad_end_date |
@@ -98,11 +98,11 @@ discard block |
||
98 | 98 | } |
99 | 99 | |
100 | 100 | /** |
101 | - * Insert new advertisement to the database |
|
102 | - * |
|
103 | - * @param array $data New ad data |
|
104 | - * @return int New advertisement ID |
|
105 | - */ |
|
101 | + * Insert new advertisement to the database |
|
102 | + * |
|
103 | + * @param array $data New ad data |
|
104 | + * @return int New advertisement ID |
|
105 | + */ |
|
106 | 106 | public function insert_ad($data) |
107 | 107 | { |
108 | 108 | $data = $this->intersect_ad_data($data); |
@@ -114,12 +114,12 @@ discard block |
||
114 | 114 | } |
115 | 115 | |
116 | 116 | /** |
117 | - * Update advertisement |
|
118 | - * |
|
119 | - * @param int $ad_id Advertisement ID |
|
120 | - * @param array $data List of data to update in the database |
|
121 | - * @return int Number of affected rows. Can be used to determine if any ad has been updated. |
|
122 | - */ |
|
117 | + * Update advertisement |
|
118 | + * |
|
119 | + * @param int $ad_id Advertisement ID |
|
120 | + * @param array $data List of data to update in the database |
|
121 | + * @return int Number of affected rows. Can be used to determine if any ad has been updated. |
|
122 | + */ |
|
123 | 123 | public function update_ad($ad_id, $data) |
124 | 124 | { |
125 | 125 | $data = $this->intersect_ad_data($data); |
@@ -133,11 +133,11 @@ discard block |
||
133 | 133 | } |
134 | 134 | |
135 | 135 | /** |
136 | - * Delete advertisement |
|
137 | - * |
|
138 | - * @param int $ad_id Advertisement ID |
|
139 | - * @return int Number of affected rows. Can be used to determine if any ad has been deleted. |
|
140 | - */ |
|
136 | + * Delete advertisement |
|
137 | + * |
|
138 | + * @param int $ad_id Advertisement ID |
|
139 | + * @return int Number of affected rows. Can be used to determine if any ad has been deleted. |
|
140 | + */ |
|
141 | 141 | public function delete_ad($ad_id) |
142 | 142 | { |
143 | 143 | $sql = 'DELETE FROM ' . $this->ads_table . ' |
@@ -148,11 +148,11 @@ discard block |
||
148 | 148 | } |
149 | 149 | |
150 | 150 | /** |
151 | - * Get all locations for specified advertisement |
|
152 | - * |
|
153 | - * @param int $ad_id Advertisement ID |
|
154 | - * @return array List of template locations for specified ad |
|
155 | - */ |
|
151 | + * Get all locations for specified advertisement |
|
152 | + * |
|
153 | + * @param int $ad_id Advertisement ID |
|
154 | + * @return array List of template locations for specified ad |
|
155 | + */ |
|
156 | 156 | public function get_ad_locations($ad_id) |
157 | 157 | { |
158 | 158 | $ad_locations = array(); |
@@ -171,12 +171,12 @@ discard block |
||
171 | 171 | } |
172 | 172 | |
173 | 173 | /** |
174 | - * Insert advertisement locations |
|
175 | - * |
|
176 | - * @param int $ad_id Advertisement ID |
|
177 | - * @param array $ad_locations List of template locations for this ad |
|
178 | - * @return void |
|
179 | - */ |
|
174 | + * Insert advertisement locations |
|
175 | + * |
|
176 | + * @param int $ad_id Advertisement ID |
|
177 | + * @param array $ad_locations List of template locations for this ad |
|
178 | + * @return void |
|
179 | + */ |
|
180 | 180 | public function insert_ad_locations($ad_id, $ad_locations) |
181 | 181 | { |
182 | 182 | $sql_ary = array(); |
@@ -191,11 +191,11 @@ discard block |
||
191 | 191 | } |
192 | 192 | |
193 | 193 | /** |
194 | - * Delete advertisement locations |
|
195 | - * |
|
196 | - * @param int $ad_id Advertisement ID |
|
197 | - * @return void |
|
198 | - */ |
|
194 | + * Delete advertisement locations |
|
195 | + * |
|
196 | + * @param int $ad_id Advertisement ID |
|
197 | + * @return void |
|
198 | + */ |
|
199 | 199 | public function delete_ad_locations($ad_id) |
200 | 200 | { |
201 | 201 | $sql = 'DELETE FROM ' . $this->ad_locations_table . ' |
@@ -204,11 +204,11 @@ discard block |
||
204 | 204 | } |
205 | 205 | |
206 | 206 | /** |
207 | - * Load memberships of the user |
|
208 | - * |
|
209 | - * @param int $user_id User ID to load memberships |
|
210 | - * @return array List of group IDs user is member of |
|
211 | - */ |
|
207 | + * Load memberships of the user |
|
208 | + * |
|
209 | + * @param int $user_id User ID to load memberships |
|
210 | + * @return array List of group IDs user is member of |
|
211 | + */ |
|
212 | 212 | public function load_memberships($user_id) |
213 | 213 | { |
214 | 214 | $memberships = array(); |
@@ -226,10 +226,10 @@ discard block |
||
226 | 226 | } |
227 | 227 | |
228 | 228 | /** |
229 | - * Load all board groups |
|
230 | - * |
|
231 | - * @return array List of groups |
|
232 | - */ |
|
229 | + * Load all board groups |
|
230 | + * |
|
231 | + * @return array List of groups |
|
232 | + */ |
|
233 | 233 | public function load_groups() |
234 | 234 | { |
235 | 235 | $sql = 'SELECT group_id, group_name, group_type |
@@ -243,11 +243,11 @@ discard block |
||
243 | 243 | } |
244 | 244 | |
245 | 245 | /** |
246 | - * Make sure only necessary data make their way to SQL query |
|
247 | - * |
|
248 | - * @param array $data List of data to query the database |
|
249 | - * @return array Cleaned data that contain only valid keys |
|
250 | - */ |
|
246 | + * Make sure only necessary data make their way to SQL query |
|
247 | + * |
|
248 | + * @param array $data List of data to query the database |
|
249 | + * @return array Cleaned data that contain only valid keys |
|
250 | + */ |
|
251 | 251 | protected function intersect_ad_data($data) |
252 | 252 | { |
253 | 253 | return array_intersect_key($data, array( |
@@ -261,11 +261,11 @@ discard block |
||
261 | 261 | } |
262 | 262 | |
263 | 263 | /** |
264 | - * Get the random statement for this database layer |
|
265 | - * Random function should generate a float value between 0 and 1 |
|
266 | - * |
|
267 | - * @return string Random statement for current database layer |
|
268 | - */ |
|
264 | + * Get the random statement for this database layer |
|
265 | + * Random function should generate a float value between 0 and 1 |
|
266 | + * |
|
267 | + * @return string Random statement for current database layer |
|
268 | + */ |
|
269 | 269 | protected function sql_random() |
270 | 270 | { |
271 | 271 | switch ($this->db->get_sql_layer()) |