-
Notifications
You must be signed in to change notification settings - Fork 150
Extension:SpecialCategoryIntersection rework #13457
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution! I have left a few notes.
@@ -293,12 +289,13 @@ private function showFooter($out){ | |||
// Examples are now kept in wikitext so that each wiki can have its own examples if it wishes. | |||
$exampleText = wfMsg('categoryintersection-footer-examples'); | |||
$rawExamples = explode("\n\n", $exampleText); | |||
foreach($rawExamples as $singleExample){ | |||
$examples = array_map(function($singleExample) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no benefit to using array_map
here, it is slower than the foreach
loop and does not make the code more readable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I reverted it.
if(!startsWith($cat, $this->CATEGORY_NS_PREFIX)){ | ||
$html .= "<em>Warning: \"$cat\" does not start with \"{$this->CATEGORY_NS_PREFIX}\".</em><br/>\n"; | ||
} | ||
$categories[] = (!startsWith($cat, $this->CATEGORY_NS_PREFIX) and !startsWith($cat, NS_CATEGORY)) ? $this->CATEGORY_NS_PREFIX.$cat : $cat; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FANDOM follows MediaWiki's PHP coding conventions. Please ensure your contributions follow this coding style.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no problem, I altered it to an if
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I hope everything is proper now.
After internal discussion it was determined we cannot accept such feature requests for now to maintain compliance with the Pull Request Policy. |
Thank's for your explanation :) |
No description provided.