forked from GNUsocial/gnu-social
[DATABASE] Only use single quotation marks for SQL strings
Double quotation marks are only used for identifiers in the SQL standard.
This commit is contained in:
@@ -1,21 +1,25 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
/*
|
||||
* StatusNet - the distributed open-source microblogging tool
|
||||
* Copyright (C) 2010, StatusNet, Inc.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
// This file is part of GNU social - https://www.gnu.org/software/social
|
||||
//
|
||||
// GNU social is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// GNU social is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Affero General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with GNU social. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* @package TwitterBridge
|
||||
* @author Evan Prodromou <evan@status.net>
|
||||
* @copyright 2010, StatusNet, Inc.
|
||||
* @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later
|
||||
*/
|
||||
|
||||
define('INSTALLDIR', realpath(dirname(__FILE__) . '/../../..'));
|
||||
@@ -37,11 +41,13 @@ require_once INSTALLDIR.'/scripts/commandline.inc';
|
||||
|
||||
$n = new Notice();
|
||||
|
||||
$n->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');
|
||||
$n->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)) {
|
||||
|
Reference in New Issue
Block a user