Skip to content

Commit 3ebd5e4

Browse files
committed
Merge pull request #11 from joomla/staging
Update from upstream
2 parents ec54dfc + 47d37b2 commit 3ebd5e4

File tree

311 files changed

+5067
-4726
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

311 files changed

+5067
-4726
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ Desktop.ini
6464
/libraries/vendor/ircmaxell/password-compat/phpunit.xml.dist
6565
/libraries/vendor/ircmaxell/password-compat/README.md
6666
/libraries/vendor/ircmaxell/password-compat/version-test.php
67+
/libraries/vendor/joomla/*/.gitignore
68+
/libraries/vendor/joomla/*/.gitmodules
6769
/libraries/vendor/joomla/*/docs
6870
/libraries/vendor/joomla/*/Tests
6971
/libraries/vendor/joomla/*/vendor

administrator/components/com_admin/models/sysinfo.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,7 @@ public function &getPhpSettings()
251251
'zip' => function_exists('zip_open') && function_exists('zip_read'),
252252
'mbstring' => extension_loaded('mbstring'),
253253
'iconv' => function_exists('iconv'),
254+
'mcrypt' => extension_loaded('mcrypt'),
254255
'max_input_vars' => ini_get('max_input_vars'),
255256
);
256257

administrator/components/com_admin/script.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class JoomlaInstallerScript
1919
/**
2020
* Method to update Joomla!
2121
*
22-
* @param JInstallerFile $installer The class calling this method
22+
* @param JInstallerAdapterFile $installer The class calling this method
2323
*
2424
* @return void
2525
*/
@@ -31,7 +31,6 @@ public function update($installer)
3131
JLog::addLogger($options, JLog::INFO, array('Update', 'databasequery', 'jerror'));
3232
JLog::add(JText::_('COM_JOOMLAUPDATE_UPDATE_LOG_DELETE_FILES'), JLog::INFO, 'Update');
3333

34-
$this->deleteUnexistingFiles();
3534
$this->updateManifestCaches();
3635
$this->updateDatabase();
3736
$this->clearRadCache();
@@ -1408,6 +1407,8 @@ public function deleteUnexistingFiles()
14081407
'/libraries/joomla/document/opensearch/opensearch.php',
14091408
'/libraries/joomla/document/raw/raw.php',
14101409
'/libraries/joomla/document/xml/xml.php',
1410+
'/administrator/components/com_installer/views/languages/tmpl/default_filter.php',
1411+
'/administrator/components/com_joomlaupdate/helpers/download.php',
14111412
);
14121413

14131414
// TODO There is an issue while deleting folders using the ftp mode

administrator/components/com_admin/views/sysinfo/tmpl/default_phpsettings.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,14 @@
157157
<?php echo JHtml::_('phpsetting.set', $this->php_settings['iconv']); ?>
158158
</td>
159159
</tr>
160+
<tr>
161+
<td>
162+
<?php echo JText::_('COM_ADMIN_MCRYPT_ENABLED'); ?>
163+
</td>
164+
<td>
165+
<?php echo JHtml::_('phpsetting.set', $this->php_settings['mcrypt']); ?>
166+
</td>
167+
</tr>
160168
<tr>
161169
<td>
162170
<?php echo JText::_('COM_ADMIN_MAX_INPUT_VARS'); ?>

administrator/components/com_banners/models/forms/filter_banners.xml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,16 @@
2828
>
2929
<option value="">JOPTION_SELECT_CATEGORY</option>
3030
</field>
31+
<field
32+
name="client_id"
33+
type="bannerclient"
34+
label="COM_BANNERS_FILTER_CLIENT"
35+
extension="com_content"
36+
description="COM_BANNERS_FILTER_CLIENT_DESC"
37+
onchange="this.form.submit();"
38+
>
39+
<option value="">COM_BANNERS_SELECT_CLIENT</option>
40+
</field>
3141
<field
3242
name="language"
3343
type="contentlanguage"
@@ -38,16 +48,6 @@
3848
<option value="">JOPTION_SELECT_LANGUAGE</option>
3949
<option value="*">JALL</option>
4050
</field>
41-
<field
42-
name="client_id"
43-
type="bannerclient"
44-
label="COM_BANNERS_FILTER_CLIENT"
45-
extension="com_content"
46-
description="COM_BANNERS_FILTER_CLIENT_DESC"
47-
onchange="this.form.submit();"
48-
>
49-
<option value="">COM_BANNERS_SELECT_CLIENT</option>
50-
</field>
5151
</fields>
5252
<fields name="list">
5353
<field

administrator/components/com_cache/controller.php

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -76,18 +76,24 @@ public function delete()
7676

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

79-
$model = $this->getModel('cache');
80-
8179
if (empty($cid))
8280
{
83-
JError::raiseWarning(500, JText::_('JERROR_NO_ITEMS_SELECTED'));
81+
JFactory::getApplication()->enqueueMessage(JText::_('JERROR_NO_ITEMS_SELECTED'), 'warning');
8482
}
8583
else
8684
{
87-
$model->cleanlist($cid);
88-
}
85+
$result = $this->getModel('cache')->cleanlist($cid);
8986

90-
$this->setRedirect('index.php?option=com_cache&client=' . $model->getClient()->id);
87+
if ($result !== array())
88+
{
89+
JFactory::getApplication()->enqueueMessage(JText::sprintf('COM_CACHE_EXPIRED_ITEMS_DELETE_ERROR', implode(', ', $result)), 'error');
90+
}
91+
else
92+
{
93+
JFactory::getApplication()->enqueueMessage(JText::_('COM_CACHE_EXPIRED_ITEMS_HAVE_BEEN_DELETED'), 'message');
94+
}
95+
}
96+
$this->setRedirect('index.php?option=com_cache');
9197
}
9298

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

103-
$model = $this->getModel('cache');
104-
$ret = $model->purge();
105-
106-
$msg = JText::_('COM_CACHE_EXPIRED_ITEMS_HAVE_BEEN_PURGED');
107-
$msgType = 'message';
108-
109-
if ($ret === false)
109+
if (!$this->getModel('cache')->purge())
110110
{
111-
$msg = JText::_('COM_CACHE_EXPIRED_ITEMS_PURGING_ERROR');
112-
$msgType = 'error';
111+
JFactory::getApplication()->enqueueMessage(JText::_('COM_CACHE_EXPIRED_ITEMS_PURGING_ERROR'), 'error');
113112
}
114-
115-
$this->setRedirect('index.php?option=com_cache&view=purge', $msg, $msgType);
113+
else
114+
{
115+
JFactory::getApplication()->enqueueMessage(JText::_('COM_CACHE_EXPIRED_ITEMS_HAVE_BEEN_PURGED'), 'message');
116+
}
117+
$this->setRedirect('index.php?option=com_cache&view=purge');
116118
}
117119
}

administrator/components/com_cache/helpers/cache.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ class CacheHelper
2020
* Get a list of filter options for the application clients.
2121
*
2222
* @return array An array of JHtmlOption elements.
23+
*
24+
* @deprecated 4.0 No replacement.
2325
*/
2426
public static function getClientOptions()
2527
{

administrator/components/com_cache/models/cache.php

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,8 @@ public function getCache()
185185
* Method to get client data.
186186
*
187187
* @return array
188+
*
189+
* @deprecated 4.0 No replacement.
188190
*/
189191
public function getClient()
190192
{
@@ -227,27 +229,33 @@ public function getPagination()
227229
*
228230
* @param string $group Cache group name.
229231
*
230-
* @return void
232+
* @return boolean True on success, false otherwise
231233
*/
232234
public function clean($group = '')
233235
{
234-
$cache = $this->getCache();
235-
$cache->clean($group);
236+
return $this->getCache()->clean($group);
236237
}
237238

238239
/**
239240
* Purge an array of cache groups.
240241
*
241242
* @param array $array Array of cache group names.
242243
*
243-
* @return void
244+
* @return array Array with errors, if they exist.
244245
*/
245246
public function cleanlist($array)
246247
{
248+
$errors = array();
249+
247250
foreach ($array as $group)
248251
{
249-
$this->clean($group);
252+
if (!$this->clean($group))
253+
{
254+
$errors[] = $group;
255+
}
250256
}
257+
258+
return $errors;
251259
}
252260

253261
/**
@@ -257,8 +265,6 @@ public function cleanlist($array)
257265
*/
258266
public function purge()
259267
{
260-
$cache = JFactory::getCache('');
261-
262-
return $cache->gc();
268+
return JFactory::getCache('')->gc();
263269
}
264270
}

administrator/components/com_cache/views/cache/tmpl/default.php

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,8 @@
2424
<?php else : ?>
2525
<div id="j-main-container">
2626
<?php endif; ?>
27-
<?php echo JLayoutHelper::render('joomla.searchtools.default', array('view' => $this, 'options' => array('filterButton' => false))); ?>
28-
<div class="clearfix"></div>
29-
<?php if (empty($this->data)) : ?>
30-
<div class="alert alert-no-items">
31-
<?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
32-
</div>
33-
<?php else : ?>
27+
<?php echo JLayoutHelper::render('joomla.searchtools.default', array('view' => $this, 'options' => array('filterButton' => false, 'totalResults' => count($this->data)))); ?>
28+
<?php if (count($this->data) > 0) : ?>
3429
<table class="table table-striped">
3530
<thead>
3631
<tr>

administrator/components/com_cache/views/purge/tmpl/default.php

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,12 @@
1010
defined('_JEXEC') or die;
1111
?>
1212

13-
<form action="<?php echo JRoute::_('index.php?option=com_cache'); ?>" method="post" name="adminForm" id="adminForm">
13+
<form action="<?php echo JRoute::_('index.php?option=com_cache&view=purge'); ?>" method="post" name="adminForm" id="adminForm">
1414
<div id="j-sidebar-container" class="span2">
1515
<?php echo $this->sidebar; ?>
1616
</div>
1717
<div id="j-main-container" class="span10">
18-
<fieldset>
19-
<legend><?php echo JText::_('COM_CACHE_PURGE_EXPIRED_ITEMS'); ?></legend>
20-
<p><?php echo JText::_('COM_CACHE_PURGE_INSTRUCTIONS'); ?></p>
21-
</fieldset>
22-
<div class="alert">
23-
<p><?php echo JText::_('COM_CACHE_RESOURCE_INTENSIVE_WARNING'); ?></p>
24-
</div>
18+
<p><?php echo JText::_('COM_CACHE_PURGE_INSTRUCTIONS'); ?></p>
2519
<input type="hidden" name="task" value="" />
2620
<?php echo JHtml::_('form.token'); ?>
2721
</div>

0 commit comments

Comments
 (0)