-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[4.2] Action Logs Enabled #37571
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
[4.2] Action Logs Enabled #37571
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -374,4 +374,33 @@ protected static function escapeCsvFormula($value) | |
|
|
||
| return $value; | ||
| } | ||
|
|
||
| /** | ||
| * Gets the actionlog plugin extension id. | ||
| * | ||
| * @return integer The actionlog plugin extension id. | ||
| * | ||
| * @since __DEPLOY_VERSION__ | ||
| */ | ||
| public static function getActionlogPluginId() | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This method needs to be moved to the model as there you have the database object available.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fix the exact same code used in multiple places in core then. Really frustrating to copy paste code from one component to another and be told its wrong. As you know core is wrong I now expect that you will fix it |
||
| { | ||
| $db = Factory::getDbo(); | ||
| $query = $db->getQuery(true) | ||
| ->select($db->quoteName('extension_id')) | ||
| ->from($db->quoteName('#__extensions')) | ||
brianteeman marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| ->where($db->quoteName('folder') . ' = ' . $db->quote('actionlog')) | ||
| ->where($db->quoteName('element') . ' = ' . $db->quote('joomla')); | ||
| $db->setQuery($query); | ||
|
|
||
| try | ||
| { | ||
| $result = (int) $db->loadResult(); | ||
| } | ||
| catch (\RuntimeException $e) | ||
| { | ||
| Factory::getApplication()->enqueueMessage($e->getMessage(), 'error'); | ||
| } | ||
|
|
||
| return $result; | ||
| } | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.