~canonical-sysadmins/wordpress/4.9.4

« back to all changes in this revision

Viewing changes to wp-admin/includes/class-wp-importer.php

  • Committer: Barry Price
  • Date: 2017-11-17 04:49:02 UTC
  • mfrom: (1.1.30 upstream)
  • Revision ID: barry.price@canonical.com-20171117044902-5frux4ycbq6g9fyf
Merge WP4.9 from upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
                // Grab all posts in chunks
30
30
                do {
31
31
                        $meta_key = $importer_name . '_' . $bid . '_permalink';
32
 
                        $sql = $wpdb->prepare( "SELECT post_id, meta_value FROM $wpdb->postmeta WHERE meta_key = '%s' LIMIT %d,%d", $meta_key, $offset, $limit );
 
32
                        $sql = $wpdb->prepare( "SELECT post_id, meta_value FROM $wpdb->postmeta WHERE meta_key = %s LIMIT %d,%d", $meta_key, $offset, $limit );
33
33
                        $results = $wpdb->get_results( $sql );
34
34
 
35
35
                        // Increment offset
248
248
        }
249
249
 
250
250
        /**
251
 
         * Reset global variables that grow out of control during imports
252
 
         *
253
 
         * @global wpdb  $wpdb
 
251
         * Resets global variables that grow out of control during imports.
 
252
         *
 
253
         * @since 3.0.0
 
254
         *
 
255
         * @global wpdb  $wpdb       WordPress database abstraction object.
254
256
         * @global array $wp_actions
255
257
         */
256
258
        public function stop_the_insanity() {