Skip to content

Commit

Permalink
Merge branch '4.0-dev' of github.com:joomla/joomla-cms into workflow-v3
Browse files Browse the repository at this point in the history
  • Loading branch information
bembelimen committed May 6, 2020
2 parents d36a2ee + 80f1b46 commit 686fa0d
Show file tree
Hide file tree
Showing 48 changed files with 70 additions and 159 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ protected function getInput()
{
// @TODO USE JLayouts here!!!
// The active item id field.
$value = (int) $this->value > 0 ? (int) $this->value : '';
$value = (int) $this->value ?: '';

Factory::getDocument()->addScriptOptions('admin_associations_modal', ['itemId' => $value]);
HTMLHelper::_('script', 'com_associations/admin_associations_modal.min.js', ['version' => 'auto', 'relative' => true]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
<th scope="col" style="width:15%">
<?php echo Text::_('JGRID_HEADING_LANGUAGE'); ?>
</th>
<th scope="col" style="width:5%">
<th scope="col" class="w-5">
<?php echo Text::_('COM_ASSOCIATIONS_HEADING_ASSOCIATION'); ?>
</th>
<th scope="col" style="width:15%">
Expand All @@ -77,7 +77,7 @@
</th>
<?php endif; ?>
<?php if (!empty($this->typeFields['access'])) : ?>
<th scope="col" style="width:5%" class="d-none d-md-table-cell">
<th scope="col" class="w-5 d-none d-md-table-cell">
<?php echo HTMLHelper::_('searchtools.sort', 'JGRID_HEADING_ACCESS', 'access_level', $listDirn, $listOrder); ?>
</th>
<?php endif; ?>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
<th scope="col" style="width:15%">
<?php echo Text::_('JGRID_HEADING_LANGUAGE'); ?>
</th>
<th scope="col" style="width:5%">
<th scope="col" class="w-5">
<?php echo HTMLHelper::_('searchtools.sort', 'COM_ASSOCIATIONS_HEADING_ASSOCIATION', 'association', $listDirn, $listOrder); ?>
</th>
<?php if (!empty($this->typeFields['menutype'])) : ?>
Expand All @@ -77,7 +77,7 @@
</th>
<?php endif; ?>
<?php if (!empty($this->typeSupports['acl'])) : ?>
<th scope="col" style="width:5%" class="d-none d-sm-table-cell">
<th scope="col" class="w-5 d-none d-sm-table-cell">
<?php echo HTMLHelper::_('searchtools.sort', 'JGRID_HEADING_ACCESS', 'access_level', $listDirn, $listOrder); ?>
</th>
<?php endif; ?>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
<?php echo HTMLHelper::_('searchtools.sort', 'JGRID_HEADING_LANGUAGE', 'a.language', $listDirn, $listOrder); ?>
</th>
<?php endif; ?>
<th scope="col" style="width:5%" class="d-none d-md-table-cell">
<th scope="col" class="w-5 d-none d-md-table-cell">
<?php echo HTMLHelper::_('searchtools.sort', 'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder); ?>
</th>
</tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ protected function getInput()
Factory::getLanguage()->load('com_categories', JPATH_ADMINISTRATOR);

// The active category id field.
$value = (int) $this->value > 0 ? (int) $this->value : '';
$value = (int) $this->value ?: '';

// Create the modal id.
$modalId = 'Category_' . $this->id;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
<?php echo HTMLHelper::_('searchtools.sort', 'JGRID_HEADING_LANGUAGE', 'language_title', $listDirn, $listOrder); ?>
</th>
<?php endif; ?>
<th scope="col" style="width:5%" class="d-none d-md-table-cell">
<th scope="col" class="w-5 d-none d-md-table-cell">
<?php echo HTMLHelper::_('searchtools.sort', 'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder); ?>
</th>
</tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ protected function getInput()
Factory::getLanguage()->load('com_contact', JPATH_ADMINISTRATOR);

// The active contact id field.
$value = (int) $this->value > 0 ? (int) $this->value : '';
$value = (int) $this->value ?: '';

// Create the modal id.
$modalId = 'Contact_' . $this->id;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
<?php echo HTMLHelper::_('searchtools.sort', 'JGRID_HEADING_LANGUAGE', 'language_title', $listDirn, $listOrder); ?>
</th>
<?php endif; ?>
<th scope="col" style="width:5%" class="d-none d-md-table-cell">
<th scope="col" class="w-5 d-none d-md-table-cell">
<?php echo HTMLHelper::_('searchtools.sort', 'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder); ?>
</th>
</tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ protected function getInput()
Factory::getLanguage()->load('com_content', JPATH_ADMINISTRATOR);

// The active article id field.
$value = ((int) $this->value) ?: '';
$value = (int) $this->value ?: '';

// Create the modal id.
$modalId = 'Article_' . $this->id;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
<?php echo HTMLHelper::_('searchtools.sort', 'JAUTHOR', 'a.created_by', $listDirn, $listOrder); ?>
</th>
<?php if ($assoc) : ?>
<th scope="col" style="width:5%" class="d-none d-md-table-cell">
<th scope="col" class="w-5 d-none d-md-table-cell">
<?php echo HTMLHelper::_('searchtools.sort', 'COM_CONTENT_HEADING_ASSOCIATION', 'association', $listDirn, $listOrder); ?>
</th>
<?php endif; ?>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
<th scope="col" style="width:15%">
<?php echo HTMLHelper::_('searchtools.sort', 'JGRID_HEADING_LANGUAGE', 'language', $listDirn, $listOrder); ?>
</th>
<th scope="col" style="width:5%" class="d-none d-md-table-cell">
<th scope="col" class="w-5 d-none d-md-table-cell">
<?php echo HTMLHelper::_('searchtools.sort', 'JDATE', 'a.created', $listDirn, $listOrder); ?>
</th>
<th scope="col" style="width:1%" class="d-none d-md-table-cell">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
<?php echo HTMLHelper::_('searchtools.sort', 'JGRID_HEADING_LANGUAGE', 'a.language', $listDirn, $listOrder); ?>
</th>
<?php endif; ?>
<th scope="col" style="width:5%" class="d-none d-md-table-cell">
<th scope="col" class="w-5 d-none d-md-table-cell">
<?php echo HTMLHelper::_('searchtools.sort', 'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder); ?>
</th>
</tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
<?php echo HTMLHelper::_('searchtools.sort', 'JGRID_HEADING_ACCESS', 'a.access', $listDirn, $listOrder); ?>
</th>
<?php if (Multilanguage::isEnabled()) : ?>
<th scope="col" style="width:5%" class="d-none d-md-table-cell">
<th scope="col" class="w-5 d-none d-md-table-cell">
<?php echo HTMLHelper::_('searchtools.sort', 'JGRID_HEADING_LANGUAGE', 'a.language', $listDirn, $listOrder); ?>
</th>
<?php endif; ?>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
<th scope="col" class="w-10 d-none d-md-table-cell">
<?php echo HTMLHelper::_('searchtools.sort', 'COM_FINDER_HEADING_CREATED_ON', 'a.created', $listDirn, $listOrder); ?>
</th>
<th scope="col" style="width:5%" class="d-none d-md-table-cell">
<th scope="col" class="w-5 d-none d-md-table-cell">
<?php echo HTMLHelper::_('searchtools.sort', 'COM_FINDER_HEADING_MAP_COUNT', 'a.map_count', $listDirn, $listOrder); ?>
</th>
<th scope="col" style="width:1%" class="d-none d-md-table-cell">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ public function remove($eid = array())
// Do not allow to uninstall locked extensions.
if ((int) $row->locked === 1)
{
$msgs[] = Text::_('COM_INSTALLER_UNINSTALL_ERROR_LOCKED_EXTENSION');
$msgs[] = Text::sprintf('COM_INSTALLER_UNINSTALL_ERROR_LOCKED_EXTENSION', $row->name, $id);

continue;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
</caption>
<thead>
<tr>
<td style="width:5%"></td>
<td class="w-5"></td>
<th scope="col">
<?php echo HTMLHelper::_('searchtools.sort', 'JGRID_HEADING_LANGUAGE', 'name', $listDirn, $listOrder); ?>
</th>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
<th scope="col" class="w-10 d-none d-md-table-cell">
<?php echo Text::_('JAUTHOR'); ?>
</th>
<th scope="col" style="width:5%" class="d-none d-md-table-cell">
<th scope="col" class="w-5 d-none d-md-table-cell">
<?php echo HTMLHelper::_('searchtools.sort', 'COM_INSTALLER_HEADING_FOLDER', 'folder_translated', $listDirn, $listOrder); ?>
</th>
<th scope="col" style="width:1%" class="d-none d-md-table-cell">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
<th scope="col" class="w-10 d-none d-md-table-cell">
<?php echo HTMLHelper::_('searchtools.sort', 'COM_INSTALLER_HEADING_FOLDER', 'folder_translated', $listDirn, $listOrder); ?>
</th>
<th scope="col" style="width:5%" class="d-none d-md-table-cell">
<th scope="col" class="w-5 d-none d-md-table-cell">
<?php echo HTMLHelper::_('searchtools.sort', 'JGRID_HEADING_ID', 'update_site_id', $listDirn, $listOrder); ?>
</th>
</tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

\defined('_JEXEC') or die;

use Joomla\CMS\Filter\InputFilter;
use Joomla\CMS\Language\LanguageHelper;

/**
Expand All @@ -20,21 +21,6 @@
*/
class LanguagesHelper
{
/**
* Method for parsing ini files.
*
* @param string $fileName Path and name of the ini file to parse.
*
* @return array Array of strings found in the file, the array indices will be the keys. On failure an empty array will be returned.
*
* @since 2.5
* @deprecated 3.9.0 Use \Joomla\CMS\Language\LanguageHelper::parseIniFile() instead.
*/
public static function parseFile($fileName)
{
return LanguageHelper::parseIniFile($fileName);
}

/**
* Filter method for language keys.
* This method will be called by \JForm while filtering the form data.
Expand All @@ -47,7 +33,7 @@ public static function parseFile($fileName)
*/
public static function filterKey($value)
{
$filter = \JFilterInput::getInstance(null, null, 1, 1);
$filter = InputFilter::getInstance([], [], InputFilter::TAGS_BLACKLIST, InputFilter::ATTR_BLACKLIST);

return strtoupper($filter->clean($value, 'cmd'));
}
Expand All @@ -64,7 +50,7 @@ public static function filterKey($value)
*/
public static function filterText($value)
{
$filter = \JFilterInput::getInstance(null, null, 1, 1);
$filter = InputFilter::getInstance([], [], InputFilter::TAGS_BLACKLIST, InputFilter::ATTR_BLACKLIST);

return $filter->clean($value);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
use Joomla\CMS\Filesystem\Folder;
use Joomla\CMS\Filesystem\Path;
use Joomla\CMS\Filter\InputFilter;
use Joomla\CMS\Language\LanguageHelper;
use Joomla\CMS\MVC\Model\BaseDatabaseModel;
use Joomla\Component\Languages\Administrator\Helper\LanguagesHelper;
use Joomla\Database\ParameterType;

/**
Expand Down Expand Up @@ -91,7 +91,7 @@ public function refresh()
// Parse all found ini files and add the strings to the database cache.
foreach ($files as $file)
{
$strings = LanguagesHelper::parseFile($file);
$strings = LanguageHelper::parseIniFile($file);

if ($strings)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@
<th scope="col" class="text-center">
<?php echo HTMLHelper::_('searchtools.sort', 'COM_LANGUAGES_HEADING_LANG_TAG', 'language', $listDirn, $listOrder); ?>
</th>
<th scope="col" style="width:5%" class="text-center">
<th scope="col" class="w-5 text-center">
<?php echo HTMLHelper::_('searchtools.sort', 'COM_LANGUAGES_HEADING_DEFAULT', 'published', $listDirn, $listOrder); ?>
</th>
<th scope="col" style="width:5%" class="d-none d-md-table-cell text-center">
<th scope="col" class="w-5 d-none d-md-table-cell text-center">
<?php echo HTMLHelper::_('searchtools.sort', 'COM_LANGUAGES_HEADING_VERSION', 'version', $listDirn, $listOrder); ?>
</th>
<th scope="col" class="w-10 d-none d-md-table-cell text-center">
Expand All @@ -65,7 +65,7 @@
<th scope="col" class="w-10 d-none d-md-table-cell text-center">
<?php echo HTMLHelper::_('searchtools.sort', 'COM_LANGUAGES_HEADING_AUTHOR_EMAIL', 'authorEmail', $listDirn, $listOrder); ?>
</th>
<th scope="col" style="width:5%" class="d-none d-md-table-cell text-center">
<th scope="col" class="w-5 d-none d-md-table-cell text-center">
<?php echo HTMLHelper::_('searchtools.sort', 'JGRID_HEADING_ID', 'extension_id', $listDirn, $listOrder); ?>
</th>
</tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
<th scope="col" class="w-10 d-none d-md-table-cell text-center">
<?php echo HTMLHelper::_('searchtools.sort', 'COM_LANGUAGES_HEADING_HOMEPAGE', 'l.home', $listDirn, $listOrder); ?>
</th>
<th scope="col" style="width:5%" class="d-none d-md-table-cell text-center">
<th scope="col" class="w-5 d-none d-md-table-cell text-center">
<?php echo HTMLHelper::_('searchtools.sort', 'JGRID_HEADING_ID', 'a.lang_id', $listDirn, $listOrder); ?>
</th>
</tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ protected function getInput()
Factory::getLanguage()->load('com_menus', JPATH_ADMINISTRATOR);

// The active article id field.
$value = (int) $this->value;
$value = (int) $this->value ?: '';

// Create the modal id.
$modalId = 'Item_' . $this->id;
Expand Down
2 changes: 1 addition & 1 deletion administrator/components/com_menus/tmpl/items/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
<?php echo HTMLHelper::_('searchtools.sort', 'JGRID_HEADING_LANGUAGE', 'language', $listDirn, $listOrder); ?>
</th>
<?php endif; ?>
<th scope="col" style="width:5%" class="d-none d-md-table-cell">
<th scope="col" class="w-5 d-none d-md-table-cell">
<?php echo HTMLHelper::_('searchtools.sort', 'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder); ?>
</th>
</tr>
Expand Down
2 changes: 1 addition & 1 deletion administrator/components/com_menus/tmpl/items/modal.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
<th scope="col" class="d-none d-md-table-cell">
<?php echo HTMLHelper::_('searchtools.sort', 'COM_MENUS_HEADING_MENU', 'menutype_title', $listDirn, $listOrder); ?>
</th>
<th scope="col" style="width:5%" class="text-center d-none d-md-table-cell">
<th scope="col" class="w-5 text-center d-none d-md-table-cell">
<?php echo HTMLHelper::_('searchtools.sort', 'COM_MENUS_HEADING_HOME', 'a.home', $listDirn, $listOrder); ?>
</th>
<th scope="col" class="w-10 d-none d-md-table-cell">
Expand Down
4 changes: 2 additions & 2 deletions administrator/components/com_menus/tmpl/menus/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
<th scope="col">
<?php echo HTMLHelper::_('searchtools.sort', 'JGLOBAL_TITLE', 'a.title', $listDirn, $listOrder); ?>
</th>
<th scope="col" style="width:5%" class="text-center">
<th scope="col" class="w-5 text-center">
<?php echo Text::_('COM_MENUS_MENUS'); ?>
</th>
<th scope="col" class="w-10 text-center d-none d-md-table-cell">
Expand All @@ -79,7 +79,7 @@
<span class="fas fa-cube" aria-hidden="true"></span>
<span class="d-none d-md-inline"><?php echo Text::_('COM_MENUS_HEADING_LINKED_MODULES'); ?></span>
</th>
<th scope="col" style="width:5%" class="d-none d-lg-table-cell text-center">
<th scope="col" class="w-5 d-none d-lg-table-cell text-center">
<?php echo HTMLHelper::_('searchtools.sort', 'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder); ?>
</th>
</tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
?>
<input type="checkbox" class="novalidate" name="jform[assigned][]" id="<?php echo $id . $link->value; ?>" value="<?php echo (int) $link->value; ?>"<?php echo $selected ? ' checked="checked"' : ''; echo $uselessMenuItem ? ' disabled="disabled"' : ''; ?>>
<label for="<?php echo $id . $link->value; ?>" class="">
<?php echo $link->text; ?> <span class="small"><?php echo Text::sprintf('JGLOBAL_LIST_ALIAS', $this->escape($link->alias)); ?></span>
<?php echo $link->text; ?>
<?php if (Multilanguage::isEnabled() && $link->language != '' && $link->language != '*') : ?>
<?php if ($link->language_image) : ?>
<?php echo HTMLHelper::_('image', 'mod_languages/' . $link->language_image . '.gif', $link->language_title, array('title' => $link->language_title), true); ?>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
<?php echo HTMLHelper::_('searchtools.sort', 'JGRID_HEADING_LANGUAGE', 'a.language', $listDirn, $listOrder); ?>
</th>
<?php endif; ?>
<th scope="col" style="width:5%" class="d-none d-md-table-cell">
<th scope="col" class="w-5 d-none d-md-table-cell">
<?php echo HTMLHelper::_('searchtools.sort', 'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder); ?>
</th>
</tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ protected function getInput()
Factory::getLanguage()->load('com_newsfeeds', JPATH_ADMINISTRATOR);

// The active newsfeed id field.
$value = (int) $this->value > 0 ? (int) $this->value : '';
$value = (int) $this->value ?: '';

// Create the modal id.
$modalId = 'Newsfeed_' . $this->id;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
<th scope="col" style="width:1%" class="text-center d-none d-md-table-cell">
<?php echo HTMLHelper::_('searchtools.sort', '', 'a.ordering', $listDirn, $listOrder, null, 'asc', 'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?>
</th>
<th scope="col" style="width:5%; min-width:85px" class="text-center">
<th scope="col" style="min-width:85px" class="w-5 text-center">
<?php echo HTMLHelper::_('searchtools.sort', 'JSTATUS', 'a.published', $listDirn, $listOrder); ?>
</th>
<th scope="col" class="title">
Expand All @@ -80,7 +80,7 @@
<?php echo HTMLHelper::_('searchtools.sort', 'JGRID_HEADING_LANGUAGE', 'language_title', $listDirn, $listOrder); ?>
</th>
<?php endif; ?>
<th scope="col" style="width:5%" class="d-none d-md-table-cell">
<th scope="col" class="w-5 d-none d-md-table-cell">
<?php echo HTMLHelper::_('searchtools.sort', 'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder); ?>
</th>
</tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
<th scope="col" class="w-10 d-none d-md-table-cell">
<?php echo HTMLHelper::_('searchtools.sort', 'JGRID_HEADING_ACCESS', 'access', $listDirn, $listOrder); ?>
</th>
<th scope="col" style="width:5%" class="d-none d-md-table-cell">
<th scope="col" class="w-5 d-none d-md-table-cell">
<?php echo HTMLHelper::_('searchtools.sort', 'JGRID_HEADING_ID', 'extension_id', $listDirn, $listOrder); ?>
</th>
</tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
<td style="width:1%" class="text-center">
<?php echo HTMLHelper::_('grid.checkall'); ?>
</td>
<th scope="col" style="width:5%" class="text-center">
<th scope="col" class="w-5 text-center">
<?php echo HTMLHelper::_('searchtools.sort', 'JSTATUS', 'a.state', $listDirn, $listOrder); ?>
</th>
<th scope="col" width="10%">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@
</caption>
<thead>
<tr>
<th scope="col" style="width:5%" class="text-center">
<th scope="col" class="w-5 text-center">
<?php echo Text::_('COM_PRIVACY_HEADING_ACTIONS'); ?>
</th>
<th scope="col" style="width:5%" class="text-center">
<th scope="col" class="w-5 text-center">
<?php echo Text::_('JSTATUS'); ?>
</th>
<th scope="col">
Expand Down
Loading

0 comments on commit 686fa0d

Please sign in to comment.