Reedy has uploaded a new change for review.
https://gerrit.wikimedia.org/r/231440
Change subject: Fix undefined indicies in Collection.suggest.php
......................................................................
Fix undefined indicies in Collection.suggest.php
Bug: T103859
Change-Id: I34ea1d29f1c67cccef5d3392dadc8db34f26e889
---
M Collection.suggest.php
1 file changed, 7 insertions(+), 6 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Collection
refs/changes/40/231440/1
diff --git a/Collection.suggest.php b/Collection.suggest.php
index 520680f..d36280e 100644
--- a/Collection.suggest.php
+++ b/Collection.suggest.php
@@ -55,12 +55,6 @@
if ( !CollectionSession::hasSession() ) {
CollectionSession::startSession();
}
- if ( !isset( $_SESSION['wsCollectionSuggestBan'] ) || $mode ==
'resetbans' ) {
- $_SESSION['wsCollectionSuggestBan'] = array();
- }
- if ( !isset( $_SESSION['wsCollectionSuggestProp'] ) ) {
- $_SESSION['wsCollectionSuggestProp'] = array();
- }
$template = self::getCollectionSuggestTemplate( $mode, $param );
$wgOut->setPageTitle( wfMessage( 'coll-suggest_title' ) );
@@ -167,6 +161,13 @@
private static function getCollectionSuggestTemplate( $mode, $param ) {
global $wgCollectionMaxSuggestions;
+ if ( !isset( $_SESSION['wsCollectionSuggestBan'] ) || $mode ==
'resetbans' ) {
+ $_SESSION['wsCollectionSuggestBan'] = array();
+ }
+ if ( !isset( $_SESSION['wsCollectionSuggestProp'] ) ) {
+ $_SESSION['wsCollectionSuggestProp'] = array();
+ }
+
switch( $mode ) {
case 'add':
SpecialCollection::addArticleFromName( NS_MAIN,
$param );
--
To view, visit https://gerrit.wikimedia.org/r/231440
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I34ea1d29f1c67cccef5d3392dadc8db34f26e889
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Collection
Gerrit-Branch: master
Gerrit-Owner: Reedy <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits