Stable release of v3.2.0-beta1
Move beta to main repo. Fix #1053 so that the right and left tabs display correctly in Joomla 4&5.
This commit is contained in:
@ -3,8 +3,8 @@
|
||||
* @package Joomla.Component.Builder
|
||||
*
|
||||
* @created 30th April, 2015
|
||||
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
|
||||
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
|
||||
* @author Llewellyn van der Merwe <https://dev.vdm.io>
|
||||
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
|
||||
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
@ -31,7 +31,7 @@ class ###Component###Model###SView### extends ItemModel
|
||||
*/
|
||||
protected $_context = 'com_###component###.###sview###';
|
||||
|
||||
/**
|
||||
/**
|
||||
* Model user data.
|
||||
*
|
||||
* @var strings
|
||||
@ -61,7 +61,7 @@ class ###Component###Model###SView### extends ItemModel
|
||||
*/
|
||||
protected function populateState()
|
||||
{
|
||||
$this->app = JFactory::getApplication();
|
||||
$this->app = Factory::getApplication();
|
||||
$this->input = $this->app->input;
|
||||
// Get the item main id
|
||||
$id = $this->input->getInt('id', null);
|
||||
@ -80,12 +80,12 @@ class ###Component###Model###SView### extends ItemModel
|
||||
*/
|
||||
public function getItem($pk = null)
|
||||
{
|
||||
$this->user = JFactory::getUser();
|
||||
$this->user = Factory::getUser();
|
||||
// check if this user has permission to access item
|
||||
if (!$this->user->authorise('###sview###.access', 'com_###component###'))
|
||||
{
|
||||
$app = JFactory::getApplication();
|
||||
$app->enqueueMessage(JText::_('Not authorised!'), 'error');
|
||||
$app = Factory::getApplication();
|
||||
$app->enqueueMessage(Text::_('Not authorised!'), 'error');
|
||||
// redirect away if not a correct to cPanel/default view
|
||||
$app->redirect('index.php?option=com_###component###');
|
||||
return false;
|
||||
@ -98,10 +98,10 @@ class ###Component###Model###SView### extends ItemModel
|
||||
$this->initSet = true;
|
||||
|
||||
$pk = (!empty($pk)) ? $pk : (int) $this->getState('###sview###.id');###CUSTOM_ADMIN_BEFORE_GET_ITEM###
|
||||
|
||||
|
||||
if ($this->_item === null)
|
||||
{
|
||||
$this->_item = array();
|
||||
$this->_item = [];
|
||||
}###LICENSE_LOCKED_CHECK###
|
||||
|
||||
if (!isset($this->_item[$pk]))
|
||||
@ -114,7 +114,7 @@ class ###Component###Model###SView### extends ItemModel
|
||||
if ($e->getCode() == 404)
|
||||
{
|
||||
// Need to go thru the error handler to allow Redirect to work.
|
||||
JError::raiseWarning(404, $e->getMessage());
|
||||
JError::raiseError(404, $e->getMessage());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user