/** * @param $comment * @param $pageText * @param $watch * @param $user User * @return */ protected function insertJob($comment, $pageText, $watch, $user) { $sessionKey = $this->stashSession(); $job = new UploadFromUrlJob($this->getTitle(), array('url' => $this->mUrl, 'comment' => $comment, 'pageText' => $pageText, 'watch' => $watch, 'userName' => $user->getName(), 'leaveMessage' => $this->mAsync == 'async-leavemessage', 'ignoreWarnings' => $this->mIgnoreWarnings, 'sessionId' => session_id(), 'sessionKey' => $sessionKey)); $job->initializeSessionData(); $job->insert(); return $sessionKey; }