Skip to content

Commit eb00b74

Browse files
authored
Merge pull request #324 from Leinad4Mind/fix-bad-merge
Fix bad merge + improvements
2 parents 843c8ca + 24e99a2 commit eb00b74

File tree

21 files changed

+117
-116
lines changed

21 files changed

+117
-116
lines changed

.gitattributes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
.gitattributes export-ignore
44
.github export-ignore
55
.gitignore export-ignore
6-
.travis export-ignore
6+
.travis.yml export-ignore
77
.vscode export-ignore
88
tests export-ignore
99
travis export-ignore

acpcleanup/acp/main_module.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ function cleanup()
201201
// Make sure the overall image & comment count is correct...
202202
$sql = 'SELECT COUNT(image_id) AS num_images, SUM(image_comments) AS num_comments
203203
FROM ' . $table_prefix . 'gallery_images
204-
WHERE image_status <> ' . \phpbbgallery\core\block::STATUS_UNAPPROVED;
204+
WHERE image_status <> ' . (int) \phpbbgallery\core\block::STATUS_UNAPPROVED;
205205
$result = $db->sql_query($sql);
206206
$row = $db->sql_fetchrow($result);
207207
$db->sql_freeresult($result);
@@ -416,7 +416,7 @@ function cleanup()
416416
),
417417
),
418418

419-
'WHERE' => 'a.album_user_id <> ' . \phpbbgallery\core\block::PUBLIC_ALBUM . ' AND a.parent_id = 0',
419+
'WHERE' => 'a.album_user_id <> ' . (int) \phpbbgallery\core\block::PUBLIC_ALBUM . ' AND a.parent_id = 0',
420420
);
421421
$sql = $db->sql_build_query('SELECT', $sql_array);
422422
$result = $db->sql_query($sql);
@@ -439,7 +439,7 @@ function cleanup()
439439

440440
$sql = 'SELECT ga.album_user_id, ga.album_images_real
441441
FROM ' . $table_prefix . 'gallery_albums ga
442-
WHERE ga.album_user_id <> ' . \phpbbgallery\core\block::PUBLIC_ALBUM . '
442+
WHERE ga.album_user_id <> ' . (int) \phpbbgallery\core\block::PUBLIC_ALBUM . '
443443
AND ga.parent_id <> 0';
444444
$result = $db->sql_query($sql);
445445
while ($row = $db->sql_fetchrow($result))
@@ -479,7 +479,7 @@ function cleanup()
479479
'CHECK_ENTRY' => $this->u_action . '&amp;check_mode=entry',
480480

481481
'U_FIND_USERNAME' => $gallery_url->append_sid('phpbb', 'memberlist', 'mode=searchuser&amp;form=acp_gallery&amp;field=prune_usernames'),
482-
'S_SELECT_ALBUM' => $gallery_album->get_albumbox(false, '', false, false, false, \phpbbgallery\core\block::PUBLIC_ALBUM, \phpbbgallery\core\block::TYPE_UPLOAD),
482+
'S_SELECT_ALBUM' => $gallery_album->get_albumbox(false, '', false, false, false, (int) \phpbbgallery\core\block::PUBLIC_ALBUM, (int) \phpbbgallery\core\block::TYPE_UPLOAD),
483483

484484
'S_FOUNDER' => ($user->data['user_type'] == USER_FOUNDER) ? true : false,
485485
));

acpimport/acp/main_module.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ function import()
6868
$filetype = getimagesize($image_src_full);
6969
$filetype_ext = '';
7070

71-
$error_occured = false;
71+
$error_occurred = false;
7272
switch ($filetype['mime'])
7373
{
7474
case 'image/jpeg':
@@ -79,7 +79,7 @@ function import()
7979
if ((substr(strtolower($image_src), -4) != '.jpg') && (substr(strtolower($image_src), -5) != '.jpeg'))
8080
{
8181
$this->log_import_error($import_schema, sprintf($user->lang['FILETYPE_MIMETYPE_MISMATCH'], $image_src, $filetype['mime']));
82-
$error_occured = true;
82+
$error_occurred = true;
8383
}
8484
break;
8585

@@ -90,7 +90,7 @@ function import()
9090
if (substr(strtolower($image_src), -4) != '.png')
9191
{
9292
$this->log_import_error($import_schema, sprintf($user->lang['FILETYPE_MIMETYPE_MISMATCH'], $image_src, $filetype['mime']));
93-
$error_occured = true;
93+
$error_occurred = true;
9494
}
9595
break;
9696

@@ -101,7 +101,7 @@ function import()
101101
if (substr(strtolower($image_src), -4) != '.gif')
102102
{
103103
$this->log_import_error($import_schema, sprintf($user->lang['FILETYPE_MIMETYPE_MISMATCH'], $image_src, $filetype['mime']));
104-
$error_occured = true;
104+
$error_occurred = true;
105105
}
106106
break;
107107

@@ -111,29 +111,29 @@ function import()
111111
if (substr(strtolower($image_src), -5) != '.webp')
112112
{
113113
$this->log_import_error($import_schema, sprintf($user->lang['FILETYPE_MIMETYPE_MISMATCH'], $image_src, $filetype['mime']));
114-
$error_occured = true;
114+
$error_occurred = true;
115115
}
116116
break;
117117

118118
default:
119119
$this->log_import_error($import_schema, $user->lang['NOT_ALLOWED_FILE_TYPE']);
120-
$error_occured = true;
120+
$error_occurred = true;
121121
break;
122122
}
123123
$image_filename = md5(unique_id()) . $filetype_ext;
124124
$file_link = $gallery_url->path('upload') . $image_filename;
125125

126-
if (!$error_occured || !@move_uploaded_file($image_src_full, $file_link))
126+
if (!$error_occurred || !@move_uploaded_file($image_src_full, $file_link))
127127
{
128128
if (!@copy($image_src_full, $file_link))
129129
{
130130
$user->add_lang('posting');
131131
$this->log_import_error($import_schema, sprintf($user->lang['GENERAL_UPLOAD_ERROR'], $file_link));
132-
$error_occured = true;
132+
$error_occurred = true;
133133
}
134134
}
135135

136-
if (!$error_occured)
136+
if (!$error_occurred)
137137
{
138138
@chmod($file_link, 0777);
139139

@@ -149,15 +149,15 @@ function import()
149149
'image_user_ip' => $user->ip,
150150
'image_time' => $start_time + $done_images,
151151
'image_album_id' => $album_id,
152-
'image_status' => \phpbbgallery\core\block::STATUS_APPROVED,
152+
'image_status' => (int) \phpbbgallery\core\block::STATUS_APPROVED,
153153
//'image_exif_data' => '',
154154
);
155155

156156
$image_tools = $phpbb_container->get('phpbbgallery.core.file.tool');
157157
$image_tools->set_image_options($gallery_config->get('max_filesize'), $gallery_config->get('max_height'), $gallery_config->get('max_width'));
158158
$image_tools->set_image_data($file_link);
159159

160-
$additional_sql_data = array();
160+
$additional_sql_data = [];
161161

162162
/**
163163
* Event to trigger before mass update
@@ -395,7 +395,7 @@ function import()
395395
'ACP_GALLERY_TITLE_EXPLAIN' => $user->lang['ACP_IMPORT_ALBUMS_EXPLAIN'],
396396
'L_IMPORT_DIR_EMPTY' => sprintf($user->lang['IMPORT_DIR_EMPTY'], $gallery_url->path('import')),
397397
'S_ALBUM_IMPORT_ACTION' => $this->u_action,
398-
'S_SELECT_IMPORT' => $gallery_album->get_albumbox(false, 'album_id', false, false, false, \phpbbgallery\core\block::PUBLIC_ALBUM, \phpbbgallery\core\block::TYPE_UPLOAD),
398+
'S_SELECT_IMPORT' => $gallery_album->get_albumbox(false, 'album_id', false, false, false, (int) \phpbbgallery\core\block::PUBLIC_ALBUM, (int) \phpbbgallery\core\block::TYPE_UPLOAD),
399399
'U_FIND_USERNAME' => $gallery_url->append_sid('phpbb', 'memberlist', 'mode=searchuser&amp;form=acp_gallery&amp;field=username&amp;select_single=true'),
400400
));
401401
}

core/acp/albums_module.php

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,9 @@ function main($id, $mode)
114114

115115
$album_data += array(
116116
'parent_id' => $request->variable('album_parent_id', $this->parent_id),
117-
'album_type' => $request->variable('album_type', \phpbbgallery\core\block::TYPE_UPLOAD),
117+
'album_type' => $request->variable('album_type', (int) \phpbbgallery\core\block::TYPE_UPLOAD),
118118
'type_action' => $request->variable('type_action', ''),
119-
'album_status' => $request->variable('album_status', \phpbbgallery\core\block::ALBUM_OPEN),
119+
'album_status' => $request->variable('album_status', (int) \phpbbgallery\core\block::ALBUM_OPEN),
120120
'album_parents' => '',
121121
'album_name' => utf8_normalize_nfc($request->variable('album_name', '', true)),
122122
'album_desc' => utf8_normalize_nfc($request->variable('album_desc', '', true)),
@@ -151,7 +151,7 @@ function main($id, $mode)
151151
// Categories are not able to be locked...
152152
if ($album_data['album_type'] == (int) \phpbbgallery\core\block::TYPE_CAT)
153153
{
154-
$album_data['album_status'] = \phpbbgallery\core\block::ALBUM_OPEN;
154+
$album_data['album_status'] = (int) \phpbbgallery\core\block::ALBUM_OPEN;
155155
}
156156

157157
// Contests need contest_data, freaky... :-O
@@ -346,7 +346,7 @@ function main($id, $mode)
346346

347347
// Make sure no direct child albums are able to be selected as parents.
348348
$exclude_albums = array();
349-
foreach ($phpbb_ext_gallery_core_album_display->get_branch(\phpbbgallery\core\block::PUBLIC_ALBUM, $album_id, 'children') as $row)
349+
foreach ($phpbb_ext_gallery_core_album_display->get_branch((int) \phpbbgallery\core\block::PUBLIC_ALBUM, $album_id, 'children') as $row)
350350
{
351351
$exclude_albums[] = $row['album_id'];
352352
}
@@ -369,8 +369,8 @@ function main($id, $mode)
369369
{
370370
$album_data = array(
371371
'parent_id' => $this->parent_id,
372-
'album_type' => \phpbbgallery\core\block::TYPE_UPLOAD,
373-
'album_status' => \phpbbgallery\core\block::ALBUM_OPEN,
372+
'album_type' => (int) \phpbbgallery\core\block::TYPE_UPLOAD,
373+
'album_status' => (int) \phpbbgallery\core\block::ALBUM_OPEN,
374374
'album_name' => utf8_normalize_nfc($request->variable('album_name', '', true)),
375375
'album_desc' => '',
376376
'album_image' => '',
@@ -413,7 +413,7 @@ function main($id, $mode)
413413
'allow_urls' => true
414414
);
415415

416-
// Parse desciption if specified
416+
// Parse description if specified
417417
if ($album_data['album_desc'])
418418
{
419419
if (!isset($album_data['album_desc_uid']))
@@ -431,7 +431,7 @@ function main($id, $mode)
431431
}
432432

433433
$album_type_options = '';
434-
$album_type_ary = array(\phpbbgallery\core\block::TYPE_CAT => 'CAT', \phpbbgallery\core\block::TYPE_UPLOAD => 'UPLOAD', \phpbbgallery\core\block::TYPE_CONTEST => 'CONTEST');
434+
$album_type_ary = array((int) \phpbbgallery\core\block::TYPE_CAT => 'CAT', (int) \phpbbgallery\core\block::TYPE_UPLOAD => 'UPLOAD', (int) \phpbbgallery\core\block::TYPE_CONTEST => 'CONTEST');
435435

436436
foreach ($album_type_ary as $value => $lang)
437437
{
@@ -454,12 +454,12 @@ function main($id, $mode)
454454
$album_sort_dir_options .= '<option' . (($album_data['album_sort_dir'] == 'd') ? ' selected="selected"' : '') . " value='d'>" . $this->language->lang('SORT_DESCENDING') . '</option>';
455455
$album_sort_dir_options .= '<option' . (($album_data['album_sort_dir'] == 'a') ? ' selected="selected"' : '') . " value='a'>" . $this->language->lang('SORT_ASCENDING') . '</option>';
456456

457-
$statuslist = '<option value="' . \phpbbgallery\core\block::ALBUM_OPEN . '"' . (($album_data['album_status'] == (int) \phpbbgallery\core\block::ALBUM_OPEN) ? ' selected="selected"' : '') . '>' . $user->lang['UNLOCKED'] . '</option><option value="' . \phpbbgallery\core\block::ALBUM_LOCKED . '"' . (($album_data['album_status'] == (int) \phpbbgallery\core\block::ALBUM_LOCKED) ? ' selected="selected"' : '') . '>' . $user->lang['LOCKED'] . '</option>';
457+
$statuslist = '<option value="' . (int) \phpbbgallery\core\block::ALBUM_OPEN . '"' . (($album_data['album_status'] == (int) \phpbbgallery\core\block::ALBUM_OPEN) ? ' selected="selected"' : '') . '>' . $user->lang['UNLOCKED'] . '</option><option value="' . (int) \phpbbgallery\core\block::ALBUM_LOCKED . '"' . (($album_data['album_status'] == (int) \phpbbgallery\core\block::ALBUM_LOCKED) ? ' selected="selected"' : '') . '>' . $user->lang['LOCKED'] . '</option>';
458458

459459
$sql = 'SELECT album_id
460460
FROM ' . $table_prefix . 'gallery_albums
461-
WHERE album_type = ' . \phpbbgallery\core\block::TYPE_UPLOAD . '
462-
AND album_user_id = ' . \phpbbgallery\core\block::PUBLIC_ALBUM . '
461+
WHERE album_type = ' . (int) \phpbbgallery\core\block::TYPE_UPLOAD . '
462+
AND album_user_id = ' . (int) \phpbbgallery\core\block::PUBLIC_ALBUM . '
463463
AND album_id <> ' . (int) $album_id;
464464
$result = $db->sql_query_limit($sql, 1);
465465

@@ -471,10 +471,10 @@ function main($id, $mode)
471471
$db->sql_freeresult($result);
472472

473473
// Subalbum move options
474-
if ($action == 'edit' && in_array($album_data['album_type'], array(\phpbbgallery\core\block::TYPE_UPLOAD, \phpbbgallery\core\block::TYPE_CONTEST)))
474+
if ($action == 'edit' && in_array($album_data['album_type'], array((int) \phpbbgallery\core\block::TYPE_UPLOAD, (int) \phpbbgallery\core\block::TYPE_CONTEST)))
475475
{
476476
$subalbums_id = array();
477-
$subalbums = $phpbb_ext_gallery_core_album_display->get_branch(\phpbbgallery\core\block::PUBLIC_ALBUM, $album_id, 'children');
477+
$subalbums = $phpbb_ext_gallery_core_album_display->get_branch((int) \phpbbgallery\core\block::PUBLIC_ALBUM, $album_id, 'children');
478478

479479
foreach ($subalbums as $row)
480480
{
@@ -486,7 +486,7 @@ function main($id, $mode)
486486
if ($uploadable_album_exists)
487487
{
488488
$template->assign_vars(array(
489-
'S_MOVE_ALBUM_OPTIONS' => $phpbb_ext_gallery_core_album->get_albumbox(true, '', $album_data['parent_id'], false, $subalbums_id, \phpbbgallery\core\block::PUBLIC_ALBUM, \phpbbgallery\core\block::TYPE_UPLOAD),
489+
'S_MOVE_ALBUM_OPTIONS' => $phpbb_ext_gallery_core_album->get_albumbox(true, '', $album_data['parent_id'], false, $subalbums_id, (int) \phpbbgallery\core\block::PUBLIC_ALBUM, (int) \phpbbgallery\core\block::TYPE_UPLOAD),
490490
));
491491
}
492492

@@ -498,7 +498,7 @@ function main($id, $mode)
498498
else if ($uploadable_album_exists)
499499
{
500500
$template->assign_vars(array(
501-
'S_MOVE_ALBUM_OPTIONS' => $phpbb_ext_gallery_core_album->get_albumbox(true, '', $album_data['parent_id'], false, $album_id, 0, \phpbbgallery\core\block::TYPE_UPLOAD),
501+
'S_MOVE_ALBUM_OPTIONS' => $phpbb_ext_gallery_core_album->get_albumbox(true, '', $album_data['parent_id'], false, $album_id, 0, (int) \phpbbgallery\core\block::TYPE_UPLOAD),
502502
));
503503
}
504504

@@ -546,9 +546,9 @@ function main($id, $mode)
546546
'S_ALBUM_UPLOAD' => ($album_data['album_type'] == (int) \phpbbgallery\core\block::TYPE_UPLOAD) ? true : false,
547547
'S_ALBUM_CAT' => ($album_data['album_type'] == (int) \phpbbgallery\core\block::TYPE_CAT) ? true : false,
548548
'S_ALBUM_CONTEST' => ($album_data['album_type'] == (int) \phpbbgallery\core\block::TYPE_CONTEST) ? true : false,
549-
'ALBUM_UPLOAD' => \phpbbgallery\core\block::TYPE_UPLOAD,
550-
'ALBUM_CAT' => \phpbbgallery\core\block::TYPE_CAT,
551-
'ALBUM_CONTEST' => \phpbbgallery\core\block::TYPE_CONTEST,
549+
'ALBUM_UPLOAD' => (int) \phpbbgallery\core\block::TYPE_UPLOAD,
550+
'ALBUM_CAT' => (int) \phpbbgallery\core\block::TYPE_CAT,
551+
'ALBUM_CONTEST' => (int) \phpbbgallery\core\block::TYPE_CONTEST,
552552
'S_CAN_COPY_PERMISSIONS' => true,
553553

554554
'S_ALBUM_WATERMARK' => ($album_data['album_watermark']) ? true : false,
@@ -588,7 +588,7 @@ function main($id, $mode)
588588
$album_data = $phpbb_ext_gallery_core_album->get_info($album_id);
589589

590590
$subalbums_id = array();
591-
$subalbums = $phpbb_ext_gallery_core_album_display->get_branch(\phpbbgallery\core\block::PUBLIC_ALBUM, $album_id, 'children');
591+
$subalbums = $phpbb_ext_gallery_core_album_display->get_branch((int) \phpbbgallery\core\block::PUBLIC_ALBUM, $album_id, 'children');
592592

593593
foreach ($subalbums as $row)
594594
{
@@ -599,15 +599,15 @@ function main($id, $mode)
599599

600600
$sql = 'SELECT album_id
601601
FROM ' . $table_prefix . 'gallery_albums
602-
WHERE album_type = ' . \phpbbgallery\core\block::TYPE_UPLOAD . '
602+
WHERE album_type = ' . (int) \phpbbgallery\core\block::TYPE_UPLOAD . '
603603
AND album_id <> ' . (int) $album_id . '
604-
AND album_user_id = ' . \phpbbgallery\core\block::PUBLIC_ALBUM;
604+
AND album_user_id = ' . (int) \phpbbgallery\core\block::PUBLIC_ALBUM;
605605
$result = $db->sql_query_limit($sql, 1);
606606

607607
if ($db->sql_fetchrow($result))
608608
{
609609
$template->assign_vars(array(
610-
'S_MOVE_ALBUM_OPTIONS' => $phpbb_ext_gallery_core_album->get_albumbox(true, '', $album_data['parent_id'], false, $subalbums_id, \phpbbgallery\core\block::PUBLIC_ALBUM, \phpbbgallery\core\block::TYPE_UPLOAD),
610+
'S_MOVE_ALBUM_OPTIONS' => $phpbb_ext_gallery_core_album->get_albumbox(true, '', $album_data['parent_id'], false, $subalbums_id, (int) \phpbbgallery\core\block::PUBLIC_ALBUM, (int) \phpbbgallery\core\block::TYPE_UPLOAD),
611611
));
612612
}
613613
$db->sql_freeresult($result);
@@ -619,7 +619,7 @@ function main($id, $mode)
619619
'U_BACK' => $this->u_action . '&amp;parent_id=' . $this->parent_id,
620620

621621
'ALBUM_NAME' => $album_data['album_name'],
622-
'S_ALBUM_POST' => (in_array($album_data['album_type'], array(\phpbbgallery\core\block::TYPE_UPLOAD, \phpbbgallery\core\block::TYPE_CONTEST))) ? true : false,
622+
'S_ALBUM_POST' => (in_array($album_data['album_type'], array((int) \phpbbgallery\core\block::TYPE_UPLOAD, (int) \phpbbgallery\core\block::TYPE_CONTEST))) ? true : false,
623623
'S_HAS_SUBALBUMS' => ($album_data['right_id'] - $album_data['left_id'] > 1) ? true : false,
624624
'S_ALBUMS_LIST' => $albums_list,
625625

@@ -640,7 +640,7 @@ function main($id, $mode)
640640
{
641641
$navigation = '<a href="' . $this->u_action . '">' . $user->lang['GALLERY_INDEX'] . '</a>';
642642

643-
$albums_nav = $phpbb_ext_gallery_core_album_display->get_branch(\phpbbgallery\core\block::PUBLIC_ALBUM, $this->parent_id, 'parents', 'descending');
643+
$albums_nav = $phpbb_ext_gallery_core_album_display->get_branch((int) \phpbbgallery\core\block::PUBLIC_ALBUM, $this->parent_id, 'parents', 'descending');
644644
foreach ($albums_nav as $row)
645645
{
646646
if ($row['album_id'] == $this->parent_id)
@@ -665,7 +665,7 @@ function main($id, $mode)
665665
$sql = 'SELECT *
666666
FROM ' . $table_prefix . "gallery_albums
667667
WHERE parent_id = {$this->parent_id}
668-
AND album_user_id = " . \phpbbgallery\core\block::PUBLIC_ALBUM . '
668+
AND album_user_id = " . (int) \phpbbgallery\core\block::PUBLIC_ALBUM . '
669669
ORDER BY left_id';
670670
$result = $db->sql_query($sql);
671671

@@ -694,7 +694,7 @@ function main($id, $mode)
694694
'ALBUM_DESCRIPTION' => generate_text_for_display($row['album_desc'], $row['album_desc_uid'], $row['album_desc_bitfield'], $row['album_desc_options']),
695695
'ALBUM_IMAGES' => $row['album_images'],
696696

697-
'S_ALBUM_POST' => ($album_type != \phpbbgallery\core\block::TYPE_CAT) ? true : false,
697+
'S_ALBUM_POST' => ($album_type != (int) \phpbbgallery\core\block::TYPE_CAT) ? true : false,
698698

699699
'U_ALBUM' => $this->u_action . '&amp;parent_id=' . $row['album_id'],
700700
'U_MOVE_UP' => $url . '&amp;action=move_up',
@@ -734,7 +734,7 @@ function main($id, $mode)
734734
}
735735

736736
/**
737-
* Display progress bar for syncinc albums
737+
* Display progress bar for syncing albums
738738
*
739739
* borrowed from phpBB3
740740
* @author: phpBB Group

core/acp/main_module.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -298,8 +298,8 @@ function overview()
298298

299299
$sql = 'SELECT COUNT(image_id) AS num_images, image_user_id AS user_id, SUM(image_comments) AS num_comments
300300
FROM ' . $images_table . '
301-
WHERE image_status <> ' . \phpbbgallery\core\block::STATUS_UNAPPROVED . '
302-
AND image_status <> ' . \phpbbgallery\core\block::STATUS_ORPHAN . '
301+
WHERE image_status <> ' . (int) \phpbbgallery\core\block::STATUS_UNAPPROVED . '
302+
AND image_status <> ' . (int) \phpbbgallery\core\block::STATUS_ORPHAN . '
303303
GROUP BY image_user_id';
304304
$result = $db->sql_query($sql);
305305

@@ -331,7 +331,7 @@ function overview()
331331

332332
$sql = 'SELECT album_id, album_user_id
333333
FROM ' . $albums_table . '
334-
WHERE album_user_id <> ' . \phpbbgallery\core\block::PUBLIC_ALBUM . '
334+
WHERE album_user_id <> ' . (int) \phpbbgallery\core\block::PUBLIC_ALBUM . '
335335
AND parent_id = 0
336336
GROUP BY album_user_id, album_id';
337337
$result = $db->sql_query($sql);
@@ -360,7 +360,7 @@ function overview()
360360
),
361361
),
362362

363-
'WHERE' => 'a.album_user_id <> ' . \phpbbgallery\core\block::PUBLIC_ALBUM . ' AND a.parent_id = 0',
363+
'WHERE' => 'a.album_user_id <> ' . (int) \phpbbgallery\core\block::PUBLIC_ALBUM . ' AND a.parent_id = 0',
364364
'ORDER_BY' => 'a.album_id DESC',
365365
);
366366
$sql = $db->sql_build_query('SELECT', $sql_array);
@@ -574,7 +574,7 @@ function overview()
574574
'CACHE_DIR_SIZE' => get_formatted_filesize($dir_sizes['stat_cache']),
575575
'GALLERY_VERSION' => $config['phpbb_gallery_version'],
576576
'U_FIND_USERNAME' => $gallery_url->append_sid('phpbb', 'memberlist', 'mode=searchuser&amp;form=action_create_pega_form&amp;field=username&amp;select_single=true'),
577-
'S_SELECT_ALBUM' => $phpbb_ext_gallery_core_album->get_albumbox(false, 'reset_album_id', false, false, false, \phpbbgallery\core\block::PUBLIC_ALBUM, \phpbbgallery\core\block::TYPE_UPLOAD),
577+
'S_SELECT_ALBUM' => $phpbb_ext_gallery_core_album->get_albumbox(false, 'reset_album_id', false, false, false, (int) \phpbbgallery\core\block::PUBLIC_ALBUM, (int) \phpbbgallery\core\block::TYPE_UPLOAD),
578578

579579
'S_FOUNDER' => ($user->data['user_type'] == USER_FOUNDER) ? true : false,
580580
'U_ACTION' => $this->u_action,

0 commit comments

Comments
 (0)