[DATABASE] Use "<>" as an SQL non-equality sign in more cases
A follow-up to commit 644b417f6c
This commit is contained in:
@@ -1,17 +1,31 @@
|
||||
<?php
|
||||
// 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/>.
|
||||
|
||||
if (!defined('GNUSOCIAL')) { exit(1); }
|
||||
defined('GNUSOCIAL') || die();
|
||||
|
||||
class RawEventsNoticeStream extends NoticeStream
|
||||
{
|
||||
function getNoticeIds($offset, $limit, $since_id, $max_id)
|
||||
public function getNoticeIds($offset, $limit, $since_id, $max_id)
|
||||
{
|
||||
$notice = new Notice();
|
||||
$qry = null;
|
||||
|
||||
$qry = 'SELECT notice.* FROM notice ';
|
||||
$qry .= 'INNER JOIN happening ON happening.uri = notice.uri ';
|
||||
$qry .= 'AND notice.is_local != ' . Notice::GATEWAY . ' ';
|
||||
$qry .= 'AND notice.is_local <> ' . Notice::GATEWAY . ' ';
|
||||
|
||||
if ($since_id != 0) {
|
||||
$qry .= 'AND notice.id > ' . $since_id . ' ';
|
||||
@@ -45,7 +59,7 @@ class EventsNoticeStream extends ScopingNoticeStream
|
||||
protected $rsvp = ['Y', 'N', '?'];
|
||||
protected $target = null;
|
||||
|
||||
function __construct(Profile $target, Profile $scoped=null, array $rsvp=array())
|
||||
public function __construct(Profile $target, Profile $scoped = null, array $rsvp = [])
|
||||
{
|
||||
$stream = new RawEventsNoticeStream();
|
||||
|
||||
|
Reference in New Issue
Block a user