Skip to content

Commit

Permalink
Merge pull request #33 from nextcloud/enh/noid/deprecations+bump
Browse files Browse the repository at this point in the history
bump version and resolve deprecations
  • Loading branch information
blizzz authored Jan 16, 2020
2 parents 8cf3f8c + 2dff6c0 commit c75ad18
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion appinfo/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@
*
*/

$app = new \OCA\WorkflowScript\AppInfo\Application();
$app = \OC::$server->query(\OCA\WorkflowScript\AppInfo\Application::class);
5 changes: 2 additions & 3 deletions appinfo/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<name>Workflow external scripts</name>
<summary>Rule based processing of files through specified external scripts</summary>
<description>Pass files on to external scripts depending on a defined set of rules.</description>
<version>1.3.0</version>
<version>1.3.1</version>
<licence>agpl</licence>
<author mail="[email protected]">Arthur Schiwon</author>
<namespace>WorkflowScript</namespace>
Expand All @@ -19,8 +19,7 @@
<website>https://github.com/nextcloud/workflow_script</website>
<bugs>https://github.com/nextcloud/workflow_script/issues</bugs>
<repository type="git">https://github.com/nextcloud/workflow_script.git</repository>
<screenshot small-thumbnail="https://raw.githubusercontent.com/nextcloud/workflow_script/master/screenshots/settings-small.png">https://raw.githubusercontent.com/nextcloud/workflow_script/master/screenshots/settings.png</screenshot>
<screenshot small-thumbnail="https://raw.githubusercontent.com/nextcloud/workflow_script/master/screenshots/example_rule-small.png">https://raw.githubusercontent.com/nextcloud/workflow_script/master/screenshots/example_rule.png</screenshot>
<screenshot>https://raw.githubusercontent.com/nextcloud/workflow_script/master/screenshots/flow-ui.png</screenshot>
<dependencies>
<nextcloud min-version="18" max-version="18" />
</dependencies>
Expand Down
9 changes: 6 additions & 3 deletions lib/Operation.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
use OCA\WorkflowScript\BackgroundJobs\Launcher;
use OCP\BackgroundJob\IJobList;
use OCP\EventDispatcher\Event;
use OCP\EventDispatcher\GenericEvent;
use OCP\Files\Folder;
use OCP\Files\InvalidPathException;
use OCP\Files\IRootFolder;
Expand All @@ -40,7 +41,7 @@
use OCP\WorkflowEngine\IManager;
use OCP\WorkflowEngine\IRuleMatcher;
use OCP\WorkflowEngine\ISpecificOperation;
use Symfony\Component\EventDispatcher\GenericEvent;
use Symfony\Component\EventDispatcher\GenericEvent as LegacyGenericEvent;

class Operation implements ISpecificOperation {

Expand Down Expand Up @@ -172,7 +173,9 @@ public function isAvailableForScope(int $scope): bool {
}

public function onEvent(string $eventName, Event $event, IRuleMatcher $ruleMatcher): void {
if (!$event instanceof GenericEvent && !$event instanceof MapperEvent) {
if (!$event instanceof GenericEvent
&& !$event instanceof LegacyGenericEvent
&& !$event instanceof MapperEvent) {
return;
}
try {
Expand Down Expand Up @@ -202,7 +205,7 @@ public function onEvent(string $eventName, Event $event, IRuleMatcher $ruleMatch
return;
}

$matches = $ruleMatcher->getMatchingOperations(Operation::class, false);
$matches = $ruleMatcher->getFlows(false);
foreach ($matches as $match) {
$command = $this->buildCommand($match['operation'], $node, $eventName, $extra);
$args = ['command' => $command];
Expand Down
Binary file removed screenshots/example_rule-small.png
Binary file not shown.
Binary file removed screenshots/example_rule.png
Binary file not shown.
Binary file added screenshots/flow-ui.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed screenshots/settings-small.png
Binary file not shown.
Binary file removed screenshots/settings.png
Binary file not shown.

0 comments on commit c75ad18

Please sign in to comment.