Skip to content

Commit

Permalink
Merge branch '4.0-dev' into sunday_2
Browse files Browse the repository at this point in the history
  • Loading branch information
brianteeman committed May 7, 2019
2 parents 6423939 + 1247a14 commit d8c4c2d
Show file tree
Hide file tree
Showing 86 changed files with 666 additions and 397 deletions.
16 changes: 12 additions & 4 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ steps:

- name: restore-cache
image: drillster/drone-volume-cache
depends_on: [ phpcs ]
settings:
restore: true
mount:
Expand All @@ -28,6 +29,7 @@ steps:

- name: prepare
image: joomlaprojects/docker-tools:develop
depends_on: [ restore-cache ]
commands:
- composer install --no-progress --no-suggest
# needed for system testing
Expand All @@ -39,6 +41,7 @@ steps:

- name: rebuild-cache
image: drillster/drone-volume-cache
depends_on: [ prepare ]
settings:
rebuild: true
mount:
Expand All @@ -51,24 +54,25 @@ steps:
path: /cache

- name: php70-unit
group: unit
depends_on: [ rebuild-cache ]
image: joomlaprojects/docker-php70:develop
commands:
- ./libraries/vendor/bin/phpunit

- name: php71-unit
group: unit
depends_on: [ rebuild-cache ]
image: joomlaprojects/docker-php71:develop
commands:
- ./libraries/vendor/bin/phpunit

- name: php72-unit
group: unit
depends_on: [ rebuild-cache ]
image: joomlaprojects/docker-php72:develop
commands:
- ./libraries/vendor/bin/phpunit

- name: javascript-cs
depends_on: [ rebuild-cache ]
image: joomlaprojects/docker-systemtests:develop
commands:
- export DISPLAY=:0
Expand All @@ -78,6 +82,7 @@ steps:
- npm run lint:js

- name: javascript-tests
depends_on: [ rebuild-cache ]
image: joomlaprojects/docker-systemtests:develop
commands:
- export DISPLAY=:0
Expand All @@ -87,17 +92,20 @@ steps:
- npm run test

- name: system-tests
depends_on: [ javascript-tests ]
image: joomlaprojects/docker-systemtests:develop
commands:
- bash libraries/vendor/joomla/test-system/src/drone-run.sh "$(pwd)"

- name: api-tests
depends_on: [ system-tests ]
image: joomlaprojects/docker-systemtests:latest
commands:
- bash libraries/vendor/joomla/test-api/drone-run.sh "$(pwd)"

- name: analysis4x
image: rips/rips-cli:1.2.1
depends_on: [ api-tests ]
when:
branch: 4.0-dev
commands:
Expand Down Expand Up @@ -139,6 +147,6 @@ services:

---
kind: signature
hmac: 8aa5446bfea3fbb295ae9ca362c72f82738cca714f5670f9bf70da1c02d1ad45
hmac: 820e2021962202c01514b4ffe5eb893640c83fb5542345a70c4ca01e4ccfd43c

...
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ public static function loadTranslationFiles($extension)
}

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

switch (substr($extension, 0, 3))
{
Expand All @@ -100,7 +101,11 @@ public static function loadTranslationFiles($extension)

case 'plg':
$parts = explode('_', $extension, 3);
$source = JPATH_PLUGINS . '/' . $parts[1] . '/' . $parts[2];

if (count($parts) > 2)
{
$source = JPATH_PLUGINS . '/' . $parts[1] . '/' . $parts[2];
}
break;

case 'pkg':
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@

defined('_JEXEC') or die;

JFormHelper::loadFieldClass('list');
use Joomla\CMS\Factory;
use Joomla\CMS\Form\FormHelper;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;

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

/**
Expand All @@ -36,7 +41,7 @@ class JFormFieldExtension extends JFormFieldList
*/
public function getOptions()
{
$db = JFactory::getDbo();
$db = Factory::getDbo();
$query = $db->getQuery(true)
->select('DISTINCT ' . $db->quoteName('extension'))
->from($db->quoteName('#__action_logs'))
Expand All @@ -59,7 +64,7 @@ public function getOptions()
foreach ($extensions as $extension)
{
ActionlogsHelper::loadTranslationFiles($extension);
$options[] = JHtml::_('select.option', $extension, JText::_($extension));
$options[] = HTMLHelper::_('select.option', $extension, Text::_($extension));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,24 @@

defined('_JEXEC') or die;

use Joomla\CMS\Factory;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Layout\LayoutHelper;
use Joomla\CMS\Router\Route;

/** @var ActionlogsViewActionlogs $this */

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

JHtml::_('bootstrap.tooltip');
JHtml::_('behavior.multiselect');
JHtml::_('formbehavior.chosen', 'select');
HTMLHelper::_('bootstrap.tooltip');
HTMLHelper::_('behavior.multiselect');
HTMLHelper::_('formbehavior.chosen', 'select');

$listOrder = $this->escape($this->state->get('list.ordering'));
$listDirn = $this->escape($this->state->get('list.direction'));

JFactory::getDocument()->addScriptDeclaration('
Factory::getDocument()->addScriptDeclaration('
Joomla.submitbutton = function(task)
{
if (task == "actionlogs.exportLogs")
Expand Down Expand Up @@ -49,38 +55,38 @@
};
');
?>
<form action="<?php echo JRoute::_('index.php?option=com_actionlogs&view=actionlogs'); ?>" method="post" name="adminForm" id="adminForm">
<form action="<?php echo Route::_('index.php?option=com_actionlogs&view=actionlogs'); ?>" method="post" name="adminForm" id="adminForm">
<div id="j-main-container">
<?php echo JLayoutHelper::render('joomla.searchtools.default', array('view' => $this)); ?>
<?php echo LayoutHelper::render('joomla.searchtools.default', array('view' => $this)); ?>
<?php if (empty($this->items)) : ?>
<div class="alert alert-warning">
<?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
<?php echo Text::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
</div>
<?php else : ?>
<table class="table table-striped table-hover" id="logsList">
<thead>
<th width="1%" class="center">
<?php echo JHtml::_('grid.checkall'); ?>
<?php echo HTMLHelper::_('grid.checkall'); ?>
</th>
<th>
<?php echo JHtml::_('searchtools.sort', 'COM_ACTIONLOGS_ACTION', 'a.message', $listDirn, $listOrder); ?>
<?php echo HTMLHelper::_('searchtools.sort', 'COM_ACTIONLOGS_ACTION', 'a.message', $listDirn, $listOrder); ?>
</th>
<th width="15%" class="nowrap">
<?php echo JHtml::_('searchtools.sort', 'COM_ACTIONLOGS_EXTENSION', 'a.extension', $listDirn, $listOrder); ?>
<?php echo HTMLHelper::_('searchtools.sort', 'COM_ACTIONLOGS_EXTENSION', 'a.extension', $listDirn, $listOrder); ?>
</th>
<th width="15%" class="nowrap">
<?php echo JHtml::_('searchtools.sort', 'COM_ACTIONLOGS_DATE', 'a.log_date', $listDirn, $listOrder); ?>
<?php echo HTMLHelper::_('searchtools.sort', 'COM_ACTIONLOGS_DATE', 'a.log_date', $listDirn, $listOrder); ?>
</th>
<th width="10%" class="nowrap">
<?php echo JHtml::_('searchtools.sort', 'COM_ACTIONLOGS_NAME', 'a.user_id', $listDirn, $listOrder); ?>
<?php echo HTMLHelper::_('searchtools.sort', 'COM_ACTIONLOGS_NAME', 'a.user_id', $listDirn, $listOrder); ?>
</th>
<?php if ($this->showIpColumn) : ?>
<th width="10%" class="nowrap">
<?php echo JHtml::_('searchtools.sort', 'COM_ACTIONLOGS_IP_ADDRESS', 'a.ip_address', $listDirn, $listOrder); ?>
<?php echo HTMLHelper::_('searchtools.sort', 'COM_ACTIONLOGS_IP_ADDRESS', 'a.ip_address', $listDirn, $listOrder); ?>
</th>
<?php endif; ?>
<th width="1%" class="nowrap hidden-phone">
<?php echo JHtml::_('searchtools.sort', 'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder); ?>
<?php echo HTMLHelper::_('searchtools.sort', 'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder); ?>
</th>
</thead>
<tfoot>
Expand All @@ -96,25 +102,25 @@
ActionlogsHelper::loadTranslationFiles($extension); ?>
<tr class="row<?php echo $i % 2; ?>">
<td class="center">
<?php echo JHtml::_('grid.id', $i, $item->id); ?>
<?php echo HTMLHelper::_('grid.id', $i, $item->id); ?>
</td>
<td>
<?php echo ActionlogsHelper::getHumanReadableLogMessage($item); ?>
</td>
<td>
<?php echo $this->escape(JText::_($extension)); ?>
<?php echo $this->escape(Text::_($extension)); ?>
</td>
<td>
<span class="hasTooltip" title="<?php echo JHtml::_('date', $item->log_date, JText::_('DATE_FORMAT_LC6')); ?>">
<?php echo JHtml::_('date.relative', $item->log_date); ?>
<span class="hasTooltip" title="<?php echo HTMLHelper::_('date', $item->log_date, Text::_('DATE_FORMAT_LC6')); ?>">
<?php echo HTMLHelper::_('date.relative', $item->log_date); ?>
</span>
</td>
<td>
<?php echo $item->name; ?>
</td>
<?php if ($this->showIpColumn) : ?>
<td>
<?php echo JText::_($this->escape($item->ip_address)); ?>
<?php echo Text::_($this->escape($item->ip_address)); ?>
</td>
<?php endif;?>
<td class="hidden-phone">
Expand All @@ -127,11 +133,11 @@
<?php endif;?>
<input type="hidden" name="task" value="" />
<input type="hidden" name="boxchecked" value="0" />
<?php echo JHtml::_('form.token'); ?>
<?php echo HTMLHelper::_('form.token'); ?>
</div>
</form>
<form action="<?php echo JRoute::_('index.php?option=com_actionlogs&view=actionlogs'); ?>" method="post" name="exportForm" id="exportForm">
<form action="<?php echo Route::_('index.php?option=com_actionlogs&view=actionlogs'); ?>" method="post" name="exportForm" id="exportForm">
<input type="hidden" name="task" value="" />
<input type="hidden" name="cids" value="" />
<?php echo JHtml::_('form.token'); ?>
<?php echo HTMLHelper::_('form.token'); ?>
</form>
Original file line number Diff line number Diff line change
Expand Up @@ -59,20 +59,21 @@ protected function getInput()
$urlSelect = $linkAssociations . '&amp;' . Session::getFormToken() . '=1';

// Select custom association button
$html[] = '<a'
$html[] = '<button'
. ' type="button"'
. ' id="select-change"'
. ' class="btn btn-secondary' . ($value ? '' : ' hidden') . '"'
. ' data-toggle="modal"'
. ' data-select="' . Text::_('COM_ASSOCIATIONS_SELECT_TARGET') . '"'
. ' data-change="' . Text::_('COM_ASSOCIATIONS_CHANGE_TARGET') . '"'
. ' role="button"'
. ' href="#associationSelect' . $this->id . 'Modal">'
. ' data-target="#associationSelect' . $this->id . 'Modal">'
. '<span class="icon-file" aria-hidden="true"></span> '
. '<span id="select-change-text"></span>'
. '</a>';
. '</button>';

// Clear association button
$html[] = '<button'
. ' type="button"'
. ' class="btn btn-secondary' . ($value ? '' : ' hidden') . '"'
. ' onclick="return Joomla.submitbutton(\'undo-association\');"'
. ' id="remove-assoc">'
Expand All @@ -93,7 +94,7 @@ protected function getInput()
'width' => '800px',
'bodyHeight' => 70,
'modalWidth' => 80,
'footer' => '<button type="button" class="btn btn-secondary" data-dismiss="modal" aria-hidden="true">'
'footer' => '<button type="button" class="btn btn-secondary" data-dismiss="modal">'
. Text::_("JLIB_HTML_BEHAVIOR_CLOSE") . '</button>',
)
);
Expand Down
2 changes: 2 additions & 0 deletions administrator/components/com_banners/Table/ClientTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ public function __construct(DatabaseDriver $db)
$this->typeAlias = 'com_banners.client';
$this->checked_out_time = $db->getNullDate();

$this->setColumnAlias('published', 'state');

parent::__construct('#__banner_clients', 'id', $db);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,8 @@ function jSelectCategory_" . $this->id . "(id, title, object) {
'width' => '800px',
'bodyHeight' => 70,
'modalWidth' => 80,
'footer' => '<a role="button" class="btn btn-secondary" data-dismiss="modal" aria-hidden="true">'
. Text::_('JLIB_HTML_BEHAVIOR_CLOSE') . '</a>',
'footer' => '<button type="button" class="btn btn-secondary" data-dismiss="modal">'
. Text::_('JLIB_HTML_BEHAVIOR_CLOSE') . '</button>',
)
);
}
Expand All @@ -259,15 +259,15 @@ function jSelectCategory_" . $this->id . "(id, title, object) {
'width' => '800px',
'bodyHeight' => 70,
'modalWidth' => 80,
'footer' => '<a role="button" class="btn btn-secondary" aria-hidden="true"'
'footer' => '<button type="button" class="btn btn-secondary"'
. ' onclick="window.processModalEdit(this, \'' . $this->id . '\', \'add\', \'category\', \'cancel\', \'item-form\'); return false;">'
. Text::_('JLIB_HTML_BEHAVIOR_CLOSE') . '</a>'
. '<a role="button" class="btn btn-primary" aria-hidden="true"'
. Text::_('JLIB_HTML_BEHAVIOR_CLOSE') . '</button>'
. '<button type="button" class="btn btn-primary"'
. ' onclick="window.processModalEdit(this, \'' . $this->id . '\', \'add\', \'category\', \'save\', \'item-form\'); return false;">'
. Text::_('JSAVE') . '</a>'
. '<a role="button" class="btn btn-success" aria-hidden="true"'
. Text::_('JSAVE') . '</button>'
. '<button type="button" class="btn btn-success"'
. ' onclick="window.processModalEdit(this, \'' . $this->id . '\', \'add\', \'category\', \'apply\', \'item-form\'); return false;">'
. Text::_('JAPPLY') . '</a>',
. Text::_('JAPPLY') . '</button>',
)
);
}
Expand All @@ -288,15 +288,15 @@ function jSelectCategory_" . $this->id . "(id, title, object) {
'width' => '800px',
'bodyHeight' => 70,
'modalWidth' => 80,
'footer' => '<a role="button" class="btn btn-secondary" aria-hidden="true"'
'footer' => '<button type="button" class="btn btn-secondary"'
. ' onclick="window.processModalEdit(this, \'' . $this->id . '\', \'edit\', \'category\', \'cancel\', \'item-form\'); return false;">'
. Text::_('JLIB_HTML_BEHAVIOR_CLOSE') . '</a>'
. '<a role="button" class="btn btn-primary" aria-hidden="true"'
. Text::_('JLIB_HTML_BEHAVIOR_CLOSE') . '</button>'
. '<button type="button" class="btn btn-primary"'
. ' onclick="window.processModalEdit(this, \'' . $this->id . '\', \'edit\', \'category\', \'save\', \'item-form\'); return false;">'
. Text::_('JSAVE') . '</a>'
. '<a role="button" class="btn btn-success" aria-hidden="true"'
. Text::_('JSAVE') . '</button>'
. '<button type="button" class="btn btn-success"'
. ' onclick="window.processModalEdit(this, \'' . $this->id . '\', \'edit\', \'category\', \'apply\', \'item-form\'); return false;">'
. Text::_('JAPPLY') . '</a>',
. Text::_('JAPPLY') . '</button>',
)
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public function checkin($ids = array())

$query = $db->getQuery(true)
->update($db->quoteName($tn))
->set('checked_out = 0')
->set('checked_out = DEFAULT')
->set('checked_out_time = ' . $db->quote($nullDate))
->where('checked_out > 0');

Expand Down
6 changes: 3 additions & 3 deletions administrator/components/com_config/forms/application.xml
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@
type="radio"
label="COM_CONFIG_FIELD_DEBUG_CONST_LANG_LABEL"
description="COM_CONFIG_FIELD_DEBUG_CONST_LANG_DESC"
class="btn-group btn-group-yesno"
class="switcher"
default="1"
filter="integer"
showon="debug_lang:1"
Expand Down Expand Up @@ -817,13 +817,13 @@
type="radio"
label="COM_CONFIG_FIELD_REDIS_PERSISTENT_LABEL"
description="COM_CONFIG_FIELD_REDIS_PERSISTENT_DESC"
class="btn-group btn-group-yesno"
class="switcher"
default="1"
filter="integer"
showon="session_handler:redis"
>
<option value="1">JYES</option>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>

<field
Expand Down

0 comments on commit d8c4c2d

Please sign in to comment.