Skip to content

Commit

Permalink
Merge branch 'staging' into 3.7.x
Browse files Browse the repository at this point in the history
  • Loading branch information
wilsonge committed Jul 30, 2016
2 parents 5963142 + 45fc0cb commit 4b4d2f1
Show file tree
Hide file tree
Showing 56 changed files with 696 additions and 539 deletions.
6 changes: 6 additions & 0 deletions administrator/components/com_admin/script.php
Original file line number Diff line number Diff line change
Expand Up @@ -1816,6 +1816,12 @@ private function cleanJoomlaCache()
{
JModelLegacy::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_cache/models');
$model = JModelLegacy::getInstance('cache', 'CacheModel');

// Clean frontend cache
$model->clean();

// Clean admin cache
$model->setState('client_id', 1);
$model->clean();
}
}
4 changes: 2 additions & 2 deletions administrator/components/com_categories/models/categories.php
Original file line number Diff line number Diff line change
Expand Up @@ -387,12 +387,12 @@ public function countItems(&$items, $extension)
{
require_once $file;

$prefix = ucfirst(str_replace('com_', '', $component));
$prefix = ucfirst($eName);
$cName = $prefix . 'Helper';

if (class_exists($cName) && is_callable(array($cName, 'countItems')))
{
call_user_func(array($cName, 'countItems'), $items, $section);
$cName::countItems($items, $section);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,4 @@

defined('_JEXEC') or die;

if ($this->item->id != 0 && $this->item->language != '*')
{
echo JLayoutHelper::render('joomla.edit.associations', $this);
}
else
{
echo '<div class="alert alert-info">' . JText::_('JGLOBAL_ASSOC_NOT_POSSIBLE') . '</div>';
}
echo JLayoutHelper::render('joomla.edit.associations', $this);
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,4 @@

defined('_JEXEC') or die;

if ($this->item->id != 0 && $this->item->language != '*')
{
echo JLayoutHelper::render('joomla.edit.associations', $this);
}
else
{
echo '<div class="alert alert-info">' . JText::_('JGLOBAL_ASSOC_NOT_POSSIBLE') . '</div>';
}
echo JLayoutHelper::render('joomla.edit.associations', $this);
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,4 @@

defined('_JEXEC') or die;

if ($this->item->id != 0 && $this->item->language != '*')
{
echo JLayoutHelper::render('joomla.edit.associations', $this);
}
else
{
echo '<div class="alert alert-info">' . JText::_('JGLOBAL_ASSOC_NOT_POSSIBLE') . '</div>';
}
echo JLayoutHelper::render('joomla.edit.associations', $this);
4 changes: 2 additions & 2 deletions administrator/components/com_joomlaupdate/models/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ public function createRestorationFile($basename = null)
if (!$writable)
{
$FTPOptions = JClientHelper::getCredentials('ftp');
$ftp = JClientFtp::getInstance($FTPOptions['host'], $FTPOptions['port'], null, $FTPOptions['user'], $FTPOptions['pass']);
$ftp = JClientFtp::getInstance($FTPOptions['host'], $FTPOptions['port'], array(), $FTPOptions['user'], $FTPOptions['pass']);
$dest = JPath::clean(str_replace(JPATH_ROOT, $FTPOptions['root'], $tempdir . '/admintools'), '/');

if (!@mkdir($tempdir . '/admintools'))
Expand Down Expand Up @@ -450,7 +450,7 @@ public function createRestorationFile($basename = null)
if (!is_writable($tempdir))
{
$FTPOptions = JClientHelper::getCredentials('ftp');
$ftp = JClientFtp::getInstance($FTPOptions['host'], $FTPOptions['port'], null, $FTPOptions['user'], $FTPOptions['pass']);
$ftp = JClientFtp::getInstance($FTPOptions['host'], $FTPOptions['port'], array(), $FTPOptions['user'], $FTPOptions['pass']);
$dest = JPath::clean(str_replace(JPATH_ROOT, $FTPOptions['root'], $tempdir . '/admintools'), '/');

if (!@mkdir($tempdir . '/admintools'))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,4 @@

defined('_JEXEC') or die;

if ($this->item->id != 0 && $this->item->language != '*')
{
echo JLayoutHelper::render('joomla.edit.associations', $this);
}
else
{
echo '<div class="alert alert-info">' . JText::_('JGLOBAL_ASSOC_NOT_POSSIBLE') . '</div>';
}
echo JLayoutHelper::render('joomla.edit.associations', $this);
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,4 @@

defined('_JEXEC') or die;

if ($this->item->id != 0 && $this->item->language != '*')
{
echo JLayoutHelper::render('joomla.edit.associations', $this);
}
else
{
echo '<div class="alert alert-info">' . JText::_('JGLOBAL_ASSOC_NOT_POSSIBLE') . '</div>';
}
echo JLayoutHelper::render('joomla.edit.associations', $this);
4 changes: 2 additions & 2 deletions cli/finder_indexer.php
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ private function putFilters()
$query
->select('t.id')
->from($db->qn('#__finder_taxonomy') . ' AS t')
->leftjoin($db->qn('#__finder_taxonomy') . ' AS p ON p.id = t.parent_id')
->leftJoin($db->qn('#__finder_taxonomy') . ' AS p ON p.id = t.parent_id')
->where($db->qn('t.title') . ' = ' . $db->q($element['title']))
->where($db->qn('p.title') . ' = ' . $db->q($element['parent']));
$taxonomy = $db->setQuery($query)->loadResult();
Expand Down Expand Up @@ -355,7 +355,7 @@ private function getFilters()
$query
->select('t.title, p.title AS parent')
->from($db->qn('#__finder_taxonomy') . ' AS t')
->leftjoin($db->qn('#__finder_taxonomy') . ' AS p ON p.id = t.parent_id')
->leftJoin($db->qn('#__finder_taxonomy') . ' AS p ON p.id = t.parent_id')
->where($db->qn('t.id') . ' IN (' . $filter->data . ')');
$taxonomies = $db->setQuery($query)->loadObjectList();

Expand Down
11 changes: 4 additions & 7 deletions components/com_contact/helpers/association.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
defined('_JEXEC') or die;

JLoader::register('ContactHelper', JPATH_ADMINISTRATOR . '/components/com_contact/helpers/contact.php');
JLoader::register('ContactHelperRoute', JPATH_SITE . '/components/com_contact/helpers/route.php');
JLoader::register('CategoryHelperAssociation', JPATH_ADMINISTRATOR . '/components/com_categories/helpers/association.php');

/**
Expand All @@ -29,15 +30,11 @@ abstract class ContactHelperAssociation extends CategoryHelperAssociation
*
* @since 3.0
*/

public static function getAssociations($id = 0, $view = null)
{
jimport('helper.route', JPATH_COMPONENT_SITE);

$app = JFactory::getApplication();
$jinput = $app->input;
$view = is_null($view) ? $jinput->get('view') : $view;
$id = empty($id) ? $jinput->getInt('id') : $id;
$jinput = JFactory::getApplication()->input;
$view = is_null($view) ? $jinput->get('view') : $view;
$id = empty($id) ? $jinput->getInt('id') : $id;

if ($view == 'contact')
{
Expand Down
11 changes: 4 additions & 7 deletions components/com_content/helpers/association.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
defined('_JEXEC') or die;

JLoader::register('ContentHelper', JPATH_ADMINISTRATOR . '/components/com_content/helpers/content.php');
JLoader::register('ContentHelperRoute', JPATH_SITE . '/components/com_content/helpers/route.php');
JLoader::register('CategoryHelperAssociation', JPATH_ADMINISTRATOR . '/components/com_categories/helpers/association.php');

/**
Expand All @@ -29,15 +30,11 @@ abstract class ContentHelperAssociation extends CategoryHelperAssociation
*
* @since 3.0
*/

public static function getAssociations($id = 0, $view = null)
{
jimport('helper.route', JPATH_COMPONENT_SITE);

$app = JFactory::getApplication();
$jinput = $app->input;
$view = is_null($view) ? $jinput->get('view') : $view;
$id = empty($id) ? $jinput->getInt('id') : $id;
$jinput = JFactory::getApplication()->input;
$view = is_null($view) ? $jinput->get('view') : $view;
$id = empty($id) ? $jinput->getInt('id') : $id;

if ($view == 'article')
{
Expand Down
4 changes: 2 additions & 2 deletions components/com_content/views/article/tmpl/default.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,13 @@

<field
name="info_block_show_title"
type="list"
type="radio"
class="btn-group"
label="COM_CONTENT_FIELD_INFOBLOCK_TITLE_LABEL"
description="COM_CONTENT_FIELD_INFOBLOCK_TITLE_DESC">
<option value="">JGLOBAL_USE_GLOBAL</option>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
<option value="0">JHIDE</option>
</field>

<field
Expand Down
11 changes: 4 additions & 7 deletions components/com_newsfeeds/helpers/association.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
defined('_JEXEC') or die;

JLoader::register('NewsfeedsHelper', JPATH_ADMINISTRATOR . '/components/com_newsfeeds/helpers/newsfeeds.php');
JLoader::register('NewsfeedsHelperRoute', JPATH_SITE . '/components/com_newsfeeds/helpers/route.php');
JLoader::register('CategoryHelperAssociation', JPATH_ADMINISTRATOR . '/components/com_categories/helpers/association.php');

/**
Expand All @@ -29,15 +30,11 @@ abstract class NewsfeedsHelperAssociation extends CategoryHelperAssociation
*
* @since 3.0
*/

public static function getAssociations($id = 0, $view = null)
{
jimport('helper.route', JPATH_COMPONENT_SITE);

$app = JFactory::getApplication();
$jinput = $app->input;
$view = is_null($view) ? $jinput->get('view') : $view;
$id = empty($id) ? $jinput->getInt('id') : $id;
$jinput = JFactory::getApplication()->input;
$view = is_null($view) ? $jinput->get('view') : $view;
$id = empty($id) ? $jinput->getInt('id') : $id;

if ($view == 'newsfeed')
{
Expand Down
Loading

0 comments on commit 4b4d2f1

Please sign in to comment.