From 5571ec0a4dc9b2297dc6e3f65fc1bbf3dfc5004b Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Fri, 5 Aug 2011 19:48:46 +0200 Subject: script to fix unfiled bugs (for bug #3386178) --- scripts/fix-unfiled-tags.php | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 scripts/fix-unfiled-tags.php (limited to 'scripts') diff --git a/scripts/fix-unfiled-tags.php b/scripts/fix-unfiled-tags.php new file mode 100644 index 0000000..8a5238e --- /dev/null +++ b/scripts/fix-unfiled-tags.php @@ -0,0 +1,35 @@ +sql_query($query))) { + die('Strange SQL error'); +} +while ($row = $db->sql_fetchrow($dbresult)) { + $db->sql_query( + 'INSERT INTO ' . $bt->getTableName() . ' ' + . $db->sql_build_array( + 'INSERT', + array('bId' => $row['bId'], 'tag' => 'system:unfiled') + ) + ); +} +$db->sql_freeresult($dbresult); +?> \ No newline at end of file -- cgit v1.2.3