Created
October 9, 2014 00:19
-
-
Save ctrlcctrlv/3537c2c1c170cb646710 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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