29
0
mirror of https://github.com/joomla/joomla-cms.git synced 2024-09-06 02:14:40 +00:00

Merge remote-tracking branch 'remotes/upstream/4.0-dev' into dev

This commit is contained in:
Allon Moritz 2018-05-12 15:37:49 +02:00
commit c816a3bd54
985 changed files with 21136 additions and 125317 deletions

View File

@ -96,19 +96,15 @@ before_test:
# Database setup for MySQL via PowerShell tools
- >
"C:\Program Files\MySQL\MySQL Server 5.7\bin\mysql" -u root -p"Password12!" -e "CREATE DATABASE IF NOT EXISTS joomla_ut;"
- >
"C:\Program Files\MySQL\MySQL Server 5.7\bin\mysql" -u root -p"Password12!" joomla_ut < tests\unit\schema\mysql.sql
# Database setup for PostgreSQL
- SET PGUSER=postgres
- SET PGPASSWORD=Password12!
- PATH=C:\Program Files\PostgreSQL\9.4\bin\;%PATH%
- createdb joomla_ut
- psql -d joomla_ut -a -f tests\unit\schema\postgresql.sql
# Database setup for SQL Server
- ps: $sqlInstance = "(local)\SQL2014"
- ps: sqlcmd -b -E -S "$sqlInstance" -Q "CREATE DATABASE joomla_ut"
- ps: sqlcmd -S "$sqlInstance" -U "sa" -P "Password12!" -i $env:APPVEYOR_BUILD_FOLDER\tests\unit\schema\sqlsrv.sql
test_script:
- cd C:\projects\joomla-cms

60
.github/CODEOWNERS vendored Normal file
View File

@ -0,0 +1,60 @@
# Custom Fields
administrator/components/com_fields/* @laoneo
components/com_fields/* @laoneo
plugins/content/fields/* @laoneo
plugins/editors-xtd/fields/* @laoneo
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
# Language strings
administrator/language/en-GB/* @brianteeman
installation/language/en-GB/* @brianteeman
language/en-GB/* @brianteeman
README.md @brianteeman
README.txt @brianteeman
# CodeMirror
media/editors/codemirror/* @okonomiyaki3000
plugins/editors/codemirror/* @okonomiyaki3000
# Statistics Server
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
# 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
# Automated Testing
build/jenkins/* @mbabker @rdeutz
build/travis/* @mbabker @rdeutz
tests/codeception/* @rdeutz
tests/javascript/* @dgt41 @rdeutz
tests/unit/* @mbabker @rdeutz
.appveyor.yml @mbabker @rdeutz
.drone.yml @rdeutz
.hound.yml @mbabker
.travis.yml @mbabker @rdeutz
appveyor-phpunit.xml @mbabker @rdeutz
codeception.yml @rdeutz
karma.conf.js @dgt41 @rdeutz
phpunit.xml.dist @mbabker @rdeutz
RoboFile.dist.ini @rdeutz
RoboFile.php @rdeutz
travis-phpunit.xml @mbabker @rdeutz
# Core JS
media/*/js/* @dgt41

1
.gitignore vendored
View File

@ -163,6 +163,7 @@ Desktop.ini
/libraries/vendor/paragonie/random_compat/tests
/libraries/vendor/paragonie/sodium_compat/dist
/libraries/vendor/paragonie/sodium_compat/.gitignore
/libraries/vendor/paragonie/sodium_compat/appveyor.yml
/libraries/vendor/paragonie/sodium_compat/build-phar.sh
/libraries/vendor/paragonie/sodium_compat/composer.json
/libraries/vendor/paragonie/sodium_compat/composer.lock

View File

@ -3,13 +3,9 @@ Joomla! CMS™ [![Analytics](https://ga-beacon.appspot.com/UA-544070-3/joomla-cm
Build Status
---------------------
Travis-CI: [![Build Status](https://travis-ci.org/joomla/joomla-cms.svg?branch=staging)](https://travis-ci.org/joomla/joomla-cms)
Drone -CI: [![Build Status](http://213.160.72.75/api/badges/joomla/joomla-cms/status.svg)](http://213.160.72.75/joomla/joomla-cms)
AppVeyor: [![Build status](https://ci.appveyor.com/api/projects/status/bpcxulw6nnxlv8kb/branch/staging?svg=true)](https://ci.appveyor.com/project/joomla/joomla-cms)
Jenkins: [![Build Status](http://build.joomla.org/job/cms/badge/icon)](http://build.joomla.org/job/cms/)
| Travis-CI | Drone-CI | AppVeyor | Jenkins |
| ------------- | ------------- | ------------- | ------------- |
| [![Build Status](https://travis-ci.org/joomla/joomla-cms.svg?branch=staging)](https://travis-ci.org/joomla/joomla-cms) | [![Build Status](http://213.160.72.75/api/badges/joomla/joomla-cms/status.svg)](http://213.160.72.75/joomla/joomla-cms) | [![Build status](https://ci.appveyor.com/api/projects/status/bpcxulw6nnxlv8kb/branch/staging?svg=true)](https://ci.appveyor.com/project/joomla/joomla-cms) | [![Build Status](http://build.joomla.org/job/cms/badge/icon)](http://build.joomla.org/job/cms/) |
What is this?
---------------------

View File

@ -0,0 +1,2 @@
ALTER TABLE `#__user_keys` DROP INDEX `series_2`;
ALTER TABLE `#__user_keys` DROP INDEX `series_3`;

View File

@ -0,0 +1,2 @@
DROP INDEX "#__user_keys_series_2";
DROP INDEX "#__user_keys_series_3";

View File

@ -0,0 +1,2 @@
ALTER TABLE [#__user_keys] DROP CONSTRAINT [#__user_keys$series_2];
ALTER TABLE [#__user_keys] DROP CONSTRAINT [#__user_keys$series_3];

View File

@ -69,11 +69,11 @@ class AssociationField extends FormField
// Clear association button
$html[] = '<button'
. ' class="btn btn-secondary' . ($value ? '' : ' hidden') . '"'
. ' onclick="return Joomla.submitbutton(\'undo-association\');"'
. ' id="remove-assoc">'
. '<span class="icon-remove" aria-hidden="true"></span> ' . \JText::_('JCLEAR')
. '</button>';
. ' class="btn btn-secondary' . ($value ? '' : ' hidden') . '"'
. ' onclick="return Joomla.submitbutton(\'undo-association\');"'
. ' id="remove-assoc">'
. '<span class="icon-remove" aria-hidden="true"></span> ' . \JText::_('JCLEAR')
. '</button>';
$html[] = '<input type="hidden" id="' . $this->id . '_id" name="' . $this->name . '" value="' . $value . '">';

View File

@ -10,6 +10,8 @@ namespace Joomla\Component\Associations\Administrator\Helper;
defined('_JEXEC') or die;
use Joomla\CMS\Association\AssociationExtensionInterface;
use Joomla\CMS\Association\AssociationServiceInterface;
use Joomla\CMS\Factory;
use Joomla\CMS\Helper\ContentHelper;
use Joomla\CMS\Layout\LayoutHelper;
@ -96,7 +98,7 @@ class AssociationsHelper extends ContentHelper
*
* @return \Joomla\CMS\Table\Table|null
*
* @since 3.7.00
* @since 3.7.0
*/
public static function getItem($extensionName, $typeName, $itemId)
{
@ -130,6 +132,43 @@ class AssociationsHelper extends ContentHelper
return in_array($extensionName, self::$supportedExtensionsList);
}
/**
* Loads the helper for the given class.
*
* @param string $extensionName The extension name with com_
*
* @return AssociationExtensionInterface|null
*
* @since __DEPLOY_VERSION__
*/
private static function loadHelper($extensionName)
{
$component = Factory::getApplication()->bootComponent($extensionName);
if ($component instanceof AssociationServiceInterface)
{
return $component->getAssociationsExtension();
}
// Check if associations helper exists
if (!file_exists(JPATH_ADMINISTRATOR . '/components/' . $extensionName . '/helpers/associations.php'))
{
return null;
}
require_once JPATH_ADMINISTRATOR . '/components/' . $extensionName . '/helpers/associations.php';
$componentAssociationsHelperClassName = self::getExtensionHelperClassName($extensionName);
if (!class_exists($componentAssociationsHelperClassName, false))
{
return null;
}
// Create an instance of the helper class
return new $componentAssociationsHelperClassName;
}
/**
* Get the extension specific helper class name
*
@ -289,6 +328,7 @@ class AssociationsHelper extends ContentHelper
}
\JHtml::_('bootstrap.popover');
return LayoutHelper::render('joomla.content.associations', $items);
}
@ -342,8 +382,7 @@ class AssociationsHelper extends ContentHelper
$result->def('associationssupport', false);
$result->def('helper', null);
// Get the associations class
$helper = Factory::getApplication()->bootComponent($extensionName)->getAssociationsExtension();
$helper = self::loadHelper($extensionName);
if (!$helper)
{
@ -463,7 +502,7 @@ class AssociationsHelper extends ContentHelper
}
// Get the extension specific helper method
$helper= self::getExtensionHelper($extensionName);
$helper = self::getExtensionHelper($extensionName);
if (method_exists($helper, 'allowEdit'))
{
@ -491,7 +530,7 @@ class AssociationsHelper extends ContentHelper
}
// Get the extension specific helper method
$helper= self::getExtensionHelper($extensionName);
$helper = self::getExtensionHelper($extensionName);
if (method_exists($helper, 'allowAdd'))
{

View File

@ -135,21 +135,25 @@ class HtmlView extends BaseHtmlView
unset($this->activeFilters['state']);
$this->filterForm->removeField('state', 'filter');
}
if (empty($support['category']))
{
unset($this->activeFilters['category_id']);
$this->filterForm->removeField('category_id', 'filter');
}
if ($extensionName !== 'com_menus')
{
unset($this->activeFilters['menutype']);
$this->filterForm->removeField('menutype', 'filter');
}
if (empty($support['level']))
{
unset($this->activeFilters['level']);
$this->filterForm->removeField('level', 'filter');
}
if (empty($support['acl']))
{
unset($this->activeFilters['access']);
@ -228,6 +232,7 @@ class HtmlView extends BaseHtmlView
ToolbarHelper::custom('associations.purge', 'purge', 'purge', 'COM_ASSOCIATIONS_PURGE', false, false);
ToolbarHelper::custom('associations.clean', 'refresh', 'refresh', 'COM_ASSOCIATIONS_DELETE_ORPHANS', false, false);
}
ToolbarHelper::preferences('com_associations');
}

View File

@ -176,6 +176,7 @@ class CategoryeditField extends \JFormFieldList
{
$language = $db->quote($this->element['language']);
}
$query->where($db->quoteName('a.language') . ' IN (' . $language . ')');
}

View File

@ -10,6 +10,8 @@ namespace Joomla\Component\Categories\Administrator\Model;
defined('_JEXEC') or die;
use Joomla\CMS\Categories\CategoriesServiceInterface;
use Joomla\CMS\Factory;
use Joomla\CMS\MVC\Factory\MVCFactoryInterface;
use Joomla\CMS\Language\Associations;
use Joomla\CMS\MVC\Model\ListModel;
@ -369,30 +371,19 @@ class CategoriesModel extends ListModel
*/
public function countItems(&$items, $extension)
{
$parts = explode('.', $extension, 2);
$component = $parts[0];
$section = null;
$parts = explode('.', $extension, 2);
$section = '';
if (count($parts) > 1)
{
$section = $parts[1];
}
// Try to find the component helper.
$eName = str_replace('com_', '', $component);
$file = \JPath::clean(JPATH_ADMINISTRATOR . '/components/' . $component . '/helpers/' . $eName . '.php');
$component = Factory::getApplication()->bootComponent($parts[0]);
if (file_exists($file))
if ($component instanceof CategoriesServiceInterface)
{
$prefix = ucfirst($eName);
$cName = $prefix . 'Helper';
\JLoader::register($cName, $file);
if (class_exists($cName) && is_callable(array($cName, 'countItems')))
{
$cName::countItems($items, $section);
}
$component->countItems($items, $section);
}
}
}

View File

@ -55,16 +55,13 @@ class FiltersField extends FormField
$html[] = ' <span class="acl-action">' . \JText::_('JGLOBAL_FILTER_GROUPS_LABEL') . '</span>';
$html[] = ' </th>';
$html[] = ' <th>';
$html[] = ' <span class="acl-action" title="' . \JText::_('JGLOBAL_FILTER_TYPE_LABEL') . '">'
. \JText::_('JGLOBAL_FILTER_TYPE_LABEL') . '</span>';
$html[] = ' <span class="acl-action">' . \JText::_('JGLOBAL_FILTER_TYPE_LABEL') . '</span>';
$html[] = ' </th>';
$html[] = ' <th>';
$html[] = ' <span class="acl-action" title="' . \JText::_('JGLOBAL_FILTER_TAGS_LABEL') . '">'
. \JText::_('JGLOBAL_FILTER_TAGS_LABEL') . '</span>';
$html[] = ' <span class="acl-action">' . \JText::_('JGLOBAL_FILTER_TAGS_LABEL') . '</span>';
$html[] = ' </th>';
$html[] = ' <th>';
$html[] = ' <span class="acl-action" title="' . \JText::_('JGLOBAL_FILTER_ATTRIBUTES_LABEL') . '">'
. \JText::_('JGLOBAL_FILTER_ATTRIBUTES_LABEL') . '</span>';
$html[] = ' <span class="acl-action">' . \JText::_('JGLOBAL_FILTER_ATTRIBUTES_LABEL') . '</span>';
$html[] = ' </th>';
$html[] = ' </tr>';
$html[] = ' </thead>';
@ -111,7 +108,6 @@ class FiltersField extends FormField
. ' name="' . $this->name . '[' . $group->value . '][filter_tags]"'
. ' type="text"'
. ' id="' . $this->id . $group->value . '_filter_tags" class="novalidate form-control"'
. ' title="' . \JText::_('JGLOBAL_FILTER_TAGS_LABEL') . '"'
. ' value="' . $group_filter['filter_tags'] . '"'
. '>';
$html[] = ' </td>';
@ -120,7 +116,6 @@ class FiltersField extends FormField
. ' name="' . $this->name . '[' . $group->value . '][filter_attributes]"'
. ' type="text"'
. ' id="' . $this->id . $group->value . '_filter_attributes" class="novalidate form-control"'
. ' title="' . \JText::_('JGLOBAL_FILTER_ATTRIBUTES_LABEL') . '"'
. ' value="' . $group_filter['filter_attributes'] . '"'
. '>';
$html[] = ' </td>';

View File

@ -730,7 +730,6 @@ class ApplicationModel extends FormModel
return false;
}
// All checks done.
$result = array(
'text' => '',

View File

@ -1,21 +0,0 @@
<?php
/**
* @package Joomla.Administrator
* @subpackage com_content
*
* @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
namespace Joomla\Component\Content\Administrator\Dispatcher;
defined('JPATH_PLATFORM') or die;
/**
* Dispatcher class for com_content
*
* @since 4.0.0
*/
class Dispatcher extends \Joomla\CMS\Dispatcher\Dispatcher
{
}

View File

@ -0,0 +1,133 @@
<?php
/**
* @package Joomla.Administrator
* @subpackage com_content
*
* @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
namespace Joomla\Component\Content\Administrator\Extension;
defined('JPATH_PLATFORM') or die;
use Joomla\CMS\Application\SiteApplication;
use Joomla\CMS\Association\AssociationServiceTrait;
use Joomla\CMS\Association\AssociationServiceInterface;
use Joomla\CMS\Categories\CategoriesServiceInterface;
use Joomla\CMS\Categories\CategoriesServiceTrait;
use Joomla\CMS\Extension\BootableExtensionInterface;
use Joomla\CMS\Extension\Component;
use Joomla\CMS\Fields\FieldsServiceInterface;
use Joomla\CMS\HTML\HTMLRegistryAwareTrait;
use Joomla\CMS\MVC\Factory\MVCFactoryServiceTrait;
use Joomla\CMS\MVC\Factory\MVCFactoryServiceInterface;
use Joomla\Component\Content\Administrator\Service\HTML\AdministratorService;
use Joomla\Component\Content\Administrator\Service\HTML\Icon;
use Psr\Container\ContainerInterface;
/**
* Component class for com_content
*
* @since __DEPLOY_VERSION__
*/
class ContentComponent extends Component implements
BootableExtensionInterface, MVCFactoryServiceInterface, CategoriesServiceInterface, FieldsServiceInterface, AssociationServiceInterface
{
use MVCFactoryServiceTrait;
use CategoriesServiceTrait;
use AssociationServiceTrait;
use HTMLRegistryAwareTrait;
/**
* Booting the extension. This is the function to set up the environment of the extension like
* registering new class loaders, etc.
*
* If required, some initial set up can be done from services of the container, eg.
* registering HTML services.
*
* @param ContainerInterface $container The container
*
* @return void
*
* @since __DEPLOY_VERSION__
*/
public function boot(ContainerInterface $container)
{
$this->getRegistry()->register('contentadministrator', new AdministratorService);
$this->getRegistry()->register('contenticon', new Icon($container->get(SiteApplication::class)));
// The layout joomla.content.icons does need a general icon service
$this->getRegistry()->register('icon', $this->getRegistry()->getService('contenticon'));
}
/**
* Returns a valid section for the given section. If it is not valid then null
* is returned.
*
* @param string $section The section to get the mapping for
* @param object $item The item
*
* @return string|null The new section
*
* @since __DEPLOY_VERSION__
*/
public function validateSection($section, $item = null)
{
if (\JFactory::getApplication()->isClient('site'))
{
// On the front end we need to map some sections
switch ($section)
{
// Editing an article
case 'form':
// Category list view
case 'featured':
case 'category':
$section = 'article';
}
}
if ($section != 'article')
{
// We don't know other sections
return null;
}
return $section;
}
/**
* Returns valid contexts
*
* @return array
*
* @since __DEPLOY_VERSION__
*/
public function getContexts(): array
{
\JFactory::getLanguage()->load('com_content', JPATH_ADMINISTRATOR);
$contexts = array(
'com_content.article' => \JText::_('COM_CONTENT'),
'com_content.categories' => \JText::_('JCATEGORY')
);
return $contexts;
}
/**
* Returns the table for the count items functions for the given section.
*
* @param string $section The section
*
* @return string|null
*
* @since __DEPLOY_VERSION__
*/
protected function getTableNameForSection(string $section = null)
{
return '#__content';
}
}

View File

@ -145,7 +145,6 @@ class AssociationsHelper extends AssociationExtensionHelper
if (in_array($typeName, $this->itemTypes))
{
switch ($typeName)
{
case 'article':

View File

@ -1,273 +0,0 @@
<?php
/**
* @package Joomla.Administrator
* @subpackage com_content
*
* @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
namespace Joomla\Component\Content\Administrator\Helper;
defined('_JEXEC') or die;
/**
* Content component helper.
*
* @since 1.6
*/
class ContentHelper extends \JHelperContent
{
public static $extension = 'com_content';
/**
* Configure the Linkbar.
*
* @param string $vName The name of the active view.
*
* @return void
*
* @since 1.6
*/
public static function addSubmenu($vName)
{
\JHtmlSidebar::addEntry(
\JText::_('JGLOBAL_ARTICLES'),
'index.php?option=com_content&view=articles',
$vName == 'articles'
);
\JHtmlSidebar::addEntry(
\JText::_('COM_CONTENT_SUBMENU_CATEGORIES'),
'index.php?option=com_categories&extension=com_content',
$vName == 'categories'
);
\JHtmlSidebar::addEntry(
\JText::_('COM_CONTENT_SUBMENU_FEATURED'),
'index.php?option=com_content&view=featured',
$vName == 'featured'
);
if (\JComponentHelper::isEnabled('com_fields') && \JComponentHelper::getParams('com_content')->get('custom_fields_enable', '1'))
{
\JHtmlSidebar::addEntry(
\JText::_('JGLOBAL_FIELDS'),
'index.php?option=com_fields&context=com_content.article',
$vName == 'fields.fields'
);
\JHtmlSidebar::addEntry(
\JText::_('JGLOBAL_FIELD_GROUPS'),
'index.php?option=com_fields&view=groups&context=com_content.article',
$vName == 'fields.groups'
);
}
}
/**
* Applies the content tag filters to arbitrary text as per settings for current user group
*
* @param text $text The string to filter
*
* @return string The filtered string
*
* @deprecated 4.0 Use \JComponentHelper::filterText() instead.
*/
public static function filterText($text)
{
try
{
\JLog::add(
sprintf('%s() is deprecated. Use JComponentHelper::filterText() instead', __METHOD__),
\JLog::WARNING,
'deprecated'
);
}
catch (\RuntimeException $exception)
{
// Informational log only
}
return \JComponentHelper::filterText($text);
}
/**
* Adds Count Items for Category Manager.
*
* @param \stdClass[] &$items The banner category objects
*
* @return \stdClass[]
*
* @since 3.5
*/
public static function countItems(&$items)
{
$db = \JFactory::getDbo();
foreach ($items as $item)
{
$item->count_trashed = 0;
$item->count_archived = 0;
$item->count_unpublished = 0;
$item->count_published = 0;
$query = $db->getQuery(true);
$query->select('state, count(*) AS count')
->from($db->qn('#__content'))
->where('catid = ' . (int) $item->id)
->group('state');
$db->setQuery($query);
$articles = $db->loadObjectList();
foreach ($articles as $article)
{
if ($article->state == 1)
{
$item->count_published = $article->count;
}
if ($article->state == 0)
{
$item->count_unpublished = $article->count;
}
if ($article->state == 2)
{
$item->count_archived = $article->count;
}
if ($article->state == -2)
{
$item->count_trashed = $article->count;
}
}
}
return $items;
}
/**
* Adds Count Items for Tag Manager.
*
* @param \stdClass[] &$items The content objects
* @param string $extension The name of the active view.
*
* @return \stdClass[]
*
* @since 3.6
*/
public static function countTagItems(&$items, $extension)
{
$db = \JFactory::getDbo();
$parts = explode('.', $extension);
$section = null;
if (count($parts) > 1)
{
$section = $parts[1];
}
$join = $db->qn('#__content') . ' AS c ON ct.content_item_id=c.id';
$state = 'state';
if ($section === 'category')
{
$join = $db->qn('#__categories') . ' AS c ON ct.content_item_id=c.id';
$state = 'published as state';
}
foreach ($items as $item)
{
$item->count_trashed = 0;
$item->count_archived = 0;
$item->count_unpublished = 0;
$item->count_published = 0;
$query = $db->getQuery(true);
$query->select($state . ', count(*) AS count')
->from($db->qn('#__contentitem_tag_map') . 'AS ct ')
->where('ct.tag_id = ' . (int) $item->id)
->where('ct.type_alias =' . $db->q($extension))
->join('LEFT', $join)
->group('state');
$db->setQuery($query);
$contents = $db->loadObjectList();
foreach ($contents as $content)
{
if ($content->state == 1)
{
$item->count_published = $content->count;
}
if ($content->state == 0)
{
$item->count_unpublished = $content->count;
}
if ($content->state == 2)
{
$item->count_archived = $content->count;
}
if ($content->state == -2)
{
$item->count_trashed = $content->count;
}
}
}
return $items;
}
/**
* Returns a valid section for articles. If it is not valid then null
* is returned.
*
* @param string $section The section to get the mapping for
*
* @return string|null The new section
*
* @since 3.7.0
*/
public static function validateSection($section)
{
if (\JFactory::getApplication()->isClient('site'))
{
// On the front end we need to map some sections
switch ($section)
{
// Editing an article
case 'form':
// Category list view
case 'featured':
case 'category':
$section = 'article';
}
}
if ($section != 'article')
{
// We don't know other sections
return null;
}
return $section;
}
/**
* Returns valid contexts
*
* @return array
*
* @since 3.7.0
*/
public static function getContexts()
{
\JFactory::getLanguage()->load('com_content', JPATH_ADMINISTRATOR);
$contexts = array(
'com_content.article' => \JText::_('COM_CONTENT'),
'com_content.categories' => \JText::_('JCATEGORY')
);
return $contexts;
}
}

View File

@ -264,6 +264,7 @@ class ArticlesModel extends ListModel
// Filter by access level.
$access = $this->getState('filter.access');
if (is_numeric($access))
{
$query->where('a.access = ' . (int) $access);
@ -385,6 +386,7 @@ class ArticlesModel extends ListModel
{
$tagId = ArrayHelper::toInteger($tagId);
$tagId = implode(',', $tagId);
if (!empty($tagId))
{
$hasTag = true;

View File

@ -158,7 +158,7 @@ class Icon
&& $article->checked_out > 0
&& $article->checked_out != $user->get('id'))
{
$checkoutUser = JFactory::getUser($article->checked_out);
$checkoutUser = Factory::getUser($article->checked_out);
$date = HTMLHelper::_('date', $article->checked_out_time);
$tooltip = Text::_('JLIB_HTML_CHECKED_OUT') . ' :: ' . Text::sprintf('COM_CONTENT_CHECKED_OUT_BY', $checkoutUser->name)
. ' <br> ' . $date;

View File

@ -12,7 +12,8 @@ namespace Joomla\Component\Content\Administrator\View\Articles;
defined('_JEXEC') or die;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
use Joomla\Component\Content\Administrator\Helper\ContentHelper;
\JLoader::register('ContentHelper', JPATH_ADMINISTRATOR . '/components/com_content/helpers/content.php');
/**
* View class for a list of articles.
@ -90,7 +91,7 @@ class HtmlView extends BaseHtmlView
{
if ($this->getLayout() !== 'modal')
{
ContentHelper::addSubmenu('articles');
\ContentHelper::addSubmenu('articles');
}
$this->items = $this->get('Items');

View File

@ -12,7 +12,8 @@ namespace Joomla\Component\Content\Administrator\View\Featured;
defined('_JEXEC') or die;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
use Joomla\Component\Content\Administrator\Helper\ContentHelper;
\JLoader::register('ContentHelper', JPATH_ADMINISTRATOR . '/components/com_content/helpers/content.php');
/**
* View class for a list of featured articles.
@ -88,7 +89,7 @@ class HtmlView extends BaseHtmlView
*/
public function display($tpl = null)
{
ContentHelper::addSubmenu('featured');
\ContentHelper::addSubmenu('featured');
$this->items = $this->get('Items');
$this->pagination = $this->get('Pagination');

View File

@ -14,6 +14,47 @@ defined('_JEXEC') or die;
*
* @since 1.6
*/
class ContentHelper extends \Joomla\Component\Content\Administrator\Helper\ContentHelper
class ContentHelper extends JHelperContent
{
/**
* Configure the Linkbar.
*
* @param string $vName The name of the active view.
*
* @return void
*
* @since 1.6
*/
public static function addSubmenu($vName)
{
\JHtmlSidebar::addEntry(
\JText::_('JGLOBAL_ARTICLES'),
'index.php?option=com_content&view=articles',
$vName == 'articles'
);
\JHtmlSidebar::addEntry(
\JText::_('COM_CONTENT_SUBMENU_CATEGORIES'),
'index.php?option=com_categories&extension=com_content',
$vName == 'categories'
);
\JHtmlSidebar::addEntry(
\JText::_('COM_CONTENT_SUBMENU_FEATURED'),
'index.php?option=com_content&view=featured',
$vName == 'featured'
);
if (\JComponentHelper::isEnabled('com_fields') && \JComponentHelper::getParams('com_content')->get('custom_fields_enable', '1'))
{
\JHtmlSidebar::addEntry(
\JText::_('JGLOBAL_FIELDS'),
'index.php?option=com_fields&context=com_content.article',
$vName == 'fields.fields'
);
\JHtmlSidebar::addEntry(
\JText::_('JGLOBAL_FIELD_GROUPS'),
'index.php?option=com_fields&view=groups&context=com_content.article',
$vName == 'fields.groups'
);
}
}
}

View File

@ -10,17 +10,15 @@
defined('_JEXEC') or die;
use Joomla\CMS\Association\AssociationExtensionInterface;
use Joomla\CMS\Application\SiteApplication;
use Joomla\CMS\Categories\Categories;
use Joomla\CMS\Dispatcher\DispatcherFactory;
use Joomla\CMS\Dispatcher\DispatcherFactoryInterface;
use Joomla\CMS\Extension\Service\Provider\Component;
use Joomla\CMS\Extension\ComponentInterface;
use Joomla\CMS\Extension\Service\Provider\DispatcherFactory;
use Joomla\CMS\Extension\Service\Provider\MVCFactoryFactory;
use Joomla\CMS\HTML\Registry;
use Joomla\CMS\MVC\Factory\MVCFactoryFactory;
use Joomla\CMS\MVC\Factory\MVCFactoryFactoryInterface;
use Joomla\Component\Content\Administrator\Extension\ContentComponent;
use Joomla\Component\Content\Administrator\Helper\AssociationsHelper;
use Joomla\Component\Content\Administrator\Service\HTML\AdministratorService;
use Joomla\Component\Content\Administrator\Service\HTML\Icon;
use Joomla\Component\Content\Site\Service\Category;
use Joomla\DI\Container;
use Joomla\DI\ServiceProviderInterface;
@ -43,27 +41,26 @@ return new class implements ServiceProviderInterface
*/
public function register(Container $container)
{
/**
* @var Registry $registry
*/
$registry = $container->get(Registry::class);
$registry->register('contentadministrator', new AdministratorService);
$registry->register('contenticon', new Icon($container->get(SiteApplication::class)));
// The layout joomla.content.icons does need a general icon service
$registry->register('icon', $registry->getService('contenticon'));
$container->set(Categories::class, ['' => new Category]);
$container->set(AssociationExtensionInterface::class, new AssociationsHelper);
$factory = new MVCFactoryFactory('\\Joomla\\Component\\Content');
$factory->setFormFactory($container->get(\Joomla\CMS\Form\FormFactoryInterface::class));
$container->set(MVCFactoryFactoryInterface::class, $factory);
$container->registerServiceProvider(new MVCFactoryFactory('\\Joomla\\Component\\Content'));
$container->registerServiceProvider(new DispatcherFactory('\\Joomla\\Component\\Content'));
$container->set(
DispatcherFactoryInterface::class,
new DispatcherFactory('\\Joomla\\Component\\Content', $container->get(MVCFactoryFactoryInterface::class))
ComponentInterface::class,
function (Container $container)
{
$component = new ContentComponent;
$component->setDispatcherFactory($container->get(DispatcherFactoryInterface::class));
$component->setRegistry($container->get(Registry::class));
$component->setMvcFactoryFactory($container->get(MVCFactoryFactoryInterface::class));
$component->setCategories($container->get(Categories::class));
$component->setAssociationExtension($container->get(AssociationExtensionInterface::class));
return $component;
}
);
$container->registerServiceProvider(new Component);
}
};

View File

@ -21,7 +21,7 @@ $this->hiddenFieldsets = array('basic-limited');
$this->ignore_fieldsets = array('jmetadata', 'item_associations');
// Create shortcut to parameters.
$params = clone($this->state->get('params'));
$params = clone $this->state->get('params');
$params->merge(new Registry($this->item->attribs));
$app = JFactory::getApplication();

View File

@ -31,7 +31,7 @@ class PreviewModel extends ItemModel
public function getItem()
{
/** @var \Joomla\CMS\Table\ContentHistory $table */
$table = $this->getTable('Contenthistory');
$table = $this->getTable('ContentHistory');
$versionId = \JFactory::getApplication()->input->getInt('version_id');
if (!$table->load($versionId))
@ -41,7 +41,7 @@ class PreviewModel extends ItemModel
// Get the content type's record so we can check ACL
/** @var \Joomla\CMS\Table\ContentType $contentTypeTable */
$contentTypeTable = $this->getTable('Contenttype');
$contentTypeTable = $this->getTable('ContentType');
if (!$contentTypeTable->load($table->ucm_type_id))
{
@ -108,7 +108,7 @@ class PreviewModel extends ItemModel
*
* @since 3.2
*/
public function getTable($type = 'Contenthistory', $prefix = 'Joomla\\CMS\\Table\\', $config = array())
public function getTable($type = 'ContentHistory', $prefix = 'Joomla\\CMS\\Table\\', $config = array())
{
return Table::getInstance($type, $prefix, $config);
}
@ -132,7 +132,7 @@ class PreviewModel extends ItemModel
$typeAlias = \JFactory::getApplication()->input->get('type_alias');
/** @var \Joomla\CMS\Table\ContentType $contentTypeTable */
$contentTypeTable = $this->getTable('Contenttype');
$contentTypeTable = $this->getTable('ContentType');
if ($contentTypeTable->getTypeId($typeAlias) == $record->ucm_type_id)
{

View File

@ -10,6 +10,8 @@ namespace Joomla\Component\Fields\Administrator\Field;
defined('_JEXEC') or die;
use Joomla\CMS\Factory;
use Joomla\CMS\Fields\FieldsServiceInterface;
use Joomla\CMS\Form\FormHelper;
FormHelper::loadFieldClass('list');
@ -46,30 +48,14 @@ class FieldcontextsField extends \JFormFieldList
protected function getOptions()
{
$parts = explode('.', $this->value);
$eName = str_replace('com_', '', $parts[0]);
$file = \JPath::clean(JPATH_ADMINISTRATOR . '/components/' . $parts[0] . '/helpers/' . $eName . '.php');
$contexts = array();
if (!file_exists($file))
$component = Factory::getApplication()->bootComponent($parts[0]);
if ($component instanceof FieldsServiceInterface)
{
return array();
return $component->getContexts();
}
$prefix = ucfirst($eName);
$cName = $prefix . 'Helper';
\JLoader::register($cName, $file);
if (class_exists($cName) && is_callable(array($cName, 'getContexts')))
{
$contexts = $cName::getContexts();
}
if (!$contexts || !is_array($contexts) || count($contexts) == 1)
{
return array();
}
return $contexts;
return [];
}
}

View File

@ -10,6 +10,8 @@ namespace Joomla\Component\Fields\Administrator\Model;
defined('_JEXEC') or die;
use Joomla\CMS\Categories\CategoriesServiceInterface;
use Joomla\CMS\Categories\SectionNotFoundException;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Factory;
use Joomla\CMS\MVC\Model\AdminModel;
@ -966,14 +968,28 @@ class FieldModel extends AdminModel
}
}
// Setting the context for the category field
$cat = $this->bootComponent($component)->getCategories();
if ($cat && $cat->get('root')->hasChildren())
try
{
$form->setFieldAttribute('assigned_cat_ids', 'extension', $component);
// Setting the context for the category field
$componentObject = $this->bootComponent($component);
if (!$componentObject instanceof CategoriesServiceInterface)
{
throw new SectionNotFoundException;
}
$cat = $componentObject->getCategories();
if ($cat->get('root')->hasChildren())
{
$form->setFieldAttribute('assigned_cat_ids', 'extension', $component);
}
else
{
$form->removeField('assigned_cat_ids');
}
}
else
catch (SectionNotFoundException $e)
{
$form->removeField('assigned_cat_ids');
}

View File

@ -65,7 +65,7 @@ class FieldsListPlugin extends FieldsPlugin
$data = array();
// Fetch the options from the plugin
$params = clone($this->params);
$params = clone $this->params;
$params->merge($field->fieldparams);
foreach ($params->get('options', array()) as $option)

View File

@ -99,6 +99,7 @@ abstract class FieldsPlugin extends CMSPlugin
// Add to cache and return the data
$types_cache[$this->_type . $this->_name] = $types;
return $types;
}

View File

@ -8,6 +8,9 @@
*/
defined('_JEXEC') or die;
use Joomla\CMS\Factory;
use Joomla\CMS\Fields\FieldsServiceInterface;
JLoader::register('JFolder', JPATH_LIBRARIES . '/joomla/filesystem/folder.php');
/**
@ -41,26 +44,18 @@ class FieldsHelper
return null;
}
$component = $parts[0];
$eName = str_replace('com_', '', $component);
$newSection = '';
$path = JPath::clean(JPATH_ADMINISTRATOR . '/components/' . $component . '/helpers/' . $eName . '.php');
$component = Factory::getApplication()->bootComponent($parts[0]);
if (file_exists($path))
if ($component instanceof FieldsServiceInterface)
{
$cName = ucfirst($eName) . 'Helper';
$newSection = $component->validateSection($parts[1], $item);
}
JLoader::register($cName, $path);
if (class_exists($cName) && is_callable(array($cName, 'validateSection')))
{
$section = call_user_func_array(array($cName, 'validateSection'), array($parts[1], $item));
if ($section)
{
$parts[1] = $section;
}
}
if ($newSection)
{
$parts[1] = $newSection;
}
return $parts;

View File

@ -2,7 +2,7 @@
/**
* @package Joomla.Administrator
* @subpackage com_fields
*
*
* @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

View File

@ -2,7 +2,7 @@
/**
* @package Joomla.Administrator
* @subpackage com_fields
*
*
* @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

View File

@ -2,7 +2,7 @@
/**
* @package Joomla.Administrator
* @subpackage com_fields
*
*
* @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

View File

@ -313,15 +313,25 @@ class FinderIndexerHelper
public static function isCommon($token, $lang)
{
static $data;
static $default;
$langCode = $lang;
// If language requested is wildcard, use the default language.
if ($lang == '*')
{
$default = $default === null ? substr(self::getDefaultLanguage(), 0, 2) : $default;
$langCode = $default;
}
// Load the common tokens for the language if necessary.
if (!isset($data[$lang]))
if (!isset($data[$langCode]))
{
$data[$lang] = self::getCommonWords($lang);
$data[$langCode] = self::getCommonWords($langCode);
}
// Check if the token is in the common array.
return in_array($token, $data[$lang], true);
return in_array($token, $data[$langCode], true);
}
/**

View File

@ -145,7 +145,7 @@ class LanguagesModel extends ListModel
foreach ($extension->attributes() as $key => $value)
{
$language->$key = (string) $value;
$language->$key = (string) $value;
}
if ($search)

View File

@ -48,7 +48,7 @@ class OverrideModel extends AdminModel
if (!$langName)
{
// If a language only exists in frontend, it's meta data cannot be
// If a language only exists in frontend, its metadata cannot be
// loaded in backend at the moment, so fall back to the language tag.
$langName = $language;
}

View File

@ -10,11 +10,11 @@ namespace Joomla\Component\Menus\Administrator\View\Items;
defined('_JEXEC') or die;
use Joomla\CMS\Helper\ContentHelper;
use Joomla\CMS\Layout\FileLayout;
use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
use Joomla\Component\Content\Administrator\Helper\ContentHelper;
use Joomla\Component\Menus\Administrator\Helper\MenusHelper;
/**

View File

@ -10,10 +10,10 @@ namespace Joomla\Component\Menus\Administrator\View\Menus;
defined('_JEXEC') or die;
use Joomla\CMS\Helper\ContentHelper;
use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
use Joomla\Component\Content\Administrator\Helper\ContentHelper;
use Joomla\Component\Menus\Administrator\Helper\MenusHelper;
/**

View File

@ -1,6 +1,6 @@
<?php
/**
* @package Joomla.Site
* @package Joomla.Administrator
* @subpackage Layout
*
* @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved.

View File

@ -1,7 +1,7 @@
<?php
/**
* @package Joomla.Libraries
* @subpackage Form
* @package Joomla.Administrator
* @subpackage com_menus
*
* @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt

View File

@ -149,7 +149,7 @@ JHtml::_('script', 'com_menus/admin-menus-default.min.js', array('version' => 'a
<?php echo JText::sprintf('COM_MENUS_MODULE_ACCESS_POSITION', $this->escape($module->title), $this->escape($module->access_title), $this->escape($module->position)); ?></a>
<?php else : ?>
<a href="#" class="disabled" disabled="disabled">
<span class="dropdown-item"><?php echo JText::sprintf('COM_MENUS_MODULE_ACCESS_POSITION', $this->escape($module->title), $this->escape($module->access_title), $this->escape($module->position)); ?></span>
<span class="dropdown-item"><?php echo JText::sprintf('COM_MENUS_MODULE_ACCESS_POSITION', $this->escape($module->title), $this->escape($module->access_title), $this->escape($module->position)); ?></span>
</a>
<?php endif; ?>
<?php endforeach; ?>

View File

@ -37,7 +37,7 @@
<field
name="ordering"
type="Pluginordering"
type="pluginordering"
label="JFIELD_ORDERING_LABEL"
/>

View File

@ -15,6 +15,6 @@ $title = $displayData['title'];
?>
<button data-toggle="modal" onclick="{jQuery( '#collapseModal' ).modal('show'); return true;}" class="btn btn-sm btn-primary">
<span class="icon-checkbox-partial" aria-hidden="true" title="<?php echo $title; ?>"></span>
<span class="icon-checkbox-partial" aria-hidden="true"></span>
<?php echo $title; ?>
</button>

View File

@ -27,8 +27,8 @@ $listDirn = $this->escape($this->state->get('list.direction'));
'bootstrap.renderModal',
'plugin' . $this->redirectPluginId . 'Modal',
array(
'url' => $link,
'title' => JText::_('COM_REDIRECT_EDIT_PLUGIN_SETTINGS'),
'url' => $link,
'title' => JText::_('COM_REDIRECT_EDIT_PLUGIN_SETTINGS'),
'height' => '400px',
'width' => '800px',
'bodyHeight' => '70',
@ -36,11 +36,12 @@ $listDirn = $this->escape($this->state->get('list.direction'));
'closeButton' => false,
'backdrop' => 'static',
'keyboard' => false,
'footer' => '<button class="btn" data-dismiss="modal" aria-hidden="true">'
. JText::_("JLIB_HTML_BEHAVIOR_CLOSE") . '</button>'
. '<button class="btn btn-primary" data-dismiss="modal" aria-hidden="true" onclick="jQuery(\'#plugin' . $this->redirectPluginId . 'Modal iframe\').contents().find(\'#saveBtn\').click();">'
'footer' => '<button type="button" class="btn" data-dismiss="modal" aria-hidden="true"'
. ' onclick="jQuery(\'#plugin' . $this->redirectPluginId . 'Modal iframe\').contents().find(\'#closeBtn\').click();">'
. JText::_('JLIB_HTML_BEHAVIOR_CLOSE') . '</button>'
. '<button type="button" class="btn btn-primary" data-dismiss="modal" aria-hidden="true" onclick="jQuery(\'#plugin' . $this->redirectPluginId . 'Modal iframe\').contents().find(\'#saveBtn\').click();">'
. JText::_("JSAVE") . '</button>'
. '<button class="btn btn-success" aria-hidden="true" onclick="jQuery(\'#plugin' . $this->redirectPluginId . 'Modal iframe\').contents().find(\'#applyBtn\').click(); return false;">'
. '<button type="button" class="btn btn-success" aria-hidden="true" onclick="jQuery(\'#plugin' . $this->redirectPluginId . 'Modal iframe\').contents().find(\'#applyBtn\').click(); return false;">'
. JText::_("JAPPLY") . '</button>'
)
); ?>
@ -157,4 +158,3 @@ $listDirn = $this->escape($this->state->get('list.direction'));
<?php echo JHtml::_('form.token'); ?>
</div>
</form>

View File

@ -10,7 +10,9 @@ namespace Joomla\Component\Tags\Administrator\Model;
defined('_JEXEC') or die;
use Joomla\CMS\Categories\CategoriesServiceInterface;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Factory;
use Joomla\CMS\MVC\Model\ListModel;
use Joomla\CMS\MVC\Factory\MVCFactoryInterface;
@ -350,7 +352,6 @@ class TagsModel extends ListModel
public function countItems(&$items, $extension)
{
$parts = explode('.', $extension);
$component = $parts[0];
$section = null;
if (count($parts) < 2)
@ -358,21 +359,11 @@ class TagsModel extends ListModel
return;
}
// Try to find the component helper.
$eName = str_replace('com_', '', $component);
$file = \JPath::clean(JPATH_ADMINISTRATOR . '/components/' . $component . '/helpers/' . $eName . '.php');
$component = Factory::getApplication()->bootComponent($parts[0]);
if (file_exists($file))
if ($component instanceof CategoriesServiceInterface)
{
$prefix = ucfirst(str_replace('com_', '', $component));
$cName = $prefix . 'Helper';
\JLoader::register($cName, $file);
if (class_exists($cName) && is_callable(array($cName, 'countTagItems')))
{
$cName::countTagItems($items, $extension);
}
$component->countTagItems($items, $extension);
}
}
}

View File

@ -11,8 +11,8 @@ defined('_JEXEC') or die;
?>
<div id="template-manager-delete" class="container-fluid">
<div class="mt-2">
<div class="col-md-12">
<p><?php echo JText::sprintf('COM_TEMPLATES_MODAL_FILE_DELETE', $this->fileName); ?></p>
</div>
<div class="col-md-12">
<p><?php echo JText::sprintf('COM_TEMPLATES_MODAL_FILE_DELETE', $this->fileName); ?></p>
</div>
</div>
</div>

View File

@ -25,23 +25,21 @@ $resetOptions = array(
?>
<div class="container">
<div class="row">
<div id="batch-choose-action" class="combo control-group">
<label id="batch-choose-action-lbl" class="control-label" for="batch-choose-action">
<form>
<div class="form-group">
<label id="batch-choose-action-lbl" class="control-label" for="batch-group-id">
<?php echo JText::_('COM_USERS_BATCH_GROUP'); ?>
</label>
</div>
<div id="batch-choose-action" class="combo controls">
<div class="control-group">
<select class="custom-select" name="batch[group_id]" id="batch-group-id">
<option value=""><?php echo JText::_('JSELECT'); ?></option>
<?php echo JHtml::_('select.options', JHtml::_('user.groups')); ?>
</select>
<div id="batch-choose-action" class="combo controls">
<select class="custom-select" name="batch[group_id]" id="batch-group-id">
<option value=""><?php echo JText::_('JSELECT'); ?></option>
<?php echo JHtml::_('select.options', JHtml::_('user.groups')); ?>
</select>
</div>
</div>
<label><?php echo JText::_('COM_USERS_REQUIRE_PASSWORD_RESET'); ?></label>
<div class="control-group radio">
<?php echo JHtml::_('select.radiolist', $resetOptions, 'batch[reset_id]', '', 'value', 'text', ''); ?>
</div>
</div>
<div class="form-group">
<label><?php echo JText::_('COM_USERS_REQUIRE_PASSWORD_RESET'); ?></label>
<?php echo JHtml::_('select.radiolist', $resetOptions, 'batch[reset_id]', '', 'value', 'text', ''); ?>
</div>
</form>
</div>

View File

@ -17,7 +17,7 @@ COM_FINDER_CONFIG_FIELD_OPENSEARCH_NAME_LABEL="OpenSearch Name"
COM_FINDER_CONFIG_GATHER_SEARCH_STATISTICS_LABEL="Gather Search Statistics"
COM_FINDER_CONFIG_HILIGHT_CONTENT_SEARCH_TERMS_LABEL="Highlight Search Terms"
COM_FINDER_CONFIG_MEMORY_TABLE_LIMIT_LABEL="Memory Table Limit"
COM_FINDER_CONFIG_META_MULTIPLIER_LABEL="Meta Data Weight Multiplier"
COM_FINDER_CONFIG_META_MULTIPLIER_LABEL="Metadata Weight Multiplier"
COM_FINDER_CONFIG_MISC_MULTIPLIER_LABEL="Misc. Text Weight Multiplier"
COM_FINDER_CONFIG_PATH_MULTIPLIER_LABEL="Path Text Weight Multiplier"
COM_FINDER_CONFIG_SHOW_ADVANCED_LABEL="Advanced Search"

View File

@ -74,7 +74,7 @@ COM_MENUS_HTML_UNPUBLISH_URL="Unpublish the URL menu item"
COM_MENUS_INTEGRATION_FIELDSET_LABEL="Integration"
COM_MENUS_ITEM_DETAILS="Details"
COM_MENUS_ITEM_FIELD_ALIAS_MENU_LABEL="Menu Item"
COM_MENUS_ITEM_FIELD_ANCHOR_CSS_LABEL="Link CSS Style"
COM_MENUS_ITEM_FIELD_ANCHOR_CSS_LABEL="Link Class"
COM_MENUS_ITEM_FIELD_ANCHOR_TITLE_LABEL="Link Title Attribute"
COM_MENUS_ITEM_FIELD_ANCHOR_REL_LABEL="Link Rel Attribute"
COM_MENUS_ITEM_FIELD_ASSIGNED_LABEL=" Menu"

View File

@ -387,6 +387,7 @@ JLIB_HTML_BEHAVIOR_HOLD_MOUSE="- Hold mouse button on any of the buttons above f
JLIB_HTML_BEHAVIOR_MONTH_SELECT="- Use the < and > buttons to select month\n"
JLIB_HTML_BEHAVIOR_NEXT_MONTH_HOLD_FOR_MENU="Select to move to the next month. Select and hold for a list of the months."
JLIB_HTML_BEHAVIOR_NEXT_YEAR_HOLD_FOR_MENU="Select to move to the next year. Select and hold for a list of years."
JLIB_HTML_BEHAVIOR_OPEN_CALENDAR="Open the calendar"
JLIB_HTML_BEHAVIOR_PREV_MONTH_HOLD_FOR_MENU="Select to move to the previous month. Select and hold for a list of the months."
JLIB_HTML_BEHAVIOR_PREV_YEAR_HOLD_FOR_MENU="Select to move to the previous year. Select and hold for a list of years."
JLIB_HTML_BEHAVIOR_SELECT_DATE="Select a date."

View File

@ -72,7 +72,7 @@ MOD_MENU_HOME_MULTIPLE="Warning! Multiple homes!"
MOD_MENU_IMPORTANT_ITEM_MENU_MANAGER="Menu Manager"
MOD_MENU_IMPORTANT_ITEM_MODULE_MANAGER="Module Manager"
MOD_MENU_IMPORTANT_ITEM_COMPONENTS_CONTAINER="Components Container"
MOD_MENU_IMPORTANT_ITEMS_INACCESSIBLE_LIST_WARNING="The administrator menu <strong>%1$s</strong> does not contain - <strong>%2$s</strong>. Click to <strong><a href='%3$s'>turn on the menu recovery mode</a></strong>."
MOD_MENU_IMPORTANT_ITEMS_INACCESSIBLE_LIST_WARNING="The administrator menu <strong>%1$s</strong> does not contain - <strong>%2$s</strong>. Select to <strong><a href='%3$s'>turn on the menu recovery mode</a></strong>."
MOD_MENU_INSTALLER_SUBMENU_DATABASE="Database"
MOD_MENU_INSTALLER_SUBMENU_DISCOVER="Discover"
MOD_MENU_INSTALLER_SUBMENU_INSTALL="Install"

View File

@ -10,5 +10,5 @@ PLG_FIELDS_SQL_PARAMS_MULTIPLE_LABEL="Multiple"
; In the string below the terms 'value' and 'text' should not be translated
PLG_FIELDS_SQL_PARAMS_QUERY_DESC="The SQL query which will provide the data for the dropdown list. The query must return two columns; one called 'value' which will hold the values of the list items; the other called 'text' containing the text in the dropdown list."
PLG_FIELDS_SQL_PARAMS_QUERY_LABEL="Query"
PLG_FIELDS_SQL_RULES_ADAPTED="For increased security the edit permission for this SQL fields was set to denied for all non Super Users."
PLG_FIELDS_SQL_RULES_ADAPTED="For increased security the edit permission for this SQL field was set to denied for all non Super Users."
PLG_FIELDS_SQL_XML_DESCRIPTION="This plugin lets you create new fields of type 'sql' in any extensions where custom fields are supported."

View File

@ -7,10 +7,10 @@ PLG_SAMPLEDATA_BLOG="Sample Data - Blog"
PLG_SAMPLEDATA_BLOG_OVERVIEW_DESC="Sample data which will set up a blog site.<br>If the site is multilingual, the data will be tagged to the active backend language."
PLG_SAMPLEDATA_BLOG_OVERVIEW_TITLE="Blog Sample data"
PLG_SAMPLEDATA_BLOG_SAMPLEDATA_CONTENT_ARTICLE_0_FULLTEXT=""
PLG_SAMPLEDATA_BLOG_SAMPLEDATA_CONTENT_ARTICLE_0_INTROTEXT="<p>This tells you a bit about this blog and the person who writes it. </p><p>When you are logged in you will be able to edit this page by clicking on the edit icon.</p>"
PLG_SAMPLEDATA_BLOG_SAMPLEDATA_CONTENT_ARTICLE_0_INTROTEXT="<p>This tells you a bit about this blog and the person who writes it. </p><p>When you are logged in you will be able to edit this page by selecting the edit icon.</p>"
PLG_SAMPLEDATA_BLOG_SAMPLEDATA_CONTENT_ARTICLE_0_TITLE="About"
PLG_SAMPLEDATA_BLOG_SAMPLEDATA_CONTENT_ARTICLE_1_FULLTEXT=""
PLG_SAMPLEDATA_BLOG_SAMPLEDATA_CONTENT_ARTICLE_1_INTROTEXT="<p>Here are some basic tips for working on your site.</p><ul><li>Joomla! has a 'front end' that you are looking at now and an 'administrator' or back end' which is where you do the more advanced work of creating your site such as setting up the menus and deciding what modules to show. You need to login to the administrator separately using the same user name and password that you used to login to this part of the site.</li><li>One of the first things you will probably want to do is change the site title and tag line and to add a logo. To do this click on the Template Settings link in the top menu. To change your site description, browser title, default email and other items, click Site Settings. More advanced configuration options are available in the administrator.</li><li>To totally change the look of your site you will probably want to install a new template. In the Extensions menu click on Extensions Manager and then go to the Install tab. There are many free and commercial templates available for Joomla.</li><li>As you have already seen, you can control who can see different parts of you site. When you work with modules, articles or weblinks setting the Access level to Registered will mean that only logged in users can see them</li><li>When you create a new article or other kind of content you also can save it as Published or Unpublished. If it is Unpublished site visitors will not be able to see it but you will.</li><li>You can learn much more about working with Joomla from the <a href='https://docs.joomla.org/'>Joomla documentation site</a> and get help from other users at the <a href='https://forum.joomla.org/'>Joomla forums</a>. In the administrator there are help buttons on every page that provide detailed information about the functions on that page.</li></ul>"
PLG_SAMPLEDATA_BLOG_SAMPLEDATA_CONTENT_ARTICLE_1_INTROTEXT="<p>Here are some basic tips for working on your site.</p><ul><li>Joomla! has a 'front end' that you are looking at now and an 'administrator' or back end' which is where you do the more advanced work of creating your site such as setting up the menus and deciding what modules to show. You need to login to the administrator separately using the same user name and password that you used to login to this part of the site.</li><li>One of the first things you will probably want to do is change the site title and tag line and to add a logo. To do this select the Template Settings link in the top menu. To change your site description, browser title, default email and other items, select Site Settings. More advanced configuration options are available in the administrator.</li><li>To totally change the look of your site you will probably want to install a new template. In the Extensions menu select Extensions Manager and then go to the Install tab. There are many free and commercial templates available for Joomla.</li><li>As you have already seen, you can control who can see different parts of you site. When you work with modules, articles or weblinks setting the Access level to Registered will mean that only logged in users can see them</li><li>When you create a new article or other kind of content you also can save it as Published or Unpublished. If it is Unpublished site visitors will not be able to see it but you will.</li><li>You can learn much more about working with Joomla from the <a href='https://docs.joomla.org/'>Joomla documentation site</a> and get help from other users at the <a href='https://forum.joomla.org/'>Joomla forums</a>. In the administrator there are help buttons on every page that provide detailed information about the functions on that page.</li></ul>"
PLG_SAMPLEDATA_BLOG_SAMPLEDATA_CONTENT_ARTICLE_1_TITLE="Working on Your Site"
PLG_SAMPLEDATA_BLOG_SAMPLEDATA_CONTENT_ARTICLE_2_FULLTEXT=""
PLG_SAMPLEDATA_BLOG_SAMPLEDATA_CONTENT_ARTICLE_2_INTROTEXT="<p>This is a sample blog posting.</p><p>If you log in to the site (the Author Login link is on the very bottom of this page) you will be able to edit it and all of the other existing articles. You will also be able to create a new article and make other changes to the site.</p><p>As you add and modify articles you will see how your site changes and also how you can customise it in various ways.</p><p>Go ahead, you can't break it.</p>"
@ -19,10 +19,10 @@ PLG_SAMPLEDATA_BLOG_SAMPLEDATA_CONTENT_ARTICLE_3_FULLTEXT="<p>On the full page y
PLG_SAMPLEDATA_BLOG_SAMPLEDATA_CONTENT_ARTICLE_3_INTROTEXT="<p>Your home page is set to display the four most recent articles from the blog category in a column. Then there are links to the 4 next oldest articles. You can change those numbers by editing the content options settings in the blog tab in your site administrator. There is a link to your site administrator in the top menu.</p><p>If you want to have your blog post broken into two parts, an introduction and then a full length separate page, use the Read More button to insert a break.</p>"
PLG_SAMPLEDATA_BLOG_SAMPLEDATA_CONTENT_ARTICLE_3_TITLE="About your home page"
PLG_SAMPLEDATA_BLOG_SAMPLEDATA_CONTENT_ARTICLE_4_FULLTEXT=""
PLG_SAMPLEDATA_BLOG_SAMPLEDATA_CONTENT_ARTICLE_4_INTROTEXT="<p>Your site has some commonly used modules already preconfigured. These include:</p><ul><li>Image Module which holds the image beneath the menu. This is a Custom module that you can edit to change the image.</li><li>Most Read Posts which lists articles based on the number of times they have been read.</li><li>Older Articles which lists out articles by month.</li><li>Syndicate which allows your readers to read your posts in a news reader.</li><li>Popular Tags, which will appear if you use tagging on your articles. Enter a tag in the Tags field when editing.</li></ul><p>Each of these modules has many options which you can experiment with in the Module Manager in your site Administrator. Moving your mouse over a module and clicking on the edit icon will take you to an edit screen for that module. Always be sure to save and close any module you edit.</p><p>Joomla! also includes many other modules you can incorporate in your site. As you develop your site you may want to add more module that you can find at the <a href='https://extensions.joomla.org/'>Joomla Extensions Directory.</a></p>"
PLG_SAMPLEDATA_BLOG_SAMPLEDATA_CONTENT_ARTICLE_4_INTROTEXT="<p>Your site has some commonly used modules already preconfigured. These include:</p><ul><li>Image Module which holds the image beneath the menu. This is a Custom module that you can edit to change the image.</li><li>Most Read Posts which lists articles based on the number of times they have been read.</li><li>Older Articles which lists out articles by month.</li><li>Syndicate which allows your readers to read your posts in a news reader.</li><li>Popular Tags, which will appear if you use tagging on your articles. Enter a tag in the Tags field when editing.</li></ul><p>Each of these modules has many options which you can experiment with in the Module Manager in your site Administrator. Moving your mouse over a module and selecting the edit icon will take you to an edit screen for that module. Always be sure to save and close any module you edit.</p><p>Joomla! also includes many other modules you can incorporate in your site. As you develop your site you may want to add more module that you can find at the <a href='https://extensions.joomla.org/'>Joomla Extensions Directory.</a></p>"
PLG_SAMPLEDATA_BLOG_SAMPLEDATA_CONTENT_ARTICLE_4_TITLE="Your Modules"
PLG_SAMPLEDATA_BLOG_SAMPLEDATA_CONTENT_ARTICLE_5_FULLTEXT=""
PLG_SAMPLEDATA_BLOG_SAMPLEDATA_CONTENT_ARTICLE_5_INTROTEXT="<p>Templates control the look and feel of your website.</p><p>This blog is installed with the Protostar template.</p><p>You can edit the options by clicking on the Working on Your Site, Template Settings link in the top menu (visible when you login).</p><p>For example you can change the site background color, highlights color, site title, site description and title font used.</p><p>More options are available in the site administrator. You may also install a new template using the extension manager.</p>"
PLG_SAMPLEDATA_BLOG_SAMPLEDATA_CONTENT_ARTICLE_5_INTROTEXT="<p>Templates control the look and feel of your website.</p><p>This blog is installed with the Protostar template.</p><p>You can edit the options by selecting the Working on Your Site, Template Settings link in the top menu (visible when you login).</p><p>For example you can change the site background color, highlights color, site title, site description and title font used.</p><p>More options are available in the site administrator. You may also install a new template using the extension manager.</p>"
PLG_SAMPLEDATA_BLOG_SAMPLEDATA_CONTENT_ARTICLE_5_TITLE="Your Template"
PLG_SAMPLEDATA_BLOG_SAMPLEDATA_CONTENT_CATEGORY_0_TITLE="Blog"
PLG_SAMPLEDATA_BLOG_SAMPLEDATA_CONTENT_CATEGORY_1_TITLE="Help"

View File

@ -21,7 +21,7 @@ PLG_SYSTEM_STATS_MODE_OPTION_NEVER_SEND="Never send"
PLG_SYSTEM_STATS_MODE_OPTION_ON_DEMAND="On demand"
PLG_SYSTEM_STATS_MSG_ALLOW_SENDING_DATA="Enable Joomla Statistics?"
PLG_SYSTEM_STATS_MSG_JOOMLA_WANTS_TO_SEND_DATA="In order to better understand our install base and end user environments it is helpful if you send some site information back to a Joomla! controlled central server. No identifying data is captured at any point. You can change these settings later from Plugins > System - Joomla! Statistics."
PLG_SYSTEM_STATS_MSG_WHAT_DATA_WILL_BE_SENT="Click here to see the information that will be sent."
PLG_SYSTEM_STATS_MSG_WHAT_DATA_WILL_BE_SENT="Select here to see the information that will be sent."
PLG_SYSTEM_STATS_RESET_UNIQUE_ID="Reset Unique ID"
PLG_SYSTEM_STATS_UNIQUE_ID_LABEL="Unique ID"
PLG_SYSTEM_STATS_XML_DESCRIPTION="System Plugin that sends environment statistics to a server controlled by the Joomla! project for statistical analysis. Statistics sent include PHP version, CMS version, Database type, Database version and Server type."

View File

@ -15,7 +15,7 @@ PLG_SYSTEM_UPDATENOTIFICATION_EMAIL_DESC="A comma separated list of the email ad
; [RELEASENEWS] URL to the release news on joomla.org
; \n Newline character. Use it to start a new line in the email.
PLG_SYSTEM_UPDATENOTIFICATION_EMAIL_SUBJECT="Joomla! Update available for [SITENAME] [URL]"
PLG_SYSTEM_UPDATENOTIFICATION_EMAIL_BODY="This email IS NOT sent by Joomla.org. It is sent automatically by your own site,\n[SITENAME] - [URL] \n\n================================================================================\nUPDATE INFORMATION\n================================================================================\n\nYour site has discovered that there is an updated version of Joomla! available for download.\n\nJoomla! version currently installed: [CURVERSION]\nJoomla! version available for installation: [NEWVERSION]\n\nThis email is sent to you by your site to remind you of this fact.\nThe Joomla! project will never contact you directly about available updates of Joomla! on your site.\n\n================================================================================\nUPDATE INSTRUCTIONS\n================================================================================\n\nTo install the update on [SITENAME] please click the following link. (If the URL is not a link, copy & paste it to your browser).\n\nUpdate link: [LINK]\n\nRelease News can be found here: [RELEASENEWS]\n\n================================================================================\nWHY AM I RECEIVING THIS EMAIL?\n================================================================================\n\nThis email has been automatically sent by a plugin provided by Joomla!, the software which powers your site.\nThis plugin looks for updated versions of Joomla! and sends an email notification to its administrators.\nYou will receive several similar emails from your site until you either update the software or disable these emails.\n\nTo disable these emails, please unpublish the 'System - Joomla! Update Notification' plugin in the Plugin Manager on your site.\n\nIf you do not understand what Joomla! is and what you need to do please do not contact the Joomla! project.\nThey are NOT sending you this email and they cannot help you. Instead, please contact the person who built or manages your site.\n\nIf you are the person who built or manages your website, please note that this plugin may have been activated automatically when you installed or updated Joomla! on your site.\n\n================================================================================\nWHO SENT ME THIS EMAIL?\n================================================================================\n\nThis email is sent to you by your own site, [SITENAME]"
PLG_SYSTEM_UPDATENOTIFICATION_EMAIL_BODY="This email IS NOT sent by Joomla.org. It is sent automatically by your own site,\n[SITENAME] - [URL] \n\n================================================================================\nUPDATE INFORMATION\n================================================================================\n\nYour site has discovered that there is an updated version of Joomla! available for download.\n\nJoomla! version currently installed: [CURVERSION]\nJoomla! version available for installation: [NEWVERSION]\n\nThis email is sent to you by your site to remind you of this fact.\nThe Joomla! project will never contact you directly about available updates of Joomla! on your site.\n\n================================================================================\nUPDATE INSTRUCTIONS\n================================================================================\n\nTo install the update on [SITENAME] please select the following link. (If the URL is not a link, copy & paste it to your browser).\n\nUpdate link: [LINK]\n\nRelease News can be found here: [RELEASENEWS]\n\n================================================================================\nWHY AM I RECEIVING THIS EMAIL?\n================================================================================\n\nThis email has been automatically sent by a plugin provided by Joomla!, the software which powers your site.\nThis plugin looks for updated versions of Joomla! and sends an email notification to its administrators.\nYou will receive several similar emails from your site until you either update the software or disable these emails.\n\nTo disable these emails, please unpublish the 'System - Joomla! Update Notification' plugin in the Plugin Manager on your site.\n\nIf you do not understand what Joomla! is and what you need to do please do not contact the Joomla! project.\nThey are NOT sending you this email and they cannot help you. Instead, please contact the person who built or manages your site.\n\nIf you are the person who built or manages your website, please note that this plugin may have been activated automatically when you installed or updated Joomla! on your site.\n\n================================================================================\nWHO SENT ME THIS EMAIL?\n================================================================================\n\nThis email is sent to you by your own site, [SITENAME]"
PLG_SYSTEM_UPDATENOTIFICATION_LANGUAGE_OVERRIDE_LBL="Email Language"
PLG_SYSTEM_UPDATENOTIFICATION_LANGUAGE_OVERRIDE_DESC="If you choose Auto (default), the update notification email to Super Users will be in the site language at the time the plugin is triggered. By selecting a language here you are forcing the update notification emails to be sent in this specific language."
PLG_SYSTEM_UPDATENOTIFICATION_LANGUAGE_OVERRIDE_NONE="Auto"

View File

@ -75,6 +75,7 @@ class StatsAdminHelper
$query->select('COUNT(id) AS count_users')
->from('#__users');
$db->setQuery($query);
try
{
$users = $db->loadResult();
@ -89,6 +90,7 @@ class StatsAdminHelper
->from('#__content')
->where('state = 1');
$db->setQuery($query);
try
{
$items = $db->loadResult();

View File

@ -54,7 +54,7 @@
white-space: pre-wrap !important; }
pre,
blockquote {
border: 1px solid #999;
border: 1px solid #adb5bd;
page-break-inside: avoid; }
thead {
display: table-header-group; }
@ -86,7 +86,17 @@
background-color: #fff !important; }
.table-bordered th,
.table-bordered td {
border: 1px solid #ddd !important; } }
border: 1px solid #dee2e6 !important; }
.table-dark {
color: inherit; }
.table-dark th,
.table-dark td,
.table-dark thead th,
.table-dark tbody + tbody {
border-color: #dee2e6; }
.table .thead-dark th {
color: inherit;
border-color: #dee2e6; } }
*,
*::before,
@ -104,7 +114,7 @@ html {
@-ms-viewport {
width: device-width; }
article, aside, dialog, figcaption, figure, footer, header, hgroup, main, nav, section {
article, aside, figcaption, figure, footer, header, hgroup, main, nav, section {
display: block; }
body {
@ -213,7 +223,7 @@ pre,
code,
kbd,
samp {
font-family: monospace, monospace;
font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
font-size: 1em; }
pre {
@ -247,7 +257,7 @@ th {
label {
display: inline-block;
margin-bottom: .5rem; }
margin-bottom: 0.5rem; }
button {
border-radius: 0; }
@ -468,12 +478,6 @@ mark,
font-size: 90%;
color: #868e96; }
code,
kbd,
pre,
samp {
font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }
code {
font-size: 87.5%;
color: #e83e8c;
@ -1124,6 +1128,12 @@ pre {
.table-bordered thead td {
border-bottom-width: 2px; }
.table-borderless th,
.table-borderless td,
.table-borderless thead th,
.table-borderless tbody + tbody {
border: 0; }
.table-striped tbody tr:nth-of-type(odd) {
background-color: rgba(0, 0, 0, 0.05); }
@ -1314,6 +1324,9 @@ pre {
border: 1px solid #ced4da;
border-radius: 0.25rem;
transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; }
@media screen and (prefers-reduced-motion: reduce) {
.form-control {
transition: none; } }
.form-control::-ms-expand {
background-color: transparent;
border: 0; }
@ -1377,6 +1390,7 @@ select.form-control:focus::-ms-value {
padding-bottom: 0.375rem;
margin-bottom: 0;
line-height: 1.5;
color: #212529;
background-color: transparent;
border: solid transparent;
border-width: 1px 0; }
@ -1509,6 +1523,11 @@ select.form-control-lg:not([size]):not([multiple]), .input-group-lg > select.for
.custom-select.is-valid ~ .valid-tooltip {
display: block; }
.was-validated .form-control-file:valid ~ .valid-feedback,
.was-validated .form-control-file:valid ~ .valid-tooltip, .form-control-file.is-valid ~ .valid-feedback,
.form-control-file.is-valid ~ .valid-tooltip {
display: block; }
.was-validated .form-check-input:valid ~ .form-check-label, .form-check-input.is-valid ~ .form-check-label {
color: #438243; }
@ -1586,6 +1605,11 @@ select.form-control-lg:not([size]):not([multiple]), .input-group-lg > select.for
.custom-select.is-invalid ~ .invalid-tooltip {
display: block; }
.was-validated .form-control-file:invalid ~ .invalid-feedback,
.was-validated .form-control-file:invalid ~ .invalid-tooltip, .form-control-file.is-invalid ~ .invalid-feedback,
.form-control-file.is-invalid ~ .invalid-tooltip {
display: block; }
.was-validated .form-check-input:invalid ~ .form-check-label, .form-check-input.is-invalid ~ .form-check-label {
color: #d9534f; }
@ -1647,7 +1671,8 @@ select.form-control-lg:not([size]):not([multiple]), .input-group-lg > select.for
vertical-align: middle; }
.form-inline .form-control-plaintext {
display: inline-block; }
.form-inline .input-group {
.form-inline .input-group,
.form-inline .custom-select {
width: auto; }
.form-inline .form-check {
display: flex;
@ -1682,6 +1707,9 @@ select.form-control-lg:not([size]):not([multiple]), .input-group-lg > select.for
line-height: 1.5;
border-radius: 0.25rem;
transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; }
@media screen and (prefers-reduced-motion: reduce) {
.btn {
transition: none; } }
.btn:hover, .btn:focus {
text-decoration: none; }
.btn:focus, .btn.focus {
@ -2080,7 +2108,8 @@ fieldset:disabled a.btn {
border-color: transparent;
box-shadow: none; }
.btn-link:disabled, .btn-link.disabled {
color: #868e96; }
color: #868e96;
pointer-events: none; }
.btn-lg, .btn-group-lg > .btn {
padding: 0.5rem 1rem;
@ -2106,30 +2135,29 @@ input[type="button"].btn-block {
width: 100%; }
.fade {
opacity: 0;
transition: opacity 0.15s linear; }
.fade.show {
opacity: 1; }
@media screen and (prefers-reduced-motion: reduce) {
.fade {
transition: none; } }
.fade:not(.show) {
opacity: 0; }
.collapse {
.collapse:not(.show) {
display: none; }
.collapse.show {
display: block; }
tr.collapse.show {
display: table-row; }
tbody.collapse.show {
display: table-row-group; }
.collapsing {
position: relative;
height: 0;
overflow: hidden;
transition: height 0.35s ease; }
@media screen and (prefers-reduced-motion: reduce) {
.collapsing {
transition: none; } }
.dropup,
.dropdown {
.dropright,
.dropdown,
.dropleft {
position: relative; }
.dropdown-toggle::after {
@ -2166,7 +2194,13 @@ tbody.collapse.show {
border: 1px solid rgba(0, 0, 0, 0.15);
border-radius: 0.25rem; }
.dropdown-menu-right {
right: 0;
left: auto; }
.dropup .dropdown-menu {
top: auto;
bottom: 100%;
margin-top: 0;
margin-bottom: 0.125rem; }
@ -2186,6 +2220,9 @@ tbody.collapse.show {
margin-left: 0; }
.dropright .dropdown-menu {
top: 0;
right: auto;
left: 100%;
margin-top: 0;
margin-left: 0.125rem; }
@ -2197,6 +2234,7 @@ tbody.collapse.show {
vertical-align: 0.255em;
content: "";
border-top: 0.3em solid transparent;
border-right: 0;
border-bottom: 0.3em solid transparent;
border-left: 0.3em solid; }
@ -2207,6 +2245,9 @@ tbody.collapse.show {
vertical-align: 0; }
.dropleft .dropdown-menu {
top: 0;
right: 100%;
left: auto;
margin-top: 0;
margin-right: 0.125rem; }
@ -2238,6 +2279,10 @@ tbody.collapse.show {
.dropleft .dropdown-toggle::before {
vertical-align: 0; }
.dropdown-menu[x-placement^="top"], .dropdown-menu[x-placement^="right"], .dropdown-menu[x-placement^="bottom"], .dropdown-menu[x-placement^="left"] {
right: auto;
bottom: auto; }
.dropdown-divider {
height: 0;
margin: 0.5rem 0;
@ -2278,6 +2323,11 @@ tbody.collapse.show {
color: #868e96;
white-space: nowrap; }
.dropdown-item-text {
display: block;
padding: 0.25rem 1.5rem;
color: #212529; }
.btn-group,
.btn-group-vertical {
position: relative;
@ -2328,8 +2378,12 @@ tbody.collapse.show {
.dropdown-toggle-split {
padding-right: 0.5625rem;
padding-left: 0.5625rem; }
.dropdown-toggle-split::after {
.dropdown-toggle-split::after,
.dropup .dropdown-toggle-split::after,
.dropright .dropdown-toggle-split::after {
margin-left: 0; }
.dropleft .dropdown-toggle-split::before {
margin-right: 0; }
.btn-sm + .dropdown-toggle-split, .btn-group-sm > .btn + .dropdown-toggle-split {
padding-right: 0.375rem;
@ -2411,11 +2465,10 @@ tbody.collapse.show {
display: flex;
align-items: center; }
.input-group > .custom-file:not(:last-child) .custom-file-label,
.input-group > .custom-file:not(:last-child) .custom-file-label::before {
.input-group > .custom-file:not(:last-child) .custom-file-label::after {
border-top-right-radius: 0;
border-bottom-right-radius: 0; }
.input-group > .custom-file:not(:first-child) .custom-file-label,
.input-group > .custom-file:not(:first-child) .custom-file-label::before {
.input-group > .custom-file:not(:first-child) .custom-file-label {
border-top-left-radius: 0;
border-bottom-left-radius: 0; }
@ -2506,11 +2559,12 @@ tbody.collapse.show {
background-color: #e9ecef; }
.custom-control-label {
position: relative;
margin-bottom: 0; }
.custom-control-label::before {
position: absolute;
top: 0.25rem;
left: 0;
left: -1.5rem;
display: block;
width: 1rem;
height: 1rem;
@ -2524,7 +2578,7 @@ tbody.collapse.show {
.custom-control-label::after {
position: absolute;
top: 0.25rem;
left: 0;
left: -1.5rem;
display: block;
width: 1rem;
height: 1rem;
@ -2624,10 +2678,10 @@ tbody.collapse.show {
height: calc(2.25rem + 2px);
margin: 0;
opacity: 0; }
.custom-file-input:focus ~ .custom-file-control {
.custom-file-input:focus ~ .custom-file-label {
border-color: #19b6ff;
box-shadow: 0 0 0 0.2rem rgba(0, 104, 152, 0.25); }
.custom-file-input:focus ~ .custom-file-control::before {
.custom-file-input:focus ~ .custom-file-label::after {
border-color: #19b6ff; }
.custom-file-input:lang(en) ~ .custom-file-label::after {
content: "Browse"; }
@ -2652,7 +2706,7 @@ tbody.collapse.show {
bottom: 0;
z-index: 3;
display: block;
height: calc(calc(2.25rem + 2px) - 1px * 2);
height: 2.25rem;
padding: 0.375rem 0.75rem;
line-height: 1.5;
color: #495057;
@ -2661,6 +2715,88 @@ tbody.collapse.show {
border-left: 1px solid #ced4da;
border-radius: 0 0.25rem 0.25rem 0; }
.custom-range {
width: 100%;
padding-left: 0;
background-color: transparent;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none; }
.custom-range:focus {
outline: none; }
.custom-range::-moz-focus-outer {
border: 0; }
.custom-range::-webkit-slider-thumb {
width: 1rem;
height: 1rem;
margin-top: -0.25rem;
background-color: #006898;
border: 0;
border-radius: 1rem;
-webkit-appearance: none;
appearance: none; }
.custom-range::-webkit-slider-thumb:focus {
outline: none;
box-shadow: 0 0 0 1px #fff, 0 0 0 0.2rem rgba(0, 104, 152, 0.25); }
.custom-range::-webkit-slider-thumb:active {
background-color: #4cc6ff; }
.custom-range::-webkit-slider-runnable-track {
width: 100%;
height: 0.5rem;
color: transparent;
cursor: pointer;
background-color: #dee2e6;
border-color: transparent;
border-radius: 1rem; }
.custom-range::-moz-range-thumb {
width: 1rem;
height: 1rem;
background-color: #006898;
border: 0;
border-radius: 1rem;
-moz-appearance: none;
appearance: none; }
.custom-range::-moz-range-thumb:focus {
outline: none;
box-shadow: 0 0 0 1px #fff, 0 0 0 0.2rem rgba(0, 104, 152, 0.25); }
.custom-range::-moz-range-thumb:active {
background-color: #4cc6ff; }
.custom-range::-moz-range-track {
width: 100%;
height: 0.5rem;
color: transparent;
cursor: pointer;
background-color: #dee2e6;
border-color: transparent;
border-radius: 1rem; }
.custom-range::-ms-thumb {
width: 1rem;
height: 1rem;
background-color: #006898;
border: 0;
border-radius: 1rem;
appearance: none; }
.custom-range::-ms-thumb:focus {
outline: none;
box-shadow: 0 0 0 1px #fff, 0 0 0 0.2rem rgba(0, 104, 152, 0.25); }
.custom-range::-ms-thumb:active {
background-color: #4cc6ff; }
.custom-range::-ms-track {
width: 100%;
height: 0.5rem;
color: transparent;
cursor: pointer;
background-color: transparent;
border-color: transparent;
border-width: 0.5rem; }
.custom-range::-ms-fill-lower {
background-color: #dee2e6;
border-radius: 1rem; }
.custom-range::-ms-fill-upper {
margin-right: 15px;
background-color: #dee2e6;
border-radius: 1rem; }
.nav {
display: flex;
flex-wrap: wrap;
@ -2806,9 +2942,6 @@ tbody.collapse.show {
flex-direction: row; }
.navbar-expand-sm .navbar-nav .dropdown-menu {
position: absolute; }
.navbar-expand-sm .navbar-nav .dropdown-menu-right {
right: 0;
left: auto; }
.navbar-expand-sm .navbar-nav .nav-link {
padding-right: 0.5rem;
padding-left: 0.5rem; }
@ -2819,10 +2952,7 @@ tbody.collapse.show {
display: flex !important;
flex-basis: auto; }
.navbar-expand-sm .navbar-toggler {
display: none; }
.navbar-expand-sm .dropup .dropdown-menu {
top: auto;
bottom: 100%; } }
display: none; } }
@media (max-width: 767.98px) {
.navbar-expand-md > .container,
@ -2838,9 +2968,6 @@ tbody.collapse.show {
flex-direction: row; }
.navbar-expand-md .navbar-nav .dropdown-menu {
position: absolute; }
.navbar-expand-md .navbar-nav .dropdown-menu-right {
right: 0;
left: auto; }
.navbar-expand-md .navbar-nav .nav-link {
padding-right: 0.5rem;
padding-left: 0.5rem; }
@ -2851,10 +2978,7 @@ tbody.collapse.show {
display: flex !important;
flex-basis: auto; }
.navbar-expand-md .navbar-toggler {
display: none; }
.navbar-expand-md .dropup .dropdown-menu {
top: auto;
bottom: 100%; } }
display: none; } }
@media (max-width: 991.98px) {
.navbar-expand-lg > .container,
@ -2870,9 +2994,6 @@ tbody.collapse.show {
flex-direction: row; }
.navbar-expand-lg .navbar-nav .dropdown-menu {
position: absolute; }
.navbar-expand-lg .navbar-nav .dropdown-menu-right {
right: 0;
left: auto; }
.navbar-expand-lg .navbar-nav .nav-link {
padding-right: 0.5rem;
padding-left: 0.5rem; }
@ -2883,10 +3004,7 @@ tbody.collapse.show {
display: flex !important;
flex-basis: auto; }
.navbar-expand-lg .navbar-toggler {
display: none; }
.navbar-expand-lg .dropup .dropdown-menu {
top: auto;
bottom: 100%; } }
display: none; } }
@media (max-width: 1199.98px) {
.navbar-expand-xl > .container,
@ -2902,9 +3020,6 @@ tbody.collapse.show {
flex-direction: row; }
.navbar-expand-xl .navbar-nav .dropdown-menu {
position: absolute; }
.navbar-expand-xl .navbar-nav .dropdown-menu-right {
right: 0;
left: auto; }
.navbar-expand-xl .navbar-nav .nav-link {
padding-right: 0.5rem;
padding-left: 0.5rem; }
@ -2915,10 +3030,7 @@ tbody.collapse.show {
display: flex !important;
flex-basis: auto; }
.navbar-expand-xl .navbar-toggler {
display: none; }
.navbar-expand-xl .dropup .dropdown-menu {
top: auto;
bottom: 100%; } }
display: none; } }
.navbar-expand {
flex-flow: row nowrap;
@ -2931,9 +3043,6 @@ tbody.collapse.show {
flex-direction: row; }
.navbar-expand .navbar-nav .dropdown-menu {
position: absolute; }
.navbar-expand .navbar-nav .dropdown-menu-right {
right: 0;
left: auto; }
.navbar-expand .navbar-nav .nav-link {
padding-right: 0.5rem;
padding-left: 0.5rem; }
@ -2945,9 +3054,6 @@ tbody.collapse.show {
flex-basis: auto; }
.navbar-expand .navbar-toggler {
display: none; }
.navbar-expand .dropup .dropdown-menu {
top: auto;
bottom: 100%; }
.navbar-light .navbar-brand {
color: rgba(0, 0, 0, 0.9); }
@ -3178,11 +3284,29 @@ tbody.collapse.show {
-webkit-column-count: 3;
column-count: 3;
-webkit-column-gap: 1.25rem;
column-gap: 1.25rem; }
column-gap: 1.25rem;
orphans: 1;
widows: 1; }
.card-columns .card {
display: inline-block;
width: 100%; } }
.accordion .card:not(:first-of-type):not(:last-of-type) {
border-bottom: 0;
border-radius: 0; }
.accordion .card:not(:first-of-type) .card-header:first-child {
border-radius: 0; }
.accordion .card:first-of-type {
border-bottom: 0;
border-bottom-right-radius: 0;
border-bottom-left-radius: 0; }
.accordion .card:last-of-type {
border-top-left-radius: 0;
border-top-right-radius: 0; }
.breadcrumb {
display: flex;
flex-wrap: wrap;
@ -3192,12 +3316,13 @@ tbody.collapse.show {
background-color: #e9ecef;
border-radius: 0.25rem; }
.breadcrumb-item + .breadcrumb-item::before {
display: inline-block;
padding-right: 0.5rem;
padding-left: 0.5rem;
color: #868e96;
content: "/"; }
.breadcrumb-item + .breadcrumb-item {
padding-left: 0.5rem; }
.breadcrumb-item + .breadcrumb-item::before {
display: inline-block;
padding-right: 0.5rem;
color: #868e96;
content: "/"; }
.breadcrumb-item + .breadcrumb-item:hover::before {
text-decoration: underline; }
@ -3224,6 +3349,7 @@ tbody.collapse.show {
background-color: #fff;
border: 1px solid #dee2e6; }
.page-link:hover {
z-index: 2;
color: #00344c;
text-decoration: none;
background-color: #e9ecef;
@ -3503,8 +3629,12 @@ tbody.collapse.show {
justify-content: center;
color: #fff;
text-align: center;
white-space: nowrap;
background-color: #006898;
transition: width 0.6s ease; }
@media screen and (prefers-reduced-motion: reduce) {
.progress-bar {
transition: none; } }
.progress-bar-striped {
background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
@ -3713,6 +3843,9 @@ button.close {
transition: transform 0.3s ease-out, -webkit-transform 0.3s ease-out;
-webkit-transform: translate(0, -25%);
transform: translate(0, -25%); }
@media screen and (prefers-reduced-motion: reduce) {
.modal.fade .modal-dialog {
transition: none; } }
.modal.show .modal-dialog {
-webkit-transform: translate(0, 0);
transform: translate(0, 0); }
@ -3927,12 +4060,15 @@ button.close {
.bs-popover-top .arrow, .bs-popover-auto[x-placement^="top"] .arrow {
bottom: calc((0.5rem + 1px) * -1); }
.bs-popover-top .arrow::before, .bs-popover-auto[x-placement^="top"] .arrow::before,
.bs-popover-top .arrow::after, .bs-popover-auto[x-placement^="top"] .arrow::after {
.bs-popover-top .arrow::after,
.bs-popover-auto[x-placement^="top"] .arrow::after {
border-width: 0.5rem 0.5rem 0; }
.bs-popover-top .arrow::before, .bs-popover-auto[x-placement^="top"] .arrow::before {
bottom: 0;
border-top-color: rgba(0, 0, 0, 0.25); }
.bs-popover-top .arrow::after, .bs-popover-auto[x-placement^="top"] .arrow::after {
.bs-popover-top .arrow::after,
.bs-popover-auto[x-placement^="top"] .arrow::after {
bottom: 1px;
border-top-color: #fff; }
@ -3944,12 +4080,15 @@ button.close {
height: 1rem;
margin: 0.3rem 0; }
.bs-popover-right .arrow::before, .bs-popover-auto[x-placement^="right"] .arrow::before,
.bs-popover-right .arrow::after, .bs-popover-auto[x-placement^="right"] .arrow::after {
.bs-popover-right .arrow::after,
.bs-popover-auto[x-placement^="right"] .arrow::after {
border-width: 0.5rem 0.5rem 0.5rem 0; }
.bs-popover-right .arrow::before, .bs-popover-auto[x-placement^="right"] .arrow::before {
left: 0;
border-right-color: rgba(0, 0, 0, 0.25); }
.bs-popover-right .arrow::after, .bs-popover-auto[x-placement^="right"] .arrow::after {
.bs-popover-right .arrow::after,
.bs-popover-auto[x-placement^="right"] .arrow::after {
left: 1px;
border-right-color: #fff; }
@ -3958,12 +4097,15 @@ button.close {
.bs-popover-bottom .arrow, .bs-popover-auto[x-placement^="bottom"] .arrow {
top: calc((0.5rem + 1px) * -1); }
.bs-popover-bottom .arrow::before, .bs-popover-auto[x-placement^="bottom"] .arrow::before,
.bs-popover-bottom .arrow::after, .bs-popover-auto[x-placement^="bottom"] .arrow::after {
.bs-popover-bottom .arrow::after,
.bs-popover-auto[x-placement^="bottom"] .arrow::after {
border-width: 0 0.5rem 0.5rem 0.5rem; }
.bs-popover-bottom .arrow::before, .bs-popover-auto[x-placement^="bottom"] .arrow::before {
top: 0;
border-bottom-color: rgba(0, 0, 0, 0.25); }
.bs-popover-bottom .arrow::after, .bs-popover-auto[x-placement^="bottom"] .arrow::after {
.bs-popover-bottom .arrow::after,
.bs-popover-auto[x-placement^="bottom"] .arrow::after {
top: 1px;
border-bottom-color: #fff; }
.bs-popover-bottom .popover-header::before, .bs-popover-auto[x-placement^="bottom"] .popover-header::before {
@ -3984,12 +4126,15 @@ button.close {
height: 1rem;
margin: 0.3rem 0; }
.bs-popover-left .arrow::before, .bs-popover-auto[x-placement^="left"] .arrow::before,
.bs-popover-left .arrow::after, .bs-popover-auto[x-placement^="left"] .arrow::after {
.bs-popover-left .arrow::after,
.bs-popover-auto[x-placement^="left"] .arrow::after {
border-width: 0.5rem 0 0.5rem 0.5rem; }
.bs-popover-left .arrow::before, .bs-popover-auto[x-placement^="left"] .arrow::before {
right: 0;
border-left-color: rgba(0, 0, 0, 0.25); }
.bs-popover-left .arrow::after, .bs-popover-auto[x-placement^="left"] .arrow::after {
.bs-popover-left .arrow::after,
.bs-popover-auto[x-placement^="left"] .arrow::after {
right: 1px;
border-left-color: #fff; }
@ -4029,6 +4174,9 @@ button.close {
backface-visibility: hidden;
-webkit-perspective: 1000px;
perspective: 1000px; }
@media screen and (prefers-reduced-motion: reduce) {
.carousel-item {
transition: none; } }
.carousel-item.active,
.carousel-item-next,
@ -4070,6 +4218,36 @@ button.close {
-webkit-transform: translate3d(-100%, 0, 0);
transform: translate3d(-100%, 0, 0); } }
.carousel-fade .carousel-item {
opacity: 0;
transition-duration: .6s;
transition-property: opacity; }
.carousel-fade .carousel-item.active,
.carousel-fade .carousel-item-next.carousel-item-left,
.carousel-fade .carousel-item-prev.carousel-item-right {
opacity: 1; }
.carousel-fade .active.carousel-item-left,
.carousel-fade .active.carousel-item-right {
opacity: 0; }
.carousel-fade .carousel-item-next,
.carousel-fade .carousel-item-prev,
.carousel-fade .carousel-item.active,
.carousel-fade .active.carousel-item-left,
.carousel-fade .active.carousel-item-prev {
-webkit-transform: translateX(0);
transform: translateX(0); }
@supports ((-webkit-transform-style: preserve-3d) or (transform-style: preserve-3d)) {
.carousel-fade .carousel-item-next,
.carousel-fade .carousel-item-prev,
.carousel-fade .carousel-item.active,
.carousel-fade .active.carousel-item-left,
.carousel-fade .active.carousel-item-prev {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0); } }
.carousel-control-prev,
.carousel-control-next {
position: absolute;
@ -4130,6 +4308,7 @@ button.close {
margin-right: 3px;
margin-left: 3px;
text-indent: -999px;
cursor: pointer;
background-color: rgba(255, 255, 255, 0.5); }
.carousel-indicators li::before {
position: absolute;
@ -4518,6 +4697,21 @@ button.bg-dark:focus {
.flex-wrap-reverse {
flex-wrap: wrap-reverse !important; }
.flex-fill {
flex: 1 1 auto !important; }
.flex-grow-0 {
flex-grow: 0 !important; }
.flex-grow-1 {
flex-grow: 1 !important; }
.flex-shrink-0 {
flex-shrink: 0 !important; }
.flex-shrink-1 {
flex-shrink: 1 !important; }
.justify-content-start {
justify-content: flex-start !important; }
@ -4599,6 +4793,16 @@ button.bg-dark:focus {
flex-wrap: nowrap !important; }
.flex-sm-wrap-reverse {
flex-wrap: wrap-reverse !important; }
.flex-sm-fill {
flex: 1 1 auto !important; }
.flex-sm-grow-0 {
flex-grow: 0 !important; }
.flex-sm-grow-1 {
flex-grow: 1 !important; }
.flex-sm-shrink-0 {
flex-shrink: 0 !important; }
.flex-sm-shrink-1 {
flex-shrink: 1 !important; }
.justify-content-sm-start {
justify-content: flex-start !important; }
.justify-content-sm-end {
@ -4659,6 +4863,16 @@ button.bg-dark:focus {
flex-wrap: nowrap !important; }
.flex-md-wrap-reverse {
flex-wrap: wrap-reverse !important; }
.flex-md-fill {
flex: 1 1 auto !important; }
.flex-md-grow-0 {
flex-grow: 0 !important; }
.flex-md-grow-1 {
flex-grow: 1 !important; }
.flex-md-shrink-0 {
flex-shrink: 0 !important; }
.flex-md-shrink-1 {
flex-shrink: 1 !important; }
.justify-content-md-start {
justify-content: flex-start !important; }
.justify-content-md-end {
@ -4719,6 +4933,16 @@ button.bg-dark:focus {
flex-wrap: nowrap !important; }
.flex-lg-wrap-reverse {
flex-wrap: wrap-reverse !important; }
.flex-lg-fill {
flex: 1 1 auto !important; }
.flex-lg-grow-0 {
flex-grow: 0 !important; }
.flex-lg-grow-1 {
flex-grow: 1 !important; }
.flex-lg-shrink-0 {
flex-shrink: 0 !important; }
.flex-lg-shrink-1 {
flex-shrink: 1 !important; }
.justify-content-lg-start {
justify-content: flex-start !important; }
.justify-content-lg-end {
@ -4779,6 +5003,16 @@ button.bg-dark:focus {
flex-wrap: nowrap !important; }
.flex-xl-wrap-reverse {
flex-wrap: wrap-reverse !important; }
.flex-xl-fill {
flex: 1 1 auto !important; }
.flex-xl-grow-0 {
flex-grow: 0 !important; }
.flex-xl-grow-1 {
flex-grow: 1 !important; }
.flex-xl-shrink-0 {
flex-shrink: 0 !important; }
.flex-xl-shrink-1 {
flex-shrink: 1 !important; }
.justify-content-xl-start {
justify-content: flex-start !important; }
.justify-content-xl-end {
@ -4910,8 +5144,6 @@ button.bg-dark:focus {
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
-webkit-clip-path: inset(50%);
clip-path: inset(50%);
border: 0; }
.sr-only-focusable:active, .sr-only-focusable:focus {
@ -4920,9 +5152,19 @@ button.bg-dark:focus {
height: auto;
overflow: visible;
clip: auto;
white-space: normal;
-webkit-clip-path: none;
clip-path: none; }
white-space: normal; }
.shadow-sm {
box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important; }
.shadow {
box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important; }
.shadow-lg {
box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175) !important; }
.shadow-none {
box-shadow: none !important; }
.w-25 {
width: 25% !important; }
@ -4936,6 +5178,9 @@ button.bg-dark:focus {
.w-100 {
width: 100% !important; }
.w-auto {
width: auto !important; }
.h-25 {
height: 25% !important; }
@ -4948,6 +5193,9 @@ button.bg-dark:focus {
.h-100 {
height: 100% !important; }
.h-auto {
height: auto !important; }
.mw-100 {
max-width: 100% !important; }
@ -5937,6 +6185,9 @@ button.bg-dark:focus {
.mx-xl-auto {
margin-left: auto !important; } }
.text-monospace {
font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }
.text-justify {
text-align: justify !important; }
@ -6061,9 +6312,18 @@ a.text-light:hover, a.text-light:focus {
a.text-dark:hover, a.text-dark:focus {
color: #1d2124 !important; }
.text-body {
color: #212529 !important; }
.text-muted {
color: #868e96 !important; }
.text-black-50 {
color: rgba(0, 0, 0, 0.5) !important; }
.text-white-50 {
color: rgba(255, 255, 255, 0.5) !important; }
.text-hide {
font: 0/0 a;
color: transparent;

File diff suppressed because one or more lines are too long

View File

@ -2364,8 +2364,8 @@
clip: auto; }
/* IcoMoon Conversion */
[class^="icon-"],
[class*=" icon-"] {
[class^="icon-"]:not(.input-group-text),
[class*=" icon-"]:not(.input-group-text) {
display: inline-block;
width: 14px;
height: 14px;

File diff suppressed because one or more lines are too long

View File

@ -50,11 +50,12 @@
background-color: #e9ecef; }
.custom-control-label {
position: relative;
margin-bottom: 0; }
.custom-control-label::before {
position: absolute;
top: 0.25rem;
left: 0;
left: -1.5rem;
display: block;
width: 1rem;
height: 1rem;
@ -68,7 +69,7 @@
.custom-control-label::after {
position: absolute;
top: 0.25rem;
left: 0;
left: -1.5rem;
display: block;
width: 1rem;
height: 1rem;
@ -168,10 +169,10 @@
height: calc(2.25rem + 2px);
margin: 0;
opacity: 0; }
.custom-file-input:focus ~ .custom-file-control {
.custom-file-input:focus ~ .custom-file-label {
border-color: #19b6ff;
box-shadow: 0 0 0 0.2rem rgba(0, 104, 152, 0.25); }
.custom-file-input:focus ~ .custom-file-control::before {
.custom-file-input:focus ~ .custom-file-label::after {
border-color: #19b6ff; }
.custom-file-input:lang(en) ~ .custom-file-label::after {
content: "Browse"; }
@ -196,7 +197,7 @@
bottom: 0;
z-index: 3;
display: block;
height: calc(calc(2.25rem + 2px) - 1px * 2);
height: 2.25rem;
padding: 0.375rem 0.75rem;
line-height: 1.5;
color: #495057;
@ -205,6 +206,88 @@
border-left: 1px solid #ced4da;
border-radius: 0 0.25rem 0.25rem 0; }
.custom-range {
width: 100%;
padding-left: 0;
background-color: transparent;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none; }
.custom-range:focus {
outline: none; }
.custom-range::-moz-focus-outer {
border: 0; }
.custom-range::-webkit-slider-thumb {
width: 1rem;
height: 1rem;
margin-top: -0.25rem;
background-color: #006898;
border: 0;
border-radius: 1rem;
-webkit-appearance: none;
appearance: none; }
.custom-range::-webkit-slider-thumb:focus {
outline: none;
box-shadow: 0 0 0 1px #fff, 0 0 0 0.2rem rgba(0, 104, 152, 0.25); }
.custom-range::-webkit-slider-thumb:active {
background-color: #4cc6ff; }
.custom-range::-webkit-slider-runnable-track {
width: 100%;
height: 0.5rem;
color: transparent;
cursor: pointer;
background-color: #dee2e6;
border-color: transparent;
border-radius: 1rem; }
.custom-range::-moz-range-thumb {
width: 1rem;
height: 1rem;
background-color: #006898;
border: 0;
border-radius: 1rem;
-moz-appearance: none;
appearance: none; }
.custom-range::-moz-range-thumb:focus {
outline: none;
box-shadow: 0 0 0 1px #fff, 0 0 0 0.2rem rgba(0, 104, 152, 0.25); }
.custom-range::-moz-range-thumb:active {
background-color: #4cc6ff; }
.custom-range::-moz-range-track {
width: 100%;
height: 0.5rem;
color: transparent;
cursor: pointer;
background-color: #dee2e6;
border-color: transparent;
border-radius: 1rem; }
.custom-range::-ms-thumb {
width: 1rem;
height: 1rem;
background-color: #006898;
border: 0;
border-radius: 1rem;
appearance: none; }
.custom-range::-ms-thumb:focus {
outline: none;
box-shadow: 0 0 0 1px #fff, 0 0 0 0.2rem rgba(0, 104, 152, 0.25); }
.custom-range::-ms-thumb:active {
background-color: #4cc6ff; }
.custom-range::-ms-track {
width: 100%;
height: 0.5rem;
color: transparent;
cursor: pointer;
background-color: transparent;
border-color: transparent;
border-width: 0.5rem; }
.custom-range::-ms-fill-lower {
background-color: #dee2e6;
border-radius: 1rem; }
.custom-range::-ms-fill-upper {
margin-right: 15px;
background-color: #dee2e6;
border-radius: 1rem; }
/* Bootstrap alert mapping */
.alert-message {
background-color: #438243;
@ -382,6 +465,9 @@ legend {
.form-control-feedback {
display: block; }
[aria-grabbed="true"] {
box-shadow: 0 0 2px 1px #006898; }
.header {
position: relative;
z-index: 5;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -50,11 +50,12 @@
background-color: #e9ecef; }
.custom-control-label {
position: relative;
margin-bottom: 0; }
.custom-control-label::before {
position: absolute;
top: 0.25rem;
left: 0;
left: -1.5rem;
display: block;
width: 1rem;
height: 1rem;
@ -68,7 +69,7 @@
.custom-control-label::after {
position: absolute;
top: 0.25rem;
left: 0;
left: -1.5rem;
display: block;
width: 1rem;
height: 1rem;
@ -168,10 +169,10 @@
height: calc(2.25rem + 2px);
margin: 0;
opacity: 0; }
.custom-file-input:focus ~ .custom-file-control {
.custom-file-input:focus ~ .custom-file-label {
border-color: #19b6ff;
box-shadow: 0 0 0 0.2rem rgba(0, 104, 152, 0.25); }
.custom-file-input:focus ~ .custom-file-control::before {
.custom-file-input:focus ~ .custom-file-label::after {
border-color: #19b6ff; }
.custom-file-input:lang(en) ~ .custom-file-label::after {
content: "Browse"; }
@ -196,7 +197,7 @@
bottom: 0;
z-index: 3;
display: block;
height: calc(calc(2.25rem + 2px) - 1px * 2);
height: 2.25rem;
padding: 0.375rem 0.75rem;
line-height: 1.5;
color: #495057;
@ -205,6 +206,88 @@
border-left: 1px solid #ced4da;
border-radius: 0 0.25rem 0.25rem 0; }
.custom-range {
width: 100%;
padding-left: 0;
background-color: transparent;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none; }
.custom-range:focus {
outline: none; }
.custom-range::-moz-focus-outer {
border: 0; }
.custom-range::-webkit-slider-thumb {
width: 1rem;
height: 1rem;
margin-top: -0.25rem;
background-color: #006898;
border: 0;
border-radius: 1rem;
-webkit-appearance: none;
appearance: none; }
.custom-range::-webkit-slider-thumb:focus {
outline: none;
box-shadow: 0 0 0 1px #fff, 0 0 0 0.2rem rgba(0, 104, 152, 0.25); }
.custom-range::-webkit-slider-thumb:active {
background-color: #4cc6ff; }
.custom-range::-webkit-slider-runnable-track {
width: 100%;
height: 0.5rem;
color: transparent;
cursor: pointer;
background-color: #dee2e6;
border-color: transparent;
border-radius: 1rem; }
.custom-range::-moz-range-thumb {
width: 1rem;
height: 1rem;
background-color: #006898;
border: 0;
border-radius: 1rem;
-moz-appearance: none;
appearance: none; }
.custom-range::-moz-range-thumb:focus {
outline: none;
box-shadow: 0 0 0 1px #fff, 0 0 0 0.2rem rgba(0, 104, 152, 0.25); }
.custom-range::-moz-range-thumb:active {
background-color: #4cc6ff; }
.custom-range::-moz-range-track {
width: 100%;
height: 0.5rem;
color: transparent;
cursor: pointer;
background-color: #dee2e6;
border-color: transparent;
border-radius: 1rem; }
.custom-range::-ms-thumb {
width: 1rem;
height: 1rem;
background-color: #006898;
border: 0;
border-radius: 1rem;
appearance: none; }
.custom-range::-ms-thumb:focus {
outline: none;
box-shadow: 0 0 0 1px #fff, 0 0 0 0.2rem rgba(0, 104, 152, 0.25); }
.custom-range::-ms-thumb:active {
background-color: #4cc6ff; }
.custom-range::-ms-track {
width: 100%;
height: 0.5rem;
color: transparent;
cursor: pointer;
background-color: transparent;
border-color: transparent;
border-width: 0.5rem; }
.custom-range::-ms-fill-lower {
background-color: #dee2e6;
border-radius: 1rem; }
.custom-range::-ms-fill-upper {
margin-right: 15px;
background-color: #dee2e6;
border-radius: 1rem; }
/* Bootstrap alert mapping */
.alert-message {
background-color: #438243;
@ -382,6 +465,9 @@ legend {
.form-control-feedback {
display: block; }
[aria-grabbed="true"] {
box-shadow: 0 0 2px 1px #006898; }
.header {
position: relative;
z-index: 5;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -109,3 +109,7 @@ legend {
.form-control-feedback {
display: block;
}
[aria-grabbed="true"] {
box-shadow: 0 0 2px 1px theme-color("primary");
}

View File

@ -1,3 +1,14 @@
/**
* Command line helper
*
* For maintainers, please run:
* node build.js --installer
* node build.js --update
* node build.js --compilejs
* node build.js --compilecss
* Before making any PRs or building any package!
*
*/
const Program = require('commander');
const Chalk = require('chalk');
@ -24,7 +35,7 @@ Program
.option('--installer', 'Creates the language file for installer error page')
.on('--help', () => {
console.log(Chalk.cyan('\n Version %s\n'), options.version);
process.exit(1);
process.exit(0);
})
.parse(process.argv);
@ -41,7 +52,7 @@ if (Program.update) {
.then(update.update(options))
// Exit with success
.then(() => process.exit(1))
.then(() => process.exit(0))
// Handle errors
.catch((err) => {

View File

@ -38,7 +38,7 @@ uglifyJs = (options, path) => {
Recurs(folder, ['*.min.js', '*.map', '*.css', '*.svg', '*.png', '*.swf']).then(
(files) => {
files.forEach((file) => {
if (file.match(/.js/)) {
if (file.match(/.js/) && !file.toLowerCase().match(/license/)) {
// Write the file
fs.writeFileSync(file.replace('.js', '.min.js'), UglifyJS.minify(fs.readFileSync(file, "utf8")).code, {encoding: "utf8"});
}

View File

@ -85,7 +85,7 @@ compileFiles = (options, path) => {
Recurs(folder, ['*.min.css', '*.map', '*.js', '*.scss', '*.svg', '*.png', '*.swf']).then(
(files) => {
files.forEach((file) => {
if (file.match(/.css/)) {
if (file.match(/.css/) && !file.toLowerCase().match(/license/)) {
// Write the file
fs.writeFileSync(file.replace('.css', '.min.css'), UglyCss.processFiles([file], {expandVars: false }), {encoding: "utf8"});
}

View File

@ -57,23 +57,34 @@ class StubGenerator extends CliApplication
*/
public function doExecute()
{
// Get the aliased class names via Reflection as the property is protected
$refl = new ReflectionClass('JLoader');
$property = $refl->getProperty('classAliases');
$property->setAccessible(true);
$aliases = $property->getValue();
$file = "<?php\n";
// Loop the aliases to generate the stubs data
foreach ($aliases as $oldName => $newName)
foreach (JLoader::getDeprecatedAliases() as $alias)
{
$oldName = $alias['old'];
$newName = $alias['new'];
$deprecatedVersion = $alias['version'];
// Figure out if the alias is for a class or interface
$reflection = new ReflectionClass($newName);
$type = $reflection->isInterface() ? 'interface' : 'class';
$modifier = ($reflection->isAbstract() && !$reflection->isInterface()) ? 'abstract ' : '';
$type = $reflection->isInterface() ? 'interface' : 'class';
$modifier = (!$reflection->isInterface() && $reflection->isFinal()) ? 'final ' : '';
$modifier = ($reflection->isAbstract() && !$reflection->isInterface()) ? $modifier . 'abstract ' : $modifier;
$file .= "$modifier$type $oldName extends $newName {}\n";
// If a deprecated version is available, write a stub class doc block with a deprecated tag
if ($deprecatedVersion !== false)
{
$file .= <<<PHP
/**
* @deprecated $deprecatedVersion Use $newName instead.
*/
PHP;
}
$file .= "$modifier$type $oldName extends $newName {}\n\n";
}
// And save the file locally

View File

@ -0,0 +1,2 @@
apc.enabled=true
apc.enable_cli=true

View File

@ -0,0 +1,594 @@
/**
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
;(function(customElements){
"use strict";
const KEYCODE = {
SPACE: 32,
ESC: 27,
ENTER: 13
};
// Find matchesFn with vendor prefix
let matchesFn = 'matches';
['matches', 'msMatchesSelector'].some(function(fn) {
if (typeof document.body[fn] === 'function') {
matchesFn = fn;
return true;
}
return false;
});
class JoomlaFieldSubform extends HTMLElement {
// Attribute getters
get buttonAdd() { return this.getAttribute('button-add'); }
get buttonRemove() { return this.getAttribute('button-remove'); }
get buttonMove() { return this.getAttribute('button-move'); }
get rowsContainer() { return this.getAttribute('rows-container'); }
get repeatableElement() { return this.getAttribute('repeatable-element'); }
get minimum() { return this.getAttribute('minimum'); }
get maximum() { return this.getAttribute('maximum'); }
get name() { return this.getAttribute('name'); }
set name(value) {
// Update the template
this.template = this.template.replace(new RegExp(' name="' + this.name.replace(/[\[\]]/g, '\\$&'), 'g'), ' name="' + value);
return this.setAttribute('name', value);
}
constructor() {
super();
let that = this;
// Get the rows container
this.containerWithRows = this;
if (this.rowsContainer) {
let allContainers = this.querySelectorAll(this.rowsContainer);
// Find closest, and exclude nested
for (let i = 0, l = allContainers.length; i < l; i++) {
if (closest(allContainers[i], 'joomla-field-subform') === this) {
this.containerWithRows = allContainers[i];
break;
}
}
}
// Last row number, help to avoid the name duplications
this.lastRowNum = this.getRows().length;
// Template for the repeating group
this.template = '';
// Prepare a row template, and find available field names
this.prepareTemplate();
// Bind buttons
if (this.buttonAdd || this.buttonRemove) {
this.addEventListener('click', function(event) {
let btnAdd = null, btnRem = null;
if (that.buttonAdd) {
btnAdd = event.target[matchesFn](that.buttonAdd) ? event.target : closest(event.target, that.buttonAdd);
}
if (that.buttonRemove) {
btnRem = event.target[matchesFn](that.buttonRemove) ? event.target : closest(event.target, that.buttonRemove);
}
// Check actine, with extra check for nested joomla-field-subform
if (btnAdd && closest(btnAdd, 'joomla-field-subform') === that) {
let row = closest(btnAdd, that.repeatableElement);
row = closest(row, 'joomla-field-subform') === that ? row : null;
that.addRow(row);
event.preventDefault();
} else if (btnRem && closest(btnRem, 'joomla-field-subform') === that) {
let row = closest(btnRem, that.repeatableElement);
that.removeRow(row);
event.preventDefault();
}
});
this.addEventListener('keydown', function(event) {
if (event.keyCode !== KEYCODE.SPACE) return;
let isAdd = that.buttonAdd && event.target[matchesFn](that.buttonAdd);
let isRem = that.buttonRemove && event.target[matchesFn](that.buttonRemove);
if ((isAdd || isRem) && closest(event.target, 'joomla-field-subform') === that) {
let row = closest(event.target, that.repeatableElement);
row = closest(row, 'joomla-field-subform') === that ? row : null;
if (isRem && row) {
that.removeRow(row);
} else if (isAdd) {
that.addRow(row)
}
event.preventDefault();
}
});
}
// Sorting
if (this.buttonMove) {
this.setUpDragSort();
}
}
/**
* Search for existing rows
* @returns {HTMLElement[]}
*/
getRows () {
let rows = this.containerWithRows.children,
matchesFn = document.body['msMatchesSelector'] ? 'msMatchesSelector' : 'matches',
result = [];
// Filter out the rows
for (let i = 0, l = rows.length; i < l; i++) {
if (rows[i][matchesFn](this.repeatableElement)) {
result.push(rows[i]);
}
}
return result;
}
/**
* Prepare a row template
*/
prepareTemplate () {
let tmplElement = [].slice.call(this.children).filter(function(el){
return el.classList.contains('subform-repeatable-template-section');
});
if (tmplElement[0]) {
this.template = tmplElement[0].innerHTML;
}
if (!this.template) {
throw new Error('The row template are required to subform element to work')
}
}
/**
* Add new row
* @param {HTMLElement} after
* @returns {HTMLElement}
*/
addRow (after) {
// Count how much we already have
const count = this.getRows().length;
if (count >= this.maximum){
return null;
}
// Make a new row from the template
let tmpEl;
if (this.containerWithRows.nodeName === 'TBODY' || this.containerWithRows.nodeName === 'TABLE') {
tmpEl = document.createElement('tbody');
} else {
tmpEl = document.createElement('div');
}
tmpEl.innerHTML = this.template;
let row = tmpEl.children[0];
// Add to container
if (after) {
after.parentNode.insertBefore(row, after.nextSibling);
} else {
this.containerWithRows.append(row);
}
// Add dragable attributes
if (this.buttonMove) {
row.setAttribute('draggable', 'false');
row.setAttribute('aria-grabbed', 'false');
row.setAttribute('tabindex', '0');
}
// Marker that it is new
row.setAttribute('data-new', '1');
// Fix names and ids, and reset values
this.fixUniqueAttributes(row, count);
// Tell about the new row
this.dispatchEvent(new CustomEvent('subform-row-add', {
detail: {row: row},
bubbles: true
}));
if (window.Joomla) {
Joomla.Event.dispatch(row, 'joomla:updated');
}
return row;
}
/**
* Remove the row
* @param {HTMLElement} row
*/
removeRow (row) {
// Count how much we have
const count = this.getRows().length;
if (count <= this.minimum){
return;
}
// Tell about the row will be removed
this.dispatchEvent(new CustomEvent('subform-row-remove', {
detail: {row: row},
bubbles: true
}));
if (window.Joomla) {
Joomla.Event.dispatch(row, 'joomla:removed');
}
row.parentNode.removeChild(row);
}
/**
* Fix names ind id`s for field that in the row
* @param {HTMLElement} row
* @param {Number} count
*/
fixUniqueAttributes(row, count) {
this.lastRowNum++;
count = count || 0;
let group = row.getAttribute('data-group'), // current group name
basename = row.getAttribute('data-base-name'), // group base name, without count
countnew = Math.max(this.lastRowNum, count + 1),
groupnew = basename + countnew; // new group name
this.lastRowNum = countnew;
row.setAttribute('data-group', groupnew);
// Fix inputs that have a "name" attribute
let haveName = row.querySelectorAll('[name]'),
ids = {}; // Collect id for fix checkboxes and radio
// Filter out nested
haveName = [].slice.call(haveName).filter(el => {
return closest(el, 'joomla-field-subform') === this;
});
for (let i = 0, l = haveName.length; i < l; i++) {
let $el = haveName[i],
name = $el.getAttribute('name'),
id = name.replace(/(\[\]$)/g, '').replace(/(\]\[)/g, '__').replace(/\[/g, '_').replace(/\]/g, ''), // id from name
nameNew = name.replace('[' + group + '][', '['+ groupnew +']['), // New name
idNew = id.replace(group, groupnew), // Count new id
countMulti = 0, // count for multiple radio/checkboxes
forOldAttr = id; // Fix "for" in the labels
if ($el.type === 'checkbox' && name.match(/\[\]$/)) { // <input type="checkbox" name="name[]"> fix
// Recount id
countMulti = ids[id] ? ids[id].length : 0;
if (!countMulti) {
// Set the id for fieldset and group label
let fieldset = closest($el, 'fieldset.checkboxes'),
elLbl = row.querySelector('label[for="' + id + '"]');
if (fieldset) {
fieldset.setAttribute('id', idNew);
}
if (elLbl) {
elLbl.setAttribute('for', idNew);
elLbl.setAttribute('id', idNew + '-lbl');
}
}
forOldAttr = forOldAttr + countMulti;
idNew = idNew + countMulti;
}
else if ($el.type === 'radio') { // <input type="radio"> fix
// Recount id
countMulti = ids[id] ? ids[id].length : 0;
if (!countMulti) {
// Set the id for fieldset and group label
let fieldset = closest($el, 'fieldset.radio'),
elLbl = row.querySelector('label[for="' + id + '"]');
if (fieldset) {
fieldset.setAttribute('id', idNew);
}
if (elLbl) {
elLbl.setAttribute('for', idNew);
elLbl.setAttribute('id', idNew + '-lbl');
}
}
forOldAttr = forOldAttr + countMulti;
idNew = idNew + countMulti;
}
// Cache already used id
if (ids[id]) {
ids[id].push(true);
} else {
ids[id] = [true];
}
// Replace the name to new one
$el.name = nameNew;
if ($el.id) {
$el.id = idNew;
}
// Guess there a label for this input
let lbl = row.querySelector('label[for="' + forOldAttr + '"]');
if (lbl) {
lbl.setAttribute('for', idNew);
lbl.setAttribute('id', idNew + '-lbl');
}
}
}
/**
* Use of HTML Drag and Drop API
* https://developer.mozilla.org/en-US/docs/Web/API/HTML_Drag_and_Drop_API
* https://www.sitepoint.com/accessible-drag-drop/
*/
setUpDragSort() {
let that = this; // Self reference
let item = null; // Storing the selected item
let touched = false; // We have a touch events
// Find all existing rows and add dragable attributes
let rows = this.getRows();
for (let ir = 0, lr = rows.length; ir < lr; ir++) {
let childRow = rows[ir];
childRow.setAttribute('draggable', 'false');
childRow.setAttribute('aria-grabbed', 'false');
childRow.setAttribute('tabindex', '0');
}
// Helper method to test whether Handler was clicked
function getMoveHandler(element) {
return !element.form // This need to test whether the element is :input
&& element[matchesFn](that.buttonMove) ? element : closest(element, that.buttonMove);
}
// Helper method to mover row to selected position
function switchRowPositions(src, dest) {
let isRowBefore = false;
if (src.parentNode === dest.parentNode) {
for (let cur = src; cur; cur = cur.previousSibling) {
if (cur === dest) {
isRowBefore = true;
break;
}
}
}
if (isRowBefore) {
dest.parentNode.insertBefore(src, dest);
}
else {
dest.parentNode.insertBefore(src, dest.nextSibling);
}
}
// Touch interaction:
// - a touch of "move button" mark a row dragable / "selected", or deselect previous selected
// - a touch of "move button" in the destination row will move a selected row to a new position
this.addEventListener('touchstart', function(event) {
touched = true;
// Check for .move button
let handler = getMoveHandler(event.target),
row = handler ? closest(handler, that.repeatableElement) : null;
if (!row || closest(row, 'joomla-field-subform') !== that) {
return;
}
// First selection
if (!item) {
row.setAttribute('draggable', 'true');
row.setAttribute('aria-grabbed', 'true');
item = row;
}
// Second selection
else {
// Move to selected position
if (row !== item) {
switchRowPositions(item, row);
}
item.setAttribute('draggable', 'false');
item.setAttribute('aria-grabbed', 'false');
item = null;
}
event.preventDefault();
});
// Mouse interaction
// - mouse down, enable "draggable" and allow to drag the row,
// - mouse up, disable "draggable"
this.addEventListener('mousedown', function(event) {
if (touched) return;
// Check for .move button
let handler = getMoveHandler(event.target),
row = handler ? closest(handler, that.repeatableElement) : null;
if (!row || closest(row, 'joomla-field-subform') !== that) {
return;
}
row.setAttribute('draggable', 'true');
row.setAttribute('aria-grabbed', 'true');
item = row;
});
this.addEventListener('mouseup', function(event) {
if (item && !touched) {
item.setAttribute('draggable', 'false');
item.setAttribute('aria-grabbed', 'false');
item = null;
}
});
// Keyboard interaction
// - "tab" to navigate to needed row,
// - modifier (ctr,alt,shift) + "space" select the row,
// - "tab" to select destination,
// - "enter" to place selected row in to destination
// - "esc" to cancel selection
this.addEventListener('keydown', function(event) {
if ((event.keyCode !== KEYCODE.ESC && event.keyCode !== KEYCODE.SPACE && event.keyCode !== KEYCODE.ENTER)
|| event.target.form || !event.target[matchesFn](that.repeatableElement)) {
return;
}
let row = event.target;
// Make sure we handle correct children
if (!row || closest(row, 'joomla-field-subform') !== that) {
return;
}
// Space is the selection or unselection keystroke
if (event.keyCode === KEYCODE.SPACE && hasModifier(event)) {
// Unselect previously selected
if (row.getAttribute('aria-grabbed') === 'true') {
row.setAttribute('draggable', 'false');
row.setAttribute('aria-grabbed', 'false');
item = null;
}
// Select new
else {
// If there was previously selected
if (item) {
item.setAttribute('draggable', 'false');
item.setAttribute('aria-grabbed', 'false');
item = null;
}
// Mark new selection
row.setAttribute('draggable', 'true');
row.setAttribute('aria-grabbed', 'true');
item = row;
}
// Prevent default to suppress any native actions
event.preventDefault();
}
// Escape is the abort keystroke (for any target element)
if (event.keyCode === KEYCODE.ESC && item) {
item.setAttribute('draggable', 'false');
item.setAttribute('aria-grabbed', 'false');
item = null;
}
// Enter, to place selected item in selected position
if (event.keyCode === KEYCODE.ENTER && item) {
item.setAttribute('draggable', 'false');
item.setAttribute('aria-grabbed', 'false');
// Do nothing here
if (row === item) {
item = null;
return;
}
// Move the item to selected position
switchRowPositions(item, row);
event.preventDefault();
item = null;
}
});
// dragstart event to initiate mouse dragging
this.addEventListener('dragstart', function(event) {
if (item) {
// We going to move the row
event.dataTransfer.effectAllowed = 'move';
// This need to work in Firefox and IE10+
event.dataTransfer.setData('text', '');
}
});
this.addEventListener('dragover', function(event) {
if (item) {
event.preventDefault();
}
});
// Handle drag action, move element to hovered position
this.addEventListener('dragenter', function(event) {
// Make sure the target in the correct container
if (!item || that.rowsContainer && closest(event.target, that.rowsContainer) !== that.containerWithRows) {
return;
}
// Find a hovered row, and replace it
let row = event.target[matchesFn](that.repeatableElement) ? event.target : closest(event.target, that.repeatableElement);
if (!row) return;
switchRowPositions(item, row);
});
// dragend event to clean-up after drop or abort
// which fires whether or not the drop target was valid
this.addEventListener('dragend', function() {
if (item) {
item.setAttribute('draggable', 'false');
item.setAttribute('aria-grabbed', 'false');
item = null;
}
});
}
}
customElements.define('joomla-field-subform', JoomlaFieldSubform);
/**
* Helper to find a closest parent element
*
* @param {HTMLElement} element
* @param {String} selector
*
* @returns {HTMLElement|null}
*/
function closest(element, selector) {
let parent;
// Traverse parents
while (element) {
parent = element.parentElement;
if (parent && parent[matchesFn](selector)) {
return parent;
}
element = parent;
}
return null;
}
/**
* Helper for testing whether a selection modifier is pressed
* @param {Event} event
*
* @returns {boolean|*}
*/
function hasModifier(event) {
return (event.ctrlKey || event.metaKey || event.shiftKey);
}
})(customElements);

View File

@ -48,7 +48,7 @@ class ModulesController extends BaseController
/**
* Method to handle cancel
*
* @return boolean True on success.
* @return void
*
* @since 3.2
*/
@ -61,7 +61,7 @@ class ModulesController extends BaseController
/**
* Method to save module editing.
*
* @return bool True on success.
* @return void
*
* @since 3.2
*/

View File

@ -40,7 +40,7 @@ class TemplatesModel extends FormModel
* @param array $data An optional array of data for the form to interogate.
* @param boolean $loadData True if the form is to load its own data (default case), false if not.
*
* @return \JForm A JForm object on success, false on failure
* @return \JForm|bool A JForm object on success, false on failure
*
* @since 3.2
*/

View File

@ -62,11 +62,11 @@ JFactory::getDocument()->addScriptDeclaration("
<legend><?php echo JText::_('COM_CONFIG_MODULES_SETTINGS_TITLE'); ?></legend>
<div>
<?php echo JText::_('COM_CONFIG_MODULES_MODULE_NAME') ?>
<span class="badge badge-secondary"><?php echo $this->item['title'] ?></span>
<?php echo JText::_('COM_CONFIG_MODULES_MODULE_NAME'); ?>
<span class="badge badge-secondary"><?php echo $this->item['title']; ?></span>
&nbsp;&nbsp;
<?php echo JText::_('COM_CONFIG_MODULES_MODULE_TYPE') ?>
<span class="badge badge-secondary"><?php echo $this->item['module'] ?></span>
<?php echo JText::_('COM_CONFIG_MODULES_MODULE_TYPE'); ?>
<span class="badge badge-secondary"><?php echo $this->item['module']; ?></span>
</div>
<hr>

View File

@ -175,68 +175,72 @@ class ContactController extends FormController
*/
private function _sendEmail($data, $contact, $copy_email_activated)
{
$app = $this->app;
$app = $this->app;
if ($contact->email_to == '' && $contact->user_id != 0)
if ($contact->email_to == '' && $contact->user_id != 0)
{
$contact_user = \JUser::getInstance($contact->user_id);
$contact->email_to = $contact_user->get('email');
}
$mailfrom = $app->get('mailfrom');
$fromname = $app->get('fromname');
$sitename = $app->get('sitename');
$name = $data['contact_name'];
$email = \JStringPunycode::emailToPunycode($data['contact_email']);
$subject = $data['contact_subject'];
$body = $data['contact_message'];
// Prepare email body
$prefix = \JText::sprintf('COM_CONTACT_ENQUIRY_TEXT', \JUri::base());
$body = $prefix . "\n" . $name . ' <' . $email . '>' . "\r\n\r\n" . stripslashes($body);
// Load the custom fields
if (!empty($data['com_fields']) && $fields = \FieldsHelper::getFields('com_contact.mail', $contact, true, $data['com_fields']))
{
$output = \FieldsHelper::render(
'com_contact.mail',
'fields.render',
array(
'context' => 'com_contact.mail',
'item' => $contact,
'fields' => $fields,
)
);
if ($output)
{
$contact_user = \JUser::getInstance($contact->user_id);
$contact->email_to = $contact_user->get('email');
$body .= "\r\n\r\n" . $output;
}
}
$mailfrom = $app->get('mailfrom');
$fromname = $app->get('fromname');
$sitename = $app->get('sitename');
$mail = \JFactory::getMailer();
$mail->addRecipient($contact->email_to);
$mail->addReplyTo($email, $name);
$mail->setSender(array($mailfrom, $fromname));
$mail->setSubject($sitename . ': ' . $subject);
$mail->setBody($body);
$sent = $mail->Send();
$name = $data['contact_name'];
$email = \JStringPunycode::emailToPunycode($data['contact_email']);
$subject = $data['contact_subject'];
$body = $data['contact_message'];
// If we are supposed to copy the sender, do so.
// Prepare email body
$prefix = \JText::sprintf('COM_CONTACT_ENQUIRY_TEXT', \JUri::base());
$body = $prefix . "\n" . $name . ' <' . $email . '>' . "\r\n\r\n" . stripslashes($body);
// Load the custom fields
if (!empty($data['com_fields']) && $fields = \FieldsHelper::getFields('com_contact.mail', $contact, true, $data['com_fields']))
{
$output = \FieldsHelper::render(
'com_contact.mail',
'fields.render',
array('context' => 'com_contact.mail', 'item' => $contact, 'fields' => $fields)
);
if ($output)
{
$body .= "\r\n\r\n" . $output;
}
}
// Check whether email copy function activated
if ($copy_email_activated == true && !empty($data['contact_email_copy']))
{
$copytext = \JText::sprintf('COM_CONTACT_COPYTEXT_OF', $contact->name, $sitename);
$copytext .= "\r\n\r\n" . $body;
$copysubject = \JText::sprintf('COM_CONTACT_COPYSUBJECT_OF', $subject);
$mail = \JFactory::getMailer();
$mail->addRecipient($contact->email_to);
$mail->addRecipient($email);
$mail->addReplyTo($email, $name);
$mail->setSender(array($mailfrom, $fromname));
$mail->setSubject($sitename . ': ' . $subject);
$mail->setBody($body);
$mail->setSubject($copysubject);
$mail->setBody($copytext);
$sent = $mail->Send();
}
// If we are supposed to copy the sender, do so.
// Check whether email copy function activated
if ($copy_email_activated == true && !empty($data['contact_email_copy']))
{
$copytext = \JText::sprintf('COM_CONTACT_COPYTEXT_OF', $contact->name, $sitename);
$copytext .= "\r\n\r\n" . $body;
$copysubject = \JText::sprintf('COM_CONTACT_COPYSUBJECT_OF', $subject);
$mail = \JFactory::getMailer();
$mail->addRecipient($email);
$mail->addReplyTo($email, $name);
$mail->setSender(array($mailfrom, $fromname));
$mail->setSubject($copysubject);
$mail->setBody($copytext);
$sent = $mail->Send();
}
return $sent;
return $sent;
}
}

View File

@ -95,7 +95,7 @@ class CategoriesModel extends ListModel
*/
public function getItems()
{
if (!count($this->_items))
if ($this->_items === null)
{
$app = \JFactory::getApplication();
$menu = $app->getMenu();

View File

@ -100,6 +100,7 @@ class CategoryModel extends ListModel
for ($i = 0, $n = count($items); $i < $n; $i++)
{
$item = &$items[$i];
if (!isset($this->_params))
{
$item->params = new Registry($item->params);
@ -181,6 +182,7 @@ class CategoryModel extends ListModel
// Filter by search in title
$search = $this->getState('list.filter');
if (!empty($search))
{
$search = $db->quote('%' . $db->escape($search, true) . '%');
@ -259,10 +261,12 @@ class CategoryModel extends ListModel
$mergedParams->merge($menuParams);
$orderCol = $app->input->get('filter_order', $mergedParams->get('initial_sort', 'ordering'));
if (!in_array($orderCol, $this->filter_fields))
{
$orderCol = 'ordering';
}
$this->setState('list.ordering', $orderCol);
$listOrder = $app->input->get('filter_order_Dir', 'ASC');
@ -319,6 +323,7 @@ class CategoryModel extends ListModel
$options['countItems'] = $params->get('show_cat_items', 1) || $params->get('show_empty_categories', 0);
$categories = \JCategories::getInstance('Contact', $options);
$this->_item = $categories->get($this->getState('category.id', 'root'));
if (is_object($this->_item))
{
$this->_children = $this->_item->getChildren();

View File

@ -203,6 +203,7 @@ class ContactModel extends FormModel
// Filter by published state.
$published = $this->getState('filter.published');
$archived = $this->getState('filter.archived');
if (is_numeric($published))
{
$query->where('(a.published = ' . (int) $published . ' OR a.published =' . (int) $archived . ')')
@ -247,7 +248,6 @@ class ContactModel extends FormModel
// Compute access permissions.
if (($access = $this->getState('filter.access')))
{
// If the access filter has been set, we already know this user can view.
$data->params->set('access-view', true);
}
@ -311,7 +311,6 @@ class ContactModel extends FormModel
// Get the com_content articles by the linked user
if ((int) $contact->user_id && $this->getState('params')->get('show_articles'))
{
$query->select('a.id')
->select('a.title')
->select('a.state')
@ -466,7 +465,6 @@ class ContactModel extends FormModel
if ($result)
{
$contactParams = new Registry($result->params);
// If we are showing a contact list, then the contact parameters take priority

View File

@ -61,6 +61,7 @@ class FeaturedModel extends ListModel
for ($i = 0, $n = count($items); $i < $n; $i++)
{
$item = &$items[$i];
if (!isset($this->_params))
{
$item->params = new Registry($item->params);
@ -105,6 +106,7 @@ class FeaturedModel extends ListModel
// Filter by state
$state = $this->getState('filter.published');
if (is_numeric($state))
{
$query->where('a.published = ' . (int) $state);
@ -155,20 +157,25 @@ class FeaturedModel extends ListModel
$this->setState('list.start', $limitstart);
$orderCol = $app->input->get('filter_order', 'ordering');
if (!in_array($orderCol, $this->filter_fields))
{
$orderCol = 'ordering';
}
$this->setState('list.ordering', $orderCol);
$listOrder = $app->input->get('filter_order_Dir', 'ASC');
if (!in_array(strtoupper($listOrder), array('ASC', 'DESC', '')))
{
$listOrder = 'ASC';
}
$this->setState('list.direction', $listOrder);
$user = \JFactory::getUser();
if ((!$user->authorise('core.edit.state', 'com_contact')) && (!$user->authorise('core.edit', 'com_contact')))
{
// Limit to published for people who can't edit or edit.state.

View File

@ -119,12 +119,16 @@ class HtmlView extends BaseHtmlView
$state = $this->get('State');
$item = $this->get('Item');
$this->form = $this->get('Form');
$params = $state->get('params');
$params = $state->get('params');
$temp = clone $params;
$active = $app->getMenu()->getActive();
$app->setUserState('com_contact.contact.data', array('catid' => $item->catid));
if (empty($item->catid))
{
$app->setUserState('com_contact.contact.data', array('catid' => $item->catid));
}
if ($active)
{
@ -199,7 +203,7 @@ class HtmlView extends BaseHtmlView
if ($item->params->get('show_street_address') || $item->params->get('show_suburb') || $item->params->get('show_state')
|| $item->params->get('show_postcode') || $item->params->get('show_country'))
{
if (!empty ($item->address) || !empty ($item->suburb) || !empty ($item->state) || !empty ($item->country) || !empty ($item->postcode))
if (!empty($item->address) || !empty($item->suburb) || !empty($item->state) || !empty($item->country) || !empty($item->postcode))
{
$item->params->set('address_check', 1);
}
@ -418,6 +422,7 @@ class HtmlView extends BaseHtmlView
}
$this->_prepareDocument();
return parent::display($tpl);
}

View File

@ -53,13 +53,14 @@ class VcfView extends AbstractView
// e.g. "de Gaulle, Charles"
$namearray = explode(',', $item->name);
if (count($namearray) > 1 )
if (count($namearray) > 1)
{
$lastname = $namearray[0];
$card_name = $lastname;
$name_and_midname = trim($namearray[1]);
$firstname = '';
if (!empty($name_and_midname))
{
$namearray = explode(' ', $name_and_midname);

View File

@ -142,6 +142,17 @@ $tparams = $this->item->params;
<?php endif; ?>
<?php if ($tparams->get('show_links')) : ?>
<?php if ($presentation_style === 'sliders') : ?>
<?php if (!$accordionStarted) : ?>
<?php echo JHtml::_('bootstrap.startAccordion', 'slide-contact', array('active' => 'display-links')); ?>
<?php $accordionStarted = true; ?>
<?php endif; ?>
<?php elseif ($presentation_style === 'tabs') : ?>
<?php if (!$tabSetStarted) : ?>
<?php echo JHtml::_('bootstrap.startTabSet', 'myTab', array('active' => 'display-links')); ?>
<?php $tabSetStarted = true; ?>
<?php endif; ?>
<?php endif; ?>
<?php echo $this->loadTemplate('links'); ?>
<?php endif; ?>

View File

@ -375,7 +375,7 @@ class ArticleController extends FormController
if (Multilanguage::isEnabled())
{
$item = $app->getMenu()->getItem($menuitem);
$lang = !is_null($item) && $item->language != '*' ? '&lang=' . $item->language : '';
$lang = !is_null($item) && $item->language != '*' ? '&lang=' . $item->language : '';
}
// If ok, redirect to the return page.

View File

@ -121,6 +121,7 @@ class QueryHelper
case 'vote' :
$orderby = 'a.id DESC ';
if (PluginHelper::isEnabled('content', 'vote'))
{
$orderby = 'rating_count DESC ';
@ -129,6 +130,7 @@ class QueryHelper
case 'rvote' :
$orderby = 'a.id ASC ';
if (PluginHelper::isEnabled('content', 'vote'))
{
$orderby = 'rating_count ASC ';
@ -137,6 +139,7 @@ class QueryHelper
case 'rank' :
$orderby = 'a.id DESC ';
if (PluginHelper::isEnabled('content', 'vote'))
{
$orderby = 'rating DESC ';
@ -145,6 +148,7 @@ class QueryHelper
case 'rrank' :
$orderby = 'a.id ASC ';
if (PluginHelper::isEnabled('content', 'vote'))
{
$orderby = 'rating ASC ';

View File

@ -197,6 +197,7 @@ class ArchiveModel extends ArticlesModel
->order('1 ASC');
$db->setQuery($query);
return $db->loadColumn();
}

View File

@ -57,7 +57,7 @@ class ArticlesModel extends ListModel
'images', 'a.images',
'urls', 'a.urls',
'filter_tag',
'tag'
'tag',
);
}
@ -125,7 +125,7 @@ class ArticlesModel extends ListModel
$this->setState('filter.language', Multilanguage::isEnabled());
// Process show_noauth parameter
if (!$params->get('show_noauth'))
if ((!$params->get('show_noauth')) || (!JComponentHelper::getParams('com_content')->get('show_noauth')))
{
$this->setState('filter.access', true);
}
@ -258,7 +258,7 @@ class ArticlesModel extends ListModel
}
// Filter by access level.
if ($access = $this->getState('filter.access'))
if ($this->getState('filter.access', true))
{
$groups = implode(',', $user->getAuthorisedViewLevels());
$query->where('a.access IN (' . $groups . ')')
@ -270,8 +270,10 @@ class ArticlesModel extends ListModel
if (is_numeric($published) && $published == 2)
{
// If category is archived then article has to be published or archived.
// If categogy is published then article has to be archived.
/**
* If category is archived then article has to be published or archived.
* Or categogy is published then article has to be archived.
*/
$query->where('((c.published = 2 AND a.state > 0) OR (c.published = 1 AND a.state = 2))');
}
elseif (is_numeric($published))
@ -303,8 +305,7 @@ class ArticlesModel extends ListModel
case 'show':
default:
// Normally we do not discriminate
// between featured/unfeatured items.
// Normally we do not discriminate between featured/unfeatured items.
break;
}
@ -525,6 +526,7 @@ class ArticlesModel extends ListModel
{
ArrayHelper::toInteger($tagId);
$tagId = implode(',', $tagId);
if (!empty($tagId))
{
$hasTag = true;
@ -579,9 +581,11 @@ class ArticlesModel extends ListModel
$item->params = clone $this->getState('params');
/*For blogs, article params override menu item params only if menu param = 'use_article'
Otherwise, menu item params control the layout
If menu item is 'use_article' and there is no article param, use global*/
/**
* For blogs, article params override menu item params only if menu param = 'use_article'
* Otherwise, menu item params control the layout
* If menu item is 'use_article' and there is no article param, use global
*/
if (($input->getString('layout') === 'blog') || ($input->getString('view') === 'featured')
|| ($this->getState('params')->get('layout_type') === 'blog'))
{
@ -637,8 +641,10 @@ class ArticlesModel extends ListModel
break;
}
// Compute the asset access permissions.
// Technically guest could edit an article, but lets not check that to improve performance a little.
/**
* Compute the asset access permissions.
* Technically guest could edit an article, but lets not check that to improve performance a little.
*/
if (!$guest)
{
$asset = 'com_content.article.' . $item->id;

View File

@ -345,7 +345,7 @@ class CategoryModel extends ListModel
{
if (!is_object($this->_item))
{
if (isset( $this->state->params))
if (isset($this->state->params))
{
$params = $this->state->params;
$options = array();

View File

@ -8,10 +8,13 @@
*/
namespace Joomla\Component\Content\Site\Model;
use Joomla\Component\Content\Site\Helper\QueryHelper;
defined('_JEXEC') or die;
use Joomla\Component\Content\Site\Helper\QueryHelper;
use Joomla\Registry\Registry;
\JLoader::register('ContentModelArticles', __DIR__ . '/articles.php');
/**
* Frontpage Component Model
*
@ -44,12 +47,25 @@ class FeaturedModel extends ArticlesModel
$input = \JFactory::getApplication()->input;
$user = \JFactory::getUser();
$app = \JFactory::getApplication('site');
// List state information
$limitstart = $input->getUInt('limitstart', 0);
$this->setState('list.start', $limitstart);
$params = $this->state->params;
$menuParams = new Registry;
if ($menu = $app->getMenu()->getActive())
{
$menuParams->loadString($menu->params);
}
$mergedParams = clone $menuParams;
$mergedParams->merge($params);
$this->setState('params', $mergedParams);
$limit = $params->get('num_leading_articles') + $params->get('num_intro_articles') + $params->get('num_links');
$this->setState('list.limit', $limit);
$this->setState('list.links', $params->get('num_links'));
@ -66,6 +82,16 @@ class FeaturedModel extends ArticlesModel
$this->setState('filter.published', array(0, 1, 2));
}
// Process show_noauth parameter
if (!$params->get('show_noauth'))
{
$this->setState('filter.access', true);
}
else
{
$this->setState('filter.access', false);
}
// Check for category selection
if ($params->get('featured_categories') && implode(',', $params->get('featured_categories')) == true)
{

View File

@ -147,16 +147,16 @@ class HtmlView extends BaseHtmlView
// Month Field
$months = array(
'' => \JText::_('COM_CONTENT_MONTH'),
'01' => \JText::_('JANUARY_SHORT'),
'02' => \JText::_('FEBRUARY_SHORT'),
'03' => \JText::_('MARCH_SHORT'),
'04' => \JText::_('APRIL_SHORT'),
'05' => \JText::_('MAY_SHORT'),
'06' => \JText::_('JUNE_SHORT'),
'07' => \JText::_('JULY_SHORT'),
'08' => \JText::_('AUGUST_SHORT'),
'09' => \JText::_('SEPTEMBER_SHORT'),
'' => \JText::_('COM_CONTENT_MONTH'),
'1' => \JText::_('JANUARY_SHORT'),
'2' => \JText::_('FEBRUARY_SHORT'),
'3' => \JText::_('MARCH_SHORT'),
'4' => \JText::_('APRIL_SHORT'),
'5' => \JText::_('MAY_SHORT'),
'6' => \JText::_('JUNE_SHORT'),
'7' => \JText::_('JULY_SHORT'),
'8' => \JText::_('AUGUST_SHORT'),
'9' => \JText::_('SEPTEMBER_SHORT'),
'10' => \JText::_('OCTOBER_SHORT'),
'11' => \JText::_('NOVEMBER_SHORT'),
'12' => \JText::_('DECEMBER_SHORT')

View File

@ -181,7 +181,8 @@ class HtmlView extends BaseHtmlView
return;
}
/* Check for no 'access-view' and empty fulltext,
/**
* Check for no 'access-view' and empty fulltext,
* - Redirect guest users to login
* - Deny access to logged users with 403 code
* NOTE: we do not recheck for no access-view + show_noauth disabled ... since it was checked above
@ -199,12 +200,15 @@ class HtmlView extends BaseHtmlView
{
$app->enqueueMessage(\JText::_('JERROR_ALERTNOAUTHOR'), 'error');
$app->setHeader('status', 403, true);
return;
}
}
// NOTE: The following code (usually) sets the text to contain the fulltext, but it is the
// responsibility of the layout to check 'access-view' and only use "introtext" for guests
/**
* NOTE: The following code (usually) sets the text to contain the fulltext, but it is the
* responsibility of the layout to check 'access-view' and only use "introtext" for guests
*/
if ($item->params->get('show_intro', '1') == '1')
{
$item->text = $item->introtext . ' ' . $item->fulltext;
@ -227,7 +231,6 @@ class HtmlView extends BaseHtmlView
}
// Process the content plugins.
PluginHelper::importPlugin('content');
\JFactory::getApplication()->triggerEvent('onContentPrepare', array('com_content.article', &$item, &$item->params, $offset));
@ -261,8 +264,10 @@ class HtmlView extends BaseHtmlView
$pathway = $app->getPathway();
$title = null;
// Because the application sets a default page title,
// we need to get it from the menu item itself
/**
* Because the application sets a default page title,
* we need to get it from the menu item itself
*/
$menu = $menus->getActive();
if ($menu)

View File

@ -46,7 +46,7 @@ class FeedView extends CategoryFeedView
if (isset($introImage) && ($introImage != ''))
{
$image = preg_match('/http/', $introImage)? $introImage : \JURI::root() . $introImage;
$image = preg_match('/http/', $introImage) ? $introImage : \JURI::root() . $introImage;
$item->description = '<p><img src="' . $image . '"></p>';
}

View File

@ -186,12 +186,21 @@ class HtmlView extends CategoryView
// we need to get it from the menu item itself
$menu = $menus->getActive();
if ($menu)
if ($menu
&& $menu->component == 'com_content'
&& isset($menu->query['view'], $menu->query['id'])
&& $menu->query['view'] == 'category'
&& $menu->query['id'] == $this->category->id)
{
$this->params->def('page_heading', $this->params->get('page_title', $menu->title));
$title = $this->params->get('page_title', $menu->title);
}
else
{
$this->params->def('page_heading', $this->category->title);
$title = $this->category->title;
$this->params->set('page_title', $title);
}
$title = $this->params->get('page_title', '');
// Check for empty title and add site name if param is set
if (empty($title))

View File

@ -68,7 +68,7 @@ class FeedView extends AbstractView
if (isset($introImage) && ($introImage != ''))
{
$image = preg_match('/http/', $introImage)? $introImage : JURI::root() . $introImage;
$image = preg_match('/http/', $introImage) ? $introImage : JURI::root() . $introImage;
$description = '<p><img src="' . $image . '"></p>';
}

View File

@ -76,7 +76,7 @@ class HtmlView extends BaseHtmlView
* @var \JDatabaseDriver
* @since 3.6.3
*/
protected $db;
protected $db;
/**
* The user object

View File

@ -35,6 +35,8 @@ abstract class ContentHelperAssociation extends CategoryHelperAssociation
$jinput = JFactory::getApplication()->input;
$view = $view ?? $jinput->get('view');
$id = empty($id) ? $jinput->getInt('id') : $id;
$user = JFactory::getUser();
$groups = implode(',', $user->getAuthorisedViewLevels());
if ($view === 'article')
{
@ -46,7 +48,26 @@ abstract class ContentHelperAssociation extends CategoryHelperAssociation
foreach ($associations as $tag => $item)
{
$return[$tag] = ContentHelperRoute::getArticleRoute((int) $item->id, (int) $item->catid, $item->language);
if ($item->language != JFactory::getLanguage()->getTag())
{
$arrId = explode(':', $item->id);
$assocId = $arrId[0];
$db = JFactory::getDbo();
$query = $db->getQuery(true)
->select($db->qn('state'))
->from($db->qn('#__content'))
->where($db->qn('id') . ' = ' . (int) ($assocId))
->where('access IN (' . $groups . ')');
$db->setQuery($query);
$result = (int) $db->loadResult();
if ($result > 0)
{
$return[$tag] = ContentHelperRoute::getArticleRoute((int) $item->id, (int) $item->catid, $item->language);
}
}
}
return $return;

View File

@ -111,10 +111,10 @@ abstract class JHtmlIcon
/**
* Creates an icon instance.
*
* @return \Joomla\Component\Content\Site\Service\HTML\Icon
* @return \Joomla\Component\Content\Administrator\Service\HTML\Icon
*/
private static function getIcon()
{
return (new \Joomla\Component\Content\Site\Service\HTML\Icon(Joomla\CMS\Factory::getApplication()));
return (new \Joomla\Component\Content\Administrator\Service\HTML\Icon(Joomla\CMS\Factory::getApplication()));
}
}

View File

@ -158,14 +158,12 @@ if (!empty($this->items))
<?php if (JLanguageAssociations::isEnabled() && $this->params->get('show_associations')) : ?>
<?php $associations = ContentHelperAssociation::displayAssociations($article->id); ?>
<?php foreach ($associations as $association) : ?>
<?php if ($association['language']->lang_code != JFactory::getLanguage()->getTag()) : ?>
<?php if ($this->params->get('flags', 1) && $association['language']->image) : ?>
<?php $flag = JHtml::_('image', 'mod_languages/' . $association['language']->image . '.gif', $association['language']->title_native, array('title' => $association['language']->title_native), true); ?>
&nbsp;<a href="<?php echo JRoute::_($association['item']); ?>"><?php echo $flag; ?></a>&nbsp;
<?php else : ?>
<?php $class = 'label label-association label-' . $association['language']->sef; ?>
&nbsp;<a class="<?php echo $class; ?>" href="<?php echo JRoute::_($association['item']); ?>"><?php echo strtoupper($association['language']->sef); ?></a>&nbsp;
<?php endif; ?>
<?php if ($this->params->get('flags', 1) && $association['language']->image) : ?>
<?php $flag = JHtml::_('image', 'mod_languages/' . $association['language']->image . '.gif', $association['language']->title_native, array('title' => $association['language']->title_native), true); ?>
&nbsp;<a href="<?php echo JRoute::_($association['item']); ?>"><?php echo $flag; ?></a>&nbsp;
<?php else : ?>
<?php $class = 'label label-association label-' . $association['language']->sef; ?>
&nbsp;<a class="<?php echo $class; ?>" href="<?php echo JRoute::_($association['item']); ?>"><?php echo strtoupper($association['language']->sef); ?></a>&nbsp;
<?php endif; ?>
<?php endforeach; ?>
<?php endif; ?>

Some files were not shown because too many files have changed in this diff Show More