r35965 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r35964‎ | r35965 | r35966 >
Date:08:34, 6 June 2008
Author:jojo
Status:old
Tags:
Comment:
do not use full URL in query, just the command for PDF server
Modified paths:
  • /trunk/extensions/Collection/Collection.body.php (modified) (history)
  • /trunk/extensions/Collection/pdf-server/pdf-server.py (modified) (history)

Diff [purge]

Index: trunk/extensions/Collection/Collection.body.php
@@ -517,16 +517,17 @@
518518 $redirect = SkinTemplate::makeSpecialUrlSubpage( 'Collection', 'generating_pdf/' );
519519 $wgOut->redirect( wfAppendQuery( $redirect,
520520 'return_to=' . urlencode( $referrer->getPrefixedText() )
521 - . '&iframe_src=' . urlencode( $response->iframe_src ) ) );
 521+ . '&query=' . urlencode( $response->query ) ) );
522522 }
523523
524524 function generatingPDF() {
525525 global $wgOut;
 526+ global $wgPDFServer;
526527 global $wgRequest;
527 -
 528+
528529 $this->setHeaders();
529 -
530 - $iframe_src = $wgRequest->getVal( 'iframe_src' );
 530+
 531+ $query = $wgRequest->getVal( 'query' );
531532 $return_to = $wgRequest->getVal( 'return_to' );
532533
533534 $wgOut->setPageTitle( wfMsg( 'coll-generating_pdf_title' ) );
@@ -534,7 +535,7 @@
535536 array(
536537 'width' => '100%',
537538 'height' => '200',
538 - 'src' => $iframe_src,
 539+ 'src' => wfAppendQuery( $wgPDFServer, $query ),
539540 'name' => 'PDF Generation',
540541 'frameborder' => 0, ),
541542 '' )
Index: trunk/extensions/Collection/pdf-server/pdf-server.py
@@ -148,13 +148,10 @@
149149
150150 self.headers['Content-Type'] = 'application/json'
151151 self.content = simplejson.dumps({
152 - 'iframe_src': '%s?%s' % (
153 - script_url,
154 - urllib.urlencode({
155 - 'command': 'pdf_status',
156 - 'collection_id': self.collection_id
157 - }),
158 - ),
 152+ 'query': urllib.urlencode({
 153+ 'command': 'pdf_status',
 154+ 'collection_id': self.collection_id
 155+ }),
159156 })
160157
161158 def do_pdf_status(self):

Status & tagging log