LogQueryBuilder
3 months ago
Actions.php
6 months ago
ArchiveSelector.php
3 months ago
ArchiveTableCreator.php
3 months ago
ArchiveTableDao.php
3 months ago
ArchiveWriter.php
3 months ago
ArchivingDbAdapter.php
1 year ago
LogAggregator.php
3 months ago
LogQueryBuilder.php
6 months ago
LogTableTemporary.php
2 years ago
Model.php
3 months ago
RawLogDao.php
6 months ago
TableMetadata.php
1 year ago
Actions.php
33 lines
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * Matomo - free/libre analytics platform |
| 5 | * |
| 6 | * @link https://matomo.org |
| 7 | * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later |
| 8 | */ |
| 9 | namespace Piwik\DataAccess; |
| 10 | |
| 11 | use Piwik\Db; |
| 12 | use Piwik\Common; |
| 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 | $table = Common::prefixTable('log_action'); |
| 29 | $sql = "DELETE FROM `{$table}` WHERE idaction IN (" . implode(",", $idActions) . ")"; |
| 30 | Db::query($sql); |
| 31 | } |
| 32 | } |
| 33 |