r39767 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r39766‎ | r39767 | r39768 >
Date:14:51, 21 August 2008
Author:jojo
Status:old
Tags:
Comment:
do not issue POST request from PoD partner from Collection extension, but let mw-serve do it.
Modified paths:
  • /trunk/extensions/Collection/Collection.body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Collection/Collection.body.php
@@ -750,28 +750,17 @@
751751 return;
752752 }
753753
754 - $url = $this->mPODPartners[$partner]['posturl'];
755 - $errorMessage = '';
756 - $contentType = '';
757 - $response = self::post( $url, array(), $errorMessage, $contentType );
758 - if ( !$response ) {
759 - $wgOut->showErrorPage( 'coll-post_failed_title', 'coll-post_failed_msg', array( $url, $errorMessage ) );
760 - return;
761 - }
762 - $postData = $json->decode( $response );
763 -
764754 $response = self::pdfServerCommand( 'zip_post', array(
765755 'metabook' => $this->buildJSONCollection( $_SESSION['wsCollection'] ),
766756 'base_url' => $wgServer . $wgScriptPath,
767757 'template_blacklist' => $wgPDFTemplateBlacklist,
768758 'template_exclusion_category' => $wgCollectionTemplateExclusionCategory,
769 - 'post_url' => $postData->post_url,
 759+ 'pod_api_url' => $this->mPODPartners[$partner]['posturl'],
770760 ) );
771761 if ( !$response ) {
772762 return;
773 - }
774 -
775 - $wgOut->redirect( $postData->redirect_url );
 763+ }
 764+ $wgOut->redirect( $response->redirect_url );
776765 }
777766
778767 private function outputIntro() {

Status & tagging log