Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/staging' into staging
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris committed Apr 13, 2016
2 parents 46527f7 + 3c461be commit b089c42
Show file tree
Hide file tree
Showing 281 changed files with 3,506 additions and 3,332 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -64,6 +64,8 @@ Desktop.ini
/libraries/vendor/ircmaxell/password-compat/phpunit.xml.dist
/libraries/vendor/ircmaxell/password-compat/README.md
/libraries/vendor/ircmaxell/password-compat/version-test.php
/libraries/vendor/joomla/*/.gitignore
/libraries/vendor/joomla/*/.gitmodules
/libraries/vendor/joomla/*/docs
/libraries/vendor/joomla/*/Tests
/libraries/vendor/joomla/*/vendor
Expand Down
1 change: 1 addition & 0 deletions administrator/components/com_admin/models/sysinfo.php
Expand Up @@ -251,6 +251,7 @@ public function &getPhpSettings()
'zip' => function_exists('zip_open') && function_exists('zip_read'),
'mbstring' => extension_loaded('mbstring'),
'iconv' => function_exists('iconv'),
'mcrypt' => extension_loaded('mcrypt'),
'max_input_vars' => ini_get('max_input_vars'),
);

Expand Down
3 changes: 1 addition & 2 deletions administrator/components/com_admin/script.php
Expand Up @@ -19,7 +19,7 @@ class JoomlaInstallerScript
/**
* Method to update Joomla!
*
* @param JInstallerFile $installer The class calling this method
* @param JInstallerAdapterFile $installer The class calling this method
*
* @return void
*/
Expand All @@ -31,7 +31,6 @@ public function update($installer)
JLog::addLogger($options, JLog::INFO, array('Update', 'databasequery', 'jerror'));
JLog::add(JText::_('COM_JOOMLAUPDATE_UPDATE_LOG_DELETE_FILES'), JLog::INFO, 'Update');

$this->deleteUnexistingFiles();
$this->updateManifestCaches();
$this->updateDatabase();
$this->clearRadCache();
Expand Down
Expand Up @@ -3,4 +3,5 @@
-- to force a new conversion when updating from version 3.5.0
--

UPDATE `#__utf8_conversion` SET converted = 0 WHERE (SELECT COUNT(*) FROM `#__extensions` WHERE `extension_id`=700 AND `manifest_cache` LIKE '%"version":"3.5.0"%') = 1;
UPDATE `#__utf8_conversion` SET `converted` = 0
WHERE (SELECT COUNT(*) FROM `#__schemas` WHERE `extension_id`=700 AND `version_id` LIKE '3.5.0%') = 1;
Expand Up @@ -157,6 +157,14 @@
<?php echo JHtml::_('phpsetting.set', $this->php_settings['iconv']); ?>
</td>
</tr>
<tr>
<td>
<?php echo JText::_('COM_ADMIN_MCRYPT_ENABLED'); ?>
</td>
<td>
<?php echo JHtml::_('phpsetting.set', $this->php_settings['mcrypt']); ?>
</td>
</tr>
<tr>
<td>
<?php echo JText::_('COM_ADMIN_MAX_INPUT_VARS'); ?>
Expand Down
Expand Up @@ -28,6 +28,16 @@
>
<option value="">JOPTION_SELECT_CATEGORY</option>
</field>
<field
name="client_id"
type="bannerclient"
label="COM_BANNERS_FILTER_CLIENT"
extension="com_content"
description="COM_BANNERS_FILTER_CLIENT_DESC"
onchange="this.form.submit();"
>
<option value="">COM_BANNERS_SELECT_CLIENT</option>
</field>
<field
name="language"
type="contentlanguage"
Expand All @@ -38,16 +48,6 @@
<option value="">JOPTION_SELECT_LANGUAGE</option>
<option value="*">JALL</option>
</field>
<field
name="client_id"
type="bannerclient"
label="COM_BANNERS_FILTER_CLIENT"
extension="com_content"
description="COM_BANNERS_FILTER_CLIENT_DESC"
onchange="this.form.submit();"
>
<option value="">COM_BANNERS_SELECT_CLIENT</option>
</field>
</fields>
<fields name="list">
<field
Expand Down
36 changes: 19 additions & 17 deletions administrator/components/com_cache/controller.php
Expand Up @@ -76,18 +76,24 @@ public function delete()

$cid = $this->input->post->get('cid', array(), 'array');

$model = $this->getModel('cache');

if (empty($cid))
{
JError::raiseWarning(500, JText::_('JERROR_NO_ITEMS_SELECTED'));
JFactory::getApplication()->enqueueMessage(JText::_('JERROR_NO_ITEMS_SELECTED'), 'warning');
}
else
{
$model->cleanlist($cid);
}
$result = $this->getModel('cache')->cleanlist($cid);

$this->setRedirect('index.php?option=com_cache&client=' . $model->getClient()->id);
if ($result !== array())
{
JFactory::getApplication()->enqueueMessage(JText::sprintf('COM_CACHE_EXPIRED_ITEMS_DELETE_ERROR', implode(', ', $result)), 'error');
}
else
{
JFactory::getApplication()->enqueueMessage(JText::_('COM_CACHE_EXPIRED_ITEMS_HAVE_BEEN_DELETED'), 'message');
}
}
$this->setRedirect('index.php?option=com_cache');
}

/**
Expand All @@ -100,18 +106,14 @@ public function purge()
// Check for request forgeries
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));

$model = $this->getModel('cache');
$ret = $model->purge();

$msg = JText::_('COM_CACHE_EXPIRED_ITEMS_HAVE_BEEN_PURGED');
$msgType = 'message';

if ($ret === false)
if (!$this->getModel('cache')->purge())
{
$msg = JText::_('COM_CACHE_EXPIRED_ITEMS_PURGING_ERROR');
$msgType = 'error';
JFactory::getApplication()->enqueueMessage(JText::_('COM_CACHE_EXPIRED_ITEMS_PURGING_ERROR'), 'error');
}

$this->setRedirect('index.php?option=com_cache&view=purge', $msg, $msgType);
else
{
JFactory::getApplication()->enqueueMessage(JText::_('COM_CACHE_EXPIRED_ITEMS_HAVE_BEEN_PURGED'), 'message');
}
$this->setRedirect('index.php?option=com_cache&view=purge');
}
}
2 changes: 2 additions & 0 deletions administrator/components/com_cache/helpers/cache.php
Expand Up @@ -20,6 +20,8 @@ class CacheHelper
* Get a list of filter options for the application clients.
*
* @return array An array of JHtmlOption elements.
*
* @deprecated 4.0 No replacement.
*/
public static function getClientOptions()
{
Expand Down
22 changes: 14 additions & 8 deletions administrator/components/com_cache/models/cache.php
Expand Up @@ -185,6 +185,8 @@ public function getCache()
* Method to get client data.
*
* @return array
*
* @deprecated 4.0 No replacement.
*/
public function getClient()
{
Expand Down Expand Up @@ -227,27 +229,33 @@ public function getPagination()
*
* @param string $group Cache group name.
*
* @return void
* @return boolean True on success, false otherwise
*/
public function clean($group = '')
{
$cache = $this->getCache();
$cache->clean($group);
return $this->getCache()->clean($group);
}

/**
* Purge an array of cache groups.
*
* @param array $array Array of cache group names.
*
* @return void
* @return array Array with errors, if they exist.
*/
public function cleanlist($array)
{
$errors = array();

foreach ($array as $group)
{
$this->clean($group);
if (!$this->clean($group))
{
$errors[] = $group;
}
}

return $errors;
}

/**
Expand All @@ -257,8 +265,6 @@ public function cleanlist($array)
*/
public function purge()
{
$cache = JFactory::getCache('');

return $cache->gc();
return JFactory::getCache('')->gc();
}
}
Expand Up @@ -24,13 +24,8 @@
<?php else : ?>
<div id="j-main-container">
<?php endif; ?>
<?php echo JLayoutHelper::render('joomla.searchtools.default', array('view' => $this, 'options' => array('filterButton' => false))); ?>
<div class="clearfix"></div>
<?php if (empty($this->data)) : ?>
<div class="alert alert-no-items">
<?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
</div>
<?php else : ?>
<?php echo JLayoutHelper::render('joomla.searchtools.default', array('view' => $this, 'options' => array('filterButton' => false, 'totalResults' => count($this->data)))); ?>
<?php if (count($this->data) > 0) : ?>
<table class="table table-striped">
<thead>
<tr>
Expand Down
10 changes: 2 additions & 8 deletions administrator/components/com_cache/views/purge/tmpl/default.php
Expand Up @@ -10,18 +10,12 @@
defined('_JEXEC') or die;
?>

<form action="<?php echo JRoute::_('index.php?option=com_cache'); ?>" method="post" name="adminForm" id="adminForm">
<form action="<?php echo JRoute::_('index.php?option=com_cache&view=purge'); ?>" method="post" name="adminForm" id="adminForm">
<div id="j-sidebar-container" class="span2">
<?php echo $this->sidebar; ?>
</div>
<div id="j-main-container" class="span10">
<fieldset>
<legend><?php echo JText::_('COM_CACHE_PURGE_EXPIRED_ITEMS'); ?></legend>
<p><?php echo JText::_('COM_CACHE_PURGE_INSTRUCTIONS'); ?></p>
</fieldset>
<div class="alert">
<p><?php echo JText::_('COM_CACHE_RESOURCE_INTENSIVE_WARNING'); ?></p>
</div>
<p><?php echo JText::_('COM_CACHE_PURGE_INSTRUCTIONS'); ?></p>
<input type="hidden" name="task" value="" />
<?php echo JHtml::_('form.token'); ?>
</div>
Expand Down
3 changes: 3 additions & 0 deletions administrator/components/com_cache/views/purge/view.html.php
Expand Up @@ -25,8 +25,11 @@ class CacheViewPurge extends JViewLegacy
*/
public function display($tpl = null)
{
JFactory::getApplication()->enqueueMessage(JText::_('COM_CACHE_RESOURCE_INTENSIVE_WARNING'), 'warning');

$this->addToolbar();
$this->sidebar = JHtmlSidebar::render();

parent::display($tpl);
}

Expand Down
Expand Up @@ -139,6 +139,16 @@ protected function getOptions()
}
}

// Displays language code if not set to All
$db = JFactory::getDbo();
$query = $db->getQuery(true)
->select($db->quoteName('language'))
->where($db->quoteName('id') . '=' . (int) $options[$i]->value)
->from($db->quoteName('#__categories'));

$db->setQuery($query);
$language = $db->loadResult();

if ($options[$i]->published == 1)
{
$options[$i]->text = str_repeat('- ', $options[$i]->level) . $options[$i]->text;
Expand All @@ -147,6 +157,11 @@ protected function getOptions()
{
$options[$i]->text = str_repeat('- ', $options[$i]->level) . '[' . $options[$i]->text . ']';
}

if ($language !== '*')
{
$options[$i]->text = $options[$i]->text . ' (' . $language . ')';
}
}

// Get the current user object.
Expand Down
Expand Up @@ -107,7 +107,22 @@ protected function getOptions()
$options[$i]->text = JText::_('JGLOBAL_ROOT_PARENT');
}

// Displays language code if not set to All
$db = JFactory::getDbo();
$query = $db->getQuery(true)
->select($db->quoteName('language'))
->where($db->quoteName('id') . '=' . (int) $options[$i]->value)
->from($db->quoteName('#__categories'));

$db->setQuery($query);
$language = $db->loadResult();

$options[$i]->text = str_repeat('- ', $options[$i]->level) . $options[$i]->text;

if ($language !== '*')
{
$options[$i]->text = $options[$i]->text . ' (' . $language . ')';
}
}

// Get the current user object.
Expand Down
6 changes: 6 additions & 0 deletions administrator/components/com_checkin/models/checkin.php
Expand Up @@ -196,6 +196,12 @@ public function getItems()
if ($db->execute())
{
$results[$tn] = $db->loadResult();

// Show only tables with items to checkin.
if ((int) $results[$tn] === 0)
{
unset($results[$tn]);
}
}
else
{
Expand Down
Expand Up @@ -29,7 +29,7 @@
<div class="clearfix"></div>
<?php if (empty($this->items)) : ?>
<div class="alert alert-no-items">
<?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
<?php echo JText::_('COM_CHECKIN_NO_ITEMS'); ?>
</div>
<?php else : ?>
<table id="global-checkin" class="table table-striped">
Expand Down Expand Up @@ -58,11 +58,7 @@
</label>
</td>
<td>
<?php if ($count > 0) : ?>
<span class="label label-warning"><?php echo $count; ?></span>
<?php else : ?>
<span class="label label-info"><?php echo $count; ?></span>
<?php endif; ?>
<span class="label label-warning"><?php echo $count; ?></span>
</td>
</tr>
<?php $i++; ?>
Expand Down
Expand Up @@ -36,8 +36,12 @@ public function execute()
$this->app->redirect('index.php');
}

$this->app->mimeType = 'application/json';
$this->app->setHeader('Content-Type', $this->app->mimeType . '; charset=' . $this->app->charSet);
$this->app->sendHeaders();

$model = new ConfigModelApplication;
echo new JResponseJson($model->sendTestMail());
JFactory::getApplication()->close();
$this->app->close();
}
}

0 comments on commit b089c42

Please sign in to comment.