Skip to content
This repository has been archived by the owner on Nov 19, 2020. It is now read-only.

skip_activity_log not working for /rows/bulk #62

Open
benhaynes opened this issue Oct 25, 2018 · 0 comments
Open

skip_activity_log not working for /rows/bulk #62

benhaynes opened this issue Oct 25, 2018 · 0 comments
Labels

Comments

@benhaynes
Copy link
Member

From directus created by bensteers : directus/directus#2175

?skip_activity_log=1 is not disabling activity logging for bulk row uploads.

Version Info

  • Directus version and branch (Or commit hash): 6.4.9
  • PHP version: 7.1.17
  • MySQL version: Ver 14.14 Distrib 5.5.60, for debian-linux-gnu (x86_64) using readline 6.3
  • OS name and version: Debian GNU/Linux 8 (jessie)

I suspect that this is the needed update:

// directus/api/core/Directus/Database/TableGateway/RelationalTableGateway.php, line 2018
...
// change
    public function updateCollection($entries)
    {
        $entries = ArrayUtils::isNumericKeys($entries) ? $entries : [$entries];
        foreach ($entries as $entry) {
            $entry = $this->updateRecord($entry);
            $entry->save();
        }
    }
// to
    public function updateCollection($entries)
    {
        $entries = ArrayUtils::isNumericKeys($entries) ? $entries : [$entries];
        foreach ($entries as $entry) {
            $entry = $this->updateRecord($entry, $this->getActivityMode());
            $entry->save();
        }
    }
...

I just haven't had a minute to test before submitting a pull request.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant