Skip to content

Commit

Permalink
Merge pull request #52 from OXIDprojects/feature/improve-anonymize-an…
Browse files Browse the repository at this point in the history
…d-autoload

Feature/improve anonymize and autoload
  • Loading branch information
proudcommerce authored Jun 19, 2020
2 parents 166ed0a + 9172d17 commit fda84f6
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [v4.2.1] 2020-06-19

### Fixed

- fix composer autoload from vendor/bin dir
- never anonymize malladmin users

## [v4.2.0] 2020-05-25

### Fixed
Expand Down
9 changes: 5 additions & 4 deletions bin/oxrun
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ if (is_file(__DIR__ . '/../../../autoload.php')) {
// default autoload
if (is_file(__DIR__ . '/../vendor/autoload.php')) {
$OXRUN_VENDOR_PATH = __DIR__ . '/../vendor/';
} elseif (is_file(__DIR__ . '/../autoload.php')) {
$OXRUN_VENDOR_PATH = __DIR__ . '/../';
}

$autoloader = require_once $OXRUN_VENDOR_PATH . 'autoload.php';
Expand All @@ -29,13 +31,12 @@ set_exception_handler([OxrunErrorHandling::class, 'handleUncaughtException']);
try {
$commandFinder = (new CommandFinder())
->addRegister(new Aggregator\CommunityPass(), true)
->addRegister(new Aggregator\ModulePass(),true)
->addRegister(new Aggregator\CustomPass(),true)
->addRegister(new Aggregator\ModulePass(), true)
->addRegister(new Aggregator\CustomPass(), true)
->addRegister(new Aggregator\OxrunPass());

(new ContainerCollection($commandFinder))
->addCommandTo($application);

} catch (\Exception $e) {
$consoleOutput = new ConsoleOutput();
$consoleOutput->writeln('<error>Command Collection: '.$e->getMessage().'</error>');
Expand All @@ -44,4 +45,4 @@ try {
$application->run();


__HALT_COMPILER();
__halt_compiler();
Binary file added oxrun.phar
Binary file not shown.
2 changes: 1 addition & 1 deletion src/Oxrun/Command/Database/AnonymizeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class AnonymizeCommand extends Command implements \Oxrun\Command\EnableInterface
'OXMOBFON' => 'string',
'OXCITY' => 'string',
],
'where' => "t.`OXUSERNAME` NOT LIKE '%{{keepDomain}}' AND t.`OXUSERNAME` LIKE '%@%'"
'where' => "t.`OXUSERNAME` NOT LIKE '%{{keepDomain}}' AND t.`OXUSERNAME` LIKE '%@%' AND t.`OXRIGHTS` NOT LIKE 'malladmin'"
],
'oxvouchers' => [
'fields' => [
Expand Down

0 comments on commit fda84f6

Please sign in to comment.