Skip to content

Commit 2baa00b

Browse files
committed
Merge branch 'staging' of https://github.com/joomla/joomla-cms into staging
2 parents 97d1fb7 + f827dfc commit 2baa00b

File tree

174 files changed

+492
-454
lines changed

Some content is hidden

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

174 files changed

+492
-454
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ services:
5656

5757
before_script:
5858
# JavaScript tests
59-
- if [[ $RUN_JAVASCRIPT_TESTS == "yes" ]]; then export DISPLAY=:99.0; bash tests/javascript/travis-tests.sh $PWD; fi
59+
- if [[ $RUN_JAVASCRIPT_TESTS == "yes" ]]; then export DISPLAY=:99.0; bash build/travis/javascript-tests.sh $PWD; fi
6060
# Make sure all dev dependencies are installed
6161
- if [[ $RUN_UNIT_TESTS == "yes" ]]; then bash build/travis/unit-tests.sh $PWD; fi
6262

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ Ready to install Joomla?
5353
* Check the [minimum requirements](https://www.joomla.org/about-joomla/technical-requirements.html).
5454
* How do you [install Joomla](https://docs.joomla.org/J3.x:Installing_Joomla)?
5555
* You could start your Joomla! experience by [building your site on a local test server](https://docs.joomla.org/Installing_Joomla_locally).
56-
When ready, it can be moved to an on-line hosting account of your choice.
56+
When ready, it can be moved to an online hosting account of your choice.
5757

5858
Updates are free!
5959
---------------------

README.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
* Check the minimum requirements here: https://www.joomla.org/about-joomla/technical-requirements.html
3939
* How do you install Joomla - hhttps://docs.joomla.org/J3.x:Installing_Joomla
4040
* You could start your Joomla! experience building your site on a local test server.
41-
When ready it can be moved to an on-line hosting account of your choice.
41+
When ready it can be moved to an online hosting account of your choice.
4242
See the tutorial: https://docs.joomla.org/Installing_Joomla_locally
4343

4444
9- Updates are free!

administrator/components/com_banners/banners.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
if (!JFactory::getUser()->authorise('core.manage', 'com_banners'))
1414
{
15-
return JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR'));
15+
throw new JControllerExceptionNotallowed(JText::_('JERROR_ALERTNOAUTHOR'), 403);
1616
}
1717

1818
// Execute the task.

administrator/components/com_content/controllers/article.php

Lines changed: 11 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -84,45 +84,32 @@ protected function allowEdit($data = array(), $key = 'id')
8484
{
8585
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
8686
$user = JFactory::getUser();
87-
$userId = $user->get('id');
8887

89-
// If we get a deny at the component level, we cannot override here.
90-
if (!parent::allowEdit($data, $key))
88+
// Zero record (id:0), return component edit permission by calling parent controller method
89+
if (!$recordId)
9190
{
92-
return false;
91+
return parent::allowEdit($data, $key);
9392
}
9493

95-
// Check general edit permission first.
94+
// Check edit on the record asset (explicit or inherited)
9695
if ($user->authorise('core.edit', 'com_content.article.' . $recordId))
9796
{
9897
return true;
9998
}
10099

101-
// Fallback on edit.own.
102-
// First test if the permission is available.
100+
// Check edit own on the record asset (explicit or inherited)
103101
if ($user->authorise('core.edit.own', 'com_content.article.' . $recordId))
104102
{
105-
// Now test the owner is the user.
106-
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
103+
// Existing record already has an owner, get it
104+
$record = $this->getModel()->getItem($recordId);
107105

108-
if (empty($ownerId) && $recordId)
106+
if (empty($record))
109107
{
110-
// Need to do a lookup from the model.
111-
$record = $this->getModel()->getItem($recordId);
112-
113-
if (empty($record))
114-
{
115-
return false;
116-
}
117-
118-
$ownerId = $record->created_by;
108+
return false;
119109
}
120110

121-
// If the owner matches 'me' then permission is granted.
122-
if ($ownerId == $userId)
123-
{
124-
return true;
125-
}
111+
// Grant if current user is owner of the record
112+
return $user->get('id') == $record->created_by;
126113
}
127114

128115
return false;

administrator/components/com_contenthistory/helpers/contenthistory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ public static function loadLanguageFiles($typeAlias)
260260
$lang->load($component, JPATH_ADMINISTRATOR, null, false, true)
261261
|| $lang->load($component, JPath::clean(JPATH_ADMINISTRATOR . '/components/' . $component), null, false, true);
262262

263-
// Force loading of back-end global language file
263+
// Force loading of backend global language file
264264
$lang->load('joomla', JPath::clean(JPATH_ADMINISTRATOR), null, false, true);
265265
}
266266
}

administrator/components/com_finder/helpers/language.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public static function loadComponentLanguage()
9595
}
9696

9797
/**
98-
* Method to load Smart Search plug-in language files.
98+
* Method to load Smart Search plugin language files.
9999
*
100100
* @return void
101101
*
@@ -113,7 +113,7 @@ public static function loadPluginLanguage()
113113

114114
$loaded = true;
115115

116-
// Get array of all the enabled Smart Search plug-in names.
116+
// Get array of all the enabled Smart Search plugin names.
117117
$db = JFactory::getDbo();
118118
$query = $db->getQuery(true)
119119
->select('name')
@@ -133,7 +133,7 @@ public static function loadPluginLanguage()
133133
$lang = JFactory::getLanguage();
134134
$lang->load('plg_content_finder', JPATH_ADMINISTRATOR);
135135

136-
// Load language file for each plug-in.
136+
// Load language file for each plugin.
137137
foreach ($plugins as $plugin)
138138
{
139139
$lang->load($plugin->name, JPATH_ADMINISTRATOR);

administrator/components/com_finder/models/index.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,9 +240,9 @@ protected function getListQuery()
240240
}
241241

242242
/**
243-
* Method to get the state of the Smart Search plug-ins.
243+
* Method to get the state of the Smart Search Plugins.
244244
*
245-
* @return array Array of relevant plug-ins and whether they are enabled or not.
245+
* @return array Array of relevant plugins and whether they are enabled or not.
246246
*
247247
* @since 2.5
248248
*/

administrator/components/com_finder/views/index/view.html.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ class FinderViewIndex extends JViewLegacy
7171
*/
7272
public function display($tpl = null)
7373
{
74-
// Load plug-in language files.
74+
// Load plugin language files.
7575
FinderHelperLanguage::loadPluginLanguage();
7676

7777
$this->items = $this->get('Items');

administrator/components/com_finder/views/maps/view.html.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class FinderViewMaps extends JViewLegacy
6464
*/
6565
public function display($tpl = null)
6666
{
67-
// Load plug-in language files.
67+
// Load plugin language files.
6868
FinderHelperLanguage::loadPluginLanguage();
6969

7070
// Load the view data.

0 commit comments

Comments
 (0)