@@ -13,32 +13,32 @@ |
||
13 | 13 | class after_not_first_post extends base |
14 | 14 | { |
15 | 15 | /** |
16 | - * {@inheritDoc} |
|
17 | - */ |
|
16 | + * {@inheritDoc} |
|
17 | + */ |
|
18 | 18 | public function get_id() |
19 | 19 | { |
20 | 20 | return 'after_not_first_post'; |
21 | 21 | } |
22 | 22 | |
23 | 23 | /** |
24 | - * {@inheritDoc} |
|
25 | - */ |
|
24 | + * {@inheritDoc} |
|
25 | + */ |
|
26 | 26 | public function get_name() |
27 | 27 | { |
28 | 28 | return $this->user->lang('AD_AFTER_NOT_FIRST_POST'); |
29 | 29 | } |
30 | 30 | |
31 | 31 | /** |
32 | - * {@inheritDoc} |
|
33 | - */ |
|
32 | + * {@inheritDoc} |
|
33 | + */ |
|
34 | 34 | public function get_desc() |
35 | 35 | { |
36 | 36 | return $this->user->lang('AD_AFTER_NOT_FIRST_POST_DESC'); |
37 | 37 | } |
38 | 38 | |
39 | 39 | /** |
40 | - * {@inheritDoc} |
|
41 | - */ |
|
40 | + * {@inheritDoc} |
|
41 | + */ |
|
42 | 42 | public function will_display() |
43 | 43 | { |
44 | 44 | return strpos($this->user->page['page_name'], 'viewtopic') !== false; |
@@ -13,24 +13,24 @@ |
||
13 | 13 | class above_footer extends base |
14 | 14 | { |
15 | 15 | /** |
16 | - * {@inheritDoc} |
|
17 | - */ |
|
16 | + * {@inheritDoc} |
|
17 | + */ |
|
18 | 18 | public function get_id() |
19 | 19 | { |
20 | 20 | return 'above_footer'; |
21 | 21 | } |
22 | 22 | |
23 | 23 | /** |
24 | - * {@inheritDoc} |
|
25 | - */ |
|
24 | + * {@inheritDoc} |
|
25 | + */ |
|
26 | 26 | public function get_name() |
27 | 27 | { |
28 | 28 | return $this->user->lang('AD_ABOVE_FOOTER'); |
29 | 29 | } |
30 | 30 | |
31 | 31 | /** |
32 | - * {@inheritDoc} |
|
33 | - */ |
|
32 | + * {@inheritDoc} |
|
33 | + */ |
|
34 | 34 | public function get_desc() |
35 | 35 | { |
36 | 36 | return $this->user->lang('AD_ABOVE_FOOTER_DESC'); |
@@ -13,24 +13,24 @@ |
||
13 | 13 | class below_footer extends base |
14 | 14 | { |
15 | 15 | /** |
16 | - * {@inheritDoc} |
|
17 | - */ |
|
16 | + * {@inheritDoc} |
|
17 | + */ |
|
18 | 18 | public function get_id() |
19 | 19 | { |
20 | 20 | return 'below_footer'; |
21 | 21 | } |
22 | 22 | |
23 | 23 | /** |
24 | - * {@inheritDoc} |
|
25 | - */ |
|
24 | + * {@inheritDoc} |
|
25 | + */ |
|
26 | 26 | public function get_name() |
27 | 27 | { |
28 | 28 | return $this->user->lang('AD_BELOW_FOOTER'); |
29 | 29 | } |
30 | 30 | |
31 | 31 | /** |
32 | - * {@inheritDoc} |
|
33 | - */ |
|
32 | + * {@inheritDoc} |
|
33 | + */ |
|
34 | 34 | public function get_desc() |
35 | 35 | { |
36 | 36 | return $this->user->lang('AD_BELOW_FOOTER_DESC'); |
@@ -13,24 +13,24 @@ |
||
13 | 13 | class above_header extends base |
14 | 14 | { |
15 | 15 | /** |
16 | - * {@inheritDoc} |
|
17 | - */ |
|
16 | + * {@inheritDoc} |
|
17 | + */ |
|
18 | 18 | public function get_id() |
19 | 19 | { |
20 | 20 | return 'above_header'; |
21 | 21 | } |
22 | 22 | |
23 | 23 | /** |
24 | - * {@inheritDoc} |
|
25 | - */ |
|
24 | + * {@inheritDoc} |
|
25 | + */ |
|
26 | 26 | public function get_name() |
27 | 27 | { |
28 | 28 | return $this->user->lang('AD_ABOVE_HEADER'); |
29 | 29 | } |
30 | 30 | |
31 | 31 | /** |
32 | - * {@inheritDoc} |
|
33 | - */ |
|
32 | + * {@inheritDoc} |
|
33 | + */ |
|
34 | 34 | public function get_desc() |
35 | 35 | { |
36 | 36 | return $this->user->lang('AD_ABOVE_HEADER_DESC'); |
@@ -13,32 +13,32 @@ |
||
13 | 13 | class after_profile extends base |
14 | 14 | { |
15 | 15 | /** |
16 | - * {@inheritDoc} |
|
17 | - */ |
|
16 | + * {@inheritDoc} |
|
17 | + */ |
|
18 | 18 | public function get_id() |
19 | 19 | { |
20 | 20 | return 'after_profile'; |
21 | 21 | } |
22 | 22 | |
23 | 23 | /** |
24 | - * {@inheritDoc} |
|
25 | - */ |
|
24 | + * {@inheritDoc} |
|
25 | + */ |
|
26 | 26 | public function get_name() |
27 | 27 | { |
28 | 28 | return $this->user->lang('AD_AFTER_PROFILE'); |
29 | 29 | } |
30 | 30 | |
31 | 31 | /** |
32 | - * {@inheritDoc} |
|
33 | - */ |
|
32 | + * {@inheritDoc} |
|
33 | + */ |
|
34 | 34 | public function get_desc() |
35 | 35 | { |
36 | 36 | return $this->user->lang('AD_AFTER_PROFILE_DESC'); |
37 | 37 | } |
38 | 38 | |
39 | 39 | /** |
40 | - * {@inheritDoc} |
|
41 | - */ |
|
40 | + * {@inheritDoc} |
|
41 | + */ |
|
42 | 42 | public function will_display() |
43 | 43 | { |
44 | 44 | return strpos($this->user->page['page_name'], 'memberlist') !== false && strpos($this->user->page['query_string'], 'viewprofile') !== false; |
@@ -13,32 +13,32 @@ |
||
13 | 13 | class before_profile extends base |
14 | 14 | { |
15 | 15 | /** |
16 | - * {@inheritDoc} |
|
17 | - */ |
|
16 | + * {@inheritDoc} |
|
17 | + */ |
|
18 | 18 | public function get_id() |
19 | 19 | { |
20 | 20 | return 'before_profile'; |
21 | 21 | } |
22 | 22 | |
23 | 23 | /** |
24 | - * {@inheritDoc} |
|
25 | - */ |
|
24 | + * {@inheritDoc} |
|
25 | + */ |
|
26 | 26 | public function get_name() |
27 | 27 | { |
28 | 28 | return $this->user->lang('AD_BEFORE_PROFILE'); |
29 | 29 | } |
30 | 30 | |
31 | 31 | /** |
32 | - * {@inheritDoc} |
|
33 | - */ |
|
32 | + * {@inheritDoc} |
|
33 | + */ |
|
34 | 34 | public function get_desc() |
35 | 35 | { |
36 | 36 | return $this->user->lang('AD_BEFORE_PROFILE_DESC'); |
37 | 37 | } |
38 | 38 | |
39 | 39 | /** |
40 | - * {@inheritDoc} |
|
41 | - */ |
|
40 | + * {@inheritDoc} |
|
41 | + */ |
|
42 | 42 | public function will_display() |
43 | 43 | { |
44 | 44 | return strpos($this->user->page['page_name'], 'memberlist') !== false && strpos($this->user->page['query_string'], 'viewprofile') !== false; |
@@ -33,8 +33,8 @@ discard block |
||
33 | 33 | protected $location_manager; |
34 | 34 | |
35 | 35 | /** |
36 | - * {@inheritdoc} |
|
37 | - */ |
|
36 | + * {@inheritdoc} |
|
37 | + */ |
|
38 | 38 | static public function getSubscribedEvents() |
39 | 39 | { |
40 | 40 | return array( |
@@ -43,13 +43,13 @@ discard block |
||
43 | 43 | } |
44 | 44 | |
45 | 45 | /** |
46 | - * Constructor |
|
47 | - * |
|
48 | - * @param \phpbb\request\request $request Request object |
|
49 | - * @param \phpbb\template\template $template Template object |
|
50 | - * @param \phpbb\admanagement\ad\manager $manager Advertisement manager object |
|
51 | - * @param \phpbb\admanagement\location\manager $location_manager Template location manager object |
|
52 | - */ |
|
46 | + * Constructor |
|
47 | + * |
|
48 | + * @param \phpbb\request\request $request Request object |
|
49 | + * @param \phpbb\template\template $template Template object |
|
50 | + * @param \phpbb\admanagement\ad\manager $manager Advertisement manager object |
|
51 | + * @param \phpbb\admanagement\location\manager $location_manager Template location manager object |
|
52 | + */ |
|
53 | 53 | public function __construct(\phpbb\request\request $request, \phpbb\template\template $template, \phpbb\admanagement\ad\manager $manager, \phpbb\admanagement\location\manager $location_manager) |
54 | 54 | { |
55 | 55 | $this->request = $request; |
@@ -45,16 +45,16 @@ discard block |
||
45 | 45 | protected $errors = array(); |
46 | 46 | |
47 | 47 | /** |
48 | - * Constructor |
|
49 | - * |
|
50 | - * @param \phpbb\template\template $template Template object |
|
51 | - * @param \phpbb\user $user User object |
|
52 | - * @param \phpbb\request\request $request Request object |
|
53 | - * @param \phpbb\admanagement\ad\manager $manager Advertisement manager object |
|
54 | - * @param \phpbb\admanagement\location\manager $location_manager Template location manager object |
|
55 | - * @param string $php_ext PHP extension |
|
56 | - * @param string $ext_path Path to this extension |
|
57 | - */ |
|
48 | + * Constructor |
|
49 | + * |
|
50 | + * @param \phpbb\template\template $template Template object |
|
51 | + * @param \phpbb\user $user User object |
|
52 | + * @param \phpbb\request\request $request Request object |
|
53 | + * @param \phpbb\admanagement\ad\manager $manager Advertisement manager object |
|
54 | + * @param \phpbb\admanagement\location\manager $location_manager Template location manager object |
|
55 | + * @param string $php_ext PHP extension |
|
56 | + * @param string $ext_path Path to this extension |
|
57 | + */ |
|
58 | 58 | public function __construct(\phpbb\template\template $template, \phpbb\user $user, \phpbb\request\request $request, \phpbb\admanagement\ad\manager $manager, \phpbb\admanagement\location\manager $location_manager, $php_ext, $ext_path) |
59 | 59 | { |
60 | 60 | $this->template = $template; |
@@ -67,10 +67,10 @@ discard block |
||
67 | 67 | } |
68 | 68 | |
69 | 69 | /** |
70 | - * Process user request |
|
71 | - * |
|
72 | - * @return void |
|
73 | - */ |
|
70 | + * Process user request |
|
71 | + * |
|
72 | + * @return void |
|
73 | + */ |
|
74 | 74 | public function main() |
75 | 75 | { |
76 | 76 | $this->user->add_lang_ext('phpbb/admanagement', 'acp'); |
@@ -87,31 +87,31 @@ discard block |
||
87 | 87 | } |
88 | 88 | |
89 | 89 | /** |
90 | - * Set page url |
|
91 | - * |
|
92 | - * @param string $u_action Custom form action |
|
93 | - * @return void |
|
94 | - */ |
|
90 | + * Set page url |
|
91 | + * |
|
92 | + * @param string $u_action Custom form action |
|
93 | + * @return void |
|
94 | + */ |
|
95 | 95 | public function set_page_url($u_action) |
96 | 96 | { |
97 | 97 | $this->u_action = $u_action; |
98 | 98 | } |
99 | 99 | |
100 | 100 | /** |
101 | - * Get ACP page title for Ads module |
|
102 | - * |
|
103 | - * @return string Language string for Ads ACP module |
|
104 | - */ |
|
101 | + * Get ACP page title for Ads module |
|
102 | + * |
|
103 | + * @return string Language string for Ads ACP module |
|
104 | + */ |
|
105 | 105 | public function get_page_title() |
106 | 106 | { |
107 | 107 | return $this->user->lang('ACP_ADMANAGEMENT_TITLE'); |
108 | 108 | } |
109 | 109 | |
110 | 110 | /** |
111 | - * Add an advertisement |
|
112 | - * |
|
113 | - * @return void |
|
114 | - */ |
|
111 | + * Add an advertisement |
|
112 | + * |
|
113 | + * @return void |
|
114 | + */ |
|
115 | 115 | public function action_add() |
116 | 116 | { |
117 | 117 | add_form_key('phpbb/admanagement/add'); |
@@ -142,10 +142,10 @@ discard block |
||
142 | 142 | } |
143 | 143 | |
144 | 144 | /** |
145 | - * Edit an advertisement |
|
146 | - * |
|
147 | - * @return void |
|
148 | - */ |
|
145 | + * Edit an advertisement |
|
146 | + * |
|
147 | + * @return void |
|
148 | + */ |
|
149 | 149 | public function action_edit() |
150 | 150 | { |
151 | 151 | $ad_id = $this->request->variable('id', 0); |
@@ -196,30 +196,30 @@ discard block |
||
196 | 196 | } |
197 | 197 | |
198 | 198 | /** |
199 | - * Enable an advertisement |
|
200 | - * |
|
201 | - * @return void |
|
202 | - */ |
|
199 | + * Enable an advertisement |
|
200 | + * |
|
201 | + * @return void |
|
202 | + */ |
|
203 | 203 | public function action_enable() |
204 | 204 | { |
205 | 205 | $this->ad_enable(true); |
206 | 206 | } |
207 | 207 | |
208 | 208 | /** |
209 | - * Disable an advertisement |
|
210 | - * |
|
211 | - * @return void |
|
212 | - */ |
|
209 | + * Disable an advertisement |
|
210 | + * |
|
211 | + * @return void |
|
212 | + */ |
|
213 | 213 | public function action_disable() |
214 | 214 | { |
215 | 215 | $this->ad_enable(false); |
216 | 216 | } |
217 | 217 | |
218 | 218 | /** |
219 | - * Delete an advertisement |
|
220 | - * |
|
221 | - * @return void |
|
222 | - */ |
|
219 | + * Delete an advertisement |
|
220 | + * |
|
221 | + * @return void |
|
222 | + */ |
|
223 | 223 | public function action_delete() |
224 | 224 | { |
225 | 225 | $ad_id = $this->request->variable('id', 0); |
@@ -253,10 +253,10 @@ discard block |
||
253 | 253 | } |
254 | 254 | |
255 | 255 | /** |
256 | - * Display the ads |
|
257 | - * |
|
258 | - * @return void |
|
259 | - */ |
|
256 | + * Display the ads |
|
257 | + * |
|
258 | + * @return void |
|
259 | + */ |
|
260 | 260 | public function list_ads() |
261 | 261 | { |
262 | 262 | foreach ($this->manager->get_all_ads() as $row) |
@@ -281,11 +281,11 @@ discard block |
||
281 | 281 | } |
282 | 282 | |
283 | 283 | /** |
284 | - * Enable/disable an advertisement |
|
285 | - * |
|
286 | - * @param bool $enable Enable or disable the advertisement? |
|
287 | - * @return void |
|
288 | - */ |
|
284 | + * Enable/disable an advertisement |
|
285 | + * |
|
286 | + * @param bool $enable Enable or disable the advertisement? |
|
287 | + * @return void |
|
288 | + */ |
|
289 | 289 | protected function ad_enable($enable) |
290 | 290 | { |
291 | 291 | $ad_id = $this->request->variable('id', 0); |
@@ -316,10 +316,10 @@ discard block |
||
316 | 316 | } |
317 | 317 | |
318 | 318 | /** |
319 | - * Get admin form data. |
|
320 | - * |
|
321 | - * @return array Form data |
|
322 | - */ |
|
319 | + * Get admin form data. |
|
320 | + * |
|
321 | + * @return array Form data |
|
322 | + */ |
|
323 | 323 | protected function get_form_data() |
324 | 324 | { |
325 | 325 | return array( |
@@ -332,12 +332,12 @@ discard block |
||
332 | 332 | } |
333 | 333 | |
334 | 334 | /** |
335 | - * Validate form data. |
|
336 | - * |
|
337 | - * @param array $data The form data. |
|
338 | - * @param string $form_name The form name. |
|
339 | - * @return void |
|
340 | - */ |
|
335 | + * Validate form data. |
|
336 | + * |
|
337 | + * @param array $data The form data. |
|
338 | + * @param string $form_name The form name. |
|
339 | + * @return void |
|
340 | + */ |
|
341 | 341 | protected function validate($data, $form_name) |
342 | 342 | { |
343 | 343 | if (!check_form_key($form_name)) |
@@ -356,11 +356,11 @@ discard block |
||
356 | 356 | } |
357 | 357 | |
358 | 358 | /** |
359 | - * Assign form data to the template. |
|
360 | - * |
|
361 | - * @param array $data The form data. |
|
362 | - * @return void |
|
363 | - */ |
|
359 | + * Assign form data to the template. |
|
360 | + * |
|
361 | + * @param array $data The form data. |
|
362 | + * @return void |
|
363 | + */ |
|
364 | 364 | protected function assign_form_data($data) |
365 | 365 | { |
366 | 366 | $this->template->assign_vars(array( |
@@ -375,11 +375,11 @@ discard block |
||
375 | 375 | } |
376 | 376 | |
377 | 377 | /** |
378 | - * Assign template locations data to the template. |
|
379 | - * |
|
380 | - * @param mixed $data The form data or nothing. |
|
381 | - * @return void |
|
382 | - */ |
|
378 | + * Assign template locations data to the template. |
|
379 | + * |
|
380 | + * @param mixed $data The form data or nothing. |
|
381 | + * @return void |
|
382 | + */ |
|
383 | 383 | protected function assign_locations($data = false) |
384 | 384 | { |
385 | 385 | foreach ($this->location_manager->get_all_locations() as $location_id => $location_data) |
@@ -394,20 +394,20 @@ discard block |
||
394 | 394 | } |
395 | 395 | |
396 | 396 | /** |
397 | - * Print success message. |
|
398 | - * |
|
399 | - * It takes arguments in the form of a language key, followed by language substitution values. |
|
400 | - */ |
|
397 | + * Print success message. |
|
398 | + * |
|
399 | + * It takes arguments in the form of a language key, followed by language substitution values. |
|
400 | + */ |
|
401 | 401 | protected function success() |
402 | 402 | { |
403 | 403 | trigger_error(call_user_func_array(array($this->user, 'lang'), func_get_args()) . adm_back_link($this->u_action)); |
404 | 404 | } |
405 | 405 | |
406 | 406 | /** |
407 | - * Print error message. |
|
408 | - * |
|
409 | - * It takes arguments in the form of a language key, followed by language substitution values. |
|
410 | - */ |
|
407 | + * Print error message. |
|
408 | + * |
|
409 | + * It takes arguments in the form of a language key, followed by language substitution values. |
|
410 | + */ |
|
411 | 411 | protected function error() |
412 | 412 | { |
413 | 413 | trigger_error(call_user_func_array(array($this->user, 'lang'), func_get_args()) . adm_back_link($this->u_action), E_USER_WARNING); |
@@ -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 array Advertisement data |
|
43 | - */ |
|
39 | + * Get specific ad |
|
40 | + * |
|
41 | + * @param int $ad_id Advertisement ID |
|
42 | + * @return array Advertisement data |
|
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 |
@@ -80,10 +80,10 @@ discard block |
||
80 | 80 | } |
81 | 81 | |
82 | 82 | /** |
83 | - * Get all advertisements |
|
84 | - * |
|
85 | - * @return array List of all ads |
|
86 | - */ |
|
83 | + * Get all advertisements |
|
84 | + * |
|
85 | + * @return array List of all ads |
|
86 | + */ |
|
87 | 87 | public function get_all_ads() |
88 | 88 | { |
89 | 89 | $sql = 'SELECT ad_id, ad_name, ad_enabled |
@@ -96,11 +96,11 @@ discard block |
||
96 | 96 | } |
97 | 97 | |
98 | 98 | /** |
99 | - * Insert new advertisement to the database |
|
100 | - * |
|
101 | - * @param array $data New ad data |
|
102 | - * @return int New advertisement ID |
|
103 | - */ |
|
99 | + * Insert new advertisement to the database |
|
100 | + * |
|
101 | + * @param array $data New ad data |
|
102 | + * @return int New advertisement ID |
|
103 | + */ |
|
104 | 104 | public function insert_ad($data) |
105 | 105 | { |
106 | 106 | $data = $this->intersect_ad_data($data); |
@@ -112,12 +112,12 @@ discard block |
||
112 | 112 | } |
113 | 113 | |
114 | 114 | /** |
115 | - * Update advertisement |
|
116 | - * |
|
117 | - * @param int $ad_id Advertisement ID |
|
118 | - * @param array $data List of data to update in the database |
|
119 | - * @return int Number of affected rows. Can be used to determine if any ad has been udated. |
|
120 | - */ |
|
115 | + * Update advertisement |
|
116 | + * |
|
117 | + * @param int $ad_id Advertisement ID |
|
118 | + * @param array $data List of data to update in the database |
|
119 | + * @return int Number of affected rows. Can be used to determine if any ad has been udated. |
|
120 | + */ |
|
121 | 121 | public function update_ad($ad_id, $data) |
122 | 122 | { |
123 | 123 | $data = $this->intersect_ad_data($data); |
@@ -131,11 +131,11 @@ discard block |
||
131 | 131 | } |
132 | 132 | |
133 | 133 | /** |
134 | - * Delete advertisement |
|
135 | - * |
|
136 | - * @param int $ad_id Advertisement ID |
|
137 | - * @return int Number of affected rows. Can be used to determine if any ad has been deleted. |
|
138 | - */ |
|
134 | + * Delete advertisement |
|
135 | + * |
|
136 | + * @param int $ad_id Advertisement ID |
|
137 | + * @return int Number of affected rows. Can be used to determine if any ad has been deleted. |
|
138 | + */ |
|
139 | 139 | public function delete_ad($ad_id) |
140 | 140 | { |
141 | 141 | $sql = 'DELETE FROM ' . $this->ads_table . ' |
@@ -146,11 +146,11 @@ discard block |
||
146 | 146 | } |
147 | 147 | |
148 | 148 | /** |
149 | - * Get all locations for specified advertisement |
|
150 | - * |
|
151 | - * @param int $ad_id Advertisement ID |
|
152 | - * @return array List of template locations for specified ad |
|
153 | - */ |
|
149 | + * Get all locations for specified advertisement |
|
150 | + * |
|
151 | + * @param int $ad_id Advertisement ID |
|
152 | + * @return array List of template locations for specified ad |
|
153 | + */ |
|
154 | 154 | public function get_ad_locations($ad_id) |
155 | 155 | { |
156 | 156 | $ad_locations = array(); |
@@ -169,12 +169,12 @@ discard block |
||
169 | 169 | } |
170 | 170 | |
171 | 171 | /** |
172 | - * Insert advertisement locations |
|
173 | - * |
|
174 | - * @param int $ad_id Advertisement ID |
|
175 | - * @param array $ad_locations List of template locations for this ad |
|
176 | - * @return void |
|
177 | - */ |
|
172 | + * Insert advertisement locations |
|
173 | + * |
|
174 | + * @param int $ad_id Advertisement ID |
|
175 | + * @param array $ad_locations List of template locations for this ad |
|
176 | + * @return void |
|
177 | + */ |
|
178 | 178 | public function insert_ad_locations($ad_id, $ad_locations) |
179 | 179 | { |
180 | 180 | $sql_ary = array(); |
@@ -189,11 +189,11 @@ discard block |
||
189 | 189 | } |
190 | 190 | |
191 | 191 | /** |
192 | - * Delete advertisement locations |
|
193 | - * |
|
194 | - * @param int $ad_id Advertisement ID |
|
195 | - * @return void |
|
196 | - */ |
|
192 | + * Delete advertisement locations |
|
193 | + * |
|
194 | + * @param int $ad_id Advertisement ID |
|
195 | + * @return void |
|
196 | + */ |
|
197 | 197 | public function delete_ad_locations($ad_id) |
198 | 198 | { |
199 | 199 | $sql = 'DELETE FROM ' . $this->ad_locations_table . ' |
@@ -202,11 +202,11 @@ discard block |
||
202 | 202 | } |
203 | 203 | |
204 | 204 | /** |
205 | - * Make sure only necessary data make their way to SQL query |
|
206 | - * |
|
207 | - * @param array $data List of data to query the database |
|
208 | - * @return array Cleaned data that contain only valid keys |
|
209 | - */ |
|
205 | + * Make sure only necessary data make their way to SQL query |
|
206 | + * |
|
207 | + * @param array $data List of data to query the database |
|
208 | + * @return array Cleaned data that contain only valid keys |
|
209 | + */ |
|
210 | 210 | protected function intersect_ad_data($data) |
211 | 211 | { |
212 | 212 | return array_intersect_key($data, array( |
@@ -218,10 +218,10 @@ discard block |
||
218 | 218 | } |
219 | 219 | |
220 | 220 | /** |
221 | - * Get the random statement for this database layer |
|
222 | - * |
|
223 | - * @return string Random statement for current database layer |
|
224 | - */ |
|
221 | + * Get the random statement for this database layer |
|
222 | + * |
|
223 | + * @return string Random statement for current database layer |
|
224 | + */ |
|
225 | 225 | protected function sql_random() |
226 | 226 | { |
227 | 227 | switch ($this->db->get_sql_layer()) |