r23439 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r23438‎ | r23439 | r23440 >
Date:21:29, 26 June 2007
Author:tstarling
Status:old
Tags:
Comment:
* Certificate no longer needed, commented out
* Added debugging information to session
* Added BOARDVOTE_REDIRECT_ONLY to disable the vote part but allow the session transfer part
Modified paths:
  • /trunk/extensions/BoardVote/BoardVote.php (modified) (history)
  • /trunk/extensions/BoardVote/BoardVote_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/BoardVote/BoardVote_body.php
@@ -31,7 +31,7 @@
3232 #$url = "http://eva/w2/extensions/BotQuery/query.php?what=userinfo&format=php";
3333 wfDebug( "Fetching URL $url\n" );
3434 $c = curl_init( $url );
35 - curl_setopt( $c, CURLOPT_CAINFO, dirname( __FILE__ ) . '/cacert-both.crt' );
 35+ #curl_setopt( $c, CURLOPT_CAINFO, dirname( __FILE__ ) . '/cacert-both.crt' );
3636 curl_setopt( $c, CURLOPT_RETURNTRANSFER, true );
3737 curl_setopt( $c, CURLOPT_COOKIE, "{$db}_session=" . urlencode( $sid ) );
3838 curl_setopt( $c, CURLOPT_FOLLOWLOCATION, true );
@@ -39,6 +39,7 @@
4040 $value = curl_exec( $c );
4141 if ( !$value ) {
4242 wfDebug( __METHOD__.": No response from server\n" );
 43+ $_SESSION['bvCurlError'] = curl_error( $c );
4344 return array( false, false, false );
4445 }
4546
Index: trunk/extensions/BoardVote/BoardVote.php
@@ -36,10 +36,13 @@
3737 if ( !function_exists( 'extAddSpecialPage' ) ) {
3838 require( dirname(__FILE__) . '/../ExtensionFunctions.php' );
3939 }
40 -extAddSpecialPage( dirname(__FILE__) . '/BoardVote_body.php', 'Boardvote', 'BoardVotePage' );
4140 extAddSpecialPage( dirname(__FILE__) . '/GoToBoardVote_body.php', 'Go_to_board_vote', 'GoToBoardVotePage' );
4241
43 -$wgExtensionFunctions[] = 'wfSetupBoardVote';
 42+if ( !defined( 'BOARDVOTE_REDIRECT_ONLY' ) ) {
 43+ extAddSpecialPage( dirname(__FILE__) . '/BoardVote_body.php', 'Boardvote', 'BoardVotePage' );
 44+ $wgExtensionFunctions[] = 'wfSetupBoardVote';
 45+}
 46+
4447 function wfSetupBoardVote() {
4548 wfSetupSession();
4649 if ( isset( $_SESSION['bvLang'] ) && !isset( $_REQUEST['uselang'] ) ) {

Status & tagging log