Skip to content

Commit 2b7e196

Browse files
authored
Merge pull request #138 from dragomano/prepare_release
Build 2.1.4 with latest fixes
2 parents 2f68bcc + ee86cd7 commit 2b7e196

File tree

11 files changed

+20
-24
lines changed

11 files changed

+20
-24
lines changed

Sources/LightPortal/Addons/RandomPages/RandomPages.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later
1111
*
1212
* @category addon
13-
* @version 21.04.23
13+
* @version 28.04.23
1414
*/
1515

1616
namespace Bugo\LightPortal\Addons\RandomPages;
@@ -139,7 +139,7 @@ public function getData(array $parameters): array
139139
$this->context['lp_num_queries']++;
140140

141141
if (empty($page_ids))
142-
return $this->getData($num_pages - 1);
142+
return $this->getData(array_merge($parameters, ['num_pages' => $num_pages - 1]));
143143

144144
$request = $this->smcFunc['db_query']('', '
145145
SELECT p.page_id, p.alias, p.created_at, p.num_views, COALESCE(mem.real_name, {string:guest}) AS author_name, mem.id_member AS author_id

Sources/LightPortal/Areas/Config/BasicConfig.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function show(): void
4040
$this->context['canonical_url'] = $this->scripturl . '?action=admin;area=lp_settings;sa=basic';
4141
$this->context['post_url'] = $this->context['canonical_url'] . ';save';
4242

43-
$this->context['permissions_excluded']['light_portal_manage_blocks'] = [-1, 0];
43+
//$this->context['permissions_excluded']['light_portal_manage_blocks'] = [-1, 0];
4444
$this->context['permissions_excluded']['light_portal_manage_pages_own'] = [-1, 0];
4545
$this->context['permissions_excluded']['light_portal_manage_pages_any'] = [-1, 0];
4646
$this->context['permissions_excluded']['light_portal_approve_pages'] = [-1, 0];
@@ -91,7 +91,7 @@ public function show(): void
9191
['title', 'edit_permissions'],
9292
['check', 'lp_prohibit_php', 'invalid' => true],
9393
['permissions', 'light_portal_view', 'help' => 'permissionhelp_light_portal_view'],
94-
['permissions', 'light_portal_manage_blocks', 'help' => 'permissionhelp_light_portal_manage_blocks'],
94+
//['permissions', 'light_portal_manage_blocks', 'help' => 'permissionhelp_light_portal_manage_blocks'],
9595
['permissions', 'light_portal_manage_pages_own', 'help' => 'permissionhelp_light_portal_manage_pages_own'],
9696
['permissions', 'light_portal_manage_pages_any', 'help' => 'permissionhelp_light_portal_manage_pages'],
9797
['permissions', 'light_portal_approve_pages', 'help' => 'permissionhelp_light_portal_approve_pages'],

Sources/LightPortal/Areas/Config/ExtraConfig.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@ public function show(): void
113113
$save_vars[] = ['int', 'lp_time_to_change_comments'];
114114
$save_vars[] = ['int', 'lp_num_comments_per_page'];
115115
$save_vars[] = ['int', 'lp_comment_sorting'];
116-
$save_vars[] = ['check', 'lp_allow_comment_ratings'];
117116

118117
$this->saveDBSettings($save_vars);
119118

Sources/LightPortal/Areas/CreditArea.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,10 @@ public function prepareComponents(): void
7171
'name' => 'Wylek',
7272
'link' => 'https://www.simplemachines.org/community/index.php?action=profile;u=608635'
7373
],
74+
[
75+
'name' => 'Panoulis64',
76+
'link' => 'https://www.simplemachines.org/community/index.php?action=profile;u=301719'
77+
]
7478
];
7579

7680
$this->context['sponsors'] = [

Sources/LightPortal/Areas/PluginArea.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ private function extendPluginList(): void
188188
$this->context['lp_can_download'] = [];
189189

190190
if (($xml = $this->cache()->get('custom_addon_list', 259200)) === null) {
191-
$link = 'https://api.jsonserve.com/BkKVmS';
191+
$link = 'https://api.jsonserve.com/b5Jrly';
192192

193193
$addon_list = $this->fetchWebData($link);
194194

Sources/LightPortal/Integration.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -371,12 +371,12 @@ public function loadPermissions(array &$permissionGroups, array &$permissionList
371371
{
372372
$this->txt['permissiongroup_light_portal'] = LP_NAME;
373373

374-
$this->context['permissions_excluded']['light_portal_manage_blocks'][] = 0;
374+
//$this->context['permissions_excluded']['light_portal_manage_blocks'][] = 0;
375375
$this->context['permissions_excluded']['light_portal_manage_pages'][] = 0;
376376
$this->context['permissions_excluded']['light_portal_approve_pages'][] = 0;
377377

378378
$permissionList['membergroup']['light_portal_view'] = [false, 'light_portal'];
379-
$permissionList['membergroup']['light_portal_manage_blocks'] = [false, 'light_portal'];
379+
//$permissionList['membergroup']['light_portal_manage_blocks'] = [false, 'light_portal'];
380380
$permissionList['membergroup']['light_portal_manage_pages'] = [true, 'light_portal'];
381381
$permissionList['membergroup']['light_portal_approve_pages'] = [false, 'light_portal'];
382382

Sources/LightPortal/Repositories/PageRepository.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public function getAll(int $start, int $items_per_page, string $sort, string $qu
6060
'author_name' => $row['author_name'],
6161
'created_at' => $this->getFriendlyTime((int) $row['date']),
6262
'is_front' => $this->isFrontpage($row['alias']),
63-
'title' => $row['title'] ?: $row['fallback_title'] ?: $row['alias'],
63+
'title' => ($row['title'] ?: $row['fallback_title']) ?: $row['alias'],
6464
];
6565
}
6666

Sources/LightPortal/Utils/SMFTrait.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,12 +302,17 @@ protected function getBoardList(array $options = []): array
302302
{
303303
require_once $this->sourcedir . '/Subs-MessageIndex.php';
304304

305-
return getBoardList(array_merge([
305+
$defaultOptions = [
306306
'ignore_boards' => true,
307307
'use_permissions' => true,
308308
'not_redirection' => true,
309309
'excluded_boards' => empty($this->modSettings['recycle_board']) ? null : [(int) $this->modSettings['recycle_board']],
310-
], $options));
310+
];
311+
312+
if (isset($options['included_boards']))
313+
unset($defaultOptions['excluded_boards']);
314+
315+
return getBoardList(array_merge($defaultOptions, $options));
311316
}
312317

313318
protected function updateMemberData(array $members, array $data): void

Themes/default/LightPortal/ManageSettings.template.php

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -451,17 +451,6 @@ function toggleSelectAll(target) {
451451
echo '
452452
</select>
453453
</dd>
454-
</template>
455-
456-
<template x-if="comment_block === \'default\'">
457-
<dt>
458-
<a id="setting_lp_allow_comment_ratings"></a> <span><label for="lp_allow_comment_ratings">', $txt['lp_allow_comment_ratings'], '</label></span>
459-
</dt>
460-
</template>
461-
<template x-if="comment_block === \'default\'">
462-
<dd>
463-
<input type="checkbox" name="lp_allow_comment_ratings" id="lp_allow_comment_ratings"', empty($modSettings['lp_allow_comment_ratings']) ? '' : ' checked', ' value="1">
464-
</dd>
465454
</template>';
466455
}
467456

package-info.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
<type>modification</type>
88

99
<upgrade from="2.1.1-2.1.3" for="2.1.*">
10-
<remove-dir name="$sourcedir/LightPortal/Addons" />
1110
<require-dir name="Sources" destination="$boarddir" />
1211
<require-dir name="Themes" destination="$boarddir" />
1312
</upgrade>

version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.1.3
1+
2.1.4

0 commit comments

Comments
 (0)