} else { $text .= '<p>This tool currently only supports migration from a flat file database to MySQL. Your original database will not be deleted. If the migration fails, disable the tool and your board will be unaffected. See the <a href="https://github.com/tslocum/TinyIB#migrating" target="_blank">README</a> <small>(<a href="README.md" target="_blank">alternate link</a>)</small> for instructions.</a><br><br><a href="?manage&dbmigrate&go"><b>Start the migration</b></a></p>'; } } else { fancyDie('Set TINYIB_DBMIGRATE to true in settings.php to use this feature.'); } } } } if (isset($_GET['delete'])) { $post = postByID($_GET['delete']); if ($post) { deletePostByID($post['id']); rebuildIndexes(); if ($post['parent'] != TINYIB_NEWTHREAD) { rebuildThread($post['parent']); } $text .= manageInfo('Post No.' . $post['id'] . ' deleted.'); } else { fancyDie("Sorry, there doesn't appear to be a post with that ID."); } } elseif (isset($_GET['approve'])) { if ($_GET['approve'] > 0) { $post = postByID($_GET['approve']); if ($post) { approvePostByID($post['id']); $thread_id = $post['parent'] == TINYIB_NEWTHREAD ? $post['id'] : $post['parent']; if (strtolower($post['email']) != 'sage' && (TINYIB_MAXREPLIES == 0 || numRepliesToThreadByID($thread_id) <= TINYIB_MAXREPLIES)) { bumpThreadByID($thread_id); } threadUpdated($thread_id);
function threadUpdated($id) { rebuildThread($id); rebuildIndexes(); }