Skip to content

Commit

Permalink
Merge branch 'staging' into disabled_fields
Browse files Browse the repository at this point in the history
  • Loading branch information
zero-24 committed Feb 12, 2019
2 parents 2d0ba7b + e492d84 commit 235e4e7
Show file tree
Hide file tree
Showing 4,073 changed files with 7,692 additions and 5,970 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
42 changes: 21 additions & 21 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ plugins/fields/* @laoneo
plugins/systems/fields/* @laoneo

# Smart Search
administrator/components/com_finder/* @mbabker
components/com_finder/* @mbabker
modules/mod_finder/* @mbabker
plugins/content/finder/* @mbabker
plugins/finder/* @mbabker
#administrator/components/com_finder/*
#components/com_finder/*
#modules/mod_finder/*
#plugins/content/finder/*
#plugins/finder/*

# CodeMirror
media/editors/codemirror/* @okonomiyaki3000
Expand All @@ -21,33 +21,33 @@ plugins/editors/codemirror/* @okonomiyaki3000
plugins/system/stats/* @mbabker @wilsonge

# Release Tools
build.xml @mbabker
build/build.php @mbabker @rdeutz @wilsonge
build/bump.php @mbabker @rdeutz @wilsonge
build/deleted_file_check.php @mbabker @rdeutz @wilsonge
build.xml @wilsonge
build/build.php @rdeutz @wilsonge
build/bump.php @rdeutz @wilsonge
build/deleted_file_check.php @rdeutz @wilsonge

# Core/Extension Install/Update Tools
administrator/components/com_joomlaupdate/* @mbabker @rdeutz @wilsonge @zero-24
libraries/src/Installer/* @mbabker @rdeutz @wilsonge @zero-24
libraries/src/Updater/* @mbabker @rdeutz @wilsonge @zero-24
administrator/components/com_joomlaupdate/* @rdeutz @wilsonge @zero-24
libraries/src/Installer/* @rdeutz @wilsonge @zero-24
libraries/src/Updater/* @rdeutz @wilsonge @zero-24

# Automated Testing
build/jenkins/* @mbabker @rdeutz
build/travis/* @mbabker @rdeutz
build/jenkins/* @rdeutz
build/travis/* @rdeutz
tests/codeception/* @rdeutz
tests/javascript/* @dgrammatiko @rdeutz
tests/unit/* @mbabker @rdeutz
.appveyor.yml @mbabker @rdeutz
tests/unit/* @rdeutz
.appveyor.yml @rdeutz
.drone.yml @rdeutz
.hound.yml @mbabker
.travis.yml @mbabker @rdeutz
appveyor-phpunit.xml @mbabker @rdeutz
.hound.yml @wilsonge
.travis.yml @rdeutz
appveyor-phpunit.xml @rdeutz
codeception.yml @rdeutz
karma.conf.js @dgrammatiko @rdeutz
phpunit.xml.dist @mbabker @rdeutz
phpunit.xml.dist @rdeutz
RoboFile.dist.ini @rdeutz
RoboFile.php @rdeutz
travis-phpunit.xml @mbabker @rdeutz
travis-phpunit.xml @rdeutz

# Core JS
media/*/js/* @dgrammatiko
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,9 @@ Desktop.ini
/libraries/vendor/simplepie/simplepie/build
/libraries/vendor/simplepie/simplepie/idn/ReadMe.txt
/libraries/vendor/simplepie/simplepie/composer.json
/libraries/vendor/typo3/phar-stream-wrapper/README.md
/libraries/vendor/typo3/phar-stream-wrapper/LICENSE
/libraries/vendor/typo3/phar-stream-wrapper/.gitignore

# System Test related files
tests/codeception/acceptance.suite.yml
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ Do you want to improve Joomla?

Copyright
---------------------
* Copyright (C) 2005 - 2018 Open Source Matters. All rights reserved.
* Copyright (C) 2005 - 2019 Open Source Matters. All rights reserved.
* [Special Thanks](https://docs.joomla.org/Special:MyLanguage/Joomla!_Credits_and_Thanks)
* Distributed under the GNU General Public License version 2 or later
* See [License details](https://docs.joomla.org/Special:MyLanguage/Joomla_Licenses)
2 changes: 1 addition & 1 deletion README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
* Documentation for Web designers: https://docs.joomla.org/Special:MyLanguage/Web_designers

Copyright:
* Copyright (C) 2005 - 2018 Open Source Matters. All rights reserved.
* Copyright (C) 2005 - 2019 Open Source Matters. All rights reserved.
* Special Thanks: https://docs.joomla.org/Special:MyLanguage/Joomla!_Credits_and_Thanks
* Distributed under the GNU General Public License version 2 or later
* See Licenses details at https://docs.joomla.org/Special:MyLanguage/Joomla_Licenses
2 changes: 1 addition & 1 deletion RoboFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @package Joomla.Site
* @subpackage RoboFile
*
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

Expand Down
15 changes: 10 additions & 5 deletions administrator/components/com_actionlogs/actionlogs.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,22 @@
* @package Joomla.Administrator
* @subpackage com_actionlogs
*
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
* @copyright Copyright (C) 2005 - 2019 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.admin'))
use Joomla\CMS\Access\Exception\NotAllowed;
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\BaseController;

if (!Factory::getUser()->authorise('core.admin'))
{
throw new JAccessExceptionNotallowed(JText::_('JERROR_ALERTNOAUTHOR'), 403);
throw new NotAllowed(Text::_('JERROR_ALERTNOAUTHOR'), 403);
}

$controller = JControllerLegacy::getInstance('Actionlogs');
$controller->execute(JFactory::getApplication()->input->get('task'));
$controller = BaseController::getInstance('Actionlogs');
$controller->execute(Factory::getApplication()->input->get('task'));
$controller->redirect();
2 changes: 1 addition & 1 deletion administrator/components/com_actionlogs/actionlogs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<name>com_actionlogs</name>
<author>Joomla! Project</author>
<creationDate>May 2018</creationDate>
<copyright>Copyright (C) 2005 - 2018 Open Source Matters. All rights reserved.</copyright>
<copyright>Copyright (C) 2005 - 2019 Open Source Matters. All rights reserved.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
<authorEmail>admin@joomla.org</authorEmail>
<authorUrl>www.joomla.org</authorUrl>
Expand Down
2 changes: 1 addition & 1 deletion administrator/components/com_actionlogs/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
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"
default="com_banners,com_cache,com_categories,com_checkin,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"
/>
</fieldset>
</config>
2 changes: 1 addition & 1 deletion administrator/components/com_actionlogs/controller.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 - 2018 Open Source Matters, Inc. All rights reserved.
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

Expand Down
24 changes: 14 additions & 10 deletions administrator/components/com_actionlogs/controllers/actionlogs.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,17 @@
* @package Joomla.Administrator
* @subpackage com_actionlogs
*
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

defined('_JEXEC') or die;

use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Date\Date;
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;
use Joomla\Utilities\ArrayHelper;

JLoader::register('ActionlogsHelper', JPATH_ADMINISTRATOR . '/components/com_actionlogs/helpers/actionlogs.php');
Expand Down Expand Up @@ -89,21 +93,21 @@ public function exportLogs()
}
catch (InvalidArgumentException $exception)
{
$this->setMessage(JText::_('COM_ACTIONLOGS_ERROR_COULD_NOT_EXPORT_DATA'), 'error');
$this->setRedirect(JRoute::_('index.php?option=com_actionlogs&view=actionlogs', false));
$this->setMessage(Text::_('COM_ACTIONLOGS_ERROR_COULD_NOT_EXPORT_DATA'), 'error');
$this->setRedirect(Route::_('index.php?option=com_actionlogs&view=actionlogs', false));

return;
}

// Destroy the iterator now
unset($data);

$date = new JDate('now', new DateTimeZone('UTC'));
$date = new Date('now', new DateTimeZone('UTC'));
$filename = 'logs_' . $date->format('Y-m-d_His_T');

$csvDelimiter = ComponentHelper::getComponent('com_actionlogs')->getParams()->get('csv_delimiter', ',');

$app = JFactory::getApplication();
$app = Factory::getApplication();
$app->setHeader('Content-Type', 'application/csv', true)
->setHeader('Content-Disposition', 'attachment; filename="' . $filename . '.csv"', true)
->setHeader('Cache-Control', 'must-revalidate', true)
Expand All @@ -122,8 +126,8 @@ public function exportLogs()
}
else
{
$this->setMessage(JText::_('COM_ACTIONLOGS_NO_LOGS_TO_EXPORT'));
$this->setRedirect(JRoute::_('index.php?option=com_actionlogs&view=actionlogs', false));
$this->setMessage(Text::_('COM_ACTIONLOGS_NO_LOGS_TO_EXPORT'));
$this->setRedirect(Route::_('index.php?option=com_actionlogs&view=actionlogs', false));
}
}

Expand All @@ -143,13 +147,13 @@ public function purge()

if ($model->purge())
{
$message = JText::_('COM_ACTIONLOGS_PURGE_SUCCESS');
$message = Text::_('COM_ACTIONLOGS_PURGE_SUCCESS');
}
else
{
$message = JText::_('COM_ACTIONLOGS_PURGE_FAIL');
$message = Text::_('COM_ACTIONLOGS_PURGE_FAIL');
}

$this->setRedirect(JRoute::_('index.php?option=com_actionlogs&view=actionlogs', false), $message);
$this->setRedirect(Route::_('index.php?option=com_actionlogs&view=actionlogs', false), $message);
}
}
30 changes: 17 additions & 13 deletions administrator/components/com_actionlogs/helpers/actionlogs.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,17 @@
* @package Joomla.Administrator
* @subpackage com_actionlogs
*
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

defined('_JEXEC') or die;

use Joomla\CMS\Date\Date;
use Joomla\CMS\Factory;
use Joomla\CMS\Filesystem\Path;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;
use Joomla\String\StringHelper;

/**
Expand Down Expand Up @@ -57,7 +61,7 @@ public static function getCsvData($data)

foreach ($data as $log)
{
$date = new JDate($log->log_date, new DateTimeZone('UTC'));
$date = new Date($log->log_date, new DateTimeZone('UTC'));
$extension = strtok($log->extension, '.');

static::loadTranslationFiles($extension);
Expand All @@ -66,9 +70,9 @@ public static function getCsvData($data)
'id' => $log->id,
'message' => strip_tags(static::getHumanReadableLogMessage($log, false)),
'date' => $date->format('Y-m-d H:i:s T'),
'extension' => JText::_($extension),
'extension' => Text::_($extension),
'name' => $log->name,
'ip_address' => JText::_($log->ip_address),
'ip_address' => Text::_($log->ip_address),
);
}

Expand All @@ -94,7 +98,7 @@ public static function loadTranslationFiles($extension)
return;
}

$lang = JFactory::getLanguage();
$lang = Factory::getLanguage();
$source = '';

switch (substr($extension, 0, 3))
Expand Down Expand Up @@ -154,7 +158,7 @@ public static function loadTranslationFiles($extension)
*/
public static function getLogContentTypeParams($context)
{
$db = JFactory::getDbo();
$db = Factory::getDbo();
$query = $db->getQuery(true)
->select('a.*')
->from($db->quoteName('#__action_log_config', 'a'))
Expand All @@ -179,17 +183,17 @@ public static function getHumanReadableLogMessage($log, $generateLinks = true)
{
static $links = array();

$message = JText::_($log->message_language_key);
$message = Text::_($log->message_language_key);
$messageData = json_decode($log->message, true);

// Special handling for translation extension name
if (isset($messageData['extension_name']))
{
static::loadTranslationFiles($messageData['extension_name']);
$messageData['extension_name'] = JText::_($messageData['extension_name']);
$messageData['extension_name'] = Text::_($messageData['extension_name']);
}

$linkMode = JFactory::getApplication()->get('force_ssl', 0) >= 1 ? 1 : -1;
$linkMode = Factory::getApplication()->get('force_ssl', 0) >= 1 ? 1 : -1;

foreach ($messageData as $key => $value)
{
Expand All @@ -198,13 +202,13 @@ public static function getHumanReadableLogMessage($log, $generateLinks = true)
{
if (!isset($links[$value]))
{
$links[$value] = JRoute::link('administrator', $value, false, $linkMode);
$links[$value] = Route::link('administrator', $value, false, $linkMode);
}

$value = $links[$value];
}

$message = str_replace('{' . $key . '}', JText::_($value), $message);
$message = str_replace('{' . $key . '}', Text::_($value), $message);
}

return $message;
Expand Down Expand Up @@ -261,8 +265,8 @@ public static function getContentTypeLink($component, $contentType, $id, $urlVar
*/
public static function loadActionLogPluginsLanguage()
{
$lang = JFactory::getLanguage();
$db = JFactory::getDbo();
$lang = Factory::getLanguage();
$db = Factory::getDbo();

// Get all (both enabled and disabled) actionlog plugins
$query = $db->getQuery(true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,15 @@
* @package Joomla.Administrator
* @subpackage com_actionlogs
*
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

defined('_JEXEC') or die;

use Joomla\CMS\Date\Date;
use Joomla\CMS\Language\Text;

/**
* Actionlogs component helper for newer PHP versions.
*
Expand Down Expand Up @@ -55,10 +58,10 @@ public static function getCsvAsGenerator($data)
yield array(
'id' => $log->id,
'message' => strip_tags(ActionlogsHelper::getHumanReadableLogMessage($log, false)),
'date' => (new JDate($log->log_date, new DateTimeZone('UTC')))->format('Y-m-d H:i:s T'),
'extension' => JText::_($extension),
'date' => (new Date($log->log_date, new DateTimeZone('UTC')))->format('Y-m-d H:i:s T'),
'extension' => Text::_($extension),
'name' => $log->name,
'ip_address' => JText::_($log->ip_address),
'ip_address' => Text::_($log->ip_address),
);
}
}
Expand Down

0 comments on commit 235e4e7

Please sign in to comment.