-
-
Notifications
You must be signed in to change notification settings - Fork 528
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#6142 Added abbility to see which plugins attached to the event #modxbughunt #13324
Conversation
…t on page with events #modxbughunt
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a small note about short array syntax (which is PHP 5.4+).
Also, i was wondering if we should display only active plugin (where(array('disabled' => false))
or style disabled plugins differently (rendered in the grid).
Otherwise 👍
$c = $this->modx->newQuery('modPlugin'); | ||
$c->leftJoin('modPluginEvent', 'modPluginEvent', 'modPluginEvent.pluginid = modPlugin.id'); | ||
$c->sortby('modPluginEvent.priority', 'ASC'); | ||
$c->where(['modPluginEvent.event' => $eventArray['name']]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While i would love to use the short array syntax, this would break compatibility to PHP 5.3.x
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree, It's a hard to follow when it has become a habit. :)
@rtripault I thought about to add marks for plugins, like |
This looks useful, but can't be merged until the short array syntax is fixed ;) |
@Mark-H @rtripault Fixed short arrays and add statuses for plugins (see screnshot below) |
$eventArray['plugins'] = ''; | ||
} | ||
|
||
$eventArray['plugins'] = json_encode($eventArray['plugins']); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the benefit of json encoding here and having to parse the json client side later ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right, it's obsolete. I've fixed and removed this encoding/decoding.
All working as expected. |
* upstream/pr/13324: Remove obsolete json encoding/decoding Added readable statuses of the plugins Fixed short array syntax for compatibility with php 5.3 #6142 Added abbility to see which plugins attached to the event on page with events #modxbughunt
Many thanks for your work and patience ;) |
#modxbughunt #1point to @rtripault |
What does it do?
It allows to see which plugins attached to system event on the events page.
Why is it needed?
When in the system a lot of plugins sometimes it can be useful so see which of them attached to events from events page. Or when we try to see which plugins work with specific event.
Related issue(s)/PR(s)
Partially fix for #6142