+ # Fork the processes
+ if ( !$skip ) {
+ $title = Title::makeTitle( NS_SPECIAL, 'Blockme' );
+ $iphash = md5( $wgIP . $wgProxyKey );
+ $url = $title->getFullURL( 'ip='.$iphash );
+
+ foreach ( $wgProxyPorts as $port ) {
+ $params = implode( ' ', array(
+ escapeshellarg( $wgProxyScriptPath ),
+ escapeshellarg( $wgIP ),
+ escapeshellarg( $port ),
+ escapeshellarg( $url )
+ ));
+ exec( "php $params &>/dev/null &" );
+ }
+ # Set MemCached key
+ if ( $wgUseMemCached ) {
+ $wgMemc->set( $mcKey, 1, $wgProxyMemcExpiry );
+ }
+ }
+ }
+
+ /**
+ * @access private
+ * @todo document
+ */
+ function mergeChangesInto( &$text ){
+ $fname = 'EditPage::mergeChangesInto';
+ $oldDate = $this->edittime;
+ $dbw =& wfGetDB( DB_MASTER );
+ $obj = $dbw->getArray( 'cur', array( 'cur_text' ), array( 'cur_id' => $this->mTitle->getArticleID() ),
+ $fname, 'FOR UPDATE' );
+
+ $yourtext = $obj->cur_text;
+ $ns = $this->mTitle->getNamespace();
+ $title = $this->mTitle->getDBkey();
+ $obj = $dbw->getArray( 'old',
+ array( 'old_text','old_flags'),
+ array( 'old_namespace' => $ns, 'old_title' => $title,
+ 'old_timestamp' => $dbw->timestamp($oldDate)),
+ $fname );
+ $oldText = Article::getRevisionText( $obj );
+
+ if(wfMerge($oldText, $text, $yourtext, $result)){
+ $text = $result;
+ return true;
+ } else {
+ return false;
+ }
+ }