diff --git a/README.md b/README.md index cd61d5e1a..066ddd6e4 100644 --- a/README.md +++ b/README.md @@ -114,8 +114,8 @@ Component Builder is mapped as a component in itself on my local development env + *Version*: 2.5.8 + *Copyright*: Copyright (C) 2015. All Rights Reserved + *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html -+ *Line count*: **124646** -+ *File count*: **742** ++ *Line count*: **124408** ++ *File count*: **741** + *Folder count*: **129** > This **component** was build with a Joomla [Automated Component Builder](http://vdm.bz/component-builder). diff --git a/admin/README.txt b/admin/README.txt index cd61d5e1a..066ddd6e4 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -114,8 +114,8 @@ Component Builder is mapped as a component in itself on my local development env + *Version*: 2.5.8 + *Copyright*: Copyright (C) 2015. All Rights Reserved + *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html -+ *Line count*: **124646** -+ *File count*: **742** ++ *Line count*: **124408** ++ *File count*: **741** + *Folder count*: **129** > This **component** was build with a Joomla [Automated Component Builder](http://vdm.bz/component-builder). diff --git a/admin/assets/css/admin_view.css b/admin/assets/css/admin_view.css index 4e25e2269..c15c77917 100644 --- a/admin/assets/css/admin_view.css +++ b/admin/assets/css/admin_view.css @@ -9,7 +9,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 178 of this MVC + @version @update number 184 of this MVC @build 14th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/assets/css/admin_views.css b/admin/assets/css/admin_views.css index c2c4821f7..90abc7897 100644 --- a/admin/assets/css/admin_views.css +++ b/admin/assets/css/admin_views.css @@ -9,7 +9,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 178 of this MVC + @version @update number 184 of this MVC @build 14th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/assets/css/field.css b/admin/assets/css/field.css index 34e250e11..8d04aefaf 100644 --- a/admin/assets/css/field.css +++ b/admin/assets/css/field.css @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 38 of this MVC - @build 28th May, 2017 + @version @update number 39 of this MVC + @build 14th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage field.css diff --git a/admin/assets/css/fields.css b/admin/assets/css/fields.css index ef91a124a..52ca1ec11 100644 --- a/admin/assets/css/fields.css +++ b/admin/assets/css/fields.css @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 38 of this MVC - @build 28th May, 2017 + @version @update number 39 of this MVC + @build 14th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage fields.css diff --git a/admin/assets/css/joomla_component.css b/admin/assets/css/joomla_component.css index 2027652f6..505c76715 100644 --- a/admin/assets/css/joomla_component.css +++ b/admin/assets/css/joomla_component.css @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 387 of this MVC - @build 11th October, 2017 + @version @update number 388 of this MVC + @build 14th October, 2017 @created 6th May, 2015 @package Component Builder @subpackage joomla_component.css diff --git a/admin/assets/css/joomla_components.css b/admin/assets/css/joomla_components.css index 536d7eb85..674cb60a3 100644 --- a/admin/assets/css/joomla_components.css +++ b/admin/assets/css/joomla_components.css @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 387 of this MVC - @build 11th October, 2017 + @version @update number 388 of this MVC + @build 14th October, 2017 @created 6th May, 2015 @package Component Builder @subpackage joomla_components.css diff --git a/admin/compiler/joomla_3/DASHJViewLagacy.php b/admin/compiler/joomla_3/DASHJViewLagacy.php index aa2a624bd..6e6bc3e7f 100644 --- a/admin/compiler/joomla_3/DASHJViewLagacy.php +++ b/admin/compiler/joomla_3/DASHJViewLagacy.php @@ -43,12 +43,6 @@ class ###Component###View###Component### extends JViewLegacy */ function display($tpl = null) { - // Check for errors. - if (count($errors = $this->get('Errors'))) - { - JError::raiseError(500, implode('
', $errors)); - return false; - }; // Assign data to the view $this->icons = $this->get('Icons'); $this->contributors = ###Component###Helper::getContributors();###DASH_GET_CUSTOM_DATA### @@ -58,6 +52,12 @@ class ###Component###View###Component### extends JViewLegacy // Set the toolbar $this->addToolBar(); + + // Check for errors. + if (count($errors = $this->get('Errors'))) + { + throw new Exception(implode("\n", $errors), 500); + } // Display the template parent::display($tpl); diff --git a/admin/compiler/joomla_3/JViewLegacy_edit.php b/admin/compiler/joomla_3/JViewLegacy_edit.php index c4fc3f474..02c368cea 100644 --- a/admin/compiler/joomla_3/JViewLegacy_edit.php +++ b/admin/compiler/joomla_3/JViewLegacy_edit.php @@ -43,13 +43,6 @@ class ###Component###View###View### extends JViewLegacy */ public function display($tpl = null) { - // Check for errors. - if (count($errors = $this->get('Errors'))) - { - JError::raiseError(500, implode('
', $errors)); - return false; - } - // Assign the variables $this->form = $this->get('Form'); $this->item = $this->get('Item'); @@ -75,6 +68,12 @@ class ###Component###View###View### extends JViewLegacy // Set the toolbar $this->addToolBar(); + + // Check for errors. + if (count($errors = $this->get('Errors'))) + { + throw new Exception(implode("\n", $errors), 500); + } // Display the template parent::display($tpl); diff --git a/admin/compiler/joomla_3/JViewLegacy_edit_site.php b/admin/compiler/joomla_3/JViewLegacy_edit_site.php index 26c1dcbca..349a82e43 100644 --- a/admin/compiler/joomla_3/JViewLegacy_edit_site.php +++ b/admin/compiler/joomla_3/JViewLegacy_edit_site.php @@ -43,13 +43,6 @@ class ###Component###View###View### extends JViewLegacy */ public function display($tpl = null) { - // Check for errors. - if (count($errors = $this->get('Errors'))) - { - JError::raiseError(500, implode('
', $errors)); - return false; - } - // Assign the variables $this->form = $this->get('Form'); $this->item = $this->get('Item'); @@ -75,6 +68,12 @@ class ###Component###View###View### extends JViewLegacy // Set the toolbar $this->addToolBar(); + + // Check for errors. + if (count($errors = $this->get('Errors'))) + { + throw new Exception(implode("\n", $errors), 500); + } // Display the template parent::display($tpl); diff --git a/admin/compiler/joomla_3/JViewLegacy_import.php b/admin/compiler/joomla_3/JViewLegacy_import.php index 42ed0f5bd..833072364 100644 --- a/admin/compiler/joomla_3/JViewLegacy_import.php +++ b/admin/compiler/joomla_3/JViewLegacy_import.php @@ -44,20 +44,13 @@ class ###Component###ViewImport extends JViewLegacy protected $dataType; public function display($tpl = null) - { + { if ($this->getLayout() !== 'modal') { // Include helper submenu ###Component###Helper::addSubmenu('import'); } - // Check for errors. - if (count($errors = $this->get('Errors'))) - { - JError::raiseError(500, implode('
', $errors)); - return false; - } - $paths = new stdClass; $paths->first = ''; $state = $this->get('state'); @@ -86,6 +79,12 @@ class ###Component###ViewImport extends JViewLegacy // clear the data type $session->clear('dataType'); } + + // Check for errors. + if (count($errors = $this->get('Errors'))) + { + throw new Exception(implode("\n", $errors), 500); + } // Display the template parent::display($tpl); diff --git a/admin/compiler/joomla_3/JViewLegacy_list.php b/admin/compiler/joomla_3/JViewLegacy_list.php index e5673e48c..72dd08795 100644 --- a/admin/compiler/joomla_3/JViewLegacy_list.php +++ b/admin/compiler/joomla_3/JViewLegacy_list.php @@ -49,13 +49,6 @@ class ###Component###View###Views### extends JViewLegacy ###Component###Helper::addSubmenu('###views###'); } - // Check for errors. - if (count($errors = $this->get('Errors'))) - { - JError::raiseError(500, implode('
', $errors)); - return false; - } - // Assign data to the view $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); @@ -78,6 +71,12 @@ class ###Component###View###Views### extends JViewLegacy $this->batchDisplay = JHtmlBatch_::render(); } } + + // Check for errors. + if (count($errors = $this->get('Errors'))) + { + throw new Exception(implode("\n", $errors), 500); + } // Display the template parent::display($tpl); diff --git a/admin/compiler/joomla_3/JViewLegacy_list_site.php b/admin/compiler/joomla_3/JViewLegacy_list_site.php index 8a40e709a..c1e5c7823 100644 --- a/admin/compiler/joomla_3/JViewLegacy_list_site.php +++ b/admin/compiler/joomla_3/JViewLegacy_list_site.php @@ -39,7 +39,7 @@ class ###Component###View###SViews### extends JViewLegacy { // Overwriting JView display method function display($tpl = null) - { + { // get combined params of both component and menu $this->app = JFactory::getApplication(); $this->params = $this->app->getParams(); diff --git a/admin/compiler/joomla_3/JViewLegacy_site.php b/admin/compiler/joomla_3/JViewLegacy_site.php index fd3d54590..851377023 100644 --- a/admin/compiler/joomla_3/JViewLegacy_site.php +++ b/admin/compiler/joomla_3/JViewLegacy_site.php @@ -39,7 +39,7 @@ class ###Component###View###SView### extends JViewLegacy { // Overwriting JView display method function display($tpl = null) - { + { // get combined params of both component and menu $this->app = JFactory::getApplication(); $this->params = $this->app->getParams(); diff --git a/admin/controllers/admin_view.php b/admin/controllers/admin_view.php index 89fc2e0e6..73d40233a 100644 --- a/admin/controllers/admin_view.php +++ b/admin/controllers/admin_view.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 178 of this MVC + @version @update number 184 of this MVC @build 14th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/controllers/admin_views.php b/admin/controllers/admin_views.php index 3b8885d15..da4e2fa24 100644 --- a/admin/controllers/admin_views.php +++ b/admin/controllers/admin_views.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 178 of this MVC + @version @update number 184 of this MVC @build 14th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/controllers/field.php b/admin/controllers/field.php index 711349549..7a8c3c828 100644 --- a/admin/controllers/field.php +++ b/admin/controllers/field.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 38 of this MVC - @build 28th May, 2017 + @version @update number 39 of this MVC + @build 14th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage field.php diff --git a/admin/controllers/fields.php b/admin/controllers/fields.php index c3e0de702..e965dde8c 100644 --- a/admin/controllers/fields.php +++ b/admin/controllers/fields.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 38 of this MVC - @build 28th May, 2017 + @version @update number 39 of this MVC + @build 14th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage fields.php diff --git a/admin/controllers/joomla_component.php b/admin/controllers/joomla_component.php index 0404fc540..681eaca24 100644 --- a/admin/controllers/joomla_component.php +++ b/admin/controllers/joomla_component.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 387 of this MVC - @build 11th October, 2017 + @version @update number 388 of this MVC + @build 14th October, 2017 @created 6th May, 2015 @package Component Builder @subpackage joomla_component.php diff --git a/admin/controllers/joomla_components.php b/admin/controllers/joomla_components.php index 58070de39..00847f20b 100644 --- a/admin/controllers/joomla_components.php +++ b/admin/controllers/joomla_components.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 387 of this MVC - @build 11th October, 2017 + @version @update number 388 of this MVC + @build 14th October, 2017 @created 6th May, 2015 @package Component Builder @subpackage joomla_components.php diff --git a/admin/helpers/compiler/e_Interpretation.php b/admin/helpers/compiler/e_Interpretation.php index d53df8225..bd06a8ba1 100644 --- a/admin/helpers/compiler/e_Interpretation.php +++ b/admin/helpers/compiler/e_Interpretation.php @@ -2840,13 +2840,6 @@ class Interpretation extends Fields $method .= PHP_EOL."\t\t\$this->".ComponentbuilderHelper::safeString($custom_get_name)."\t= \$this->get('".$custom_get_name."');"; } } - - $method .= PHP_EOL.PHP_EOL."\t\t//".$this->setLine(__LINE__)." Check for errors."; - $method .= PHP_EOL."\t\tif (count(\$errors = \$this->get('Errors')))"; - $method .= PHP_EOL."\t\t{"; - $method .= PHP_EOL."\t\t\tJError::raiseError(500, ".'implode(PHP_EOL, $errors));'; - $method .= PHP_EOL."\t\t\treturn false;"; - $method .= PHP_EOL."\t\t}"; // add custom script if ($view['settings']->add_php_jview_display == 1) { @@ -2875,6 +2868,13 @@ class Interpretation extends Fields $method .= PHP_EOL.PHP_EOL."\t\t//".$this->setLine(__LINE__)." set the document"; $method .= PHP_EOL."\t\t\$this->setDocument();"; } + + $method .= PHP_EOL.PHP_EOL."\t\t//".$this->setLine(__LINE__)." Check for errors."; + $method .= PHP_EOL."\t\tif (count(\$errors = \$this->get('Errors')))"; + $method .= PHP_EOL."\t\t{"; + $method .= PHP_EOL."\t\t\tthrow new Exception(implode(\"\n\", \$errors), 500);"; + $method .= PHP_EOL."\t\t}"; + $method .= PHP_EOL.PHP_EOL."\t\tparent::display(\$tpl);"; } return $method; diff --git a/admin/language/en-GB/en-GB.com_componentbuilder.ini b/admin/language/en-GB/en-GB.com_componentbuilder.ini index 7ae372b1c..da6d3558c 100644 --- a/admin/language/en-GB/en-GB.com_componentbuilder.ini +++ b/admin/language/en-GB/en-GB.com_componentbuilder.ini @@ -2369,7 +2369,6 @@ COM_COMPONENTBUILDER_FIELD_JAVASCRIPT_VIEW_FOOTER_HINT="// JavaScript for the ed COM_COMPONENTBUILDER_FIELD_JAVASCRIPT_VIEW_FOOTER_LABEL="Javascript" COM_COMPONENTBUILDER_FIELD_JSON="JSON" COM_COMPONENTBUILDER_FIELD_KEY="KEY" -COM_COMPONENTBUILDER_FIELD_LINKED_ADMIN_VIEWS="Linked - Admin Views" COM_COMPONENTBUILDER_FIELD_LONGTEXT="LONGTEXT" COM_COMPONENTBUILDER_FIELD_MEDIUMTEXT="MEDIUMTEXT" COM_COMPONENTBUILDER_FIELD_MODIFIED_BY_DESC="The last user that modified this Field." diff --git a/admin/layouts/field/linked_admin_views_fullwidth.php b/admin/layouts/field/linked_admin_views_fullwidth.php deleted file mode 100644 index d1600e6dd..000000000 --- a/admin/layouts/field/linked_admin_views_fullwidth.php +++ /dev/null @@ -1,126 +0,0 @@ - - @copyright Copyright (C) 2015. All Rights Reserved - @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - - Builds Complex Joomla Components - -/-----------------------------------------------------------------------------------------------------------------------------*/ - -// No direct access to this file - -defined('_JEXEC') or die('Restricted access'); - -// set the defaults -$items = $displayData->wablinked_admin_views; -$user = JFactory::getUser(); -$id = $displayData->item->id; -$edit = "index.php?option=com_componentbuilder&view=admin_views&task=admin_view.edit"; - -?> -
- - - - - - - - - - - - - - $item): ?> - authorise('core.manage', 'com_checkin') || $item->checked_out == $user->id || $item->checked_out == 0; - $userChkOut = JFactory::getUser($item->checked_out); - $canDo = ComponentbuilderHelper::getActions('admin_view',$item,'admin_views'); - ?> - - - - - - published == 1):?> - - published == 0):?> - - published == 2):?> - - published == -2):?> - - - - - - -
- - - - - - - - - - - -
- get('admin_view.edit')): ?> - escape($item->system_name); ?> - checked_out): ?> - name, $item->checked_out_time, 'admin_views.', $canCheckin); ?> - - -
escape($item->system_name); ?>
- -
- escape($item->name_single); ?> - - escape($item->name_list); ?> - - escape($item->short_description); ?> - - - - - - - - - - - - - - - - - - id; ?> -
- -
- -
- -
diff --git a/admin/layouts/fieldtype/fields_fullwidth.php b/admin/layouts/fieldtype/fields_fullwidth.php index 6f58722cc..ca928cbc7 100644 --- a/admin/layouts/fieldtype/fields_fullwidth.php +++ b/admin/layouts/fieldtype/fields_fullwidth.php @@ -28,7 +28,7 @@ defined('_JEXEC') or die('Restricted access'); // set the defaults -$items = $displayData->wacfields; +$items = $displayData->wabfields; $user = JFactory::getUser(); $id = $displayData->item->id; $edit = "index.php?option=com_componentbuilder&view=fields&task=field.edit"; diff --git a/admin/layouts/ftp/linked_components_fullwidth.php b/admin/layouts/ftp/linked_components_fullwidth.php index 82b6fbcfe..5be0d2cc0 100644 --- a/admin/layouts/ftp/linked_components_fullwidth.php +++ b/admin/layouts/ftp/linked_components_fullwidth.php @@ -28,7 +28,7 @@ defined('_JEXEC') or die('Restricted access'); // set the defaults -$items = $displayData->wadlinked_components; +$items = $displayData->waclinked_components; $user = JFactory::getUser(); $id = $displayData->item->id; $edit = "index.php?option=com_componentbuilder&view=joomla_components&task=joomla_component.edit"; diff --git a/admin/models/admin_view.php b/admin/models/admin_view.php index 8574b2c82..c4659447e 100644 --- a/admin/models/admin_view.php +++ b/admin/models/admin_view.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 178 of this MVC + @version @update number 184 of this MVC @build 14th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/models/admin_views.php b/admin/models/admin_views.php index cb5a0580a..bffdae389 100644 --- a/admin/models/admin_views.php +++ b/admin/models/admin_views.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 178 of this MVC + @version @update number 184 of this MVC @build 14th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/models/ajax.php b/admin/models/ajax.php index 9a06f749d..e9f93893b 100644 --- a/admin/models/ajax.php +++ b/admin/models/ajax.php @@ -449,6 +449,7 @@ class ComponentbuilderModelAjax extends JModelList } } + protected $ref; protected $fieldsArray = array( 'admin_fields' => 'addfields', 'admin_fields_conditions' => 'addconditions'); @@ -464,6 +465,7 @@ class ComponentbuilderModelAjax extends JModelList // check if we are in the correct view. if (!is_null($values['a_id']) && $values['a_id'] > 0 && strlen($values['a_view']) && $values['a_view'] === 'admin_view') { + $this->ref = '&ref=admin_view&refid=' . $values['a_id']; // get the field data if ($fieldsData = ComponentbuilderHelper::getVar($type, (int) $values['a_id'], 'admin_view', $this->fieldsArray[$type])) { @@ -533,7 +535,7 @@ class ComponentbuilderModelAjax extends JModelList $this->fieldNames[$field] = JText::_('COM_COMPONENTBUILDER_NO_FIELD_FOUND'); } } - $bucket[] = $this->fieldNames[$field]; + $bucket[] = $this->fieldNames[$field] . $this->addEditLink($field, 'field', 'fields'); } } elseif (is_numeric($value)) @@ -545,7 +547,7 @@ class ComponentbuilderModelAjax extends JModelList $this->fieldNames[$value] = JText::_('COM_COMPONENTBUILDER_NO_FIELD_FOUND'); } } - $bucket[] = $this->fieldNames[$value]; + $bucket[] = $this->fieldNames[$value] . $this->addEditLink($value, 'field', 'fields'); } // return found fields if (ComponentbuilderHelper::checkArray($bucket)) @@ -555,6 +557,30 @@ class ComponentbuilderModelAjax extends JModelList return JText::_('COM_COMPONENTBUILDER_NO_FIELD_FOUND'); } + protected function addEditLink($id, $view, $views) + { + // can edit + if ($this->canEdit($id)) + { + $edit = "index.php?option=com_componentbuilder&view=".$views."&task=".$view.".edit&id=".$id.$this->ref; + return ' '; + + } + return ''; + } + + protected $user; + + protected function canEdit($id, $view = 'admin_fields') + { + // load field permission check + if (!ComponentbuilderHelper::checkObject($this->user)) // TODO && $this->user instanceof JUser) + { + $this->user = JFactory::getUser(); + } + return $this->user->authorise($view.'.edit', 'com_componentbuilder.'.$view.'.' . (int) $id); + } + protected $tabNames = array(); protected function setTabName($header, $value) diff --git a/admin/models/field.php b/admin/models/field.php index bff97fa66..f9485479c 100644 --- a/admin/models/field.php +++ b/admin/models/field.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 38 of this MVC - @build 28th May, 2017 + @version @update number 39 of this MVC + @build 14th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage field.php @@ -130,87 +130,9 @@ class ComponentbuilderModelField extends JModelAdmin $item->tags = new JHelperTags; $item->tags->getTagIds($item->id, 'com_componentbuilder.field'); } - } - $this->addfieldsvvwc = $item->id; + } return $item; - } - - /** - * Method to get list data. - * - * @return mixed An array of data items on success, false on failure. - */ - public function getWablinked_admin_views() - { - // Get the user object. - $user = JFactory::getUser(); - // Create a new query object. - $db = JFactory::getDBO(); - $query = $db->getQuery(true); - - // Select some fields - $query->select('a.*'); - - // From the componentbuilder_admin_view table - $query->from($db->quoteName('#__componentbuilder_admin_view', 'a')); - - // Order the results by ordering - $query->order('a.published ASC'); - $query->order('a.ordering ASC'); - - // Load the items - $db->setQuery($query); - $db->execute(); - if ($db->getNumRows()) - { - $items = $db->loadObjectList(); - - // set values to display correctly. - if (ComponentbuilderHelper::checkArray($items)) - { - // get user object. - $user = JFactory::getUser(); - foreach ($items as $nr => &$item) - { - $access = ($user->authorise('admin_view.access', 'com_componentbuilder.admin_view.' . (int) $item->id) && $user->authorise('admin_view.access', 'com_componentbuilder')); - if (!$access) - { - unset($items[$nr]); - continue; - } - - } - } - - // Filter by addfieldsvvwc in this Repetable Field - if (ComponentbuilderHelper::checkArray($items) && isset($this->addfieldsvvwc)) - { - foreach ($items as $nr => &$item) - { - if (isset($item->addfields) && ComponentbuilderHelper::checkJson($item->addfields)) - { - $tmpArray = json_decode($item->addfields,true); - if (!isset($tmpArray['field']) || !ComponentbuilderHelper::checkArray($tmpArray['field']) || !in_array($this->addfieldsvvwc, $tmpArray['field'])) - { - unset($items[$nr]); - continue; - } - } - else - { - unset($items[$nr]); - continue; - } - } - } - else - { - return false; - } - return $items; - } - return false; } /** diff --git a/admin/models/fields.php b/admin/models/fields.php index 8756f7e0d..7f06213d1 100644 --- a/admin/models/fields.php +++ b/admin/models/fields.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 38 of this MVC - @build 28th May, 2017 + @version @update number 39 of this MVC + @build 14th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage fields.php diff --git a/admin/models/fieldtype.php b/admin/models/fieldtype.php index 07b5797db..43e0c2e5a 100644 --- a/admin/models/fieldtype.php +++ b/admin/models/fieldtype.php @@ -129,7 +129,7 @@ class ComponentbuilderModelFieldtype extends JModelAdmin $item->tags->getTagIds($item->id, 'com_componentbuilder.fieldtype'); } } - $this->fieldtypevvwd = $item->id; + $this->fieldtypevvwc = $item->id; return $item; } @@ -139,7 +139,7 @@ class ComponentbuilderModelFieldtype extends JModelAdmin * * @return mixed An array of data items on success, false on failure. */ - public function getWacfields() + public function getWabfields() { // Get the user object. $user = JFactory::getUser(); @@ -159,15 +159,15 @@ class ComponentbuilderModelFieldtype extends JModelAdmin $query->select($db->quoteName('g.name','fieldtype_name')); $query->join('LEFT', $db->quoteName('#__componentbuilder_fieldtype', 'g') . ' ON (' . $db->quoteName('a.fieldtype') . ' = ' . $db->quoteName('g.id') . ')'); - // Filter by fieldtypevvwd global. - $fieldtypevvwd = $this->fieldtypevvwd; - if (is_numeric($fieldtypevvwd )) + // Filter by fieldtypevvwc global. + $fieldtypevvwc = $this->fieldtypevvwc; + if (is_numeric($fieldtypevvwc )) { - $query->where('a.fieldtype = ' . (int) $fieldtypevvwd ); + $query->where('a.fieldtype = ' . (int) $fieldtypevvwc ); } - elseif (is_string($fieldtypevvwd)) + elseif (is_string($fieldtypevvwc)) { - $query->where('a.fieldtype = ' . $db->quote($fieldtypevvwd)); + $query->where('a.fieldtype = ' . $db->quote($fieldtypevvwc)); } else { @@ -208,13 +208,13 @@ class ComponentbuilderModelFieldtype extends JModelAdmin foreach ($items as $nr => &$item) { // convert datatype - $item->datatype = $this->selectionTranslationWacfields($item->datatype, 'datatype'); + $item->datatype = $this->selectionTranslationWabfields($item->datatype, 'datatype'); // convert indexes - $item->indexes = $this->selectionTranslationWacfields($item->indexes, 'indexes'); + $item->indexes = $this->selectionTranslationWabfields($item->indexes, 'indexes'); // convert null_switch - $item->null_switch = $this->selectionTranslationWacfields($item->null_switch, 'null_switch'); + $item->null_switch = $this->selectionTranslationWabfields($item->null_switch, 'null_switch'); // convert store - $item->store = $this->selectionTranslationWacfields($item->store, 'store'); + $item->store = $this->selectionTranslationWabfields($item->store, 'store'); } } @@ -228,7 +228,7 @@ class ComponentbuilderModelFieldtype extends JModelAdmin * * @return translatable string */ - public function selectionTranslationWacfields($value,$name) + public function selectionTranslationWabfields($value,$name) { // Array of datatype language strings if ($name === 'datatype') diff --git a/admin/models/forms/admin_view.js b/admin/models/forms/admin_view.js index c5975ab03..9e7fce9ff 100644 --- a/admin/models/forms/admin_view.js +++ b/admin/models/forms/admin_view.js @@ -9,7 +9,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 178 of this MVC + @version @update number 184 of this MVC @build 14th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/models/forms/field.js b/admin/models/forms/field.js index 6296ea07e..da75ddc16 100644 --- a/admin/models/forms/field.js +++ b/admin/models/forms/field.js @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 38 of this MVC - @build 28th May, 2017 + @version @update number 39 of this MVC + @build 14th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage field.js diff --git a/admin/models/forms/help_document.js b/admin/models/forms/help_document.js index 381029af4..269d2972d 100644 --- a/admin/models/forms/help_document.js +++ b/admin/models/forms/help_document.js @@ -23,12 +23,12 @@ /-----------------------------------------------------------------------------------------------------------------------------*/ // Some Global Values -jform_vvvvwafwae_required = false; -jform_vvvvwagwaf_required = false; -jform_vvvvwahwag_required = false; -jform_vvvvwaiwah_required = false; -jform_vvvvwajwai_required = false; -jform_vvvvwakwaj_required = false; +jform_vvvvwafwad_required = false; +jform_vvvvwagwae_required = false; +jform_vvvvwahwaf_required = false; +jform_vvvvwaiwag_required = false; +jform_vvvvwajwah_required = false; +jform_vvvvwakwai_required = false; // Initial Script jQuery(document).ready(function() @@ -59,26 +59,26 @@ function vvvvwaf(location_vvvvwaf) if (location_vvvvwaf == 1) { jQuery('#jform_admin_view').closest('.control-group').show(); - if (jform_vvvvwafwae_required) + if (jform_vvvvwafwad_required) { updateFieldRequired('admin_view',0); jQuery('#jform_admin_view').prop('required','required'); jQuery('#jform_admin_view').attr('aria-required',true); jQuery('#jform_admin_view').addClass('required'); - jform_vvvvwafwae_required = false; + jform_vvvvwafwad_required = false; } } else { jQuery('#jform_admin_view').closest('.control-group').hide(); - if (!jform_vvvvwafwae_required) + if (!jform_vvvvwafwad_required) { updateFieldRequired('admin_view',1); jQuery('#jform_admin_view').removeAttr('required'); jQuery('#jform_admin_view').removeAttr('aria-required'); jQuery('#jform_admin_view').removeClass('required'); - jform_vvvvwafwae_required = true; + jform_vvvvwafwad_required = true; } } } @@ -90,26 +90,26 @@ function vvvvwag(location_vvvvwag) if (location_vvvvwag == 2) { jQuery('#jform_site_view').closest('.control-group').show(); - if (jform_vvvvwagwaf_required) + if (jform_vvvvwagwae_required) { updateFieldRequired('site_view',0); jQuery('#jform_site_view').prop('required','required'); jQuery('#jform_site_view').attr('aria-required',true); jQuery('#jform_site_view').addClass('required'); - jform_vvvvwagwaf_required = false; + jform_vvvvwagwae_required = false; } } else { jQuery('#jform_site_view').closest('.control-group').hide(); - if (!jform_vvvvwagwaf_required) + if (!jform_vvvvwagwae_required) { updateFieldRequired('site_view',1); jQuery('#jform_site_view').removeAttr('required'); jQuery('#jform_site_view').removeAttr('aria-required'); jQuery('#jform_site_view').removeClass('required'); - jform_vvvvwagwaf_required = true; + jform_vvvvwagwae_required = true; } } } @@ -134,26 +134,26 @@ function vvvvwah(type_vvvvwah) if (type) { jQuery('#jform_url').closest('.control-group').show(); - if (jform_vvvvwahwag_required) + if (jform_vvvvwahwaf_required) { updateFieldRequired('url',0); jQuery('#jform_url').prop('required','required'); jQuery('#jform_url').attr('aria-required',true); jQuery('#jform_url').addClass('required'); - jform_vvvvwahwag_required = false; + jform_vvvvwahwaf_required = false; } } else { jQuery('#jform_url').closest('.control-group').hide(); - if (!jform_vvvvwahwag_required) + if (!jform_vvvvwahwaf_required) { updateFieldRequired('url',1); jQuery('#jform_url').removeAttr('required'); jQuery('#jform_url').removeAttr('aria-required'); jQuery('#jform_url').removeClass('required'); - jform_vvvvwahwag_required = true; + jform_vvvvwahwaf_required = true; } } } @@ -189,26 +189,26 @@ function vvvvwai(type_vvvvwai) if (type) { jQuery('#jform_article').closest('.control-group').show(); - if (jform_vvvvwaiwah_required) + if (jform_vvvvwaiwag_required) { updateFieldRequired('article',0); jQuery('#jform_article').prop('required','required'); jQuery('#jform_article').attr('aria-required',true); jQuery('#jform_article').addClass('required'); - jform_vvvvwaiwah_required = false; + jform_vvvvwaiwag_required = false; } } else { jQuery('#jform_article').closest('.control-group').hide(); - if (!jform_vvvvwaiwah_required) + if (!jform_vvvvwaiwag_required) { updateFieldRequired('article',1); jQuery('#jform_article').removeAttr('required'); jQuery('#jform_article').removeAttr('aria-required'); jQuery('#jform_article').removeClass('required'); - jform_vvvvwaiwah_required = true; + jform_vvvvwaiwag_required = true; } } } @@ -244,26 +244,26 @@ function vvvvwaj(type_vvvvwaj) if (type) { jQuery('#jform_content-lbl').closest('.control-group').show(); - if (jform_vvvvwajwai_required) + if (jform_vvvvwajwah_required) { updateFieldRequired('content',0); jQuery('#jform_content').prop('required','required'); jQuery('#jform_content').attr('aria-required',true); jQuery('#jform_content').addClass('required'); - jform_vvvvwajwai_required = false; + jform_vvvvwajwah_required = false; } } else { jQuery('#jform_content-lbl').closest('.control-group').hide(); - if (!jform_vvvvwajwai_required) + if (!jform_vvvvwajwah_required) { updateFieldRequired('content',1); jQuery('#jform_content').removeAttr('required'); jQuery('#jform_content').removeAttr('aria-required'); jQuery('#jform_content').removeClass('required'); - jform_vvvvwajwai_required = true; + jform_vvvvwajwah_required = true; } } } @@ -286,26 +286,26 @@ function vvvvwak(target_vvvvwak) if (target_vvvvwak == 1) { jQuery('#jform_groups').closest('.control-group').show(); - if (jform_vvvvwakwaj_required) + if (jform_vvvvwakwai_required) { updateFieldRequired('groups',0); jQuery('#jform_groups').prop('required','required'); jQuery('#jform_groups').attr('aria-required',true); jQuery('#jform_groups').addClass('required'); - jform_vvvvwakwaj_required = false; + jform_vvvvwakwai_required = false; } } else { jQuery('#jform_groups').closest('.control-group').hide(); - if (!jform_vvvvwakwaj_required) + if (!jform_vvvvwakwai_required) { updateFieldRequired('groups',1); jQuery('#jform_groups').removeAttr('required'); jQuery('#jform_groups').removeAttr('aria-required'); jQuery('#jform_groups').removeClass('required'); - jform_vvvvwakwaj_required = true; + jform_vvvvwakwai_required = true; } } } diff --git a/admin/models/forms/joomla_component.js b/admin/models/forms/joomla_component.js index 9bb88eca3..b7a9c5371 100644 --- a/admin/models/forms/joomla_component.js +++ b/admin/models/forms/joomla_component.js @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 387 of this MVC - @build 11th October, 2017 + @version @update number 388 of this MVC + @build 14th October, 2017 @created 6th May, 2015 @package Component Builder @subpackage joomla_component.js diff --git a/admin/models/ftp.php b/admin/models/ftp.php index 5eae1e7a7..e159f9927 100644 --- a/admin/models/ftp.php +++ b/admin/models/ftp.php @@ -112,7 +112,7 @@ class ComponentbuilderModelFtp extends JModelAdmin $item->tags->getTagIds($item->id, 'com_componentbuilder.ftp'); } } - $this->sales_server_ftpupdate_server_ftp_vvwe = $item->id; + $this->sales_server_ftpupdate_server_ftp_vvwd = $item->id; return $item; } @@ -122,7 +122,7 @@ class ComponentbuilderModelFtp extends JModelAdmin * * @return mixed An array of data items on success, false on failure. */ - public function getWadlinked_components() + public function getWaclinked_components() { // Get the user object. $user = JFactory::getUser(); @@ -136,15 +136,15 @@ class ComponentbuilderModelFtp extends JModelAdmin // From the componentbuilder_joomla_component table $query->from($db->quoteName('#__componentbuilder_joomla_component', 'a')); - // Filter by sales_server_ftpupdate_server_ftp_vvwe global. - $sales_server_ftpupdate_server_ftp_vvwe = $this->sales_server_ftpupdate_server_ftp_vvwe; - if (is_numeric($sales_server_ftpupdate_server_ftp_vvwe )) + // Filter by sales_server_ftpupdate_server_ftp_vvwd global. + $sales_server_ftpupdate_server_ftp_vvwd = $this->sales_server_ftpupdate_server_ftp_vvwd; + if (is_numeric($sales_server_ftpupdate_server_ftp_vvwd )) { - $query->where('a.sales_server_ftp = ' . (int) $sales_server_ftpupdate_server_ftp_vvwe . ' OR a.update_server_ftp = ' . (int) $sales_server_ftpupdate_server_ftp_vvwe, ' OR'); + $query->where('a.sales_server_ftp = ' . (int) $sales_server_ftpupdate_server_ftp_vvwd . ' OR a.update_server_ftp = ' . (int) $sales_server_ftpupdate_server_ftp_vvwd, ' OR'); } - elseif (is_string($sales_server_ftpupdate_server_ftp_vvwe)) + elseif (is_string($sales_server_ftpupdate_server_ftp_vvwd)) { - $query->where('a.sales_server_ftp = ' . $db->quote($sales_server_ftpupdate_server_ftp_vvwe) . ' OR a.update_server_ftp = ' . $db->quote($sales_server_ftpupdate_server_ftp_vvwe), ' OR'); + $query->where('a.sales_server_ftp = ' . $db->quote($sales_server_ftpupdate_server_ftp_vvwd) . ' OR a.update_server_ftp = ' . $db->quote($sales_server_ftpupdate_server_ftp_vvwd), ' OR'); } else { diff --git a/admin/models/joomla_component.php b/admin/models/joomla_component.php index 28fa84730..6c032b573 100644 --- a/admin/models/joomla_component.php +++ b/admin/models/joomla_component.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 387 of this MVC - @build 11th October, 2017 + @version @update number 388 of this MVC + @build 14th October, 2017 @created 6th May, 2015 @package Component Builder @subpackage joomla_component.php diff --git a/admin/models/joomla_components.php b/admin/models/joomla_components.php index f328bff01..39016e611 100644 --- a/admin/models/joomla_components.php +++ b/admin/models/joomla_components.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 387 of this MVC - @build 11th October, 2017 + @version @update number 388 of this MVC + @build 14th October, 2017 @created 6th May, 2015 @package Component Builder @subpackage joomla_components.php diff --git a/admin/tables/admin_view.php b/admin/tables/admin_view.php index e01682861..23b0c8e54 100644 --- a/admin/tables/admin_view.php +++ b/admin/tables/admin_view.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 178 of this MVC + @version @update number 184 of this MVC @build 14th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/tables/field.php b/admin/tables/field.php index bce6c81d9..739f6888c 100644 --- a/admin/tables/field.php +++ b/admin/tables/field.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 38 of this MVC - @build 28th May, 2017 + @version @update number 39 of this MVC + @build 14th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage field.php diff --git a/admin/tables/joomla_component.php b/admin/tables/joomla_component.php index 39b30193c..7d418c718 100644 --- a/admin/tables/joomla_component.php +++ b/admin/tables/joomla_component.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 387 of this MVC - @build 11th October, 2017 + @version @update number 388 of this MVC + @build 14th October, 2017 @created 6th May, 2015 @package Component Builder @subpackage joomla_component.php diff --git a/admin/views/admin_fields/view.html.php b/admin/views/admin_fields/view.html.php index a116235e6..2bfdc9878 100644 --- a/admin/views/admin_fields/view.html.php +++ b/admin/views/admin_fields/view.html.php @@ -40,13 +40,6 @@ class ComponentbuilderViewAdmin_fields extends JViewLegacy */ public function display($tpl = null) { - // Check for errors. - if (count($errors = $this->get('Errors'))) - { - JError::raiseError(500, implode('
', $errors)); - return false; - } - // Assign the variables $this->form = $this->get('Form'); $this->item = $this->get('Item'); @@ -72,6 +65,12 @@ class ComponentbuilderViewAdmin_fields extends JViewLegacy // Set the toolbar $this->addToolBar(); + + // Check for errors. + if (count($errors = $this->get('Errors'))) + { + throw new Exception(implode("\n", $errors), 500); + } // Display the template parent::display($tpl); diff --git a/admin/views/admin_fields_conditions/view.html.php b/admin/views/admin_fields_conditions/view.html.php index a13dd08ce..eee425ef1 100644 --- a/admin/views/admin_fields_conditions/view.html.php +++ b/admin/views/admin_fields_conditions/view.html.php @@ -40,13 +40,6 @@ class ComponentbuilderViewAdmin_fields_conditions extends JViewLegacy */ public function display($tpl = null) { - // Check for errors. - if (count($errors = $this->get('Errors'))) - { - JError::raiseError(500, implode('
', $errors)); - return false; - } - // Assign the variables $this->form = $this->get('Form'); $this->item = $this->get('Item'); @@ -72,6 +65,12 @@ class ComponentbuilderViewAdmin_fields_conditions extends JViewLegacy // Set the toolbar $this->addToolBar(); + + // Check for errors. + if (count($errors = $this->get('Errors'))) + { + throw new Exception(implode("\n", $errors), 500); + } // Display the template parent::display($tpl); diff --git a/admin/views/admin_view/submitbutton.js b/admin/views/admin_view/submitbutton.js index 2cecab9f7..c8048cf6d 100644 --- a/admin/views/admin_view/submitbutton.js +++ b/admin/views/admin_view/submitbutton.js @@ -9,7 +9,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 178 of this MVC + @version @update number 184 of this MVC @build 14th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/views/admin_view/tmpl/edit.php b/admin/views/admin_view/tmpl/edit.php index 2b6b322a2..488816fdc 100644 --- a/admin/views/admin_view/tmpl/edit.php +++ b/admin/views/admin_view/tmpl/edit.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 178 of this MVC + @version @update number 184 of this MVC @build 14th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/views/admin_view/view.html.php b/admin/views/admin_view/view.html.php index 6106ec583..ed136929e 100644 --- a/admin/views/admin_view/view.html.php +++ b/admin/views/admin_view/view.html.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 178 of this MVC + @version @update number 184 of this MVC @build 14th October, 2017 @created 30th April, 2015 @package Component Builder @@ -40,13 +40,6 @@ class ComponentbuilderViewAdmin_view extends JViewLegacy */ public function display($tpl = null) { - // Check for errors. - if (count($errors = $this->get('Errors'))) - { - JError::raiseError(500, implode('
', $errors)); - return false; - } - // Assign the variables $this->form = $this->get('Form'); $this->item = $this->get('Item'); @@ -75,6 +68,12 @@ class ComponentbuilderViewAdmin_view extends JViewLegacy // Set the toolbar $this->addToolBar(); + + // Check for errors. + if (count($errors = $this->get('Errors'))) + { + throw new Exception(implode("\n", $errors), 500); + } // Display the template parent::display($tpl); diff --git a/admin/views/admin_views/tmpl/default.php b/admin/views/admin_views/tmpl/default.php index 14f020833..94535d8de 100644 --- a/admin/views/admin_views/tmpl/default.php +++ b/admin/views/admin_views/tmpl/default.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 178 of this MVC + @version @update number 184 of this MVC @build 14th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/views/admin_views/tmpl/default_batch_body.php b/admin/views/admin_views/tmpl/default_batch_body.php index cf28b263f..06b04c4c2 100644 --- a/admin/views/admin_views/tmpl/default_batch_body.php +++ b/admin/views/admin_views/tmpl/default_batch_body.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 178 of this MVC + @version @update number 184 of this MVC @build 14th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/views/admin_views/tmpl/default_batch_footer.php b/admin/views/admin_views/tmpl/default_batch_footer.php index e48cb0308..354a1732f 100644 --- a/admin/views/admin_views/tmpl/default_batch_footer.php +++ b/admin/views/admin_views/tmpl/default_batch_footer.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 178 of this MVC + @version @update number 184 of this MVC @build 14th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/views/admin_views/tmpl/default_body.php b/admin/views/admin_views/tmpl/default_body.php index 40835f355..69a929a98 100644 --- a/admin/views/admin_views/tmpl/default_body.php +++ b/admin/views/admin_views/tmpl/default_body.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 178 of this MVC + @version @update number 184 of this MVC @build 14th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/views/admin_views/tmpl/default_foot.php b/admin/views/admin_views/tmpl/default_foot.php index 4c4825635..016124a73 100644 --- a/admin/views/admin_views/tmpl/default_foot.php +++ b/admin/views/admin_views/tmpl/default_foot.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 178 of this MVC + @version @update number 184 of this MVC @build 14th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/views/admin_views/tmpl/default_head.php b/admin/views/admin_views/tmpl/default_head.php index 8ff9c1289..b46aa2708 100644 --- a/admin/views/admin_views/tmpl/default_head.php +++ b/admin/views/admin_views/tmpl/default_head.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 178 of this MVC + @version @update number 184 of this MVC @build 14th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/views/admin_views/tmpl/default_toolbar.php b/admin/views/admin_views/tmpl/default_toolbar.php index 14dda9851..3a34a14d5 100644 --- a/admin/views/admin_views/tmpl/default_toolbar.php +++ b/admin/views/admin_views/tmpl/default_toolbar.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 178 of this MVC + @version @update number 184 of this MVC @build 14th October, 2017 @created 30th April, 2015 @package Component Builder diff --git a/admin/views/admin_views/view.html.php b/admin/views/admin_views/view.html.php index f7a14180c..9496270b7 100644 --- a/admin/views/admin_views/view.html.php +++ b/admin/views/admin_views/view.html.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 178 of this MVC + @version @update number 184 of this MVC @build 14th October, 2017 @created 30th April, 2015 @package Component Builder @@ -46,13 +46,6 @@ class ComponentbuilderViewAdmin_views extends JViewLegacy ComponentbuilderHelper::addSubmenu('admin_views'); } - // Check for errors. - if (count($errors = $this->get('Errors'))) - { - JError::raiseError(500, implode('
', $errors)); - return false; - } - // Assign data to the view $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); @@ -80,6 +73,12 @@ class ComponentbuilderViewAdmin_views extends JViewLegacy $this->batchDisplay = JHtmlBatch_::render(); } } + + // Check for errors. + if (count($errors = $this->get('Errors'))) + { + throw new Exception(implode("\n", $errors), 500); + } // Display the template parent::display($tpl); diff --git a/admin/views/admins_fields/view.html.php b/admin/views/admins_fields/view.html.php index 10f76ee33..0dd4e3471 100644 --- a/admin/views/admins_fields/view.html.php +++ b/admin/views/admins_fields/view.html.php @@ -46,13 +46,6 @@ class ComponentbuilderViewAdmins_fields extends JViewLegacy ComponentbuilderHelper::addSubmenu('admins_fields'); } - // Check for errors. - if (count($errors = $this->get('Errors'))) - { - JError::raiseError(500, implode('
', $errors)); - return false; - } - // Assign data to the view $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); @@ -80,6 +73,12 @@ class ComponentbuilderViewAdmins_fields extends JViewLegacy $this->batchDisplay = JHtmlBatch_::render(); } } + + // Check for errors. + if (count($errors = $this->get('Errors'))) + { + throw new Exception(implode("\n", $errors), 500); + } // Display the template parent::display($tpl); diff --git a/admin/views/admins_fields_conditions/view.html.php b/admin/views/admins_fields_conditions/view.html.php index 8d0b6f9bf..ebb724e05 100644 --- a/admin/views/admins_fields_conditions/view.html.php +++ b/admin/views/admins_fields_conditions/view.html.php @@ -46,13 +46,6 @@ class ComponentbuilderViewAdmins_fields_conditions extends JViewLegacy ComponentbuilderHelper::addSubmenu('admins_fields_conditions'); } - // Check for errors. - if (count($errors = $this->get('Errors'))) - { - JError::raiseError(500, implode('
', $errors)); - return false; - } - // Assign data to the view $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); @@ -80,6 +73,12 @@ class ComponentbuilderViewAdmins_fields_conditions extends JViewLegacy $this->batchDisplay = JHtmlBatch_::render(); } } + + // Check for errors. + if (count($errors = $this->get('Errors'))) + { + throw new Exception(implode("\n", $errors), 500); + } // Display the template parent::display($tpl); diff --git a/admin/views/compiler/view.html.php b/admin/views/compiler/view.html.php index 3c3f66bea..5175aada4 100644 --- a/admin/views/compiler/view.html.php +++ b/admin/views/compiler/view.html.php @@ -47,13 +47,6 @@ class ComponentbuilderViewCompiler extends JViewLegacy $this->canDo = ComponentbuilderHelper::getActions('compiler'); // Initialise variables. $this->items = $this->get('Items'); - - // Check for errors. - if (count($errors = $this->get('Errors'))) - { - JError::raiseError(500, implode(PHP_EOL, $errors)); - return false; - } if ($this->getLayout() !== 'modal') { // Include helper submenu @@ -74,6 +67,13 @@ class ComponentbuilderViewCompiler extends JViewLegacy // set the document $this->setDocument(); + // Check for errors. + if (count($errors = $this->get('Errors'))) + { + throw new Exception(implode(" +", $errors), 500); + } + parent::display($tpl); } diff --git a/admin/views/componentbuilder/view.html.php b/admin/views/componentbuilder/view.html.php index 5f72d5eb9..97550a9e6 100644 --- a/admin/views/componentbuilder/view.html.php +++ b/admin/views/componentbuilder/view.html.php @@ -40,12 +40,6 @@ class ComponentbuilderViewComponentbuilder extends JViewLegacy */ function display($tpl = null) { - // Check for errors. - if (count($errors = $this->get('Errors'))) - { - JError::raiseError(500, implode('
', $errors)); - return false; - }; // Assign data to the view $this->icons = $this->get('Icons'); $this->contributors = ComponentbuilderHelper::getContributors(); @@ -59,6 +53,12 @@ class ComponentbuilderViewComponentbuilder extends JViewLegacy // Set the toolbar $this->addToolBar(); + + // Check for errors. + if (count($errors = $this->get('Errors'))) + { + throw new Exception(implode("\n", $errors), 500); + } // Display the template parent::display($tpl); diff --git a/admin/views/custom_admin_view/view.html.php b/admin/views/custom_admin_view/view.html.php index 07c006c3c..a30d018ad 100644 --- a/admin/views/custom_admin_view/view.html.php +++ b/admin/views/custom_admin_view/view.html.php @@ -40,13 +40,6 @@ class ComponentbuilderViewCustom_admin_view extends JViewLegacy */ public function display($tpl = null) { - // Check for errors. - if (count($errors = $this->get('Errors'))) - { - JError::raiseError(500, implode('
', $errors)); - return false; - } - // Assign the variables $this->form = $this->get('Form'); $this->item = $this->get('Item'); @@ -75,6 +68,12 @@ class ComponentbuilderViewCustom_admin_view extends JViewLegacy // Set the toolbar $this->addToolBar(); + + // Check for errors. + if (count($errors = $this->get('Errors'))) + { + throw new Exception(implode("\n", $errors), 500); + } // Display the template parent::display($tpl); diff --git a/admin/views/custom_admin_views/view.html.php b/admin/views/custom_admin_views/view.html.php index fa9ad4b2a..442a935b0 100644 --- a/admin/views/custom_admin_views/view.html.php +++ b/admin/views/custom_admin_views/view.html.php @@ -46,13 +46,6 @@ class ComponentbuilderViewCustom_admin_views extends JViewLegacy ComponentbuilderHelper::addSubmenu('custom_admin_views'); } - // Check for errors. - if (count($errors = $this->get('Errors'))) - { - JError::raiseError(500, implode('
', $errors)); - return false; - } - // Assign data to the view $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); @@ -80,6 +73,12 @@ class ComponentbuilderViewCustom_admin_views extends JViewLegacy $this->batchDisplay = JHtmlBatch_::render(); } } + + // Check for errors. + if (count($errors = $this->get('Errors'))) + { + throw new Exception(implode("\n", $errors), 500); + } // Display the template parent::display($tpl); diff --git a/admin/views/custom_code/view.html.php b/admin/views/custom_code/view.html.php index c97c9064a..045425f9a 100644 --- a/admin/views/custom_code/view.html.php +++ b/admin/views/custom_code/view.html.php @@ -40,13 +40,6 @@ class ComponentbuilderViewCustom_code extends JViewLegacy */ public function display($tpl = null) { - // Check for errors. - if (count($errors = $this->get('Errors'))) - { - JError::raiseError(500, implode('
', $errors)); - return false; - } - // Assign the variables $this->form = $this->get('Form'); $this->item = $this->get('Item'); @@ -72,6 +65,12 @@ class ComponentbuilderViewCustom_code extends JViewLegacy // Set the toolbar $this->addToolBar(); + + // Check for errors. + if (count($errors = $this->get('Errors'))) + { + throw new Exception(implode("\n", $errors), 500); + } // Display the template parent::display($tpl); diff --git a/admin/views/custom_codes/view.html.php b/admin/views/custom_codes/view.html.php index 67fb18a75..f96f3c903 100644 --- a/admin/views/custom_codes/view.html.php +++ b/admin/views/custom_codes/view.html.php @@ -46,13 +46,6 @@ class ComponentbuilderViewCustom_codes extends JViewLegacy ComponentbuilderHelper::addSubmenu('custom_codes'); } - // Check for errors. - if (count($errors = $this->get('Errors'))) - { - JError::raiseError(500, implode('
', $errors)); - return false; - } - // Assign data to the view $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); @@ -80,6 +73,12 @@ class ComponentbuilderViewCustom_codes extends JViewLegacy $this->batchDisplay = JHtmlBatch_::render(); } } + + // Check for errors. + if (count($errors = $this->get('Errors'))) + { + throw new Exception(implode("\n", $errors), 500); + } // Display the template parent::display($tpl); diff --git a/admin/views/dynamic_get/view.html.php b/admin/views/dynamic_get/view.html.php index db0e8d87b..35f860f47 100644 --- a/admin/views/dynamic_get/view.html.php +++ b/admin/views/dynamic_get/view.html.php @@ -40,13 +40,6 @@ class ComponentbuilderViewDynamic_get extends JViewLegacy */ public function display($tpl = null) { - // Check for errors. - if (count($errors = $this->get('Errors'))) - { - JError::raiseError(500, implode('
', $errors)); - return false; - } - // Assign the variables $this->form = $this->get('Form'); $this->item = $this->get('Item'); @@ -72,6 +65,12 @@ class ComponentbuilderViewDynamic_get extends JViewLegacy // Set the toolbar $this->addToolBar(); + + // Check for errors. + if (count($errors = $this->get('Errors'))) + { + throw new Exception(implode("\n", $errors), 500); + } // Display the template parent::display($tpl); diff --git a/admin/views/dynamic_gets/view.html.php b/admin/views/dynamic_gets/view.html.php index 248ffb940..8eaecfdc7 100644 --- a/admin/views/dynamic_gets/view.html.php +++ b/admin/views/dynamic_gets/view.html.php @@ -46,13 +46,6 @@ class ComponentbuilderViewDynamic_gets extends JViewLegacy ComponentbuilderHelper::addSubmenu('dynamic_gets'); } - // Check for errors. - if (count($errors = $this->get('Errors'))) - { - JError::raiseError(500, implode('
', $errors)); - return false; - } - // Assign data to the view $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); @@ -80,6 +73,12 @@ class ComponentbuilderViewDynamic_gets extends JViewLegacy $this->batchDisplay = JHtmlBatch_::render(); } } + + // Check for errors. + if (count($errors = $this->get('Errors'))) + { + throw new Exception(implode("\n", $errors), 500); + } // Display the template parent::display($tpl); diff --git a/admin/views/field/submitbutton.js b/admin/views/field/submitbutton.js index e0ed9b159..47f6c3de1 100644 --- a/admin/views/field/submitbutton.js +++ b/admin/views/field/submitbutton.js @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 38 of this MVC - @build 28th May, 2017 + @version @update number 39 of this MVC + @build 14th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage submitbutton.js diff --git a/admin/views/field/tmpl/edit.php b/admin/views/field/tmpl/edit.php index ff1cb5057..5c5f0d18b 100644 --- a/admin/views/field/tmpl/edit.php +++ b/admin/views/field/tmpl/edit.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 38 of this MVC - @build 28th May, 2017 + @version @update number 39 of this MVC + @build 14th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage edit.php @@ -89,18 +89,6 @@ $componentParams = JComponentHelper::getParams('com_componentbuilder'); - canDo->get('admin_view.access')) : ?> - -
-
-
-
- -
-
- - - canDo->get('field.delete') || $this->canDo->get('core.edit.created_by') || $this->canDo->get('field.edit.state') || $this->canDo->get('core.edit.created')) : ?>
diff --git a/admin/views/field/view.html.php b/admin/views/field/view.html.php index 9b0f1b558..311c9f23c 100644 --- a/admin/views/field/view.html.php +++ b/admin/views/field/view.html.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 38 of this MVC - @build 28th May, 2017 + @version @update number 39 of this MVC + @build 14th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage view.html.php @@ -40,13 +40,6 @@ class ComponentbuilderViewField extends JViewLegacy */ public function display($tpl = null) { - // Check for errors. - if (count($errors = $this->get('Errors'))) - { - JError::raiseError(500, implode('
', $errors)); - return false; - } - // Assign the variables $this->form = $this->get('Form'); $this->item = $this->get('Item'); @@ -68,13 +61,16 @@ class ComponentbuilderViewField extends JViewLegacy { // return to the list view that refered to this item $this->referral = '&ref='.(string)$this->ref; - } - - // Get Linked view data - $this->wablinked_admin_views = $this->get('Wablinked_admin_views'); + } // Set the toolbar $this->addToolBar(); + + // Check for errors. + if (count($errors = $this->get('Errors'))) + { + throw new Exception(implode("\n", $errors), 500); + } // Display the template parent::display($tpl); @@ -197,17 +193,7 @@ class ComponentbuilderViewField extends JViewLegacy $document->setTitle(JText::_($isNew ? 'COM_COMPONENTBUILDER_FIELD_NEW' : 'COM_COMPONENTBUILDER_FIELD_EDIT')); $document->addStyleSheet(JURI::root() . "administrator/components/com_componentbuilder/assets/css/field.css"); // Add Ajax Token - $document->addScriptDeclaration("var token = '".JSession::getFormToken()."';"); - - // Add the CSS for Footable - $document->addStyleSheet('https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css'); - $document->addStyleSheet(JURI::root() .'media/com_componentbuilder/footable/css/footable.standalone.min.css'); - // Add the JavaScript for Footable (adding all funtions) - $document->addScript(JURI::root() .'media/com_componentbuilder/footable/js/footable.min.js'); - - $footable = "jQuery(document).ready(function() { jQuery(function () { jQuery('.footable').footable();});});"; - $document->addScriptDeclaration($footable); - + $document->addScriptDeclaration("var token = '".JSession::getFormToken()."';"); $document->addScript(JURI::root() . $this->script); $document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/field/submitbutton.js"); JText::script('view not acceptable. Error'); diff --git a/admin/views/fields/tmpl/default.php b/admin/views/fields/tmpl/default.php index 54748cfdb..aa6702791 100644 --- a/admin/views/fields/tmpl/default.php +++ b/admin/views/fields/tmpl/default.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 38 of this MVC - @build 28th May, 2017 + @version @update number 39 of this MVC + @build 14th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage default.php diff --git a/admin/views/fields/tmpl/default_batch_body.php b/admin/views/fields/tmpl/default_batch_body.php index cdfed4528..84cf5fd81 100644 --- a/admin/views/fields/tmpl/default_batch_body.php +++ b/admin/views/fields/tmpl/default_batch_body.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 38 of this MVC - @build 28th May, 2017 + @version @update number 39 of this MVC + @build 14th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage default_batch_body.php diff --git a/admin/views/fields/tmpl/default_batch_footer.php b/admin/views/fields/tmpl/default_batch_footer.php index 513bb158f..236493c37 100644 --- a/admin/views/fields/tmpl/default_batch_footer.php +++ b/admin/views/fields/tmpl/default_batch_footer.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 38 of this MVC - @build 28th May, 2017 + @version @update number 39 of this MVC + @build 14th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage default_batch_footer.php diff --git a/admin/views/fields/tmpl/default_body.php b/admin/views/fields/tmpl/default_body.php index 99554fedd..9b0d0c30c 100644 --- a/admin/views/fields/tmpl/default_body.php +++ b/admin/views/fields/tmpl/default_body.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 38 of this MVC - @build 28th May, 2017 + @version @update number 39 of this MVC + @build 14th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage default_body.php diff --git a/admin/views/fields/tmpl/default_foot.php b/admin/views/fields/tmpl/default_foot.php index 89481e81c..f408f79bc 100644 --- a/admin/views/fields/tmpl/default_foot.php +++ b/admin/views/fields/tmpl/default_foot.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 38 of this MVC - @build 28th May, 2017 + @version @update number 39 of this MVC + @build 14th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage default_foot.php diff --git a/admin/views/fields/tmpl/default_head.php b/admin/views/fields/tmpl/default_head.php index 429813e39..6cc62bafa 100644 --- a/admin/views/fields/tmpl/default_head.php +++ b/admin/views/fields/tmpl/default_head.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 38 of this MVC - @build 28th May, 2017 + @version @update number 39 of this MVC + @build 14th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage default_head.php diff --git a/admin/views/fields/tmpl/default_toolbar.php b/admin/views/fields/tmpl/default_toolbar.php index 1a66e90af..15916ef80 100644 --- a/admin/views/fields/tmpl/default_toolbar.php +++ b/admin/views/fields/tmpl/default_toolbar.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 38 of this MVC - @build 28th May, 2017 + @version @update number 39 of this MVC + @build 14th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage default_toolbar.php diff --git a/admin/views/fields/view.html.php b/admin/views/fields/view.html.php index cb2fd8a2d..3e348e1a4 100644 --- a/admin/views/fields/view.html.php +++ b/admin/views/fields/view.html.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 38 of this MVC - @build 28th May, 2017 + @version @update number 39 of this MVC + @build 14th October, 2017 @created 30th April, 2015 @package Component Builder @subpackage view.html.php @@ -46,13 +46,6 @@ class ComponentbuilderViewFields extends JViewLegacy ComponentbuilderHelper::addSubmenu('fields'); } - // Check for errors. - if (count($errors = $this->get('Errors'))) - { - JError::raiseError(500, implode('
', $errors)); - return false; - } - // Assign data to the view $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); @@ -80,6 +73,12 @@ class ComponentbuilderViewFields extends JViewLegacy $this->batchDisplay = JHtmlBatch_::render(); } } + + // Check for errors. + if (count($errors = $this->get('Errors'))) + { + throw new Exception(implode("\n", $errors), 500); + } // Display the template parent::display($tpl); diff --git a/admin/views/fieldtype/view.html.php b/admin/views/fieldtype/view.html.php index a5f891d7d..1ce02ccc2 100644 --- a/admin/views/fieldtype/view.html.php +++ b/admin/views/fieldtype/view.html.php @@ -40,13 +40,6 @@ class ComponentbuilderViewFieldtype extends JViewLegacy */ public function display($tpl = null) { - // Check for errors. - if (count($errors = $this->get('Errors'))) - { - JError::raiseError(500, implode('
', $errors)); - return false; - } - // Assign the variables $this->form = $this->get('Form'); $this->item = $this->get('Item'); @@ -71,10 +64,16 @@ class ComponentbuilderViewFieldtype extends JViewLegacy } // Get Linked view data - $this->wacfields = $this->get('Wacfields'); + $this->wabfields = $this->get('Wabfields'); // Set the toolbar $this->addToolBar(); + + // Check for errors. + if (count($errors = $this->get('Errors'))) + { + throw new Exception(implode("\n", $errors), 500); + } // Display the template parent::display($tpl); diff --git a/admin/views/fieldtypes/view.html.php b/admin/views/fieldtypes/view.html.php index a468df1e1..441a4a3eb 100644 --- a/admin/views/fieldtypes/view.html.php +++ b/admin/views/fieldtypes/view.html.php @@ -46,13 +46,6 @@ class ComponentbuilderViewFieldtypes extends JViewLegacy ComponentbuilderHelper::addSubmenu('fieldtypes'); } - // Check for errors. - if (count($errors = $this->get('Errors'))) - { - JError::raiseError(500, implode('
', $errors)); - return false; - } - // Assign data to the view $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); @@ -80,6 +73,12 @@ class ComponentbuilderViewFieldtypes extends JViewLegacy $this->batchDisplay = JHtmlBatch_::render(); } } + + // Check for errors. + if (count($errors = $this->get('Errors'))) + { + throw new Exception(implode("\n", $errors), 500); + } // Display the template parent::display($tpl); diff --git a/admin/views/ftp/view.html.php b/admin/views/ftp/view.html.php index a925c155e..ec6d80f2b 100644 --- a/admin/views/ftp/view.html.php +++ b/admin/views/ftp/view.html.php @@ -40,13 +40,6 @@ class ComponentbuilderViewFtp extends JViewLegacy */ public function display($tpl = null) { - // Check for errors. - if (count($errors = $this->get('Errors'))) - { - JError::raiseError(500, implode('
', $errors)); - return false; - } - // Assign the variables $this->form = $this->get('Form'); $this->item = $this->get('Item'); @@ -71,10 +64,16 @@ class ComponentbuilderViewFtp extends JViewLegacy } // Get Linked view data - $this->wadlinked_components = $this->get('Wadlinked_components'); + $this->waclinked_components = $this->get('Waclinked_components'); // Set the toolbar $this->addToolBar(); + + // Check for errors. + if (count($errors = $this->get('Errors'))) + { + throw new Exception(implode("\n", $errors), 500); + } // Display the template parent::display($tpl); diff --git a/admin/views/ftps/view.html.php b/admin/views/ftps/view.html.php index 0cc018990..1aa11b01e 100644 --- a/admin/views/ftps/view.html.php +++ b/admin/views/ftps/view.html.php @@ -46,13 +46,6 @@ class ComponentbuilderViewFtps extends JViewLegacy ComponentbuilderHelper::addSubmenu('ftps'); } - // Check for errors. - if (count($errors = $this->get('Errors'))) - { - JError::raiseError(500, implode('
', $errors)); - return false; - } - // Assign data to the view $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); @@ -80,6 +73,12 @@ class ComponentbuilderViewFtps extends JViewLegacy $this->batchDisplay = JHtmlBatch_::render(); } } + + // Check for errors. + if (count($errors = $this->get('Errors'))) + { + throw new Exception(implode("\n", $errors), 500); + } // Display the template parent::display($tpl); diff --git a/admin/views/help_document/view.html.php b/admin/views/help_document/view.html.php index 950cf867f..a8af0fdd2 100644 --- a/admin/views/help_document/view.html.php +++ b/admin/views/help_document/view.html.php @@ -40,13 +40,6 @@ class ComponentbuilderViewHelp_document extends JViewLegacy */ public function display($tpl = null) { - // Check for errors. - if (count($errors = $this->get('Errors'))) - { - JError::raiseError(500, implode('
', $errors)); - return false; - } - // Assign the variables $this->form = $this->get('Form'); $this->item = $this->get('Item'); @@ -72,6 +65,12 @@ class ComponentbuilderViewHelp_document extends JViewLegacy // Set the toolbar $this->addToolBar(); + + // Check for errors. + if (count($errors = $this->get('Errors'))) + { + throw new Exception(implode("\n", $errors), 500); + } // Display the template parent::display($tpl); diff --git a/admin/views/help_documents/view.html.php b/admin/views/help_documents/view.html.php index 2d0783c42..fb534a326 100644 --- a/admin/views/help_documents/view.html.php +++ b/admin/views/help_documents/view.html.php @@ -46,13 +46,6 @@ class ComponentbuilderViewHelp_documents extends JViewLegacy ComponentbuilderHelper::addSubmenu('help_documents'); } - // Check for errors. - if (count($errors = $this->get('Errors'))) - { - JError::raiseError(500, implode('
', $errors)); - return false; - } - // Assign data to the view $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); @@ -80,6 +73,12 @@ class ComponentbuilderViewHelp_documents extends JViewLegacy $this->batchDisplay = JHtmlBatch_::render(); } } + + // Check for errors. + if (count($errors = $this->get('Errors'))) + { + throw new Exception(implode("\n", $errors), 500); + } // Display the template parent::display($tpl); diff --git a/admin/views/import/view.html.php b/admin/views/import/view.html.php index fd95617c7..cda6301be 100644 --- a/admin/views/import/view.html.php +++ b/admin/views/import/view.html.php @@ -41,20 +41,13 @@ class ComponentbuilderViewImport extends JViewLegacy protected $dataType; public function display($tpl = null) - { + { if ($this->getLayout() !== 'modal') { // Include helper submenu ComponentbuilderHelper::addSubmenu('import'); } - // Check for errors. - if (count($errors = $this->get('Errors'))) - { - JError::raiseError(500, implode('
', $errors)); - return false; - } - $paths = new stdClass; $paths->first = ''; $state = $this->get('state'); @@ -83,6 +76,12 @@ class ComponentbuilderViewImport extends JViewLegacy // clear the data type $session->clear('dataType'); } + + // Check for errors. + if (count($errors = $this->get('Errors'))) + { + throw new Exception(implode("\n", $errors), 500); + } // Display the template parent::display($tpl); diff --git a/admin/views/import_joomla_components/view.html.php b/admin/views/import_joomla_components/view.html.php index f7189c379..3d4674d6a 100644 --- a/admin/views/import_joomla_components/view.html.php +++ b/admin/views/import_joomla_components/view.html.php @@ -50,12 +50,6 @@ class ComponentbuilderViewImport_joomla_components extends JViewLegacy ComponentbuilderHelper::addSubmenu('import'); } - // Check for errors. - if (count($errors = $this->get('Errors'))){ - JError::raiseError(500, implode('
', $errors)); - return false; - } - $paths = new stdClass; $paths->first = ''; $state = $this->get('state'); @@ -95,6 +89,13 @@ class ComponentbuilderViewImport_joomla_components extends JViewLegacy $this->packageInfo = json_decode($session->get('smart_package_info', false), true); $this->formPackage = $this->getForm(); } + + // Check for errors. + if (count($errors = $this->get('Errors'))) + { + throw new Exception(implode("\n", $errors), 500); + } + // Display the template parent::display($tpl); } diff --git a/admin/views/joomla_component/submitbutton.js b/admin/views/joomla_component/submitbutton.js index b4206bdbb..7d588e846 100644 --- a/admin/views/joomla_component/submitbutton.js +++ b/admin/views/joomla_component/submitbutton.js @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 387 of this MVC - @build 11th October, 2017 + @version @update number 388 of this MVC + @build 14th October, 2017 @created 6th May, 2015 @package Component Builder @subpackage submitbutton.js diff --git a/admin/views/joomla_component/tmpl/edit.php b/admin/views/joomla_component/tmpl/edit.php index 790781657..078e7bc94 100644 --- a/admin/views/joomla_component/tmpl/edit.php +++ b/admin/views/joomla_component/tmpl/edit.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 387 of this MVC - @build 11th October, 2017 + @version @update number 388 of this MVC + @build 14th October, 2017 @created 6th May, 2015 @package Component Builder @subpackage edit.php diff --git a/admin/views/joomla_component/view.html.php b/admin/views/joomla_component/view.html.php index 940bba320..7d3aeb65a 100644 --- a/admin/views/joomla_component/view.html.php +++ b/admin/views/joomla_component/view.html.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 387 of this MVC - @build 11th October, 2017 + @version @update number 388 of this MVC + @build 14th October, 2017 @created 6th May, 2015 @package Component Builder @subpackage view.html.php @@ -40,13 +40,6 @@ class ComponentbuilderViewJoomla_component extends JViewLegacy */ public function display($tpl = null) { - // Check for errors. - if (count($errors = $this->get('Errors'))) - { - JError::raiseError(500, implode('
', $errors)); - return false; - } - // Assign the variables $this->form = $this->get('Form'); $this->item = $this->get('Item'); @@ -84,6 +77,12 @@ class ComponentbuilderViewJoomla_component extends JViewLegacy // Set the toolbar $this->addToolBar(); + + // Check for errors. + if (count($errors = $this->get('Errors'))) + { + throw new Exception(implode("\n", $errors), 500); + } // Display the template parent::display($tpl); diff --git a/admin/views/joomla_components/tmpl/default.php b/admin/views/joomla_components/tmpl/default.php index 81a7c65f1..f1ac9bbf3 100644 --- a/admin/views/joomla_components/tmpl/default.php +++ b/admin/views/joomla_components/tmpl/default.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 387 of this MVC - @build 11th October, 2017 + @version @update number 388 of this MVC + @build 14th October, 2017 @created 6th May, 2015 @package Component Builder @subpackage default.php diff --git a/admin/views/joomla_components/tmpl/default_batch_body.php b/admin/views/joomla_components/tmpl/default_batch_body.php index f4f47a741..4abaca76c 100644 --- a/admin/views/joomla_components/tmpl/default_batch_body.php +++ b/admin/views/joomla_components/tmpl/default_batch_body.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 387 of this MVC - @build 11th October, 2017 + @version @update number 388 of this MVC + @build 14th October, 2017 @created 6th May, 2015 @package Component Builder @subpackage default_batch_body.php diff --git a/admin/views/joomla_components/tmpl/default_batch_footer.php b/admin/views/joomla_components/tmpl/default_batch_footer.php index cfb93da6b..0f6242e74 100644 --- a/admin/views/joomla_components/tmpl/default_batch_footer.php +++ b/admin/views/joomla_components/tmpl/default_batch_footer.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 387 of this MVC - @build 11th October, 2017 + @version @update number 388 of this MVC + @build 14th October, 2017 @created 6th May, 2015 @package Component Builder @subpackage default_batch_footer.php diff --git a/admin/views/joomla_components/tmpl/default_body.php b/admin/views/joomla_components/tmpl/default_body.php index 853794f12..27d6db2b5 100644 --- a/admin/views/joomla_components/tmpl/default_body.php +++ b/admin/views/joomla_components/tmpl/default_body.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 387 of this MVC - @build 11th October, 2017 + @version @update number 388 of this MVC + @build 14th October, 2017 @created 6th May, 2015 @package Component Builder @subpackage default_body.php diff --git a/admin/views/joomla_components/tmpl/default_foot.php b/admin/views/joomla_components/tmpl/default_foot.php index 36f3d2c6a..7adb4d8c6 100644 --- a/admin/views/joomla_components/tmpl/default_foot.php +++ b/admin/views/joomla_components/tmpl/default_foot.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 387 of this MVC - @build 11th October, 2017 + @version @update number 388 of this MVC + @build 14th October, 2017 @created 6th May, 2015 @package Component Builder @subpackage default_foot.php diff --git a/admin/views/joomla_components/tmpl/default_head.php b/admin/views/joomla_components/tmpl/default_head.php index 247a20419..75a47de72 100644 --- a/admin/views/joomla_components/tmpl/default_head.php +++ b/admin/views/joomla_components/tmpl/default_head.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 387 of this MVC - @build 11th October, 2017 + @version @update number 388 of this MVC + @build 14th October, 2017 @created 6th May, 2015 @package Component Builder @subpackage default_head.php diff --git a/admin/views/joomla_components/tmpl/default_toolbar.php b/admin/views/joomla_components/tmpl/default_toolbar.php index c81dd8172..2fc355800 100644 --- a/admin/views/joomla_components/tmpl/default_toolbar.php +++ b/admin/views/joomla_components/tmpl/default_toolbar.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 387 of this MVC - @build 11th October, 2017 + @version @update number 388 of this MVC + @build 14th October, 2017 @created 6th May, 2015 @package Component Builder @subpackage default_toolbar.php diff --git a/admin/views/joomla_components/view.html.php b/admin/views/joomla_components/view.html.php index 3547116a0..ed0c85051 100644 --- a/admin/views/joomla_components/view.html.php +++ b/admin/views/joomla_components/view.html.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 387 of this MVC - @build 11th October, 2017 + @version @update number 388 of this MVC + @build 14th October, 2017 @created 6th May, 2015 @package Component Builder @subpackage view.html.php @@ -46,13 +46,6 @@ class ComponentbuilderViewJoomla_components extends JViewLegacy ComponentbuilderHelper::addSubmenu('joomla_components'); } - // Check for errors. - if (count($errors = $this->get('Errors'))) - { - JError::raiseError(500, implode('
', $errors)); - return false; - } - // Assign data to the view $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); @@ -80,6 +73,12 @@ class ComponentbuilderViewJoomla_components extends JViewLegacy $this->batchDisplay = JHtmlBatch_::render(); } } + + // Check for errors. + if (count($errors = $this->get('Errors'))) + { + throw new Exception(implode("\n", $errors), 500); + } // Display the template parent::display($tpl); diff --git a/admin/views/language/view.html.php b/admin/views/language/view.html.php index 374949377..0729bd219 100644 --- a/admin/views/language/view.html.php +++ b/admin/views/language/view.html.php @@ -40,13 +40,6 @@ class ComponentbuilderViewLanguage extends JViewLegacy */ public function display($tpl = null) { - // Check for errors. - if (count($errors = $this->get('Errors'))) - { - JError::raiseError(500, implode('
', $errors)); - return false; - } - // Assign the variables $this->form = $this->get('Form'); $this->item = $this->get('Item'); @@ -72,6 +65,12 @@ class ComponentbuilderViewLanguage extends JViewLegacy // Set the toolbar $this->addToolBar(); + + // Check for errors. + if (count($errors = $this->get('Errors'))) + { + throw new Exception(implode("\n", $errors), 500); + } // Display the template parent::display($tpl); diff --git a/admin/views/language_translation/view.html.php b/admin/views/language_translation/view.html.php index 413310057..094ee24d3 100644 --- a/admin/views/language_translation/view.html.php +++ b/admin/views/language_translation/view.html.php @@ -40,13 +40,6 @@ class ComponentbuilderViewLanguage_translation extends JViewLegacy */ public function display($tpl = null) { - // Check for errors. - if (count($errors = $this->get('Errors'))) - { - JError::raiseError(500, implode('
', $errors)); - return false; - } - // Assign the variables $this->form = $this->get('Form'); $this->item = $this->get('Item'); @@ -72,6 +65,12 @@ class ComponentbuilderViewLanguage_translation extends JViewLegacy // Set the toolbar $this->addToolBar(); + + // Check for errors. + if (count($errors = $this->get('Errors'))) + { + throw new Exception(implode("\n", $errors), 500); + } // Display the template parent::display($tpl); diff --git a/admin/views/language_translations/view.html.php b/admin/views/language_translations/view.html.php index 6d15377c8..a1147e032 100644 --- a/admin/views/language_translations/view.html.php +++ b/admin/views/language_translations/view.html.php @@ -46,13 +46,6 @@ class ComponentbuilderViewLanguage_translations extends JViewLegacy ComponentbuilderHelper::addSubmenu('language_translations'); } - // Check for errors. - if (count($errors = $this->get('Errors'))) - { - JError::raiseError(500, implode('
', $errors)); - return false; - } - // Assign data to the view $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); @@ -80,6 +73,12 @@ class ComponentbuilderViewLanguage_translations extends JViewLegacy $this->batchDisplay = JHtmlBatch_::render(); } } + + // Check for errors. + if (count($errors = $this->get('Errors'))) + { + throw new Exception(implode("\n", $errors), 500); + } // Display the template parent::display($tpl); diff --git a/admin/views/languages/view.html.php b/admin/views/languages/view.html.php index 598b931ec..ac223cef4 100644 --- a/admin/views/languages/view.html.php +++ b/admin/views/languages/view.html.php @@ -46,13 +46,6 @@ class ComponentbuilderViewLanguages extends JViewLegacy ComponentbuilderHelper::addSubmenu('languages'); } - // Check for errors. - if (count($errors = $this->get('Errors'))) - { - JError::raiseError(500, implode('
', $errors)); - return false; - } - // Assign data to the view $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); @@ -80,6 +73,12 @@ class ComponentbuilderViewLanguages extends JViewLegacy $this->batchDisplay = JHtmlBatch_::render(); } } + + // Check for errors. + if (count($errors = $this->get('Errors'))) + { + throw new Exception(implode("\n", $errors), 500); + } // Display the template parent::display($tpl); diff --git a/admin/views/layout/view.html.php b/admin/views/layout/view.html.php index 74d6c3cdf..af3836724 100644 --- a/admin/views/layout/view.html.php +++ b/admin/views/layout/view.html.php @@ -40,13 +40,6 @@ class ComponentbuilderViewLayout extends JViewLegacy */ public function display($tpl = null) { - // Check for errors. - if (count($errors = $this->get('Errors'))) - { - JError::raiseError(500, implode('
', $errors)); - return false; - } - // Assign the variables $this->form = $this->get('Form'); $this->item = $this->get('Item'); @@ -72,6 +65,12 @@ class ComponentbuilderViewLayout extends JViewLegacy // Set the toolbar $this->addToolBar(); + + // Check for errors. + if (count($errors = $this->get('Errors'))) + { + throw new Exception(implode("\n", $errors), 500); + } // Display the template parent::display($tpl); diff --git a/admin/views/layouts/view.html.php b/admin/views/layouts/view.html.php index 8007b112f..0f6517bb4 100644 --- a/admin/views/layouts/view.html.php +++ b/admin/views/layouts/view.html.php @@ -46,13 +46,6 @@ class ComponentbuilderViewLayouts extends JViewLegacy ComponentbuilderHelper::addSubmenu('layouts'); } - // Check for errors. - if (count($errors = $this->get('Errors'))) - { - JError::raiseError(500, implode('
', $errors)); - return false; - } - // Assign data to the view $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); @@ -80,6 +73,12 @@ class ComponentbuilderViewLayouts extends JViewLegacy $this->batchDisplay = JHtmlBatch_::render(); } } + + // Check for errors. + if (count($errors = $this->get('Errors'))) + { + throw new Exception(implode("\n", $errors), 500); + } // Display the template parent::display($tpl); diff --git a/admin/views/site_view/view.html.php b/admin/views/site_view/view.html.php index b0abe5551..2d10b8179 100644 --- a/admin/views/site_view/view.html.php +++ b/admin/views/site_view/view.html.php @@ -40,13 +40,6 @@ class ComponentbuilderViewSite_view extends JViewLegacy */ public function display($tpl = null) { - // Check for errors. - if (count($errors = $this->get('Errors'))) - { - JError::raiseError(500, implode('
', $errors)); - return false; - } - // Assign the variables $this->form = $this->get('Form'); $this->item = $this->get('Item'); @@ -75,6 +68,12 @@ class ComponentbuilderViewSite_view extends JViewLegacy // Set the toolbar $this->addToolBar(); + + // Check for errors. + if (count($errors = $this->get('Errors'))) + { + throw new Exception(implode("\n", $errors), 500); + } // Display the template parent::display($tpl); diff --git a/admin/views/site_views/view.html.php b/admin/views/site_views/view.html.php index 64c56c4ef..46c2e8acd 100644 --- a/admin/views/site_views/view.html.php +++ b/admin/views/site_views/view.html.php @@ -46,13 +46,6 @@ class ComponentbuilderViewSite_views extends JViewLegacy ComponentbuilderHelper::addSubmenu('site_views'); } - // Check for errors. - if (count($errors = $this->get('Errors'))) - { - JError::raiseError(500, implode('
', $errors)); - return false; - } - // Assign data to the view $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); @@ -80,6 +73,12 @@ class ComponentbuilderViewSite_views extends JViewLegacy $this->batchDisplay = JHtmlBatch_::render(); } } + + // Check for errors. + if (count($errors = $this->get('Errors'))) + { + throw new Exception(implode("\n", $errors), 500); + } // Display the template parent::display($tpl); diff --git a/admin/views/snippet/view.html.php b/admin/views/snippet/view.html.php index d0be913b7..124e205dd 100644 --- a/admin/views/snippet/view.html.php +++ b/admin/views/snippet/view.html.php @@ -40,13 +40,6 @@ class ComponentbuilderViewSnippet extends JViewLegacy */ public function display($tpl = null) { - // Check for errors. - if (count($errors = $this->get('Errors'))) - { - JError::raiseError(500, implode('
', $errors)); - return false; - } - // Assign the variables $this->form = $this->get('Form'); $this->item = $this->get('Item'); @@ -72,6 +65,12 @@ class ComponentbuilderViewSnippet extends JViewLegacy // Set the toolbar $this->addToolBar(); + + // Check for errors. + if (count($errors = $this->get('Errors'))) + { + throw new Exception(implode("\n", $errors), 500); + } // Display the template parent::display($tpl); diff --git a/admin/views/snippets/view.html.php b/admin/views/snippets/view.html.php index 05ab30fad..72929b273 100644 --- a/admin/views/snippets/view.html.php +++ b/admin/views/snippets/view.html.php @@ -46,13 +46,6 @@ class ComponentbuilderViewSnippets extends JViewLegacy ComponentbuilderHelper::addSubmenu('snippets'); } - // Check for errors. - if (count($errors = $this->get('Errors'))) - { - JError::raiseError(500, implode('
', $errors)); - return false; - } - // Assign data to the view $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); @@ -80,6 +73,12 @@ class ComponentbuilderViewSnippets extends JViewLegacy $this->batchDisplay = JHtmlBatch_::render(); } } + + // Check for errors. + if (count($errors = $this->get('Errors'))) + { + throw new Exception(implode("\n", $errors), 500); + } // Display the template parent::display($tpl); diff --git a/admin/views/template/view.html.php b/admin/views/template/view.html.php index 627df2a75..f3d28e466 100644 --- a/admin/views/template/view.html.php +++ b/admin/views/template/view.html.php @@ -40,13 +40,6 @@ class ComponentbuilderViewTemplate extends JViewLegacy */ public function display($tpl = null) { - // Check for errors. - if (count($errors = $this->get('Errors'))) - { - JError::raiseError(500, implode('
', $errors)); - return false; - } - // Assign the variables $this->form = $this->get('Form'); $this->item = $this->get('Item'); @@ -72,6 +65,12 @@ class ComponentbuilderViewTemplate extends JViewLegacy // Set the toolbar $this->addToolBar(); + + // Check for errors. + if (count($errors = $this->get('Errors'))) + { + throw new Exception(implode("\n", $errors), 500); + } // Display the template parent::display($tpl); diff --git a/admin/views/templates/view.html.php b/admin/views/templates/view.html.php index 787693eb8..4512692ea 100644 --- a/admin/views/templates/view.html.php +++ b/admin/views/templates/view.html.php @@ -46,13 +46,6 @@ class ComponentbuilderViewTemplates extends JViewLegacy ComponentbuilderHelper::addSubmenu('templates'); } - // Check for errors. - if (count($errors = $this->get('Errors'))) - { - JError::raiseError(500, implode('
', $errors)); - return false; - } - // Assign data to the view $this->items = $this->get('Items'); $this->pagination = $this->get('Pagination'); @@ -80,6 +73,12 @@ class ComponentbuilderViewTemplates extends JViewLegacy $this->batchDisplay = JHtmlBatch_::render(); } } + + // Check for errors. + if (count($errors = $this->get('Errors'))) + { + throw new Exception(implode("\n", $errors), 500); + } // Display the template parent::display($tpl); diff --git a/site/views/api/view.html.php b/site/views/api/view.html.php index e91eeff6d..33d7212b2 100644 --- a/site/views/api/view.html.php +++ b/site/views/api/view.html.php @@ -36,7 +36,7 @@ class ComponentbuilderViewApi extends JViewLegacy { // Overwriting JView display method function display($tpl = null) - { + { // get combined params of both component and menu $this->app = JFactory::getApplication(); $this->params = $this->app->getParams(); @@ -46,19 +46,19 @@ class ComponentbuilderViewApi extends JViewLegacy // Initialise variables. $this->item = $this->get('Item'); - // Check for errors. - if (count($errors = $this->get('Errors'))) - { - JError::raiseError(500, implode(PHP_EOL, $errors)); - return false; - } - // Set the toolbar $this->addToolBar(); // set the document $this->_prepareDocument(); + // Check for errors. + if (count($errors = $this->get('Errors'))) + { + throw new Exception(implode(" +", $errors), 500); + } + parent::display($tpl); }