--
Working on (have been).
Reset script.
if (isset($_GET['restore'])) { header('Content-Type: text/plain'); ini_set('display_errors', 1); set_time_limit(0); echo "resetting...\n"; db_query('TRUNCATE TABLE {watchdog}'); db_query("UPDATE {system} SET schema_version = %d WHERE name = '%s'", 6000, 'pift'); $tables = array( 'pift_data', 'pift_test', 'pift_project', ); $ret = array(); foreach ($tables as $table) { if (db_table_exists($table)) { db_drop_table($ret, $table); } } echo "importing d.o dataset...\n"; $parts = parse_url($db_url['default']); $command = "mysql -u{$parts['user']} -p{$parts['pass']} " . substr($parts['path'], 1); exec($command . ' < /home/boombatower/download/pift_data.sql'); echo "finished...\n"; print_r($ret); exit; }
t.d.o dump script:
if (isset($_GET['pifr_dump'])) { $result = db_query('SELECT file_id, server_file_id FROM {pifr_file}'); $dump = ''; $count = 0; while ($file = db_fetch_array($result)) { $dump .= $file['file_id'] . ',' . $file['server_file_id'] . "\n"; $count++; } file_put_contents('files.dump.txt', $dump); drupal_set_message('Dumped: ' . $count); exit; }
Cleaned it up a bit and confirmed it works on d.o data...I don't have files tables and such to be 100% sure...not sure how to proceed there as I think we want to be 100%. Regex removes link properly!
I'll just plan on deploying to d6.d.o and checking 100% there...as I think was the original plan.
Committed.
Automatically closed -- issue fixed for 2 weeks with no activity.
Comments
Comment #1
boombatower commentedWorking on (have been).
Comment #2
boombatower commentedReset script.
Comment #3
boombatower commentedt.d.o dump script:
Comment #4
boombatower commentedCleaned it up a bit and confirmed it works on d.o data...I don't have files tables and such to be 100% sure...not sure how to proceed there as I think we want to be 100%. Regex removes link properly!
Comment #5
boombatower commentedI'll just plan on deploying to d6.d.o and checking 100% there...as I think was the original plan.
Committed.