Pwirth has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/284863

Change subject: ExtendedSearch: Made sure, that there is a always 
RequestContext and SearchRequest
......................................................................

ExtendedSearch: Made sure, that there is a always RequestContext and 
SearchRequest

* Fixes notices thrown by SearchOptions::getInstance()

Change-Id: Ifa17c36860162a2a08004be2f4b358f66a3a8117
---
M ExtendedSearch/includes/SearchIndex/SearchOptions.class.php
1 file changed, 8 insertions(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceExtensions 
refs/changes/63/284863/1

diff --git a/ExtendedSearch/includes/SearchIndex/SearchOptions.class.php 
b/ExtendedSearch/includes/SearchIndex/SearchOptions.class.php
index 0ccba32..49a4284 100644
--- a/ExtendedSearch/includes/SearchIndex/SearchOptions.class.php
+++ b/ExtendedSearch/includes/SearchIndex/SearchOptions.class.php
@@ -85,7 +85,14 @@
         * Constructor  for SearchOptions class
         * @param SearchRequest $oSearchRequest search request
         */
-       public function __construct( $oSearchRequest, $oContext ) {
+       public function __construct( $oSearchRequest = null, $oContext = null ) 
{
+               if( is_null($oSearchRequest) ) {
+                       $oSearchRequest = new SearchRequest();
+                       $oSearchRequest->init();
+               }
+               if( is_null($oContext) ) {
+                       $oContext = RequestContext::getMain();
+               }
                $this->oSearchRequest = $oSearchRequest;
                $this->oRequestContext = $oContext;
        }

-- 
To view, visit https://gerrit.wikimedia.org/r/284863
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifa17c36860162a2a08004be2f4b358f66a3a8117
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: master
Gerrit-Owner: Pwirth <wi...@hallowelt.biz>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to