Skip to content

Commit

Permalink
Merge pull request #96 from dragomano/update
Browse files Browse the repository at this point in the history
Update to v2.0rc4
  • Loading branch information
dragomano authored May 24, 2022
2 parents 70abc39 + 619f3de commit 4e938d8
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 14 deletions.
7 changes: 2 additions & 5 deletions Sources/LightPortal/AbstractMain.php
Original file line number Diff line number Diff line change
Expand Up @@ -230,17 +230,14 @@ private function getBlockPlacements(): array

private function getPageOptions(): array
{
return array_combine(
['show_title', 'show_author_and_date', 'show_related_pages', 'allow_comments'],
array_pad($this->txt['lp_page_options'], 4, LP_NEED_TRANSLATION)
);
return array_combine(['show_title', 'show_author_and_date', 'show_related_pages', 'allow_comments'], $this->txt['lp_page_options']);
}

private function getPluginTypes(): array
{
return array_combine(
['block', 'ssi', 'editor', 'comment', 'parser', 'article', 'frontpage', 'impex', 'block_options', 'page_options', 'icons', 'seo', 'other'],
array_pad($this->txt['lp_plugins_types'], 13, LP_NEED_TRANSLATION)
$this->txt['lp_plugins_types']
);
}
}
4 changes: 2 additions & 2 deletions Sources/LightPortal/Addons/AdsBlock/AdsBlock.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* @license https://spdx.org/licenses/GPL-3.0-or-later.html GPL-3.0-or-later
*
* @category addon
* @version 12.05.22
* @version 23.05.22
*/

namespace Bugo\LightPortal\Addons\AdsBlock;
Expand Down Expand Up @@ -409,7 +409,7 @@ private function getPlacements(): array
'after_every_last_post',
'after_last_post'
],
array_pad($this->txt['lp_ads_block']['placement_set'], 12, LP_NEED_TRANSLATION)
$this->txt['lp_ads_block']['placement_set']
);
}

Expand Down
5 changes: 1 addition & 4 deletions Sources/LightPortal/Areas/BlockArea.php
Original file line number Diff line number Diff line change
Expand Up @@ -553,10 +553,7 @@ private function getAreasInfo(): string
];

$this->txt['lp_block_areas_values'][1] = sprintf($this->txt['lp_block_areas_values'][1], 'home,portal,forum,search');
$this->context['lp_possible_areas'] = array_combine(
$example_areas,
array_pad($this->txt['lp_block_areas_values'], 12, LP_NEED_TRANSLATION)
);
$this->context['lp_possible_areas'] = array_combine($example_areas, $this->txt['lp_block_areas_values']);

ob_start();

Expand Down
2 changes: 1 addition & 1 deletion Sources/LightPortal/Areas/ConfigArea.php
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ public function basic()

$this->context['lp_frontpage_modes'] = array_combine(
[0, 'chosen_page', 'all_pages', 'chosen_pages', 'all_topics', 'chosen_topics', 'chosen_boards'],
array_pad($this->txt['lp_frontpage_mode_set'], 7, LP_NEED_TRANSLATION)
$this->txt['lp_frontpage_mode_set']
);

$this->context['board_list'] = $this->getBoardList();
Expand Down
3 changes: 1 addition & 2 deletions Sources/LightPortal/Integration.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,13 @@ public function userInfo()
$this->context['lp_num_queries'] ??= 0;

defined('LP_NAME') || define('LP_NAME', 'Light Portal');
defined('LP_VERSION') || define('LP_VERSION', '2.0rc3');
defined('LP_VERSION') || define('LP_VERSION', '2.0rc4');
defined('LP_ADDON_DIR') || define('LP_ADDON_DIR', __DIR__ . '/Addons');
defined('LP_CACHE_TIME') || define('LP_CACHE_TIME', (int) ($this->modSettings['lp_cache_update_interval'] ?? 72000));
defined('LP_ACTION') || define('LP_ACTION', $this->modSettings['lp_portal_action'] ?? 'portal');
defined('LP_PAGE_PARAM') || define('LP_PAGE_PARAM', $this->modSettings['lp_page_param'] ?? 'page');
defined('LP_BASE_URL') || define('LP_BASE_URL', $this->scripturl . '?action=' . LP_ACTION);
defined('LP_PAGE_URL') || define('LP_PAGE_URL', $this->scripturl . '?' . LP_PAGE_PARAM . '=');
defined('LP_NEED_TRANSLATION') || define('LP_NEED_TRANSLATION', '<span class="amt">Please, update translation</span>');
}

/**
Expand Down
3 changes: 3 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"require-dev": {
"phing/phing": "2.*"
},
"scripts": {
"build": "vendor/bin/phing"
}
}

0 comments on commit 4e938d8

Please sign in to comment.