read())) { if ($entry == '.' || $entry == '..') { continue; } $entry = $dir . '/' . $entry; if (is_dir($entry)) { if (!full_rmdir($entry)) { return FALSE; } continue; } if (!@unlink($entry)) { $d->close(); return FALSE; } } $d->close(); rmdir($dir); return TRUE; } // Vars $ajaxdeleted = false; $locked_by_context = array('index.php', 'config.ini.php'); // If we are storing the media in the data directory (this is the // default for the media firewall), then don't delete it. // Need to consider the settings for all gedcoms foreach (get_all_gedcoms() as $ged_id=>$gedcom) { $MEDIA_FIREWALL_ROOTDIR=get_gedcom_setting($ged_id, 'MEDIA_FIREWALL_ROOTDIR', WT_DATA_DIR); $MEDIA_DIRECTORY =get_gedcom_setting($ged_id, 'MEDIA_DIRECTORY'); if (realpath($MEDIA_FIREWALL_ROOTDIR)==realpath(WT_DATA_DIR)) { $locked_by_context[]=trim($MEDIA_DIRECTORY, '/'); } } print_header(WT_I18N::translate('Cleanup data directory')); echo '
', WT_I18N::translate('To delete a file or subdirectory from the data directory drag it to the wastebasket or select its checkbox. Click the Delete button to permanently remove the indicated files.'), '
',
WT_I18N::translate('Files marked with %s are required for proper operation and cannot be removed.', '
'),
'