From a8aa33312a72797adb7778c995bc7ebb75c710ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cankush=5Fm=E2=80=9D?= Date: Fri, 24 Jan 2020 15:23:03 +0530 Subject: [PATCH 1/2] Bug #154919 fix: Local Site>> Getting some technical message once user installed the latest package on local site --- .../com_tjucm/site/views/itemform/tmpl/default.php | 2 +- .../com_tjucm/site/views/itemform/view.html.php | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/components/com_tjucm/site/views/itemform/tmpl/default.php b/src/components/com_tjucm/site/views/itemform/tmpl/default.php index 79aad352..9b02b752 100644 --- a/src/components/com_tjucm/site/views/itemform/tmpl/default.php +++ b/src/components/com_tjucm/site/views/itemform/tmpl/default.php @@ -41,7 +41,7 @@ $baseUrl = $jinput->input->server->get('REQUEST_URI', '', 'STRING'); $calledFrom = (strpos($baseUrl, 'administrator')) ? 'backend' : 'frontend'; $layout = ($calledFrom == 'frontend') ? 'default' : 'edit'; -$dynamicLayout = $this->setLayout($typeParams->layout); +$dynamicLayout = $this->setLayout($this->layout); $fieldsets_counter_deafult = 0; $setnavigation = false; diff --git a/src/components/com_tjucm/site/views/itemform/view.html.php b/src/components/com_tjucm/site/views/itemform/view.html.php index 3c942b00..6f8e5301 100644 --- a/src/components/com_tjucm/site/views/itemform/view.html.php +++ b/src/components/com_tjucm/site/views/itemform/view.html.php @@ -242,7 +242,7 @@ public function display($tpl = null) } // Set Layout to type view - $layout = isset($typeParams->layout) ? $typeParams->layout : ''; + $this->layout = isset($typeParams->layout) ? $typeParams->layout : ''; if (isset($typeParams->layout) && !empty($typeParams->layout)) { @@ -284,9 +284,9 @@ public function display($tpl = null) $this->allow_auto_save = (isset($typeParams->allow_auto_save) && empty($typeParams->allow_auto_save)) ? 0 : 1; $this->allow_draft_save = (isset($typeParams->allow_draft_save) && !empty($typeParams->allow_draft_save)) ? 1 : 0; - $this->allow_bit_rate=(isset($typeParams->bitrate_on) && !empty($typeParams->bitrate_on)) ? 1 : 0; - $this->allow_bit_rate_seconds=$typeParams->bitrate_seconds; - + $this->allow_bit_rate = (isset($typeParams->bitrate_on) && !empty($typeParams->bitrate_on)) ? 1 : 0; + $this->allow_bit_rate_seconds = $typeParams->bitrate_seconds; + // Check for errors. if (count($errors = $this->get('Errors'))) { From e325a46513a3ece34a315efd21ac0ac803c0e0d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cankush=5Fm=E2=80=9D?= Date: Fri, 24 Jan 2020 16:03:50 +0530 Subject: [PATCH 2/2] Bug #156460 fix: Front End>> User redirect to other menu and getting an error while trying to unpublish the record without permission --- .../com_tjucm/site/controllers/item.php | 25 ++++++++++--------- .../com_tjucm/site/layouts/list/list.php | 3 +-- .../site/views/items/tmpl/default.php | 4 ++- 3 files changed, 17 insertions(+), 15 deletions(-) diff --git a/src/components/com_tjucm/site/controllers/item.php b/src/components/com_tjucm/site/controllers/item.php index 02faed5e..ab40ac17 100644 --- a/src/components/com_tjucm/site/controllers/item.php +++ b/src/components/com_tjucm/site/controllers/item.php @@ -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'); @@ -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(); } diff --git a/src/components/com_tjucm/site/layouts/list/list.php b/src/components/com_tjucm/site/layouts/list/list.php index 81aa1802..6ff9d6a7 100644 --- a/src/components/com_tjucm/site/layouts/list/list.php +++ b/src/components/com_tjucm/site/layouts/list/list.php @@ -22,7 +22,6 @@ } $fieldsData = $displayData['fieldsData']; - $app = Factory::getApplication(); $user = Factory::getUser(); @@ -152,7 +151,7 @@ $fieldXml = $formObject->getFieldXml($tjFieldsFieldTable->name); ?> - + created_by == $user->id)) { diff --git a/src/components/com_tjucm/site/views/items/tmpl/default.php b/src/components/com_tjucm/site/views/items/tmpl/default.php index 6d7b8a7a..6ce3b12c 100644 --- a/src/components/com_tjucm/site/views/items/tmpl/default.php +++ b/src/components/com_tjucm/site/views/items/tmpl/default.php @@ -258,7 +258,9 @@ function copyItem() 'ucmTypeId' => $this->ucmTypeId, 'ucmTypeParams' => $this->ucmTypeParams, 'fieldsData' => $fieldsData, - 'formObject' => $formObject + 'formObject' => $formObject, + 'statusColumnWidth' => $statusColumnWidth, + 'listcolumn' => $this->listcolumn ) ); }