Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diffusion/DiffusionLintSaveRunner.php
| Show First 20 Lines • Show All 223 Lines • ▼ Show 20 Lines | foreach (array_chunk($this->deletes, 1024) as $paths) { | ||||
| $paths); | $paths); | ||||
| } | } | ||||
| foreach (array_chunk($this->inserts, 256) as $values) { | foreach (array_chunk($this->inserts, 256) as $values) { | ||||
| queryfx( | queryfx( | ||||
| $this->conn, | $this->conn, | ||||
| 'INSERT INTO %T | 'INSERT INTO %T | ||||
| (branchID, path, line, code, severity, name, description) | (branchID, path, line, code, severity, name, description) | ||||
| VALUES %Q', | VALUES %LQ', | ||||
| PhabricatorRepository::TABLE_LINTMESSAGE, | PhabricatorRepository::TABLE_LINTMESSAGE, | ||||
| implode(', ', $values)); | $values); | ||||
| } | } | ||||
| $this->conn->saveTransaction(); | $this->conn->saveTransaction(); | ||||
| $this->deletes = array(); | $this->deletes = array(); | ||||
| $this->inserts = array(); | $this->inserts = array(); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 47 Lines • ▼ Show 20 Lines | if ($authors) { | ||||
| $where[] = qsprintf( | $where[] = qsprintf( | ||||
| $this->conn, | $this->conn, | ||||
| '(path = %s AND line IN (%Ld))', | '(path = %s AND line IN (%Ld))', | ||||
| $this->svnRoot.'/'.$path, | $this->svnRoot.'/'.$path, | ||||
| $lines); | $lines); | ||||
| } | } | ||||
| queryfx( | queryfx( | ||||
| $this->conn, | $this->conn, | ||||
| 'UPDATE %T SET authorPHID = %s WHERE %Q', | 'UPDATE %T SET authorPHID = %s WHERE %LO', | ||||
| PhabricatorRepository::TABLE_LINTMESSAGE, | PhabricatorRepository::TABLE_LINTMESSAGE, | ||||
| $author, | $author, | ||||
| implode(' OR ', $where)); | $where); | ||||
| } | } | ||||
| $this->conn->saveTransaction(); | $this->conn->saveTransaction(); | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||