Skip to content

Commit

Permalink
Generate ID when none given (#298)
Browse files Browse the repository at this point in the history
Fixes: #297
(cherry picked from commit 75fa0e3)
  • Loading branch information
lens0021 committed Jul 30, 2021
1 parent 716ee57 commit c0c950d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Versions and bullets are arranged chronologically from latest to oldest.
- Experimental 'Larger Elements' feature is now on testing.
- A registered end user can enable the feature in Special:Preference.
- A new configuration variable is added: `$wgFemiwikiLegacySmallElementsForAnonymousUser`. This is for enabling the larger elements for anonymous user but will soon be deprecated after finishing the test. Set this to false to enable the feature for anonymous user.
- ID for `Mediawiki:Skin-femiwiki-xeicon-map.json` of a portlet item is now always provided. The id of item could be generated in a form of `<PORTLET_NAME>-item-<ITEM_KEY>` when the item does not have one. (https://github.com/femiwiki/FemiwikiSkin/issues/297)

## v1.9.2

Expand Down
2 changes: 1 addition & 1 deletion includes/SkinFemiwiki.php
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ protected function getPortletData( $name, array $items ) {

$htmlItems = '';
foreach ( $items as $key => $item ) {
$id = $item['id'];
$id = $item['id'] ?? $name . '-item-' . $key;
if ( isset( $xeIconMap[$id] ) ) {
$options = [
'text-wrapper' => [
Expand Down

0 comments on commit c0c950d

Please sign in to comment.