LogQueryBuilder
6 years ago
Actions.php
6 years ago
ArchiveSelector.php
6 years ago
ArchiveTableCreator.php
6 years ago
ArchiveTableDao.php
6 years ago
ArchiveWriter.php
6 years ago
ArchivingDbAdapter.php
6 years ago
LogAggregator.php
5 years ago
LogQueryBuilder.php
6 years ago
LogTableTemporary.php
6 years ago
Model.php
6 years ago
RawLogDao.php
6 years ago
TableMetadata.php
6 years ago
Actions.php
35 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Piwik - free/libre analytics platform |
| 4 | * |
| 5 | * @link https://matomo.org |
| 6 | * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later |
| 7 | */ |
| 8 | namespace Piwik\DataAccess; |
| 9 | |
| 10 | use Piwik\Db; |
| 11 | use Piwik\Common; |
| 12 | |
| 13 | /** |
| 14 | * Data Access Object for operations dealing with the log_action table. |
| 15 | */ |
| 16 | class Actions |
| 17 | { |
| 18 | /** |
| 19 | * Removes a list of actions from the log_action table by ID. |
| 20 | * |
| 21 | * @param int[] $idActions |
| 22 | */ |
| 23 | public function delete($idActions) |
| 24 | { |
| 25 | foreach ($idActions as &$id) { |
| 26 | $id = (int)$id; |
| 27 | } |
| 28 | |
| 29 | $table = Common::prefixTable('log_action'); |
| 30 | |
| 31 | $sql = "DELETE FROM $table WHERE idaction IN (" . implode(",", $idActions) . ")"; |
| 32 | Db::query($sql); |
| 33 | } |
| 34 | } |
| 35 |