Pass Context to User::resetOptions
authorumherirrender <umherirrender_de.wp@web.de>
Sat, 12 Oct 2013 20:48:26 +0000 (22:48 +0200)
committerumherirrender <umherirrender_de.wp@web.de>
Sat, 12 Oct 2013 20:48:26 +0000 (22:48 +0200)
Change-Id: I0444777697ed9a8b8afdd0e5a96841848b162a7a

includes/api/ApiOptions.php
includes/specials/SpecialPreferences.php

index b5aec77..7256066 100644 (file)
@@ -54,7 +54,7 @@ class ApiOptions extends ApiBase {
                }
 
                if ( $params['reset'] ) {
-                       $user->resetOptions( $params['resetkinds'] );
+                       $user->resetOptions( $params['resetkinds'], $this->getContext() );
                        $changed = true;
                }
 
index fe91ada..cc7b8fa 100644 (file)
@@ -91,7 +91,7 @@ class SpecialPreferences extends SpecialPage {
                }
 
                $user = $this->getUser();
-               $user->resetOptions( 'all' );
+               $user->resetOptions( 'all', $this->getContext() );
                $user->saveSettings();
 
                $url = $this->getTitle()->getFullURL( 'success' );