Differential D19814 Diff 47316 src/applications/daemon/management/PhabricatorLockLogManagementWorkflow.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/daemon/management/PhabricatorLockLogManagementWorkflow.php
| Show First 20 Lines • Show All 101 Lines • ▼ Show 20 Lines | public function execute(PhutilArgumentParser $args) { | ||||
| if (strlen($with_name)) { | if (strlen($with_name)) { | ||||
| $parts[] = qsprintf( | $parts[] = qsprintf( | ||||
| $conn, | $conn, | ||||
| 'lockName = %s', | 'lockName = %s', | ||||
| $with_name); | $with_name); | ||||
| } | } | ||||
| if (!$parts) { | if (!$parts) { | ||||
| $constraint = '1 = 1'; | $constraint = qsprintf($conn, '1 = 1'); | ||||
| } else { | } else { | ||||
| $constraint = '('.implode(') AND (', $parts).')'; | $constraint = qsprintf($conn, '%LA', $parts); | ||||
| } | } | ||||
| $logs = $table->loadAllWhere( | $logs = $table->loadAllWhere( | ||||
| '%Q ORDER BY id DESC LIMIT 100', | '%Q ORDER BY id DESC LIMIT 100', | ||||
| $constraint); | $constraint); | ||||
| $logs = array_reverse($logs); | $logs = array_reverse($logs); | ||||
| if (!$logs) { | if (!$logs) { | ||||
| ▲ Show 20 Lines • Show All 102 Lines • Show Last 20 Lines | |||||