Changeset 3650 for trunk/wp-admin/import/dotclear.php
- Timestamp:
- 03/21/2006 12:14:18 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/import/dotclear.php
r3530 r3650 158 158 $dcdb = new wpdb(get_option('dcuser'), get_option('dcpass'), get_option('dcname'), get_option('dchost')); 159 159 set_magic_quotes_runtime(0); 160 $ prefix = get_option('tpre');160 $dbprefix = get_option('dcdbprefix'); 161 161 162 162 // Get Categories 163 return $dcdb->get_results('SELECT * FROM dc_categorie', ARRAY_A);163 return $dcdb->get_results('SELECT * FROM '.$dbprefix.'categorie', ARRAY_A); 164 164 } 165 165 … … 170 170 $dcdb = new wpdb(get_option('dcuser'), get_option('dcpass'), get_option('dcname'), get_option('dchost')); 171 171 set_magic_quotes_runtime(0); 172 $ prefix = get_option('tpre');172 $dbprefix = get_option('dcdbprefix'); 173 173 174 174 // Get Users 175 175 176 return $dcdb->get_results('SELECT * FROM dc_user', ARRAY_A);176 return $dcdb->get_results('SELECT * FROM '.$dbprefix.'user', ARRAY_A); 177 177 } 178 178 … … 182 182 $dcdb = new wpdb(get_option('dcuser'), get_option('dcpass'), get_option('dcname'), get_option('dchost')); 183 183 set_magic_quotes_runtime(0); 184 $ prefix = get_option('tpre');184 $dbprefix = get_option('dcdbprefix'); 185 185 186 186 // Get Posts 187 return $dcdb->get_results('SELECT dc_post.*, dc_categorie.cat_libelle_url AS post_cat_name188 FROM dc_post INNER JOIN dc_categorie189 ON dc_post.cat_id = dc_categorie.cat_id', ARRAY_A);187 return $dcdb->get_results('SELECT '.$dbprefix.'post.*, '.$dbprefix.'categorie.cat_libelle_url AS post_cat_name 188 FROM '.$dbprefix.'post INNER JOIN '.$dbprefix.'categorie 189 ON '.$dbprefix.'post.cat_id = '.$dbprefix.'categorie.cat_id', ARRAY_A); 190 190 } 191 191 … … 196 196 $dcdb = new wpdb(get_option('dcuser'), get_option('dcpass'), get_option('dcname'), get_option('dchost')); 197 197 set_magic_quotes_runtime(0); 198 $ prefix = get_option('tpre');198 $dbprefix = get_option('dcdbprefix'); 199 199 200 200 // Get Comments 201 return $dcdb->get_results('SELECT * FROM dc_comment', ARRAY_A);201 return $dcdb->get_results('SELECT * FROM '.$dbprefix.'comment', ARRAY_A); 202 202 } 203 203 … … 207 207 $dcdb = new wpdb(get_option('dcuser'), get_option('dcpass'), get_option('dcname'), get_option('dchost')); 208 208 set_magic_quotes_runtime(0); 209 $dbprefix = get_option('d bprefix');209 $dbprefix = get_option('dcdbprefix'); 210 210 211 211 return $dcdb->get_results('SELECT * FROM '.$dbprefix.'link ORDER BY position', ARRAY_A); … … 610 610 function cleanup_dcimport() 611 611 { 612 delete_option('d bprefix');612 delete_option('dcdbprefix'); 613 613 delete_option('dc_cats'); 614 614 delete_option('dcid2wpid'); … … 700 700 if($_POST['dbprefix']) 701 701 { 702 if(get_option(' tpre'))703 delete_option(' tpre');704 add_option(' tpre',$_POST['dbprefix']);702 if(get_option('dcdbprefix')) 703 delete_option('dcdbprefix'); 704 add_option('dcdbprefix',$_POST['dbprefix']); 705 705 } 706 706
Note: See TracChangeset
for help on using the changeset viewer.