Changeset 33734 for trunk/src/wp-admin/includes/upgrade.php
- Timestamp:
- 08/25/2015 08:27:56 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/upgrade.php
r33727 r33734 560 560 $posts = $wpdb->get_results("SELECT ID, post_title, post_name FROM $wpdb->posts WHERE post_name = ''"); 561 561 if ($posts) { 562 foreach ($posts as $post) {562 foreach ($posts as $post) { 563 563 if ('' == $post->post_name) { 564 564 $newtitle = sanitize_title($post->post_title); … … 700 700 $posts = $wpdb->get_results("SELECT ID, post_title, post_content, post_excerpt, guid, post_date, post_name, post_status, post_author FROM $wpdb->posts"); 701 701 if ($posts) { 702 foreach ($posts as $post) {702 foreach ($posts as $post) { 703 703 $post_content = addslashes(deslash($post->post_content)); 704 704 $post_title = addslashes(deslash($post->post_title)); … … 717 717 $comments = $wpdb->get_results("SELECT comment_ID, comment_author, comment_content FROM $wpdb->comments"); 718 718 if ($comments) { 719 foreach ($comments as $comment) {719 foreach ($comments as $comment) { 720 720 $comment_content = deslash($comment->comment_content); 721 721 $comment_author = deslash($comment->comment_author); … … 728 728 $links = $wpdb->get_results("SELECT link_id, link_name, link_description FROM $wpdb->links"); 729 729 if ($links) { 730 foreach ($links as $link) {730 foreach ($links as $link) { 731 731 $link_name = deslash($link->link_name); 732 732 $link_description = deslash($link->link_description); … … 1206 1206 $start = 0; 1207 1207 while( $rows = $wpdb->get_results( "SELECT option_name, option_value FROM $wpdb->options ORDER BY option_id LIMIT $start, 20" ) ) { 1208 foreach ( $rows as $row ) {1208 foreach ( $rows as $row ) { 1209 1209 $value = $row->option_value; 1210 1210 if ( !@unserialize( $value ) ) … … 1640 1640 $start = 0; 1641 1641 while( $rows = $wpdb->get_results( "SELECT meta_key, meta_value FROM {$wpdb->sitemeta} ORDER BY meta_id LIMIT $start, 20" ) ) { 1642 foreach ( $rows as $row ) {1642 foreach ( $rows as $row ) { 1643 1643 $value = $row->meta_value; 1644 1644 if ( !@unserialize( $value ) ) … … 1722 1722 $upgrade = false; 1723 1723 $indexes = $wpdb->get_results( "SHOW INDEXES FROM $wpdb->signups" ); 1724 foreach ( $indexes as $index ) {1724 foreach ( $indexes as $index ) { 1725 1725 if ( 'domain_path' == $index->Key_name && 'domain' == $index->Column_name && 140 != $index->Sub_part ) { 1726 1726 $upgrade = true; … … 2026 2026 2027 2027 // Create a tablename index for an array ($cqueries) of queries 2028 foreach ($queries as $qry) {2028 foreach ($queries as $qry) { 2029 2029 if ( preg_match( "|CREATE TABLE ([^ ]*)|", $qry, $matches ) ) { 2030 2030 $cqueries[ trim( $matches[1], '`' ) ] = $qry; … … 2215 2215 ); 2216 2216 2217 foreach ( $index_strings as $index_string ) {2217 foreach ( $index_strings as $index_string ) { 2218 2218 if ( ! ( ( $aindex = array_search( $index_string, $indices ) ) === false ) ) { 2219 2219 unset( $indices[ $aindex ] ); … … 2266 2266 $alterations = dbDelta( $tables ); 2267 2267 echo "<ol>\n"; 2268 foreach ($alterations as $alteration) echo "<li>$alteration</li>\n";2268 foreach ($alterations as $alteration) echo "<li>$alteration</li>\n"; 2269 2269 echo "</ol>\n"; 2270 2270 }
Note: See TracChangeset
for help on using the changeset viewer.