Skip to content

Commit

Permalink
Bug #156460 fix: Front End>> User redirect to other menu and getting …
Browse files Browse the repository at this point in the history
…an error while trying to unpublish the record without permission
  • Loading branch information
ankush-maherwal committed Jan 24, 2020
1 parent 43e85e2 commit e325a46
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 15 deletions.
25 changes: 13 additions & 12 deletions src/components/com_tjucm/site/controllers/item.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,6 @@ public function __construct()
$this->client = JFactory::getApplication()->input->get('client');
$this->created_by = JFactory::getApplication()->input->get('created_by');

$this->appendUrl = "";

if (!empty($this->created_by))
{
$this->appendUrl .= "&created_by=" . $this->created_by;
}

if (!empty($this->client))
{
$this->appendUrl .= "&client=" . $this->client;
}

// Get UCM type id from uniquue identifier
JModelLegacy::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_tjucm/models');
$tjUcmModelType = JModelLegacy::getInstance('Type', 'TjucmModel');
Expand Down Expand Up @@ -69,6 +57,19 @@ public function __construct()
}
}
}

$this->appendUrl = "";

if (!empty($this->created_by))
{
$this->appendUrl .= "&created_by=" . $this->created_by;
}

if (!empty($this->client))
{
$this->appendUrl .= "&client=" . $this->client;
}

parent::__construct();
}

Expand Down
3 changes: 1 addition & 2 deletions src/components/com_tjucm/site/layouts/list/list.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
}

$fieldsData = $displayData['fieldsData'];

$app = Factory::getApplication();
$user = Factory::getUser();

Expand Down Expand Up @@ -152,7 +151,7 @@

$fieldXml = $formObject->getFieldXml($tjFieldsFieldTable->name);
?>
<td style="word-break: break-word;" width="<?php echo (85 - $statusColumnWidth) / count($this->listcolumn) . '%';?>">
<td style="word-break: break-word;" width="<?php echo (85 - $displayData['statusColumnWidth']) / count($displayData['listcolumn']) . '%';?>">
<?php
if ($canView || ($item->created_by == $user->id))
{
Expand Down
4 changes: 3 additions & 1 deletion src/components/com_tjucm/site/views/items/tmpl/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,9 @@ function copyItem()
'ucmTypeId' => $this->ucmTypeId,
'ucmTypeParams' => $this->ucmTypeParams,
'fieldsData' => $fieldsData,
'formObject' => $formObject
'formObject' => $formObject,
'statusColumnWidth' => $statusColumnWidth,
'listcolumn' => $this->listcolumn
)
);
}
Expand Down

0 comments on commit e325a46

Please sign in to comment.