Changeset 968440
- Timestamp:
- 08/19/2014 06:07:16 PM (11 years ago)
- Location:
- multisite-cloner/trunk
- Files:
-
- 2 edited
-
multisite-cloner.php (modified) (4 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
multisite-cloner/trunk/multisite-cloner.php
r960134 r968440 5 5 * Plugin URI: https://wordpress.org/plugins/multisite-cloner 6 6 * Description: When creating a new blog on WordPress Multisite, copies all the posts, settings and files, from a selected blog into the new one. 7 * Version: 0.1. 87 * Version: 0.1.9 8 8 * Author: Manuel Razzari, Patricio Tarantino 9 9 * Author URI: http://tipit.net … … 209 209 210 210 // Replace URLs and paths in the DB 211 211 212 212 cloner_db_replacer( array($old_url,$old_uploads), array($new_url,$new_uploads), $new_tables); 213 213 … … 219 219 220 220 // Copy Files 221 $old_uploads = str_ireplace($blog_id, $id_default_blog, $base_dir); ;221 $old_uploads = str_ireplace($blog_id, $id_default_blog, $base_dir); 222 222 $new_uploads = $base_dir;; 223 223 … … 381 381 382 382 // Something was changed 383 if ( $edited_data != $data_to_fix ) {384 $update_sql[] = $column . ' = "' . ( $edited_data ) . '"';383 if ( $edited_data != $data_to_fix) { 384 $update_sql[] = $column . ' = "' . mysql_real_escape_string( $edited_data ) . '"'; 385 385 $upd = true; 386 386 } 387 388 387 if ( $primary_key ) 389 $where_sql[] = $column . ' = "' . ( $data_to_fix ) . '"';388 $where_sql[] = $column . ' = "' . mysql_real_escape_string( $data_to_fix ) . '"'; 390 389 } 391 390 392 if ( $upd && ! empty( $where_sql ) ) {391 if ( $upd && ! empty( $where_sql )) { 393 392 $sql = 'UPDATE ' . $table . ' SET ' . implode( ', ', $update_sql ) . ' WHERE ' . implode( ' AND ', array_filter( $where_sql ) ); 394 $result = $wpdb->query( $sql ); 395 393 $result = $wpdb->query( $sql ); 396 394 } 397 395 396 398 397 } 399 398 400 399 } 400 401 401 } 402 402 -
multisite-cloner/trunk/readme.txt
r960134 r968440 62 62 == Changelog == 63 63 64 = 0.1.9 = 65 * Bug fix: Images in post were linked to the original blog. 66 64 67 = 0.1.8 = 65 68 * Minor fix to avoid PHP warning if target directories already exist (Fixes [warning when creating new site](http://wordpress.org/support/topic/error-when-creating-new-site) reported by mr.gengu and beda69). … … 97 100 == Upgrade Notice == 98 101 99 = 0.1. 8=100 * Minor fix to avoid PHP warning if target directories already exist.102 = 0.1.9 = 103 * Bug fix: Images in post were linked to the original blog.
Note: See TracChangeset
for help on using the changeset viewer.