Skip to content

Commit

Permalink
Merge branch '4.0-dev' into patch-125
Browse files Browse the repository at this point in the history
  • Loading branch information
alikon authored Dec 6, 2019
2 parents 41a405e + f794274 commit 8ad3883
Show file tree
Hide file tree
Showing 14 changed files with 71 additions and 94 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -249,10 +249,10 @@
->removeState(1)
->removeState(2)
->removeState(-2)
->addState(ContentComponent::CONDITION_PUBLISHED, '', 'publish', 'COM_CONTENT_CHANGE_STAGE', ['tip_title' => 'JPUBLISHED'])
->addState(ContentComponent::CONDITION_UNPUBLISHED, '', 'unpublish', 'COM_CONTENT_CHANGE_STAGE', ['tip_title' => 'JUNPUBLISHED'])
->addState(ContentComponent::CONDITION_ARCHIVED, '', 'archive', 'COM_CONTENT_CHANGE_STAGE', ['tip_title' => 'JARCHIVED'])
->addState(ContentComponent::CONDITION_TRASHED, '', 'trash', 'COM_CONTENT_CHANGE_STAGE', ['tip_title' => 'JTRASHED'])
->addState(ContentComponent::CONDITION_PUBLISHED, '', 'publish', Text::_('COM_CONTENT_CHANGE_STAGE'), ['tip_title' => Text::_('JPUBLISHED')])
->addState(ContentComponent::CONDITION_UNPUBLISHED, '', 'unpublish', Text::_('COM_CONTENT_CHANGE_STAGE'), ['tip_title' => Text::_('JUNPUBLISHED')])
->addState(ContentComponent::CONDITION_ARCHIVED, '', 'archive', Text::_('COM_CONTENT_CHANGE_STAGE'), ['tip_title' => Text::_('JARCHIVED')])
->addState(ContentComponent::CONDITION_TRASHED, '', 'trash', Text::_('COM_CONTENT_CHANGE_STAGE'), ['tip_title' => Text::_('JTRASHED')])
->setLayout('joomla.button.transition-button')
->render($item->stage_condition, $i, $options, $item->publish_up, $item->publish_down);
?>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,10 +233,10 @@
->removeState(1)
->removeState(2)
->removeState(-2)
->addState(ContentComponent::CONDITION_PUBLISHED, '', 'publish', 'COM_CONTENT_CHANGE_STAGE', ['tip_title' => 'JPUBLISHED'])
->addState(ContentComponent::CONDITION_UNPUBLISHED, '', 'unpublish', 'COM_CONTENT_CHANGE_STAGE', ['tip_title' => 'JUNPUBLISHED'])
->addState(ContentComponent::CONDITION_ARCHIVED, '', 'archive', 'COM_CONTENT_CHANGE_STAGE', ['tip_title' => 'JARCHIVED'])
->addState(ContentComponent::CONDITION_TRASHED, '', 'trash', 'COM_CONTENT_CHANGE_STAGE', ['tip_title' => 'JTRASHED'])
->addState(ContentComponent::CONDITION_PUBLISHED, '', 'publish', Text::_('COM_CONTENT_CHANGE_STAGE'), ['tip_title' => Text::_('JPUBLISHED')])
->addState(ContentComponent::CONDITION_UNPUBLISHED, '', 'unpublish', Text::_('COM_CONTENT_CHANGE_STAGE'), ['tip_title' => Text::_('JUNPUBLISHED')])
->addState(ContentComponent::CONDITION_ARCHIVED, '', 'archive', Text::_('COM_CONTENT_CHANGE_STAGE'), ['tip_title' => Text::_('JARCHIVED')])
->addState(ContentComponent::CONDITION_TRASHED, '', 'trash', Text::_('COM_CONTENT_CHANGE_STAGE'), ['tip_title' => Text::_('JTRASHED')])
->setLayout('joomla.button.transition-button')
->render($item->stage_condition, $i, $options, $item->publish_up, $item->publish_down);
?>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,6 @@ public function save($key = null, $urlVar = null)
}

$data['link'] = 'index.php?' . urldecode(http_build_query($args, '', '&'));
unset($data['request']);
}

// Check for validation errors.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

defined('_JEXEC') or die;

use Joomla\CMS\Filter\InputFilter;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\FormController;
use Joomla\CMS\Router\Route;
Expand Down Expand Up @@ -70,6 +71,8 @@ public function save($key = null, $urlVar = null)
return false;
}

$data['menutype'] = InputFilter::getInstance()->clean($data['menutype'], 'TRIM');

// Populate the row id from the session.
$data['id'] = $recordId;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,10 +198,6 @@ public function resync()
return;
}

// Declare variables before binding.
$componentId = 0;
$itemId = 0;

$query = $db->getQuery(true)
->update($db->quoteName('#__menu'))
->set($db->quoteName('component_id') . ' = :componentId')
Expand Down
4 changes: 0 additions & 4 deletions administrator/components/com_menus/Model/ItemModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -1381,10 +1381,6 @@ public function rebuild()
return false;
}

// Declare paramaters before binding.
$id = 0;
$params = '';

$query = $db->getQuery(true)
->update($db->quoteName('#__menu'))
->set($db->quoteName('params') . ' = :params')
Expand Down
22 changes: 7 additions & 15 deletions administrator/components/com_menus/Model/MenusModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ public function getItems()
$db = $this->getDbo();
$menuTypes = array_column((array) $items, 'menutype');

// Get the published menu counts.
$query = $db->getQuery(true)
->select(
[
Expand All @@ -89,14 +88,17 @@ public function getItems()
]
)
->from($db->quoteName('#__menu', 'm'))
->where($db->quoteName('m.published') . ' = 1')
->where($db->quoteName('m.published') . ' = :published')
->whereIn($db->quoteName('m.menutype'), $menuTypes, ParameterType::STRING)
->group($db->quoteName('m.menutype'));
->group($db->quoteName('m.menutype'))
->bind(':published', $published, ParameterType::INTEGER);

$db->setQuery($query);

// Get the published menu counts.
try
{
$published = 1;
$countPublished = $db->loadAssocList('menutype', 'count_published');
}
catch (\RuntimeException $e)
Expand All @@ -107,14 +109,9 @@ public function getItems()
}

// Get the unpublished menu counts.
$query->clear('where')
->bind()
->where($db->quoteName('m.published') . ' = 0')
->whereIn($db->quoteName('m.menutype'), $menuTypes, ParameterType::STRING);
$db->setQuery($query);

try
{
$published = 0;
$countUnpublished = $db->loadAssocList('menutype', 'count_published');
}
catch (\RuntimeException $e)
Expand All @@ -125,14 +122,9 @@ public function getItems()
}

// Get the trashed menu counts.
$query->clear('where')
->bind()
->where($db->quoteName('m.published') . ' = -2')
->whereIn($db->quoteName('m.menutype'), $menuTypes, ParameterType::STRING);
$db->setQuery($query);

try
{
$published = -2;
$countTrashed = $db->loadAssocList('menutype', 'count_published');
}
catch (\RuntimeException $e)
Expand Down
69 changes: 35 additions & 34 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions installation/tmpl/remove/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -187,10 +187,6 @@ class="btn btn-primary"
</legend>
<div class="j-install-step-form">
<p><?php echo Text::_('INSTL_COMPLETE_FINAL_DESC'); ?></p>
<div class="form-group">
<a class="btn btn-primary btn-block" href="<?php echo Uri::root(); ?>"><span class="fa fa-eye" aria-hidden="true"></span> <?php echo Text::_('INSTL_COMPLETE_SITE_BTN'); ?></a>
<a class="btn btn-primary btn-block" href="<?php echo Uri::root(); ?>administrator/"><span class="fa fa-lock" aria-hidden="true"></span> <?php echo Text::_('INSTL_COMPLETE_ADMIN_BTN'); ?></a>
</div>
</div>
</fieldset>

Expand Down
7 changes: 3 additions & 4 deletions layouts/joomla/button/action-button.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
*/

use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;

HTMLHelper::_('bootstrap.popover');

Expand All @@ -28,14 +27,14 @@
$tipTitle = $options['tip_title'];
?>
<button type="submit" class="tbody-icon data-state-<?php echo $this->escape($value ?? ''); ?><?php echo $tip ? ' hasPopover' : ''; ?>"
title="<?php echo HTMLHelper::_('tooltipText', Text::_($tipTitle ? : $title), '', 0); ?>"
data-content="<?php echo HTMLHelper::_('tooltipText', Text::_($title), '', 0); ?>"
title="<?php echo HTMLHelper::_('tooltipText', $tipTitle ?: $title, '', 0); ?>"
data-content="<?php echo HTMLHelper::_('tooltipText', $title, '', 0); ?>"
data-placement="top"
<?php echo !empty($disabled) ? 'disabled' : ''; ?>
<?php if (!empty($task) && empty($disabled)) : ?>
onclick="return Joomla.listItemTask('<?php echo $checkboxName . $this->escape($row ?? ''); ?>', '<?php echo $this->escape(isset($task) ? $taskPrefix . $task : ''); ?>')"
<?php endif; ?>
>
<span class="<?php echo $this->escape($icon ?? ''); ?>" aria-hidden="true"></span>
<span class="sr-only"><?php echo Text::_($title); ?></span>
<span class="sr-only"><?php echo $title; ?></span>
</button>
7 changes: 3 additions & 4 deletions layouts/joomla/button/transition-button.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
*/

use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;

HTMLHelper::_('bootstrap.popover');

Expand All @@ -31,8 +30,8 @@
<?php if ($only_icon) : ?>
<span class="tbody-icon mr-1">
<span class="<?php echo $this->escape($icon ?? ''); ?> <?php echo $tip ? 'hasPopover' : ''; ?>"
title="<?php echo HTMLHelper::_('tooltipText', Text::_($tipTitle ? : $title), '', 0); ?>"
data-content="<?php echo HTMLHelper::_('tooltipText', Text::_($title), '', 0); ?>"
title="<?php echo HTMLHelper::_('tooltipText', $tipTitle ?: $title, '', 0); ?>"
data-content="<?php echo HTMLHelper::_('tooltipText', $title, '', 0); ?>"
data-placement="top"
></span>
</span>
Expand All @@ -43,7 +42,7 @@
href="javascript://"
<?php endif; ?>

title="<?php echo HTMLHelper::_('tooltipText', Text::_($tipTitle ? : $title), '', 0); ?>"
title="<?php echo HTMLHelper::_('tooltipText', $tipTitle ?: $title, '', 0); ?>"
data-content="<?php echo HTMLHelper::_('tooltipText', $title, '', 0); ?>"
data-placement="top"
onclick="Joomla.toggleAllNextElements(this, 'd-none')"
Expand Down
Loading

0 comments on commit 8ad3883

Please sign in to comment.