thumbnail tweaks
[lhc/web/wiklou.git] / includes / SpecialExport.php
index 84e215e..8497113 100644 (file)
 # http://www.gnu.org/copyleft/gpl.html
 
 function wfSpecialExport( $page = "" ) {
-       global $wgOut, $wgLang;
+       global $wgOut, $wgLang, $wgRequest;
        
-       if( $_REQUEST['action'] == 'submit') {
-               $page = $_REQUEST['pages'];
-               $curonly = isset($_REQUEST['curonly']) ? true : false;
+       if( $wgRequest->getVal( 'action' ) == 'submit') {
+               $page = $wgRequest->getText( 'pages' );
+               $curonly = $wgRequest->getCheck( 'curonly' );
        } else {
+               # Pre-check the 'current version only' box in the UI
                $curonly = true;
        }
        
@@ -42,7 +43,7 @@ function wfSpecialExport( $page = "" ) {
 <form method='post' action=\"$action\">
 <input type='hidden' name='action' value='submit' />
 <textarea name='pages' cols='40' rows='10'></textarea><br />
-<label><input type='checkbox' name='curonly' value='true' checked />
+<label><input type='checkbox' name='curonly' value='true' checked='checked' />
 " . wfMsg( "exportcuronly" ) . "</label><br />
 <input type='submit' />
 </form>
@@ -114,7 +115,7 @@ function revision2xml( $s, $full, $cur ) {
                $u = "<ip>" . htmlspecialchars( $s->user_text ) . "</ip>";
        }
        $xml .= "      <contributor>$u</contributor>\n";
-       if($s->minor) {
+       if( !empty( $s->minor ) ) {
                $xml .= "      <minor/>\n";
        }
        if($s->comment != "") {