From 376e82c6015dcffcb4d9e652c4bab7070bde1e92 Mon Sep 17 00:00:00 2001 From: Ivan Klimchuk Date: Mon, 27 Mar 2017 15:03:34 +0300 Subject: [PATCH] Fixed error with not found modAction in ms2OrderStatusSlackify plugin for miniShop2 --- _build/build.transport.php | 2 +- .../elements/plugins/ms2OrderStatusSlackify.php | 10 +++------- docs/changelog.txt | 4 ++++ 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/_build/build.transport.php b/_build/build.transport.php index e7b833c..20b93ae 100644 --- a/_build/build.transport.php +++ b/_build/build.transport.php @@ -37,7 +37,7 @@ define('PKG_NAME', 'Slackify'); define('PKG_NAME_LOWER', strtolower(PKG_NAME)); -define('PKG_VERSION', '0.8.1'); +define('PKG_VERSION', '0.8.2'); define('PKG_RELEASE', 'pl'); require_once 'xpdo/xpdo/xpdo.class.php'; diff --git a/core/components/slackify/elements/plugins/ms2OrderStatusSlackify.php b/core/components/slackify/elements/plugins/ms2OrderStatusSlackify.php index b2fa0a9..12ee774 100644 --- a/core/components/slackify/elements/plugins/ms2OrderStatusSlackify.php +++ b/core/components/slackify/elements/plugins/ms2OrderStatusSlackify.php @@ -37,12 +37,8 @@ $a->setPretext($new ? 'New order was made on site' : 'Status of order was changed'); $a->setColor(new Color('#' . $status->get('color'))); // from status - /** @var modAction $action */ - $action = $modx->getObject('modAction', ['namespace' => 'minishop2', 'controller' => 'controllers/mgr/orders']); - $link = new Link(rtrim(MODX_SITE_URL, '/') . MODX_MANAGER_URL . "index.php?a={$action->get('id')}#&order={$order->get('id')}", $order->get('num')); - $title = $new - ? "New order $link was placed on the site" - : "Order $link was updated"; + $link = new Link(rtrim(MODX_SITE_URL, '/') . MODX_MANAGER_URL . "index.php?a=mgr/orders&namespace=minishop2#&order={$order->get('id')}", $order->get('num')); + $title = $new ? "New order $link was placed on the site" : "Order $link was updated"; $a->setTitle(new Title($title)); $a->addField(new Field('Status', $status->get('name'), true)); @@ -66,5 +62,5 @@ $slackify->send($message); - break; + break; } diff --git a/docs/changelog.txt b/docs/changelog.txt index 6db22cf..ecaec43 100644 --- a/docs/changelog.txt +++ b/docs/changelog.txt @@ -1,5 +1,9 @@ This file shows the changes in recent releases of Slackify. +Slackify 0.8.2-pl (March 27, 2017) +======================================== +- Fixed error with not found modAction in ms2OrderStatusSlackify plugin for miniShop2 + Slackify 0.8.1-pl (September 28, 2015) ======================================== - Fixed error when modx could not load Slackify class as service