Fixed importScopedSession() and moved exportUserSession() to RequestContext.
authorAaron Schulz <aschulz@wikimedia.org>
Thu, 14 Mar 2013 22:43:42 +0000 (15:43 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Fri, 15 Mar 2013 19:49:54 +0000 (12:49 -0700)
commitf31a0463aaee6f8cc18d05c3af4804f67f36a2c1
tree6ad3f1fde3315a177b419d09502902d084dfd84b
parent78e45b47f6fc643c16712b787188b24800547f3a
Fixed importScopedSession() and moved exportUserSession() to RequestContext.

* Renamed WebRequest::exportUserSession -> RequestContext::exportSession.
  Updated the only callers of this new function.
* Init the user with User::newFromId() instead of relying on the session
  (which breaks when things like CentralAuth are enabled).
* Made RequestContext::exportSession() include the user ID.
* Removed now-redundant user ID checks in upload jobs.
* Added unit tests for the session import function.

Change-Id: I543e6766f7a8a828ea5d270328c3bc7738c6fe94
includes/WebRequest.php
includes/api/ApiUpload.php
includes/context/ContextSource.php
includes/context/IContextSource.php
includes/context/RequestContext.php
includes/job/jobs/AssembleUploadChunksJob.php
includes/job/jobs/PublishStashedFileJob.php
tests/phpunit/includes/RequestContextTest.php