| 72 |
'#title' => t('Method'), |
'#title' => t('Method'), |
| 73 |
'#options' => array('normal' => t('Normal'), 'quick' => t('Quick')), |
'#options' => array('normal' => t('Normal'), 'quick' => t('Quick')), |
| 74 |
'#default_value' => 'normal', |
'#default_value' => 'normal', |
| 75 |
'#description' => t('Normal node delete calls node_delete() on every node in the database. If you have only a few hundred nodes, this can take a very long time. Use the quick node delete method to get around this problem. This method deletes directly from the database, skipping the extra php processing. It does a pretty good job; the only downside is that it experimental and can miss related tables that are normally handled by module hook_delete\'s, although it does try to catch these, and in actuality may not miss anything.'), |
'#description' => t('Normal node delete calls node_delete() on every node in the database. If you have only a few hundred nodes, this can take a very long time. Use the quick node delete method to get around this problem. This method deletes directly from the database, skipping the extra php processing. The downside is that it can miss related tables that are normally handled by module hook_delete\'s.'), |
| 76 |
), |
), |
| 77 |
); |
); |
| 78 |
$form['confirm'] = array( |
$form['confirm'] = array( |
| 196 |
$tables = array('node_revisions' => $nid_vid, 'comments' => $nid); |
$tables = array('node_revisions' => $nid_vid, 'comments' => $nid); |
| 197 |
$tables[_content_tablename($type, CONTENT_DB_STORAGE_PER_CONTENT_TYPE)] = $nid_vid; |
$tables[_content_tablename($type, CONTENT_DB_STORAGE_PER_CONTENT_TYPE)] = $nid_vid; |
| 198 |
$content = content_types($type); |
$content = content_types($type); |
| 199 |
if (count($content->fields)) { |
if (count($content['fields'])) { |
| 200 |
foreach ($content->fields as $field) { |
foreach ($content['fields'] as $field) { |
| 201 |
$field_info = content_database_info($field); |
$field_info = content_database_info($field); |
| 202 |
$tables[$field_info['table']] = $nid_vid; |
$tables[$field_info['table']] = $nid_vid; |
| 203 |
} |
} |
| 229 |
break; |
break; |
| 230 |
} |
} |
| 231 |
|
|
| 232 |
|
// @todo: update all node related nid references |
| 233 |
|
|
| 234 |
// delete from all of the content tables in one sql statement |
// delete from all of the content tables in one sql statement |
| 235 |
$sql = array('delete' => array(), 'from' => array(), 'where' => array()); |
$sql = array('delete' => array(), 'from' => array(), 'where' => array()); |
| 236 |
$index = 0; |
$index = 0; |