https://www.mediawiki.org/wiki/Special:Code/MediaWiki/112759

Revision: 112759
Author:   aaron
Date:     2012-03-01 01:48:21 +0000 (Thu, 01 Mar 2012)
Log Message:
-----------
MFT r112758

Modified Paths:
--------------
    branches/wmf/1.19wmf1/extensions/WikiLove/ApiWikiLove.php

Property Changed:
----------------
    branches/wmf/1.19wmf1/extensions/


Property changes on: branches/wmf/1.19wmf1/extensions
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/JSTesting/extensions:100352-107913
/branches/REL1_15/phase3/extensions:51646
/branches/REL1_17/phase3/extensions:81445,81448
/branches/new-installer/phase3/extensions:43664-66004
/branches/sqlite/extensions:58211-58321
/branches/wmf/1.18wmf1/extensions:97508
/trunk/extensions:111043,111199,111218,111484,111575,111604,111659-111661,111668,111670,111688,111690,111698,111713,111715,111780,111796,111814,111947,112074,112153,112160,112166,112260,112282,112360,112517,112571,112613,112628
/trunk/phase3/extensions:111002,111029,111034,111062,111067,111076,111085,111128,111144,111251
   + /branches/JSTesting/extensions:100352-107913
/branches/REL1_15/phase3/extensions:51646
/branches/REL1_17/phase3/extensions:81445,81448
/branches/new-installer/phase3/extensions:43664-66004
/branches/sqlite/extensions:58211-58321
/branches/wmf/1.18wmf1/extensions:97508
/trunk/extensions:111043,111199,111218,111484,111575,111604,111659-111661,111668,111670,111688,111690,111698,111713,111715,111780,111796,111814,111947,112074,112153,112160,112166,112260,112282,112360,112517,112571,112613,112628,112758
/trunk/phase3/extensions:111002,111029,111034,111062,111067,111076,111085,111128,111144,111251

Modified: branches/wmf/1.19wmf1/extensions/WikiLove/ApiWikiLove.php
===================================================================
--- branches/wmf/1.19wmf1/extensions/WikiLove/ApiWikiLove.php   2012-03-01 
01:45:40 UTC (rev 112758)
+++ branches/wmf/1.19wmf1/extensions/WikiLove/ApiWikiLove.php   2012-03-01 
01:48:21 UTC (rev 112759)
@@ -20,16 +20,25 @@
                }
 
                // not using section => 'new' here, as we like to give our own 
edit summary
-               $api = new ApiMain( new FauxRequest( array(
-                       'action' => 'edit',
-                       'title' => $talk->getFullText(),
-                       // need to do this, as Article::replaceSection fails 
for non-existing pages
-                       'appendtext' => ( $talk->exists() ? "\n\n" : '' ) . 
wfMsgForContent( 'newsectionheaderdefaultlevel', $params['subject'] )
-                               . "\n\n" . $params['text'],
-                       'token' => $params['token'],
-                       'summary' => wfMsgForContent( 'wikilove-summary', 
$wgParser->stripSectionName( $params['subject'] ) ),
-                       'notminor' => true,
-               ), false, array( 'wsEditToken' => $wgRequest->getSessionData( 
'wsEditToken' ) ) ), true );
+               $api = new ApiMain(
+                       new DerivativeRequest(
+                               $wgRequest,
+                               array(
+                                       'action'     => 'edit',
+                                       'title'      => $talk->getFullText(),
+                                       // need to do this, as 
Article::replaceSection fails for non-existing pages
+                                       'appendtext' => ( $talk->exists() ? 
"\n\n" : '' ) . 
+                                               wfMsgForContent( 
'newsectionheaderdefaultlevel', $params['subject'] )
+                                               . "\n\n" . $params['text'],
+                                       'token'      => $params['token'],
+                                       'summary'    => wfMsgForContent( 
'wikilove-summary', 
+                                               $wgParser->stripSectionName( 
$params['subject'] ) ),
+                                       'notminor'   => true
+                               ),
+                               false // was posted?
+                       ),
+                       true // enable write?
+               );
 
                $api->execute();
 


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to