Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
170e10a
Removed all default values for type 'TEXT'
eXsiLe95 Sep 4, 2017
914283e
Removed all defaults for SQL types `text` from update files
eXsiLe95 Sep 5, 2017
9894caa
Removed default value for SQL type `mediumtext`
eXsiLe95 Sep 5, 2017
cbe3548
Updated nl-NL installation language files
Jan 31, 2020
68515b4
#27744 allow showing ucm_content items with core_access=0. Similar fi…
svenbluege Jan 31, 2020
99ce3c3
Implements suggested change.
svenbluege Feb 2, 2020
82c10b4
tidyingup
astridx Feb 2, 2020
37a283e
[plg_system_actionlogs] Render values in profile (#27771)
SharkyKZ Feb 3, 2020
87dec22
Show correct message when uploaded file is too large (#27730)
SharkyKZ Feb 3, 2020
10db709
Custom field "list of images" doesn't show directories properly (#20294)
eshiol Feb 3, 2020
80fa015
delete one more
astridx Feb 4, 2020
20730e6
Merge pull request #27775 from astridx/3xcontactdefault
rdeutz Feb 5, 2020
fe798dd
Merge pull request #27745 from svenbluege/staging
rdeutz Feb 6, 2020
32d5f59
Merge branch 'staging' into invalid-sql-joomla3
richard67 Feb 15, 2020
ce9346d
Merge eXsiLe95:invalid-sql-joomla3 into richard67:staging-redo-pr-17860
richard67 Feb 15, 2020
c129993
Fix joomla.sql
richard67 Feb 15, 2020
d88af31
Add missing new update sql scripts
richard67 Feb 15, 2020
993254e
Fix old schema updates for postgresql
richard67 Feb 15, 2020
9fc091b
Move editAssociations code to regular save method (#27941)
Feb 16, 2020
4583899
Corrected English grammar in comment
richard67 Feb 17, 2020
90736a8
Merge pull request #27937 from richard67/staging-redo-pr-17860
wilsonge Feb 18, 2020
8ea5b9f
[3] fix wrong catid for contactcreator (#27949)
alikon Feb 20, 2020
914a371
Fix regression that not allow to use a custom filter with subform fie…
Fedik Feb 20, 2020
ac9b425
Add noopener option (#28005)
Feb 24, 2020
bd13b49
Fix submitting forms with empty repeatable subforms (#27999)
SharkyKZ Feb 24, 2020
e74a2c9
Add new "sponsored" and "ugc" options to rel attribute for external l…
simbus82 Feb 24, 2020
b030efc
Fix some issues when saving menus (#28053)
SharkyKZ Feb 25, 2020
d3ed843
Fix error on PHP 5.3 (#27896)
SharkyKZ Feb 27, 2020
a8b58de
Use unset filter for hits field (#28104)
SharkyKZ Feb 27, 2020
ab67635
Don't filter form data on reload (#28103)
SharkyKZ Feb 28, 2020
494b95b
Only collect contacts when requested (#28077)
zero-24 Feb 29, 2020
eb0ce6b
clarification of the return value for the user ID (#27374)
tecpromotion Feb 29, 2020
35f1325
Fix nested names calculation (#28134)
Fedik Feb 29, 2020
b90df84
Update SQL files (#22419)
HLeithner Mar 4, 2020
fcd1885
Fix default Custom Field in some cases (#27618)
HLeithner Mar 4, 2020
01c3dd3
Remove structured data markup (#28010)
HLeithner Mar 4, 2020
5e7c899
Fix cache logic in UsergrouplistField field type (#28021)
HLeithner Mar 4, 2020
2e40eb2
Joomla! 3.9.16 Release Candidate
HLeithner Mar 4, 2020
cf25340
Joomla! 3.9.16
HLeithner Mar 9, 2020
2e2188d
Reset to dev
HLeithner Mar 10, 2020
26a4393
Merge branch 'staging' into 3.10-dev
HLeithner Mar 10, 2020
d42f082
Merge branch '3.10-dev' into 4.0-dev
wilsonge Mar 14, 2020
ac02bb1
Fix code style errors
wilsonge Mar 14, 2020
2aa8cce
Add back line removed during conflicts
wilsonge Mar 14, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions administrator/components/com_categories/forms/category.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
default="0"
class="readonly"
readonly="true"
filter="unset"
/>

<field
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ class FieldLayoutField extends FormField
*/
protected function getInput()
{
$extension = explode('.', $this->form->getValue('context'))[0];
$extension = explode('.', $this->form->getValue('context'));
$extension = $extension[0];

if ($extension)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ public function save($data)
private function checkDefaultValue($data)
{
// Empty default values are correct
if (empty($data['default_value']))
if (empty($data['default_value']) && $data['default_value'] !== '0')
{
return true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ private function checkContent()
$params = ComponentHelper::getParams('com_media');

$helper = new MediaHelper;
$serverlength = $this->input->server->get('CONTENT_LENGTH');
$serverlength = $this->input->server->getInt('CONTENT_LENGTH');

if ($serverlength > ($params->get('upload_maxsize', 0) * 1024 * 1024)
|| $serverlength > $helper->toBytes(ini_get('upload_max_filesize'))
Expand Down
3 changes: 3 additions & 0 deletions administrator/components/com_menus/forms/item_url.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,14 @@
<option value="license"/>
<option value="next"/>
<option value="nofollow"/>
<option value="noopener"/>
<option value="noreferrer"/>
<option value="prefetch"/>
<option value="prev"/>
<option value="search"/>
<option value="sponsored"/>
<option value="tag"/>
<option value="ugc"/>
</field>

<field
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public function save($key = null, $urlVar = null)
$this->setMessage(Text::_('COM_MENUS_ERROR_MENUTYPE'), 'error');

// Redirect back to the edit screen.
$this->setRedirect(Route::_('index.php?option=com_menus&view=menu&layout=edit', false));
$this->setRedirect(Route::_('index.php?option=com_menus&view=menu&layout=edit' . $this->getRedirectToItemAppend($recordId), false));

return false;
}
Expand Down Expand Up @@ -113,7 +113,7 @@ public function save($key = null, $urlVar = null)
$app->setUserState($context . '.data', $data);

// Redirect back to the edit screen.
$this->setRedirect(Route::_('index.php?option=com_menus&view=menu&layout=edit', false));
$this->setRedirect(Route::_('index.php?option=com_menus&view=menu&layout=edit' . $this->getRedirectToItemAppend($recordId), false));

return false;
}
Expand All @@ -133,7 +133,7 @@ public function save($key = null, $urlVar = null)

// Redirect back to the edit screen.
$this->setMessage(Text::sprintf('JLIB_APPLICATION_ERROR_SAVE_FAILED', $model->getError()), 'error');
$this->setRedirect(Route::_('index.php?option=com_menus&view=menu&layout=edit', false));
$this->setRedirect(Route::_('index.php?option=com_menus&view=menu&layout=edit' . $this->getRedirectToItemAppend($recordId), false));

return false;
}
Expand Down Expand Up @@ -168,6 +168,7 @@ public function save($key = null, $urlVar = null)
// Set the record data in the session.
$recordId = $model->getState($this->context . '.id');
$this->holdEditId($context, $recordId);
$app->setUserState($context . '.data', null);

// Redirect back to the edit screen.
$this->setRedirect(Route::_('index.php?option=com_menus&view=menu&layout=edit' . $this->getRedirectToItemAppend($recordId), false));
Expand Down
1 change: 1 addition & 0 deletions administrator/components/com_tags/forms/tag.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
class="readonly"
default="0"
readonly="true"
filter="unset"
/>

<field
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,14 @@ public function copy()
$templateID = $this->input->getInt('id', 0);
$file = $this->input->get('file');

// Access check.
if (!$this->allowEdit())
{
$app->enqueueMessage(Text::_('JLIB_APPLICATION_ERROR_SAVE_NOT_PERMITTED'), 'error');

return false;
}

$this->setRedirect('index.php?option=com_templates&view=template&id=' . $templateID . '&file=' . $file);

/* @var \Joomla\Component\Templates\Administrator\Model\TemplateModel $model */
Expand Down Expand Up @@ -260,19 +268,7 @@ public function getModel($name = 'Template', $prefix = 'Administrator', $config
*/
protected function allowEdit()
{
return $this->app->getIdentity()->authorise('core.edit', 'com_templates');
}

/**
* Method to check if you can save a new or existing record.
*
* @return boolean
*
* @since 3.2
*/
protected function allowSave()
{
return $this->allowEdit();
return $this->app->getIdentity()->authorise('core.admin');
}

/**
Expand All @@ -296,7 +292,7 @@ public function save()
$explodeArray = explode(':', base64_decode($fileName));

// Access check.
if (!$this->allowSave())
if (!$this->allowEdit())
{
$this->setMessage(Text::_('JLIB_APPLICATION_ERROR_SAVE_NOT_PERMITTED'), 'error');

Expand Down Expand Up @@ -411,6 +407,14 @@ public function overrides()
$override = base64_decode($this->input->get('folder'));
$id = $this->input->get('id');

// Access check.
if (!$this->allowEdit())
{
$this->app->enqueueMessage(Text::_('JLIB_APPLICATION_ERROR_SAVE_NOT_PERMITTED'), 'error');

return;
}

if ($model->createOverride($override))
{
$this->setMessage(Text::_('COM_TEMPLATES_OVERRIDE_SUCCESS'));
Expand Down Expand Up @@ -438,6 +442,14 @@ public function delete()
$id = $this->input->get('id');
$file = $this->input->get('file');

// Access check.
if (!$this->allowEdit())
{
$this->app->enqueueMessage(Text::_('JLIB_APPLICATION_ERROR_SAVE_NOT_PERMITTED'), 'error');

return;
}

if (base64_decode(urldecode($file)) == '/index.php')
{
$this->setMessage(Text::_('COM_TEMPLATES_ERROR_INDEX_DELETE'), 'warning');
Expand Down Expand Up @@ -479,6 +491,14 @@ public function createFile()
$location = base64_decode($this->input->get('address'));
$type = $this->input->get('type');

// Access check.
if (!$this->allowEdit())
{
$this->app->enqueueMessage(Text::_('JLIB_APPLICATION_ERROR_SAVE_NOT_PERMITTED'), 'error');

return;
}

if ($type == 'null')
{
$this->setMessage(Text::_('COM_TEMPLATES_INVALID_FILE_TYPE'), 'error');
Expand Down Expand Up @@ -525,6 +545,14 @@ public function uploadFile()
$upload = $this->input->files->get('files');
$location = base64_decode($this->input->get('address'));

// Access check.
if (!$this->allowEdit())
{
$this->app->enqueueMessage(Text::_('JLIB_APPLICATION_ERROR_SAVE_NOT_PERMITTED'), 'error');

return;
}

if ($return = $model->uploadFile($upload, $location))
{
$this->setMessage(Text::_('COM_TEMPLATES_FILE_UPLOAD_SUCCESS') . $upload['name']);
Expand Down Expand Up @@ -559,6 +587,14 @@ public function createFolder()
$name = $this->input->get('name');
$location = base64_decode($this->input->get('address'));

// Access check.
if (!$this->allowEdit())
{
$this->app->enqueueMessage(Text::_('JLIB_APPLICATION_ERROR_SAVE_NOT_PERMITTED'), 'error');

return;
}

if (!preg_match('/^[a-zA-Z0-9-_.]+$/', $name))
{
$this->setMessage(Text::_('COM_TEMPLATES_INVALID_FOLDER_NAME'), 'error');
Expand Down Expand Up @@ -597,6 +633,14 @@ public function deleteFolder()
$file = $this->input->get('file');
$location = base64_decode($this->input->get('address'));

// Access check.
if (!$this->allowEdit())
{
$this->app->enqueueMessage(Text::_('JLIB_APPLICATION_ERROR_SAVE_NOT_PERMITTED'), 'error');

return;
}

if (empty($location))
{
$this->setMessage(Text::_('COM_TEMPLATES_ERROR_ROOT_DELETE'), 'warning');
Expand Down Expand Up @@ -641,6 +685,14 @@ public function renameFile()
$file = $this->input->get('file');
$newName = $this->input->get('new_name');

// Access check.
if (!$this->allowEdit())
{
$this->app->enqueueMessage(Text::_('JLIB_APPLICATION_ERROR_SAVE_NOT_PERMITTED'), 'error');

return;
}

if (base64_decode(urldecode($file)) == '/index.php')
{
$this->setMessage(Text::_('COM_TEMPLATES_ERROR_RENAME_INDEX'), 'warning');
Expand Down Expand Up @@ -676,6 +728,9 @@ public function renameFile()
*/
public function cropImage()
{
// Check for request forgeries
$this->checkToken();

$id = $this->input->get('id');
$file = $this->input->get('file');
$x = $this->input->get('x');
Expand All @@ -686,6 +741,14 @@ public function cropImage()
/** @var \Joomla\Component\Templates\Administrator\Model\TemplateModel $model */
$model = $this->getModel();

// Access check.
if (!$this->allowEdit())
{
$this->app->enqueueMessage(Text::_('JLIB_APPLICATION_ERROR_SAVE_NOT_PERMITTED'), 'error');

return;
}

if (empty($w) && empty($h) && empty($x) && empty($y))
{
$this->setMessage(Text::_('COM_TEMPLATES_CROP_AREA_ERROR'), 'error');
Expand Down Expand Up @@ -715,6 +778,9 @@ public function cropImage()
*/
public function resizeImage()
{
// Check for request forgeries
$this->checkToken();

$id = $this->input->get('id');
$file = $this->input->get('file');
$width = $this->input->get('width');
Expand All @@ -723,6 +789,14 @@ public function resizeImage()
/** @var \Joomla\Component\Templates\Administrator\Model\TemplateModel $model */
$model = $this->getModel();

// Access check.
if (!$this->allowEdit())
{
$this->app->enqueueMessage(Text::_('JLIB_APPLICATION_ERROR_SAVE_NOT_PERMITTED'), 'error');

return;
}

if ($model->resizeImage($file, $width, $height))
{
$this->setMessage(Text::_('COM_TEMPLATES_FILE_RESIZE_SUCCESS'));
Expand Down Expand Up @@ -757,6 +831,14 @@ public function copyFile()
/** @var \Joomla\Component\Templates\Administrator\Model\TemplateModel $model */
$model = $this->getModel();

// Access check.
if (!$this->allowEdit())
{
$this->app->enqueueMessage(Text::_('JLIB_APPLICATION_ERROR_SAVE_NOT_PERMITTED'), 'error');

return;
}

if (!preg_match('/^[a-zA-Z0-9-_]+$/', $newName))
{
$this->setMessage(Text::_('COM_TEMPLATES_INVALID_FILE_NAME'), 'error');
Expand Down Expand Up @@ -794,6 +876,14 @@ public function extractArchive()
/** @var \Joomla\Component\Templates\Administrator\Model\TemplateModel $model */
$model = $this->getModel();

// Access check.
if (!$this->allowEdit())
{
$this->app->enqueueMessage(Text::_('JLIB_APPLICATION_ERROR_SAVE_NOT_PERMITTED'), 'error');

return;
}

if ($model->extractArchive($file))
{
$this->setMessage(Text::_('COM_TEMPLATES_FILE_ARCHIVE_EXTRACT_SUCCESS'));
Expand Down
2 changes: 1 addition & 1 deletion administrator/language/en-GB/plg_fields_sql.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
; Note : All ini files need to be saved as UTF-8

PLG_FIELDS_SQL="Fields - SQL"
PLG_FIELDS_SQL_CREATE_NOT_POSSIBLE="Only a Super User can create an SQL field!"
PLG_FIELDS_SQL_CREATE_NOT_POSSIBLE="Only a Super User can create or edit an SQL field!"
PLG_FIELDS_SQL_LABEL="SQL (%s)"
PLG_FIELDS_SQL_PARAMS_MULTIPLE_LABEL="Multiple"
; In the string below the terms 'value' and 'text' should not be translated
Expand Down
4 changes: 3 additions & 1 deletion components/com_contact/src/View/Contact/HtmlView.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ public function display($tpl = null)
$item = $this->get('Item');
$this->form = $this->get('Form');
$params = $state->get('params');
$contacts = array();

$temp = clone $params;

Expand Down Expand Up @@ -154,7 +155,8 @@ public function display($tpl = null)
$item->params = $temp;
}

if ($item)
// Collect extra contact information when this information is required
if ($item && $item->params->get('show_contact_list'))
{
// Get Category Model data
$categoryModel = new \Joomla\Component\Contact\Site\Model\CategoryModel(array('ignore_request' => true));
Expand Down
3 changes: 2 additions & 1 deletion components/com_content/src/Model/FeaturedModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
use Joomla\Component\Content\Administrator\Extension\ContentComponent;
use Joomla\Component\Content\Site\Helper\QueryHelper;
use Joomla\Registry\Registry;
use Joomla\Utilities\ArrayHelper;

/**
* Frontpage Component Model
Expand Down Expand Up @@ -168,7 +169,7 @@ protected function getListQuery()

if (is_array($featuredCategories) && !in_array('', $featuredCategories))
{
$query->where('a.catid IN (' . implode(',', $featuredCategories) . ')');
$query->where('a.catid IN (' . implode(',', ArrayHelper::toInteger($featuredCategories)) . ')');
}

return $query;
Expand Down
Loading