Ticket #12620: livejournal.php.patch
File livejournal.php.patch, 5.1 KB (added by , 15 years ago) |
---|
-
Sites/wordpress-trunk/wp-admin/import/livejournal.php
184 184 <input type="hidden" name="step" value="<?php echo esc_attr( get_option( 'ljapi_step' ) ) ?>" /> 185 185 <p><?php _e( 'It looks like you attempted to import your LiveJournal posts previously and got interrupted.' ) ?></p> 186 186 <p class="submit"> 187 <input type="submit" class="button -primary" value="<?php esc_attr_e( 'Continue previous import' ) ?>" />187 <input type="submit" class="button" value="<?php esc_attr_e( 'Continue previous import' ) ?>" /> 188 188 </p> 189 189 <p class="submitbox"><a href="<?php echo esc_url($_SERVER['PHP_SELF'] . '?import=livejournal&step=-1&_wpnonce=' . wp_create_nonce( 'lj-api-import' ) . '&_wp_http_referer=' . esc_attr( $_SERVER['REQUEST_URI'] )) ?>" class="deletion submitdelete"><?php _e( 'Cancel & start a new import' ) ?></a></p> 190 190 <p> … … 223 223 <p><?php _e( "<strong>WARNING:</strong> This can take a really long time if you have a lot of entries in your LiveJournal, or a lot of comments. Ideally, you should only start this process if you can leave your computer alone while it finishes the import." ) ?></p> 224 224 225 225 <p class="submit"> 226 <input type="submit" class="button -primary" value="<?php esc_attr_e( 'Connect to LiveJournal and Import' ) ?>" />226 <input type="submit" class="button" value="<?php esc_attr_e( 'Connect to LiveJournal and Import' ) ?>" /> 227 227 </p> 228 228 229 229 <p><?php _e( '<strong>NOTE:</strong> If the import process is interrupted for <em>any</em> reason, come back to this page and it will continue from where it stopped automatically.' ) ?></p> … … 762 762 // Check form inputs and start importing posts 763 763 function step1() { 764 764 global $verified; 765 766 do_action( 'import_start' ); 767 765 768 set_time_limit( 0 ); 766 769 update_option( 'ljapi_step', 1 ); 767 770 if ( !$this->ixr ) $this->ixr = new IXR_Client( $this->ixr_url, false, 80, 30 ); … … 821 824 <form action="admin.php?import=livejournal" method="post" id="ljapi-auto-repost"> 822 825 <?php wp_nonce_field( 'lj-api-import' ) ?> 823 826 <input type="hidden" name="step" id="step" value="1" /> 824 <p><input type="submit" class="button -primary" value="<?php esc_attr_e( 'Import the next batch' ) ?>" /> <span id="auto-message"></span></p>827 <p><input type="submit" class="button" value="<?php esc_attr_e( 'Import the next batch' ) ?>" /> <span id="auto-message"></span></p> 825 828 </form> 826 829 <?php $this->auto_ajax( 'ljapi-auto-repost', 'auto-message', 0 ); ?> 827 830 <?php … … 835 838 836 839 // Download comments to local XML 837 840 function step2() { 841 do_action( 'import_start' ); 842 838 843 set_time_limit( 0 ); 839 844 update_option( 'ljapi_step', 2 ); 840 845 $this->username = get_option( 'ljapi_username' ); … … 871 876 <p><strong><?php printf( __( 'Imported comment batch %d of <strong>approximately</strong> %d' ), get_option( 'ljapi_comment_batch' ), $batch ) ?></strong></p> 872 877 <?php wp_nonce_field( 'lj-api-import' ) ?> 873 878 <input type="hidden" name="step" id="step" value="2" /> 874 <p><input type="submit" class="button -primary" value="<?php esc_attr_e( 'Import the next batch' ) ?>" /> <span id="auto-message"></span></p>879 <p><input type="submit" class="button" value="<?php esc_attr_e( 'Import the next batch' ) ?>" /> <span id="auto-message"></span></p> 875 880 </form> 876 881 <?php $this->auto_ajax( 'ljapi-auto-repost', 'auto-message', 0 ); ?> 877 882 <?php … … 886 891 // Re-thread comments already in the DB 887 892 function step3() { 888 893 global $wpdb; 894 895 do_action( 'import_start' ); 896 889 897 set_time_limit( 0 ); 890 898 update_option( 'ljapi_step', 3 ); 891 899 … … 947 955 $str .= wp_nonce_field( 'lj-api-import', '_wpnonce', true, false ); 948 956 $str .= wp_referer_field( false ); 949 957 $str .= '<input type="hidden" name="step" id="step" value="' . esc_attr($next_step) . '" />'; 950 $str .= '<p><input type="submit" class="button -primary" value="' . esc_attr( $label ) . '" /> <span id="auto-message"></span></p>';958 $str .= '<p><input type="submit" class="button" value="' . esc_attr( $label ) . '" /> <span id="auto-message"></span></p>'; 951 959 $str .= '</form>'; 952 960 953 961 return $str; … … 1000 1008 str = '<?php _e( "Processing next batch." ) ?> <img src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" alt="" id="processing" align="top" />'; 1001 1009 jQuery( '#<?php echo $msg ?>' ).html( str ); 1002 1010 jQuery('#ljapi-status').load(ajaxurl, {'action':'lj-importer', 1011 'import':'livejournal', 1003 1012 'step':jQuery('#step').val(), 1004 1013 '_wpnonce':'<?php echo wp_create_nonce( 'lj-api-import' ) ?>', 1005 1014 '_wp_http_referer':'<?php echo $_SERVER['REQUEST_URI'] ?>'}); … … 1042 1051 $wpdb->update( $wpdb->comments, 1043 1052 array( 'comment_karma' => 0, 'comment_agent' => 'WP LJ Importer', 'comment_type' => '' ), 1044 1053 array( 'comment_type' => 'livejournal' ) ); 1054 1055 do_action( 'import_end' ); 1045 1056 } 1046 1057 1047 1058 function LJ_API_Import() {