Skip to content

Instantly share code, notes, and snippets.

@ctrlcctrlv
Created October 9, 2014 00:19
Show Gist options
  • Save ctrlcctrlv/3537c2c1c170cb646710 to your computer and use it in GitHub Desktop.
Save ctrlcctrlv/3537c2c1c170cb646710 to your computer and use it in GitHub Desktop.
<?php
if (php_sapi_name() != 'cli')
die();
include 'inc/functions.php';
$boards = listBoards();
foreach ($boards as &$board) {
//query(sprintf("ALTER TABLE `posts_%s` ADD `edited_at` DATETIME NULL", $board['uri'])) or error(db_error());
$config['meta_noindex'] = false;
openBoard($board['uri']);
if (isset($config['meta_noindex']) && $config['meta_noindex']) {
$query = prepare('UPDATE `boards` SET indexed = FALSE WHERE `uri` = :uri');
$query->bindValue(':uri', $board['uri']);
$query->execute() or error(db_error($query));
echo $board['uri'] . "\n";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment