Changeset View
Changeset View
Standalone View
Standalone View
src/applications/macro/query/PhabricatorMacroQuery.php
Show First 20 Lines • Show All 122 Lines • ▼ Show 20 Lines | protected function buildWhereClauseParts(AphrontDatabaseConnection $conn) { | ||||
if ($this->authorPHIDs !== null) { | if ($this->authorPHIDs !== null) { | ||||
$where[] = qsprintf( | $where[] = qsprintf( | ||||
$conn, | $conn, | ||||
'm.authorPHID IN (%Ls)', | 'm.authorPHID IN (%Ls)', | ||||
$this->authorPHIDs); | $this->authorPHIDs); | ||||
} | } | ||||
if (strlen($this->nameLike)) { | if (($this->nameLike !== null) && strlen($this->nameLike)) { | ||||
$where[] = qsprintf( | $where[] = qsprintf( | ||||
$conn, | $conn, | ||||
'm.name LIKE %~', | 'm.name LIKE %~', | ||||
$this->nameLike); | $this->nameLike); | ||||
} | } | ||||
if ($this->names !== null) { | if ($this->names !== null) { | ||||
$where[] = qsprintf( | $where[] = qsprintf( | ||||
$conn, | $conn, | ||||
'm.name IN (%Ls)', | 'm.name IN (%Ls)', | ||||
$this->names); | $this->names); | ||||
} | } | ||||
if (strlen($this->namePrefix)) { | if (($this->namePrefix !== null) && strlen($this->namePrefix)) { | ||||
$where[] = qsprintf( | $where[] = qsprintf( | ||||
$conn, | $conn, | ||||
'm.name LIKE %>', | 'm.name LIKE %>', | ||||
$this->namePrefix); | $this->namePrefix); | ||||
} | } | ||||
switch ($this->status) { | switch ($this->status) { | ||||
case self::STATUS_ACTIVE: | case self::STATUS_ACTIVE: | ||||
▲ Show 20 Lines • Show All 115 Lines • Show Last 20 Lines |