Skip to content

Commit

Permalink
Merge branch '4.0-dev' into tiny
Browse files Browse the repository at this point in the history
  • Loading branch information
jeckodevelopment committed Apr 10, 2019
2 parents aee87cf + e43d3e9 commit f87213d
Show file tree
Hide file tree
Showing 360 changed files with 3,444 additions and 2,086 deletions.
3 changes: 1 addition & 2 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ There are other branches available which serve specific purposes.

| Branch | Purpose |
| ------ | ------- |
| staging | Current codebase. Branch for the next minor Joomla version. New backward compatible features go into this branch. |
| 3.9-dev | Branch for the next minor Joomla version. The 3.9.0 release will include the Privacy Tools Suite features. Commits to staging will be applied to this branch as well. |
| staging | Current codebase. Branch for the next minor Joomla version. New backward compatible features go into this branch. The 3.9.0 release will include the Privacy Tools Suite features. |
| 3.10-dev | Branch for the next minor Joomla version. The 3.10.0 release will only include compatibility features for 4.0. Commits to staging will be applied to this branch as well. |
| 4.0-dev | Branch for the next major Joomla version. New features go into this branch. Commits to staging will be applied to this branch as well. |
4 changes: 2 additions & 2 deletions administrator/components/com_actionlogs/actionlogs.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
* @package Joomla.Administrator
* @subpackage com_actionlogs
*
* @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved.
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

defined('_JEXEC') or die;

if (!JFactory::getUser()->authorise('core.manage', 'com_actionlogs'))
if (!JFactory::getUser()->authorise('core.admin'))
{
throw new JAccessExceptionNotallowed(JText::_('JERROR_ALERTNOAUTHOR'), 403);
}
Expand Down
2 changes: 1 addition & 1 deletion administrator/components/com_actionlogs/actionlogs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
<authorEmail>admin@joomla.org</authorEmail>
<authorUrl>www.joomla.org</authorUrl>
<version>__DEPLOY_VERSION__</version>
<version>3.9.0</version>
<description>COM_ACTIONLOGS_XML_DESCRIPTION</description>
<administration>
<menu>COM_ACTIONLOGS</menu>
Expand Down
6 changes: 3 additions & 3 deletions administrator/components/com_actionlogs/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<field
name="ip_logging"
type="radio"
label="COM_ACTIONLOGS_IP_LOGGING"
label="COM_ACTIONLOGS_IP_LOGGING_LABEL"
description="COM_ACTIONLOGS_IP_LOGGING_DESC"
class="btn-group btn-group-yesno"
default="0"
Expand All @@ -16,7 +16,7 @@
<field
name="csv_delimiter"
type="list"
label="COM_ACTIONLOGS_CSV_DELIMITER"
label="COM_ACTIONLOGS_CSV_DELIMITER_LABEL"
description="COM_ACTIONLOGS_CSV_DELIMITER_DESC"
default=","
>
Expand All @@ -26,7 +26,7 @@
<field
name="loggable_extensions"
type="logtype"
label="COM_ACTIONLOGS_LOG_EXTENSIONS"
label="COM_ACTIONLOGS_LOG_EXTENSIONS_LABEL"
description="COM_ACTIONLOGS_LOG_EXTENSIONS_DESC"
multiple="true"
default="com_banners,com_cache,com_categories,com_config,com_contact,com_content,com_installer,com_media,com_menus,com_messages,com_modules,com_newsfeeds,com_plugins,com_redirect,com_tags,com_templates,com_users"
Expand Down
2 changes: 1 addition & 1 deletion administrator/components/com_actionlogs/controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
/**
* Actionlogs Controller
*
* @since __DEPLOY_VERSION__
* @since 3.9.0
*/
class ActionlogsController extends JControllerLegacy
{
Expand Down
25 changes: 16 additions & 9 deletions administrator/components/com_actionlogs/controllers/actionlogs.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @package Joomla.Administrator
* @subpackage com_actionlogs
*
* @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved.
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

Expand All @@ -12,12 +12,12 @@
use Joomla\CMS\Component\ComponentHelper;
use Joomla\Utilities\ArrayHelper;

JLoader::register('ActionlogsHelper', JPATH_COMPONENT . '/helpers/actionlogs.php');
JLoader::register('ActionlogsHelper', JPATH_ADMINISTRATOR . '/components/com_actionlogs/helpers/actionlogs.php');

/**
* Actionlogs list controller class.
*
* @since __DEPLOY_VERSION__
* @since 3.9.0
*/
class ActionlogsControllerActionlogs extends JControllerAdmin
{
Expand All @@ -26,7 +26,7 @@ class ActionlogsControllerActionlogs extends JControllerAdmin
*
* @param array $config An optional associative array of configuration settings.
*
* @since __DEPLOY_VERSION__
* @since 3.9.0
*/
public function __construct(array $config = array())
{
Expand All @@ -44,7 +44,7 @@ public function __construct(array $config = array())
*
* @return object The model.
*
* @since __DEPLOY_VERSION__
* @since 3.9.0
*/
public function getModel($name = 'Actionlogs', $prefix = 'ActionlogsModel', $config = array('ignore_request' => true))
{
Expand All @@ -57,15 +57,22 @@ public function getModel($name = 'Actionlogs', $prefix = 'ActionlogsModel', $con
*
* @return void
*
* @since __DEPLOY_VERSION__
* @since 3.9.0
*/
public function exportLogs()
{
// Check for request forgeries.
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));

// Get selected logs
$pks = ArrayHelper::toInteger($this->input->post->get('cid', array(), 'array'));
$task = $this->getTask();

$pks = array();

if ($task == 'exportSelectedLogs')
{
// Get selected logs
$pks = ArrayHelper::toInteger(explode(',', $this->input->post->getString('cids')));
}

// Get the logs data
$data = $this->getModel()->getLogsData($pks);
Expand Down Expand Up @@ -105,7 +112,7 @@ public function exportLogs()
*
* @return void
*
* @since __DEPLOY_VERSION__
* @since 3.9.0
*/
public function purge()
{
Expand Down
47 changes: 8 additions & 39 deletions administrator/components/com_actionlogs/helpers/actionlogs.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @package Joomla.Administrator
* @subpackage com_actionlogs
*
* @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved.
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

Expand All @@ -16,7 +16,7 @@
/**
* Actionlogs component helper.
*
* @since __DEPLOY_VERSION__
* @since 3.9.0
*/
class ActionlogsHelper
{
Expand All @@ -27,7 +27,7 @@ class ActionlogsHelper
*
* @return array
*
* @since __DEPLOY_VERSION__
* @since 3.9.0
*/
public static function getCsvData($data)
{
Expand Down Expand Up @@ -61,7 +61,7 @@ public static function getCsvData($data)
*
* @return void
*
* @since __DEPLOY_VERSION__
* @since 3.9.0
*/
public static function loadTranslationFiles($extension)
{
Expand Down Expand Up @@ -113,7 +113,7 @@ public static function loadTranslationFiles($extension)
*
* @return mixed An object contains content type parameters, or null if not found
*
* @since __DEPLOY_VERSION__
* @since 3.9.0
*/
public static function getLogContentTypeParams($context)
{
Expand All @@ -128,45 +128,14 @@ public static function getLogContentTypeParams($context)
return $db->loadObject();
}

/**
* Method to retrieve data by primary keys from a table
*
* @param array $pks An array of primary key ids of the content that has changed state.
* @param string $field The field to get from the table
* @param string $idField The primary key of the table
* @param string $table The database table to get data from
*
* @return array
*
* @since __DEPLOY_VERSION__
*/
public static function getDataByPks($pks, $field, $idField, $table)
{
$db = JFactory::getDbo();
$query = $db->getQuery(true)
->select($db->quoteName(array($idField, $field)))
->from($db->quoteName($table))
->where($db->quoteName($idField) . ' IN (' . implode(',', ArrayHelper::toInteger($pks)) . ')');
$db->setQuery($query);

try
{
return $db->loadObjectList($idField);
}
catch (RuntimeException $e)
{
return array();
}
}

/**
* Get human readable log message for a User Action Log
*
* @param stdClass $log A User Action log message record
*
* @return string
*
* @since __DEPLOY_VERSION__
* @since 3.9.0
*/
public static function getHumanReadableLogMessage($log)
{
Expand Down Expand Up @@ -206,7 +175,7 @@ public static function getHumanReadableLogMessage($log)
*
* @return string Link to the content item
*
* @since __DEPLOY_VERSION__
* @since 3.9.0
*/
public static function getContentTypeLink($component, $contentType, $id, $urlVar = 'id')
{
Expand Down Expand Up @@ -243,7 +212,7 @@ public static function getContentTypeLink($component, $contentType, $id, $urlVar
*
* @return void
*
* @since __DEPLOY_VERSION__
* @since 3.9.0
*/
public static function loadActionLogPluginsLanguage()
{
Expand Down
6 changes: 3 additions & 3 deletions administrator/components/com_actionlogs/models/actionlog.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
/**
* Methods supporting a list of article records.
*
* @since __DEPLOY_VERSION__
* @since 3.9.0
*/
class ActionlogsModelActionlog extends JModelLegacy
{
Expand All @@ -31,7 +31,7 @@ class ActionlogsModelActionlog extends JModelLegacy
*
* @return void
*
* @since __DEPLOY_VERSION__
* @since 3.9.0
*/
public function addLog($messages, $messageLanguageKey, $context, $userId = null)
{
Expand Down Expand Up @@ -91,7 +91,7 @@ public function addLog($messages, $messageLanguageKey, $context, $userId = null)
*
* @return void
*
* @since __DEPLOY_VERSION__
* @since 3.9.0
*/
protected function sendNotificationEmails($messages, $username, $context)
{
Expand Down

0 comments on commit f87213d

Please sign in to comment.