Skip to content

Commit

Permalink
Merge branch '4.1-dev' into 4.1-dev-nikosdion-feature-installer-sql-i…
Browse files Browse the repository at this point in the history
…mprovements-mod-1
  • Loading branch information
richard67 committed Jan 15, 2022
2 parents 6ccdd5f + 989c719 commit b785424
Show file tree
Hide file tree
Showing 286 changed files with 2,867 additions and 2,370 deletions.
2 changes: 1 addition & 1 deletion .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ services:
## Install PHP and composer, and run the appropriate composer command
install:
- IF EXIST C:\tools\php (SET PHP=0)
# TODO: This is a workaround for https://github.com/chocolatey/choco/issues/1843. Once this is fixed we
# @todo: This is a workaround for https://github.com/chocolatey/choco/issues/1843. Once this is fixed we
# should go back to latest version in appveyor saving ourselves test time
- ps: choco upgrade chocolatey -y --version 0.10.13 --allow-downgrade --no-progress
- ps: >-
Expand Down
117 changes: 64 additions & 53 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -182,39 +182,41 @@ steps:
commands:
- bash tests/Codeception/drone-api-run.sh "$(pwd)" mysql

- name: phpnext-api-mysql
depends_on:
- phpmin-api-mysql
image: joomlaprojects/docker-images:systemtests8.2
failure: ignore
environment:
JOOMLA_INSTALLATION_DISABLE_LOCALHOST_CHECK: 1
commands:
- bash tests/Codeception/drone-api-run.sh "$(pwd)" mysqlphpnext
# - name: phpnext-api-mysql
# depends_on:
# - phpmin-api-mysql
# image: joomlaprojects/docker-images:systemtests8.2
# failure: ignore
# environment:
# JOOMLA_INSTALLATION_DISABLE_LOCALHOST_CHECK: 1
# commands:
# - bash tests/Codeception/drone-api-run.sh "$(pwd)" mysqlphpnext

- name: phpmin-api-postgres
depends_on:
- phpnext-api-mysql
# - phpnext-api-mysql
- phpmin-api-mysql
image: joomlaprojects/docker-images:systemtests
failure: ignore
environment:
JOOMLA_INSTALLATION_DISABLE_LOCALHOST_CHECK: 1
commands:
- bash tests/Codeception/drone-api-run.sh "$(pwd)" postgres

- name: phpnext-api-postgres
depends_on:
- phpmin-api-postgres
image: joomlaprojects/docker-images:systemtests8.2
failure: ignore
environment:
JOOMLA_INSTALLATION_DISABLE_LOCALHOST_CHECK: 1
commands:
- bash tests/Codeception/drone-api-run.sh "$(pwd)" postgresphpnext
# - name: phpnext-api-postgres
# depends_on:
# - phpmin-api-postgres
# image: joomlaprojects/docker-images:systemtests8.2
# failure: ignore
# environment:
# JOOMLA_INSTALLATION_DISABLE_LOCALHOST_CHECK: 1
# commands:
# - bash tests/Codeception/drone-api-run.sh "$(pwd)" postgresphpnext

- name: phpmax-api-postgres
depends_on:
- phpnext-api-postgres
# - phpnext-api-postgres
- phpmin-api-postgres
image: joomlaprojects/docker-images:systemtests8.1
failure: ignore
environment:
Expand All @@ -233,53 +235,62 @@ steps:
commands:
- bash tests/Codeception/drone-system-run.sh "$(pwd)" mysql

- name: phpnext-system-mysql
depends_on: [ phpmin-system-mysql ]
image: joomlaprojects/docker-images:systemtests8.2
failure: ignore
environment:
JOOMLA_INSTALLATION_DISABLE_LOCALHOST_CHECK: 1
commands:
- bash tests/Codeception/drone-system-run.sh "$(pwd)" mysqlphpnext
# - name: phpnext-system-mysql
# depends_on:
# - phpmin-system-mysql
# image: joomlaprojects/docker-images:systemtests8.2
# failure: ignore
# environment:
# JOOMLA_INSTALLATION_DISABLE_LOCALHOST_CHECK: 1
# commands:
# - bash tests/Codeception/drone-system-run.sh "$(pwd)" mysqlphpnext

- name: phpmax-system-mysql
depends_on: [ phpnext-system-mysql ]
depends_on:
# - phpnext-system-mysql
- phpmin-system-mysql
image: joomlaprojects/docker-images:systemtests8.1
failure: ignore
environment:
JOOMLA_INSTALLATION_DISABLE_LOCALHOST_CHECK: 1
commands:
- bash tests/Codeception/drone-system-run.sh "$(pwd)" mysqlphpmax

- name: phpnext-system-mysql8
depends_on: [ phpmax-system-mysql ]
image: joomlaprojects/docker-images:systemtests8.2
failure: ignore
environment:
JOOMLA_INSTALLATION_DISABLE_LOCALHOST_CHECK: 1
commands:
- bash tests/Codeception/drone-system-run.sh "$(pwd)" mysql8phpnext
# - name: phpnext-system-mysql8
# depends_on:
# - phpmax-system-mysql
# image: joomlaprojects/docker-images:systemtests8.2
# failure: ignore
# environment:
# JOOMLA_INSTALLATION_DISABLE_LOCALHOST_CHECK: 1
# commands:
# - bash tests/Codeception/drone-system-run.sh "$(pwd)" mysql8phpnext

- name: phpmax-system-mysql8
depends_on: [ phpnext-system-mysql ]
depends_on:
# - phpnext-system-mysql
- phpmax-system-mysql
image: joomlaprojects/docker-images:systemtests8.1
failure: ignore
environment:
JOOMLA_INSTALLATION_DISABLE_LOCALHOST_CHECK: 1
commands:
- bash tests/Codeception/drone-system-run.sh "$(pwd)" mysql8phpmax

- name: phpnext-system-postgres
depends_on: [ phpmax-system-mysql8 ]
image: joomlaprojects/docker-images:systemtests8.2
failure: ignore
environment:
JOOMLA_INSTALLATION_DISABLE_LOCALHOST_CHECK: 1
commands:
- bash tests/Codeception/drone-system-run.sh "$(pwd)" postgresphpnext
# - name: phpnext-system-postgres
# depends_on:
# - phpmax-system-mysql8
# image: joomlaprojects/docker-images:systemtests8.2
# failure: ignore
# environment:
# JOOMLA_INSTALLATION_DISABLE_LOCALHOST_CHECK: 1
# commands:
# - bash tests/Codeception/drone-system-run.sh "$(pwd)" postgresphpnext

- name: phpmax-system-postgres
depends_on: [ phpnext-system-mysql8 ]
depends_on:
# - phpnext-system-mysql8
- phpmax-system-mysql8
image: joomlaprojects/docker-images:systemtests8.1
failure: ignore
environment:
Expand All @@ -306,17 +317,17 @@ steps:
- name: artifacts-system-tests
image: cschlosser/drone-ftps
depends_on:
- phpnext-system-mysql
- phpnext-system-mysql8
- phpnext-system-postgres
# - phpnext-system-mysql
# - phpnext-system-mysql8
# - phpnext-system-postgres
- phpmax-system-mysql
- phpmax-system-mysql8
- phpmax-system-postgres
- phpmin-system-mysql
- phpmin-system-mysql8
- phpmin-system-postgres
- phpnext-api-mysql
- phpnext-api-postgres
# - phpnext-api-mysql
# - phpnext-api-postgres
- phpmax-api-mysql
- phpmax-api-postgres
- phpmin-api-mysql
Expand Down Expand Up @@ -409,6 +420,6 @@ steps:

---
kind: signature
hmac: e93522732dd8607448fa7705982c42c06f9ebf9762023ed1bb2207ee975fee42
hmac: daa8e5588cc88058bc57aadf35e3d9dd55eefaa9419c457ce374a0dd19eb7cda

...
8 changes: 6 additions & 2 deletions administrator/components/com_admin/script.php
Original file line number Diff line number Diff line change
Expand Up @@ -6112,7 +6112,7 @@ public function deleteUnexistingFiles($dryRun = false, $suppressOutput = false)
'/media/vendor/codemirror/lib/#codemirror.js#',
// From 4.0.5 to 4.0.6
'/media/vendor/mediaelement/css/mejs-controls.png',
// From 4.0.x to 4.1.0
// From 4.0.x to 4.1.0-beta1
'/administrator/templates/atum/css/system/searchtools/searchtools.css',
'/administrator/templates/atum/css/system/searchtools/searchtools.min.css',
'/administrator/templates/atum/css/system/searchtools/searchtools.min.css.gz',
Expand Down Expand Up @@ -6327,6 +6327,8 @@ public function deleteUnexistingFiles($dryRun = false, $suppressOutput = false)
'/templates/system/scss/general.scss',
'/templates/system/scss/offline.scss',
'/templates/system/scss/offline_rtl.scss',
// From 4.1.0-beta3 to 4.1.0-rc1
'/api/components/com_media/src/Helper/AdapterTrait.php',
);

$folders = array(
Expand Down Expand Up @@ -7586,7 +7588,7 @@ public function deleteUnexistingFiles($dryRun = false, $suppressOutput = false)
'/libraries/vendor/algo26-matthias/idna-convert/tests',
// From 4.0.3 to 4.0.4
'/templates/cassiopeia/images/system',
// From 4.0.5 to 4.1.0
// From 4.0.x to 4.1.0-beta1
'/templates/system/scss',
'/templates/system/css',
'/templates/cassiopeia/scss/vendor/metismenu',
Expand Down Expand Up @@ -7637,6 +7639,8 @@ public function deleteUnexistingFiles($dryRun = false, $suppressOutput = false)
'/administrator/templates/atum/css/system/searchtools',
'/administrator/templates/atum/css/system',
'/administrator/templates/atum/css',
// From 4.1.0-beta3 to 4.1.0-rc1
'/api/components/com_media/src/Helper',
);

$status['files_checked'] = $files;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,5 @@ INSERT INTO `#__action_log_config` (`type_title`, `type_alias`, `id_holder`, `ti
INSERT INTO `#__mail_templates` (`template_id`, `extension`, `language`, `subject`, `body`, `htmlbody`, `attachments`, `params`) VALUES
('plg_system_tasknotification.failure_mail', 'plg_system_tasknotification', '', 'PLG_SYSTEM_TASK_NOTIFICATION_FAILURE_MAIL_SUBJECT', 'PLG_SYSTEM_TASK_NOTIFICATION_FAILURE_MAIL_BODY', '', '', '{"tags": ["task_id", "task_title", "exit_code", "exec_data_time", "task_output"]}'),
('plg_system_tasknotification.fatal_recovery_mail', 'plg_system_tasknotification', '', 'PLG_SYSTEM_TASK_NOTIFICATION_FATAL_MAIL_SUBJECT', 'PLG_SYSTEM_TASK_NOTIFICATION_FATAL_MAIL_BODY', '', '', '{"tags": ["task_id", "task_title"]}'),
('plg_system_tasknotification.orphan_mail', 'plg_system_tasknotification', '', 'PLG_SYSTEM_TASK_NOTIFICATION_ORPHAN_MAIL_SUBJECT', 'PLG_SYSTEM_TASK_NOTIFICATION_ORPHAN_MAIL_BODY', '', '', '{"tags": ["task_id", "task_title", ""]}'),
('plg_system_tasknotification.orphan_mail', 'plg_system_tasknotification', '', 'PLG_SYSTEM_TASK_NOTIFICATION_ORPHAN_MAIL_SUBJECT', 'PLG_SYSTEM_TASK_NOTIFICATION_ORPHAN_MAIL_BODY', '', '', '{"tags": ["task_id", "task_title"]}'),
('plg_system_tasknotification.success_mail', 'plg_system_tasknotification', '', 'PLG_SYSTEM_TASK_NOTIFICATION_SUCCESS_MAIL_SUBJECT', 'PLG_SYSTEM_TASK_NOTIFICATION_SUCCESS_MAIL_BODY', '', '', '{"tags":["task_id", "task_title", "exec_data_time", "task_output"]}');
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
UPDATE `#__mail_templates`
SET `params` = '{"tags": ["task_id", "task_title"]}'
WHERE `template_id`= 'plg_system_tasknotification.orphan_mail' AND `params` = '{"tags": ["task_id", "task_title", ""]}';
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,5 @@ INSERT INTO "#__action_log_config" ("type_title", "type_alias", "id_holder", "ti
INSERT INTO "#__mail_templates" ("template_id", "extension", "language", "subject", "body", "htmlbody", "attachments", "params") VALUES
('plg_system_tasknotification.failure_mail', 'plg_system_tasknotification', '', 'PLG_SYSTEM_TASK_NOTIFICATION_FAILURE_MAIL_SUBJECT', 'PLG_SYSTEM_TASK_NOTIFICATION_FAILURE_MAIL_BODY', '', '', '{"tags": ["task_id", "task_title", "exit_code", "exec_data_time", "task_output"]}'),
('plg_system_tasknotification.fatal_recovery_mail', 'plg_system_tasknotification', '', 'PLG_SYSTEM_TASK_NOTIFICATION_FATAL_MAIL_SUBJECT', 'PLG_SYSTEM_TASK_NOTIFICATION_FATAL_MAIL_BODY', '', '', '{"tags": ["task_id", "task_title"]}'),
('plg_system_tasknotification.orphan_mail', 'plg_system_tasknotification', '', 'PLG_SYSTEM_TASK_NOTIFICATION_ORPHAN_MAIL_SUBJECT', 'PLG_SYSTEM_TASK_NOTIFICATION_ORPHAN_MAIL_BODY', '', '', '{"tags": ["task_id", "task_title", ""]}'),
('plg_system_tasknotification.orphan_mail', 'plg_system_tasknotification', '', 'PLG_SYSTEM_TASK_NOTIFICATION_ORPHAN_MAIL_SUBJECT', 'PLG_SYSTEM_TASK_NOTIFICATION_ORPHAN_MAIL_BODY', '', '', '{"tags": ["task_id", "task_title"]}'),
('plg_system_tasknotification.success_mail', 'plg_system_tasknotification', '', 'PLG_SYSTEM_TASK_NOTIFICATION_SUCCESS_MAIL_SUBJECT', 'PLG_SYSTEM_TASK_NOTIFICATION_SUCCESS_MAIL_BODY', '', '', '{"tags":["task_id", "task_title", "exec_data_time", "task_output"]}');
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
UPDATE "#__mail_templates"
SET "params" = '{"tags": ["task_id", "task_title"]}'
WHERE "template_id"= 'plg_system_tasknotification.orphan_mail' AND "params" = '{"tags": ["task_id", "task_title", ""]}';
36 changes: 28 additions & 8 deletions administrator/components/com_banners/tmpl/clients/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,20 +123,40 @@
<?php echo $item->contact; ?>
</td>
<td class="text-center btns d-none d-md-table-cell itemnumber">
<a class="btn <?php echo ($item->count_published > 0) ? 'btn-success' : 'btn-secondary'; ?>" href="<?php echo Route::_('index.php?option=com_banners&view=banners&filter[client_id]=' . (int) $item->id . '&filter[published]=1'); ?>">
<?php echo $item->count_published; ?></a>
<a class="btn <?php echo ($item->count_published > 0) ? 'btn-success' : 'btn-secondary'; ?>" href="<?php echo Route::_('index.php?option=com_banners&view=banners&filter[client_id]=' . (int) $item->id . '&filter[published]=1'); ?>"
aria-describedby="tip-publish<?php echo $i; ?>">
<?php echo $item->count_published; ?>
</a>
<div role="tooltip" id="tip-publish<?php echo $i; ?>">
<?php echo Text::_('COM_BANNERS_COUNT_PUBLISHED_ITEMS'); ?>
</div>
</td>
<td class="text-center btns d-none d-md-table-cell itemnumber">
<a class="btn <?php echo ($item->count_unpublished > 0) ? 'btn-danger' : 'btn-secondary'; ?>" href="<?php echo Route::_('index.php?option=com_banners&view=banners&filter[client_id]=' . (int) $item->id . '&filter[published]=0'); ?>">
<?php echo $item->count_unpublished; ?></a>
<a class="btn <?php echo ($item->count_unpublished > 0) ? 'btn-danger' : 'btn-secondary'; ?>" href="<?php echo Route::_('index.php?option=com_banners&view=banners&filter[client_id]=' . (int) $item->id . '&filter[published]=0'); ?>"
aria-describedby="tip-unpublish<?php echo $i; ?>">
<?php echo $item->count_unpublished; ?>
</a>
<div role="tooltip" id="tip-unpublish<?php echo $i; ?>">
<?php echo Text::_('COM_BANNERS_COUNT_UNPUBLISHED_ITEMS'); ?>
</div>
</td>
<td class="text-center btns d-none d-md-table-cell itemnumber">
<a class="btn <?php echo ($item->count_archived > 0) ? 'btn-info' : 'btn-secondary'; ?>" href="<?php echo Route::_('index.php?option=com_banners&view=banners&filter[client_id]=' . (int) $item->id . '&filter[published]=2'); ?>">
<?php echo $item->count_archived; ?></a>
<a class="btn <?php echo ($item->count_archived > 0) ? 'btn-info' : 'btn-secondary'; ?>" href="<?php echo Route::_('index.php?option=com_banners&view=banners&filter[client_id]=' . (int) $item->id . '&filter[published]=2'); ?>"
aria-describedby="tip-archived<?php echo $i; ?>">
<?php echo $item->count_archived; ?>
</a>
<div role="tooltip" id="tip-archived<?php echo $i; ?>">
<?php echo Text::_('COM_BANNERS_COUNT_ARCHIVED_ITEMS'); ?>
</div>
</td>
<td class="text-center btns d-none d-md-table-cell itemnumber">
<a class="btn <?php echo ($item->count_trashed > 0) ? 'btn-inverse' : 'btn-secondary'; ?>" href="<?php echo Route::_('index.php?option=com_banners&view=banners&filter[client_id]=' . (int) $item->id . '&filter[published]=-2'); ?>">
<?php echo $item->count_trashed; ?></a>
<a class="btn <?php echo ($item->count_trashed > 0) ? 'btn-dark' : 'btn-secondary'; ?>" href="<?php echo Route::_('index.php?option=com_banners&view=banners&filter[client_id]=' . (int) $item->id . '&filter[published]=-2'); ?>"
aria-describedby="tip-trashed<?php echo $i; ?>">
<?php echo $item->count_trashed; ?>
</a>
<div role="tooltip" id="tip-trashed<?php echo $i; ?>">
<?php echo Text::_('COM_BANNERS_COUNT_TRASHED_ITEMS'); ?>
</div>
</td>
<td class="small d-none d-md-table-cell">
<?php if ($item->purchase_type < 0) : ?>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@

<?php echo $this->form->getInput('extension'); ?>
<input type="hidden" name="task" value="">
<input type="hidden" name="return" value="<?php echo $input->getBase64('return'); ?>">
<input type="hidden" name="forcedLanguage" value="<?php echo $input->get('forcedLanguage', '', 'cmd'); ?>">
<?php echo HTMLHelper::_('form.token'); ?>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class FiltersField extends FormField
/**
* Method to get the field input markup.
*
* TODO: Add access check.
* @todo: Add access check.
*
* @return string The field input markup.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ protected function getListQuery()
$categoryTable = Table::getInstance('Category', 'JTable');
$subCatItemsWhere = array();

// TODO: Convert to prepared statement
// @todo: Convert to prepared statement
foreach ($categoryId as $filter_catid)
{
$categoryTable->load($filter_catid);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public function display($tpl = null)
}

// Preprocess the list of items to find ordering divisions.
// TODO: Complete the ordering stuff with nested sets
// @todo: Complete the ordering stuff with nested sets
foreach ($this->items as &$item)
{
$item->order_up = true;
Expand Down
2 changes: 1 addition & 1 deletion administrator/components/com_content/forms/article.xml
Original file line number Diff line number Diff line change
Expand Up @@ -909,7 +909,7 @@

<fields name="metadata" label="JGLOBAL_FIELDSET_METADATA_OPTIONS">
<fieldset name="jmetadata"
label="JGLOBAL_FIELDSET_METADATA_OPTIONS">
label="JGLOBAL_FIELDSET_METADATA_OPTIONS">

<field
name="robots"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
onchange="this.form.submit();"
>
<option value="0">JNONE</option>
<option value="by_me">COM_CONTENT_FILTER_AUTHORS_BY_ME</option>
</field>

<field
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ public function getItem($pk = null)
$registry = new Registry($item->urls);
$item->urls = $registry->toArray();

$item->articletext = trim($item->fulltext) != '' ? $item->introtext . "<hr id=\"system-readmore\">" . $item->fulltext : $item->introtext;
$item->articletext = ($item->fulltext !== null && trim($item->fulltext) != '') ? $item->introtext . "<hr id=\"system-readmore\">" . $item->fulltext : $item->introtext;

if (!empty($item->id))
{
Expand Down Expand Up @@ -499,7 +499,9 @@ public function getForm($data = array(), $loadData = true)
$record = new \stdClass;

// Get ID of the article from input, for frontend, we use a_id while backend uses id
$articleIdFromInput = (int) $app->input->getInt('a_id') ?: $app->input->getInt('id', 0);
$articleIdFromInput = $app->isClient('site')
? $app->input->getInt('a_id', 0)
: $app->input->getInt('id', 0);

// On edit article, we get ID of article from article.id state, but on save, we use data from input
$id = (int) $this->getState('article.id', $articleIdFromInput);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ protected function getListQuery()
// Filter by featured.
$featured = (string) $this->getState('filter.featured');

if (in_array($featured, ['0','1']))
if (\in_array($featured, ['0','1']))
{
$featured = (int) $featured;
$query->where($db->quoteName('a.featured') . ' = :featured')
Expand Down Expand Up @@ -462,6 +462,14 @@ protected function getListQuery()
}
elseif (is_array($authorId))
{
// Check to see if by_me is in the array
if (\in_array('by_me', $authorId))

// Replace by_me with the current user id in the array
{
$authorId['by_me'] = $user->id;
}

$authorId = ArrayHelper::toInteger($authorId);
$query->whereIn($db->quoteName('a.created_by'), $authorId);
}
Expand Down
Loading

0 comments on commit b785424

Please sign in to comment.