Pmiazga has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/381806 )
Change subject: [WIP] Use SessionManager instead of wfSetupSession ...................................................................... [WIP] Use SessionManager instead of wfSetupSession wfSetupSession is deprecated and we should use SessionManager instead. Current code throws deprecated warnings which lead to "headers already sent" warnings. Bug: T162910 Change-Id: I12dbafedd92bf6ea14e7380a33b8d5a6459b8b0b --- M Collection.php M Collection.session.php 2 files changed, 3 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Collection refs/changes/06/381806/1 diff --git a/Collection.php b/Collection.php index b3751e2..4dc945b 100644 --- a/Collection.php +++ b/Collection.php @@ -311,9 +311,8 @@ $wgAjaxExportList[] = 'wfAjaxGetCollection'; function wfAjaxPostCollection( $collection = '', $redirect = '' ) { - if ( session_id() == '' ) { - wfSetupSession(); - } + \MediaWiki\Session\SessionManager::getGlobalSession()->persist(); + $collection = FormatJson::decode( $collection, true ); $collection['enabled'] = true; $_SESSION['wsCollection'] = $collection; diff --git a/Collection.session.php b/Collection.session.php index 0e8d0cf..53caa2f 100644 --- a/Collection.session.php +++ b/Collection.session.php @@ -33,9 +33,7 @@ } public static function startSession() { - if ( session_id() == '' ) { - wfSetupSession(); - } + \MediaWiki\Session\SessionManager::getGlobalSession()->persist(); self::clearCollection(); } -- To view, visit https://gerrit.wikimedia.org/r/381806 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I12dbafedd92bf6ea14e7380a33b8d5a6459b8b0b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Collection Gerrit-Branch: master Gerrit-Owner: Pmiazga <pmia...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits