#!/usr/bin/env php . /** * @package TwitterBridge * @author Evan Prodromou * @copyright 2010, StatusNet, Inc. * @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later */ define('INSTALLDIR', realpath(dirname(__FILE__) . '/../../..')); $helptext = <<query( 'SELECT notice.id, notice.uri ' . 'FROM notice LEFT JOIN notice_to_status ' . 'ON notice.id = notice_to_status.notice_id ' . "WHERE notice.source = 'twitter'" . 'AND notice_to_status.status_id IS NULL' ); while ($n->fetch()) { if (preg_match('/^http://twitter.com(/#!)?/[\w_.]+/status/(\d+)$/', $n->uri, $match)) { $status_id = $match[1]; Notice_to_status::saveNew($n->id, $status_id); } }