diff --git a/README.md b/README.md index 78d546339..a994fcf86 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Component Builder (2.3.7) +# Component Builder (2.3.8) This is a [Joomla 3.x](http://www.joomla.org/) component. @@ -8,7 +8,7 @@ The Component Builder for [Joomla](http://www.joomla.org/) that is highly advanc Whether you're a seasoned [Joomla](http://www.joomla.org/) developer, or have just started, Component Builder will safe you lots of time and money. A real must have! -You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.3.7) with **ALL** its features and **ALL** concepts totally open-source and free! +You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.3.8) with **ALL** its features and **ALL** concepts totally open-source and free! Once installed upgrades are quick and easy via the default Joomla upgrade area. @@ -104,13 +104,13 @@ Component Builder is mapped as a component in itself on my local development env + *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io) + *Name*: [Component Builder](http://vdm.bz/component-builder) + *First Build*: 30th April, 2015 -+ *Last Build*: 20th March, 2017 -+ *Version*: 2.3.7 ++ *Last Build*: 27th March, 2017 ++ *Version*: 2.3.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*: **93648** -+ *File count*: **602** -+ *Folder count*: **105** ++ *Line count*: **95888** ++ *File count*: **609** ++ *Folder count*: **107** > This **component** was build with a Joomla [Automated Component Builder](http://vdm.bz/component-builder). > Developed by [Llewellyn van der Merwe](mailto:joomla@vdm.io) diff --git a/admin/README.txt b/admin/README.txt index 78d546339..a994fcf86 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -1,4 +1,4 @@ -# Component Builder (2.3.7) +# Component Builder (2.3.8) This is a [Joomla 3.x](http://www.joomla.org/) component. @@ -8,7 +8,7 @@ The Component Builder for [Joomla](http://www.joomla.org/) that is highly advanc Whether you're a seasoned [Joomla](http://www.joomla.org/) developer, or have just started, Component Builder will safe you lots of time and money. A real must have! -You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.3.7) with **ALL** its features and **ALL** concepts totally open-source and free! +You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.3.8) with **ALL** its features and **ALL** concepts totally open-source and free! Once installed upgrades are quick and easy via the default Joomla upgrade area. @@ -104,13 +104,13 @@ Component Builder is mapped as a component in itself on my local development env + *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io) + *Name*: [Component Builder](http://vdm.bz/component-builder) + *First Build*: 30th April, 2015 -+ *Last Build*: 20th March, 2017 -+ *Version*: 2.3.7 ++ *Last Build*: 27th March, 2017 ++ *Version*: 2.3.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*: **93648** -+ *File count*: **602** -+ *Folder count*: **105** ++ *Line count*: **95888** ++ *File count*: **609** ++ *Folder count*: **107** > This **component** was build with a Joomla [Automated Component Builder](http://vdm.bz/component-builder). > Developed by [Llewellyn van der Merwe](mailto:joomla@vdm.io) diff --git a/admin/access.xml b/admin/access.xml index 4c8cd730f..4bf60b30b 100644 --- a/admin/access.xml +++ b/admin/access.xml @@ -101,7 +101,8 @@ - + + diff --git a/admin/assets/css/admin.css b/admin/assets/css/admin.css index 0da2801ba..12ac87fbe 100644 --- a/admin/assets/css/admin.css +++ b/admin/assets/css/admin.css @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage admin.css diff --git a/admin/assets/css/admin_view.css b/admin/assets/css/admin_view.css index 9f724ffb1..db44338a4 100644 --- a/admin/assets/css/admin_view.css +++ b/admin/assets/css/admin_view.css @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 104 of this MVC - @build 6th March, 2017 + @version @update number 108 of this MVC + @build 24th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage admin_view.css diff --git a/admin/assets/css/admin_views.css b/admin/assets/css/admin_views.css index 4006ff308..7027a0964 100644 --- a/admin/assets/css/admin_views.css +++ b/admin/assets/css/admin_views.css @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 104 of this MVC - @build 6th March, 2017 + @version @update number 108 of this MVC + @build 24th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage admin_views.css diff --git a/admin/assets/css/compiler.css b/admin/assets/css/compiler.css index 69b431c16..ef2f121af 100644 --- a/admin/assets/css/compiler.css +++ b/admin/assets/css/compiler.css @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 46 of this MVC - @build 3rd March, 2017 + @version @update number 47 of this MVC + @build 21st March, 2017 @created 1st February, 2017 @package Component Builder @subpackage compiler.css diff --git a/admin/assets/css/dashboard.css b/admin/assets/css/dashboard.css index 9e6c28f7f..a038ed073 100644 --- a/admin/assets/css/dashboard.css +++ b/admin/assets/css/dashboard.css @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage dashboard.css diff --git a/admin/assets/css/joomla_component.css b/admin/assets/css/joomla_component.css index e0e599bc0..f73851017 100644 --- a/admin/assets/css/joomla_component.css +++ b/admin/assets/css/joomla_component.css @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 132 of this MVC - @build 20th March, 2017 + @version @update number 182 of this MVC + @build 27th March, 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 13d508e5f..b8bb9bc61 100644 --- a/admin/assets/css/joomla_components.css +++ b/admin/assets/css/joomla_components.css @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 132 of this MVC - @build 20th March, 2017 + @version @update number 182 of this MVC + @build 27th March, 2017 @created 6th May, 2015 @package Component Builder @subpackage joomla_components.css diff --git a/admin/compiler/joomla_3/JModelLegacy_import.php b/admin/compiler/joomla_3/JModelLegacy_import.php index 28f496992..0bd7856cb 100644 --- a/admin/compiler/joomla_3/JModelLegacy_import.php +++ b/admin/compiler/joomla_3/JModelLegacy_import.php @@ -34,6 +34,11 @@ defined('_JEXEC') or die('Restricted access'); */ class ###Component###ModelImport extends JModelLegacy { + // set uploading values + protected $use_streams = false; + protected $allow_unsafe = false; + protected $safeFileOptions = array(); + /** * @var object JTable object */ @@ -75,10 +80,6 @@ class ###Component###ModelImport extends JModelLegacy // Recall the 'Import from Directory' path. $path = $app->getUserStateFromRequest($this->_context . '.import_directory', 'import_directory', $app->get('tmp_path')); $this->setState('import.directory', $path); - // set uploading values - $this->use_streams = false; - $this->allow_unsafe = false; - $this->safeFileOptions = array(); parent::populateState(); } @@ -285,21 +286,16 @@ class ###Component###ModelImport extends JModelLegacy } // check the extention - switch(strtolower(pathinfo($p_dir, PATHINFO_EXTENSION))){ - case 'xls': - case 'ods': - case 'csv': - break; - - default: + if(!$this->checkExtension($p_dir)) + { + // set error message $app->enqueueMessage(JText::_('COM_###COMPONENT###_IMPORT_MSG_DOES_NOT_HAVE_A_VALID_FILE_TYPE'), 'warning'); return false; - break; } $package['packagename'] = null; - $package['dir'] = $p_dir; - $package['type'] = $type; + $package['dir'] = $p_dir; + $package['type'] = $type; return $package; } @@ -357,21 +353,15 @@ class ###Component###ModelImport extends JModelLegacy $archivename = JPath::clean($archivename); // check the extention - switch(strtolower(pathinfo($archivename, PATHINFO_EXTENSION))){ - case 'xls': - case 'ods': - case 'csv': - break; - - default: + if(!$this->checkExtension($archivename)) + { // Cleanup the import files $this->remove($archivename); $app->enqueueMessage(JText::_('COM_###COMPONENT###_IMPORT_MSG_DOES_NOT_HAVE_A_VALID_FILE_TYPE'), 'warning'); return false; - break; - } + } - $config = JFactory::getConfig(); + $config = JFactory::getConfig(); // set Package Name $check['packagename'] = $archivename; @@ -384,6 +374,28 @@ class ###Component###ModelImport extends JModelLegacy return $check; } + /** + * Check the extension + * + * @param string $file Name of the uploaded file + * + * @return boolean True on success + * + */ + protected function checkExtension($file) + { + // check the extention + switch(strtolower(pathinfo($file, PATHINFO_EXTENSION))) + { + case 'xls': + case 'ods': + case 'csv': + return true; + break; + } + return false; + } + /** * Clean up temporary uploaded spreadsheet * diff --git a/admin/compiler/joomla_3/JModelLegacy_import_custom.php b/admin/compiler/joomla_3/JModelLegacy_import_custom.php index 3dfedbe16..eca19ee79 100644 --- a/admin/compiler/joomla_3/JModelLegacy_import_custom.php +++ b/admin/compiler/joomla_3/JModelLegacy_import_custom.php @@ -34,6 +34,11 @@ defined('_JEXEC') or die('Restricted access'); */ class ###Component###Model###View### extends JModelLegacy { + // set uploading values + protected $use_streams = false; + protected $allow_unsafe = false; + protected $safeFileOptions = array(); + /** * @var object JTable object */ @@ -75,10 +80,6 @@ class ###Component###Model###View### extends JModelLegacy // Recall the 'Import from Directory' path. $path = $app->getUserStateFromRequest($this->_context . '.import_directory', 'import_directory', $app->get('tmp_path')); $this->setState('import.directory', $path); - // set uploading values - $this->use_streams = false; - $this->allow_unsafe = false; - $this->safeFileOptions = array(); parent::populateState(); } ###IMPORT_METHOD_CUSTOM### @@ -175,21 +176,16 @@ class ###Component###Model###View### extends JModelLegacy } // check the extention - switch(strtolower(pathinfo($p_dir, PATHINFO_EXTENSION))){ - case 'xls': - case 'ods': - case 'csv': - break; - - default: + if(!$this->checkExtension($p_dir)) + { + // set error message $app->enqueueMessage(JText::_('COM_###COMPONENT###_IMPORT_MSG_DOES_NOT_HAVE_A_VALID_FILE_TYPE'), 'warning'); return false; - break; } $package['packagename'] = null; - $package['dir'] = $p_dir; - $package['type'] = $type; + $package['dir'] = $p_dir; + $package['type'] = $type; return $package; } @@ -247,21 +243,15 @@ class ###Component###Model###View### extends JModelLegacy $archivename = JPath::clean($archivename); // check the extention - switch(strtolower(pathinfo($archivename, PATHINFO_EXTENSION))){ - case 'xls': - case 'ods': - case 'csv': - break; - - default: + if(!$this->checkExtension($archivename)) + { // Cleanup the import files $this->remove($archivename); $app->enqueueMessage(JText::_('COM_###COMPONENT###_IMPORT_MSG_DOES_NOT_HAVE_A_VALID_FILE_TYPE'), 'warning'); return false; - break; - } + } - $config = JFactory::getConfig(); + $config = JFactory::getConfig(); // set Package Name $check['packagename'] = $archivename; @@ -273,6 +263,7 @@ class ###Component###Model###View### extends JModelLegacy return $check; } + ###IMPORT_EXT_METHOD_CUSTOM### /** * Clean up temporary uploaded spreadsheet diff --git a/admin/componentbuilder.php b/admin/componentbuilder.php index 649e869ed..ab22c52fd 100644 --- a/admin/componentbuilder.php +++ b/admin/componentbuilder.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage componentbuilder.php diff --git a/admin/controller.php b/admin/controller.php index 33067763e..5b1c887ab 100644 --- a/admin/controller.php +++ b/admin/controller.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage controller.php diff --git a/admin/controllers/admin_view.php b/admin/controllers/admin_view.php index 5bfa65878..d9c1c71f6 100644 --- a/admin/controllers/admin_view.php +++ b/admin/controllers/admin_view.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 104 of this MVC - @build 6th March, 2017 + @version @update number 108 of this MVC + @build 24th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage admin_view.php diff --git a/admin/controllers/admin_views.php b/admin/controllers/admin_views.php index b70976663..3a7320c39 100644 --- a/admin/controllers/admin_views.php +++ b/admin/controllers/admin_views.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 104 of this MVC - @build 6th March, 2017 + @version @update number 108 of this MVC + @build 24th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage admin_views.php diff --git a/admin/controllers/ajax.json.php b/admin/controllers/ajax.json.php index 860cd7bc9..af5f5b6fb 100644 --- a/admin/controllers/ajax.json.php +++ b/admin/controllers/ajax.json.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage ajax.json.php diff --git a/admin/controllers/compiler.php b/admin/controllers/compiler.php index 84a0d3a58..e95a14c0a 100644 --- a/admin/controllers/compiler.php +++ b/admin/controllers/compiler.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 46 of this MVC - @build 3rd March, 2017 + @version @update number 47 of this MVC + @build 21st March, 2017 @created 1st February, 2017 @package Component Builder @subpackage compiler.php diff --git a/admin/controllers/componentbuilder.php b/admin/controllers/componentbuilder.php index eb1efa284..630cb6ce4 100644 --- a/admin/controllers/componentbuilder.php +++ b/admin/controllers/componentbuilder.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage componentbuilder.php diff --git a/admin/controllers/help.php b/admin/controllers/help.php index be7e6ed9b..92bda1c7e 100644 --- a/admin/controllers/help.php +++ b/admin/controllers/help.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage help.php diff --git a/admin/controllers/import.php b/admin/controllers/import.php index 491ce3cb2..2a8221770 100644 --- a/admin/controllers/import.php +++ b/admin/controllers/import.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage import.php diff --git a/admin/controllers/import_joomla_components.php b/admin/controllers/import_joomla_components.php new file mode 100644 index 000000000..7423a6227 --- /dev/null +++ b/admin/controllers/import_joomla_components.php @@ -0,0 +1,67 @@ + + @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'); + +/** + * Componentbuilder Import_joomla_components Controller + */ +class ComponentbuilderControllerImport_joomla_components extends JControllerLegacy +{ + /** + * Import an spreadsheet. + * + * @return void + */ + public function import() + { + // Check for request forgeries + JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN')); + + $model = $this->getModel('Import_joomla_components'); + if ($model->import()) + { + $cache = JFactory::getCache('mod_menu'); + $cache->clean(); + // TODO: Reset the users acl here as well to kill off any missing bits + } + + $app = JFactory::getApplication(); + $redirect_url = $app->getUserState('com_componentbuilder.redirect_url'); + if (empty($redirect_url)) + { + $redirect_url = JRoute::_('index.php?option=com_componentbuilder&view=import_joomla_components', false); + } + else + { + // wipe out the user state when we're going to redirect + $app->setUserState('com_componentbuilder.redirect_url', ''); + $app->setUserState('com_componentbuilder.message', ''); + $app->setUserState('com_componentbuilder.extension_message', ''); + } + $this->setRedirect($redirect_url); + } +} diff --git a/admin/controllers/joomla_component.php b/admin/controllers/joomla_component.php index e5abc63be..9de6bddc4 100644 --- a/admin/controllers/joomla_component.php +++ b/admin/controllers/joomla_component.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 132 of this MVC - @build 20th March, 2017 + @version @update number 182 of this MVC + @build 27th March, 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 3c50eaba4..b282cdb66 100644 --- a/admin/controllers/joomla_components.php +++ b/admin/controllers/joomla_components.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 132 of this MVC - @build 20th March, 2017 + @version @update number 182 of this MVC + @build 27th March, 2017 @created 6th May, 2015 @package Component Builder @subpackage joomla_components.php @@ -99,7 +99,7 @@ class ComponentbuilderControllerJoomla_components extends JControllerAdmin $session->set('dataType_VDM_IMPORTINTO', 'joomla_component'); // Redirect to import view. $message = JText::_('COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_FOR_JOOMLA_COMPONENTS'); - $this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=import', false), $message); + $this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=import_joomla_components', false), $message); return; } } @@ -109,6 +109,28 @@ class ComponentbuilderControllerJoomla_components extends JControllerAdmin return; } + public function smartImport() + { + // Check for request forgeries + JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); + // check if import is allowed for this user. + $user = JFactory::getUser(); + if ($user->authorise('joomla_component.import', 'com_componentbuilder') && $user->authorise('core.import', 'com_componentbuilder')) + { + $session = JFactory::getSession(); + $session->set('backto_VDM_IMPORT', 'joomla_components'); + $session->set('dataType_VDM_IMPORTINTO', 'smart_package'); + // Redirect to import view. + $message = JText::_('COM_COMPONENTBUILDER_YOU_CAN_NOW_SELECT_THE_COMPONENT_BZIPB_PACKAGE_YOU_WOULD_LIKE_TO_IMPORTBR_SMALLPLEASE_NOTE_THAT_SMART_COMPONENT_IMPORT_ONLY_WORKS_WITH_THE_FOLLOWING_FORMAT_BZIPBSMALL'); + $this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=import_joomla_components&target=smartPackage', false), $message); + return; + } + // Redirect to the list screen with error. + $message = JText::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_IMPORT_A_COMPONENT_PLEASE_CONTACT_YOUR_SYSTEM_ADMINISTRATOR_FOR_MORE_HELP'); + $this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=joomla_components', false), $message, 'error'); + return; + } + public function smartExport() { // Check for request forgeries @@ -122,6 +144,14 @@ class ComponentbuilderControllerJoomla_components extends JControllerAdmin $pks = $input->post->get('cid', array(), 'array'); // Sanitize the input JArrayHelper::toInteger($pks); + // check if there is any selections + if (!ComponentbuilderHelper::checkArray($pks)) + { + // Redirect to the list screen with error. + $message = JText::_('COM_COMPONENTBUILDER_NO_COMPONENTS_WERE_SELECTED_PLEASE_MAKE_A_SELECTION_AND_TRY_AGAIN'); + $this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=joomla_components', false), $message, 'error'); + return; + } // Get the model $model = $this->getModel('Joomla_components'); // set auto loader @@ -129,7 +159,7 @@ class ComponentbuilderControllerJoomla_components extends JControllerAdmin // get the data to export if ($model->getSmartExport($pks)) { - // Redirect to the list screen with error. + // Redirect to the list screen with success. $message = array(); $message[] = '

' . JText::_('COM_COMPONENTBUILDER_EXPORT_COMPLETED') . '

'; $message[] = '

' . JText::sprintf('COM_COMPONENTBUILDER_PATH_TO_THE_ZIPPED_PACKAGE_IS_CODESCODE', $model->zipPath) . '

'; @@ -151,7 +181,7 @@ class ComponentbuilderControllerJoomla_components extends JControllerAdmin } } // Redirect to the list screen with error. - $message = JText::_('COM_COMPONENTBUILDER_EXPORT_FAILED'); + $message = JText::_('COM_COMPONENTBUILDER_EXPORT_FAILED_PLEASE_TRY_AGAIN_LATTER'); $this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=joomla_components', false), $message, 'error'); return; } diff --git a/admin/helpers/compiler/a_Get.php b/admin/helpers/compiler/a_Get.php index f9138277f..ca090fac7 100644 --- a/admin/helpers/compiler/a_Get.php +++ b/admin/helpers/compiler/a_Get.php @@ -814,7 +814,7 @@ class Get { foreach ($addScriptTypes as $scriptType) { - if (isset($component->{'add_'.$scriptMethod.'_'.$scriptType}) && $component->{'add_'.$scriptMethod.'_'.$scriptType} == 1) + if (isset($component->{'add_'.$scriptMethod.'_'.$scriptType}) && $component->{'add_'.$scriptMethod.'_'.$scriptType} == 1 && ComponentbuilderHelper::checkString($component->{$scriptMethod.'_'.$scriptType})) { $this->customScriptBuilder[$scriptMethod][$scriptType] = $this->setDynamicValues(base64_decode($component->{$scriptMethod.'_'.$scriptType})); } @@ -826,7 +826,7 @@ class Get } } // add_php_helper - if ($component->add_php_helper_admin == 1) + if ($component->add_php_helper_admin == 1 && ComponentbuilderHelper::checkString($component->php_helper_admin)) { $this->lang = 'admin'; $this->customScriptBuilder['component_php_helper_admin'] = PHP_EOL.PHP_EOL.$this->setDynamicValues(base64_decode($component->php_helper_admin)); @@ -837,7 +837,7 @@ class Get } unset($component->php_helper); // add_admin_event - if ($component->add_admin_event == 1) + if ($component->add_admin_event == 1 && ComponentbuilderHelper::checkString($component->php_admin_event)) { $this->lang = 'admin'; $this->customScriptBuilder['component_php_admin_event'] = $this->setDynamicValues(base64_decode($component->php_admin_event)); @@ -848,7 +848,7 @@ class Get } unset($component->php_admin_event); // add_php_helper_both - if ($component->add_php_helper_both == 1) + if ($component->add_php_helper_both == 1 && ComponentbuilderHelper::checkString($component->php_helper_both)) { $this->lang = 'both'; $this->customScriptBuilder['component_php_helper_both'] = PHP_EOL.PHP_EOL.$this->setDynamicValues(base64_decode($component->php_helper_both)); @@ -858,7 +858,7 @@ class Get $this->customScriptBuilder['component_php_helper_both'] = ''; } // add_php_helper_site - if ($component->add_php_helper_site == 1) + if ($component->add_php_helper_site == 1 && ComponentbuilderHelper::checkString($component->php_helper_site)) { $this->lang = 'site'; $this->customScriptBuilder['component_php_helper_site'] = PHP_EOL.PHP_EOL.$this->setDynamicValues(base64_decode($component->php_helper_site)); @@ -869,7 +869,7 @@ class Get } unset($component->php_helper); // add_site_event - if ($component->add_site_event == 1) + if ($component->add_site_event == 1 && ComponentbuilderHelper::checkString($component->php_site_event)) { $this->lang = 'site'; $this->customScriptBuilder['component_php_site_event'] = $this->setDynamicValues(base64_decode($component->php_site_event)); @@ -906,7 +906,7 @@ class Get } // dashboard methods - if ($component->add_php_dashboard_methods) + if ($component->add_php_dashboard_methods && ComponentbuilderHelper::checkString($component->php_dashboard_methods)) { $nowLang = $this->lang; $this->lang = 'admin'; @@ -1230,7 +1230,7 @@ class Get $addArrayJ = array('javascript_view_file','javascript_view_footer','javascript_views_file','javascript_views_footer'); foreach ($addArrayJ as $scripter) { - if (isset($view->{'add_'.$scripter}) && $view->{'add_'.$scripter} == 1) + if (isset($view->{'add_'.$scripter}) && $view->{'add_'.$scripter} == 1 && ComponentbuilderHelper::checkString($view->$scripter)) { $view->$scripter = $this->setDynamicValues(base64_decode($view->$scripter)); $scripter_target = str_replace('javascript_', '', $scripter); @@ -1316,7 +1316,7 @@ class Get // set custom import scripts if (isset($view->add_custom_import) && $view->add_custom_import == 1) { - $addImportArray = array('php_import_display','php_import','php_import_setdata','php_import_save','html_import_view'); + $addImportArray = array('php_import_ext','php_import_display','php_import','php_import_setdata','php_import_save','html_import_view'); foreach ($addImportArray as $importScripter) { if (isset($view->$importScripter) && strlen($view->$importScripter) > 0) @@ -1324,6 +1324,11 @@ class Get $this->customScriptBuilder[$importScripter]['import_'.$name_list] = $this->setDynamicValues(base64_decode($view->$importScripter)); unset($view->$importScripter); } + else + { + // load the default + $this->customScriptBuilder[$importScripter]['import_'.$name_list] = ComponentbuilderHelper::getImportScripts($importScripter, true); + } } } @@ -1472,7 +1477,7 @@ class Get $addArray = array('php_view','php_jview','php_jview_display','php_document','js_document','css_document','css'); foreach ($addArray as $scripter) { - if (isset($view->{'add_'.$scripter}) && $view->{'add_'.$scripter} == 1) + if (isset($view->{'add_'.$scripter}) && $view->{'add_'.$scripter} == 1 && ComponentbuilderHelper::checkString($view->$scripter)) { $view->$scripter = $this->setDynamicValues(base64_decode($view->$scripter)); // set uikit to views @@ -1661,7 +1666,7 @@ class Get if (ComponentbuilderHelper::checkString($name_single) && !isset($this->customFieldScript[$name_single][$id])) { // add_javascript_view_footer - if ($this->_fieldData[$id]->add_javascript_view_footer == 1) + if ($this->_fieldData[$id]->add_javascript_view_footer == 1 && ComponentbuilderHelper::checkString($this->_fieldData[$id]->javascript_view_footer)) { if(!isset($this->customScriptBuilder['view_footer'])) { @@ -1719,7 +1724,7 @@ class Get if (ComponentbuilderHelper::checkString($name_list) && !isset($this->customFieldScript[$name_list][$id])) { // add_javascript_views_footer - if ($this->_fieldData[$id]->add_javascript_views_footer == 1) + if ($this->_fieldData[$id]->add_javascript_views_footer == 1 && ComponentbuilderHelper::checkString($this->_fieldData[$id]->javascript_views_footer)) { if(!isset($this->customScriptBuilder['views_footer'])) { @@ -1812,12 +1817,12 @@ class Get foreach ($results as $nr => &$result) { // add calculations if set - if($result->addcalculation == 1) + if($result->addcalculation == 1 && ComponentbuilderHelper::checkString($result->php_calculation)) { - $result->php_calculation = base64_decode($result->php_calculation); + $result->php_calculation = $this->setDynamicValues(base64_decode($result->php_calculation)); } // add php custom scripting (php_before_getitem) - if($result->add_php_before_getitem == 1) + if($result->add_php_before_getitem == 1 && ComponentbuilderHelper::checkString($result->php_before_getitem)) { if (!isset($this->customScriptBuilder[$this->target.'_php_before_getitem'][$view_code])) { @@ -1828,7 +1833,7 @@ class Get unset($result->php_before_getitem); } // add php custom scripting (php_after_getitem) - if($result->add_php_after_getitem == 1) + if($result->add_php_after_getitem == 1 && ComponentbuilderHelper::checkString($result->php_after_getitem)) { if (!isset($this->customScriptBuilder[$this->target.'_php_after_getitem'][$view_code])) { @@ -1839,7 +1844,7 @@ class Get unset($result->php_after_getitem); } // add php custom scripting (php_before_getitems) - if($result->add_php_before_getitems == 1) + if($result->add_php_before_getitems == 1 && ComponentbuilderHelper::checkString($result->php_before_getitems)) { if (!isset($this->customScriptBuilder[$this->target.'_php_before_getitems'][$view_code])) { @@ -1850,7 +1855,7 @@ class Get unset($result->php_before_getitems); } // add php custom scripting (php_after_getitems) - if($result->add_php_after_getitems == 1) + if($result->add_php_after_getitems == 1 && ComponentbuilderHelper::checkString($result->php_after_getitems)) { if (!isset($this->customScriptBuilder[$this->target.'_php_after_getitems'][$view_code])) { @@ -1861,7 +1866,7 @@ class Get unset($result->php_after_getitems); } // add php custom scripting (php_getlistquery) - if($result->add_php_getlistquery == 1) + if($result->add_php_getlistquery == 1 && ComponentbuilderHelper::checkString($result->php_getlistquery)) { if (!isset($this->customScriptBuilder[$this->target.'_php_getlistquery'][$view_code])) { @@ -2227,7 +2232,7 @@ class Get if ($k_ey == $n_ame || $key == $name) { $php_view = ''; - if ($row->add_php_view == 1) + if ($row->add_php_view == 1 && ComponentbuilderHelper::checkString($row->php_view)) { $php_view = $this->setDynamicValues(base64_decode($row->php_view)); } diff --git a/admin/helpers/compiler/e_Interpretation.php b/admin/helpers/compiler/e_Interpretation.php index 9c0599a24..94223d38f 100644 --- a/admin/helpers/compiler/e_Interpretation.php +++ b/admin/helpers/compiler/e_Interpretation.php @@ -7382,8 +7382,10 @@ class Interpretation extends Fields { // setup Ajax files $target = array('admin' => 'import_'.$viewName_list); - $this->buildDynamique($target,'customimport'); + $this->buildDynamique($target, 'customimport'); // load the custom script to the files + // ###IMPORT_EXT_METHOD_CUSTOM### <<>> + $this->fileContentDynamic['import_'.$viewName_list]['###IMPORT_EXT_METHOD_CUSTOM###'] = $this->getCustomScriptBuilder('php_import_ext', 'import_'.$viewName_list, PHP_EOL, null, true); // ###IMPORT_DISPLAY_METHOD_CUSTOM### <<>> $this->fileContentDynamic['import_'.$viewName_list]['###IMPORT_DISPLAY_METHOD_CUSTOM###'] = $this->getCustomScriptBuilder('php_import_display', 'import_'.$viewName_list, PHP_EOL, null, true); // ###IMPORT_SETDATE_METHOD_CUSTOM### <<>> diff --git a/admin/helpers/componentbuilder.php b/admin/helpers/componentbuilder.php index b6c9a549f..f460e7899 100644 --- a/admin/helpers/componentbuilder.php +++ b/admin/helpers/componentbuilder.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage componentbuilder.php @@ -392,7 +392,680 @@ abstract class ComponentbuilderHelper return true; } return false; - } + } + + public static function getImportScripts($type, $fieldName = false) + { + // if field name is pased the convert to type + if ($fieldName) + { + $fieldNames = array( + 'php_import_display' => 'display', + 'php_import_setdata' => 'setdata', + 'php_import_save' => 'save', + 'html_import_view' => 'view', + 'php_import' => 'import', + 'php_import_ext' => 'ext' + ); + // first check if the field name is found + if (isset($fieldNames[$type])) + { + $type = $fieldNames[$type]; + } + else + { + return ''; + } + } + $script = array(); + if ('display' === $type) + { + // set the display script + $script['display'][] = "\tprotected \$headerList;"; + $script['display'][] = "\tprotected \$hasPackage = false;"; + $script['display'][] = "\tprotected \$headers;"; + $script['display'][] = "\tprotected \$hasHeader = 0;"; + $script['display'][] = "\tprotected \$dataType;"; + $script['display'][] = "\n\tpublic function display(\$tpl = null)"; + $script['display'][] = "\t{"; + $script['display'][] = "\t\tif (\$this->getLayout() !== 'modal')"; + $script['display'][] = "\t\t{"; + $script['display'][] = "\t\t\t// Include helper submenu"; + $script['display'][] = "\t\t\t###-#-#-Component###Helper::addSubmenu('import');"; + $script['display'][] = "\t\t}"; + $script['display'][] = "\n\t\t// Check for errors."; + $script['display'][] = "\t\tif (count(\$errors = \$this->get('Errors'))){"; + $script['display'][] = "\t\t\tJError::raiseError(500, implode('
', \$errors));"; + $script['display'][] = "\t\t\treturn false;"; + $script['display'][] = "\t\t}"; + $script['display'][] = "\n\t\t\$paths = new stdClass;"; + $script['display'][] = "\t\t\$paths->first = '';"; + $script['display'][] = "\t\t\$state = \$this->get('state');"; + $script['display'][] = "\n\t\t\$this->paths = &\$paths;"; + $script['display'][] = "\t\t\$this->state = &\$state;"; + $script['display'][] = "\t\t// get global action permissions"; + $script['display'][] = "\t\t\$this->canDo = ###-#-#-Component###Helper::getActions('import');"; + $script['display'][] = "\n\t\t// We don't need toolbar in the modal window."; + $script['display'][] = "\t\tif (\$this->getLayout() !== 'modal')"; + $script['display'][] = "\t\t{"; + $script['display'][] = "\t\t\t\$this->addToolbar();"; + $script['display'][] = "\t\t\t\$this->sidebar = JHtmlSidebar::render();"; + $script['display'][] = "\t\t}"; + $script['display'][] = "\n\t\t// get the session object"; + $script['display'][] = "\t\t\$session = JFactory::getSession();"; + $script['display'][] = "\t\t// check if it has package"; + $script['display'][] = "\t\t\$this->hasPackage \t= \$session->get('hasPackage', false);"; + $script['display'][] = "\t\t\$this->dataType \t= \$session->get('dataType', false);"; + $script['display'][] = "\t\tif(\$this->hasPackage && \$this->dataType)"; + $script['display'][] = "\t\t{"; + $script['display'][] = "\t\t\t\$this->headerList \t= json_decode(\$session->get(\$this->dataType.'_VDM_IMPORTHEADERS', false),true);"; + $script['display'][] = "\t\t\t\$this->headers \t\t= ###-#-#-Component###Helper::getFileHeaders(\$this->dataType);"; + $script['display'][] = "\t\t\t// clear the data type"; + $script['display'][] = "\t\t\t\$session->clear('dataType');"; + $script['display'][] = "\t\t}"; + $script['display'][] = "\n\t\t// Display the template"; + $script['display'][] = "\t\tparent::display(\$tpl);"; + $script['display'][] = "\t}"; + } + elseif ('setdata' === $type) + { + // set the setdata script + $script['setdata'] = array(); + $script['setdata'][] = "\t/**"; + $script['setdata'][] = "\t* Set the data from the spreadsheet to the database"; + $script['setdata'][] = "\t*"; + $script['setdata'][] = "\t* @param string \$package Paths to the uploaded package file"; + $script['setdata'][] = "\t*"; + $script['setdata'][] = "\t* @return boolean false on failure"; + $script['setdata'][] = "\t*"; + $script['setdata'][] = "\t**/"; + $script['setdata'][] = "\tprotected function setData(\$package,\$table,\$target_headers)"; + $script['setdata'][] = "\t{"; + $script['setdata'][] = "\t\tif (###-#-#-Component###Helper::checkArray(\$target_headers))"; + $script['setdata'][] = "\t\t{"; + $script['setdata'][] = "\t\t\t// make sure the file is loaded\t\t"; + $script['setdata'][] = "\t\t\tJLoader::import('PHPExcel', JPATH_COMPONENT_ADMINISTRATOR . '/helpers');"; + $script['setdata'][] = "\t\t\t\$jinput = JFactory::getApplication()->input;"; + $script['setdata'][] = "\t\t\tforeach(\$target_headers as \$header)"; + $script['setdata'][] = "\t\t\t{"; + $script['setdata'][] = "\t\t\t\t\$data['target_headers'][\$header] = \$jinput->getString(\$header, null);"; + $script['setdata'][] = "\t\t\t}"; + $script['setdata'][] = "\t\t\t// set the data"; + $script['setdata'][] = "\t\t\tif(isset(\$package['dir']))"; + $script['setdata'][] = "\t\t\t{"; + $script['setdata'][] = "\t\t\t\t\$inputFileType = PHPExcel_IOFactory::identify(\$package['dir']);"; + $script['setdata'][] = "\t\t\t\t\$excelReader = PHPExcel_IOFactory::createReader(\$inputFileType);"; + $script['setdata'][] = "\t\t\t\t\$excelReader->setReadDataOnly(true);"; + $script['setdata'][] = "\t\t\t\t\$excelObj = \$excelReader->load(\$package['dir']);"; + $script['setdata'][] = "\t\t\t\t\$data['array'] = \$excelObj->getActiveSheet()->toArray(null, true,true,true);"; + $script['setdata'][] = "\t\t\t\t\$excelObj->disconnectWorksheets();"; + $script['setdata'][] = "\t\t\t\tunset(\$excelObj);"; + $script['setdata'][] = "\t\t\t\treturn \$this->save(\$data,\$table);"; + $script['setdata'][] = "\t\t\t}"; + $script['setdata'][] = "\t\t}"; + $script['setdata'][] = "\t\treturn false;"; + $script['setdata'][] = "\t}"; + } + elseif ('save' === $type) + { + $script['save'] = array(); + $script['save'][] = "\t/**"; + $script['save'][] = "\t* Save the data from the file to the database"; + $script['save'][] = "\t*"; + $script['save'][] = "\t* @param string \$package Paths to the uploaded package file"; + $script['save'][] = "\t*"; + $script['save'][] = "\t* @return boolean false on failure"; + $script['save'][] = "\t*"; + $script['save'][] = "\t**/"; + $script['save'][] = "\tprotected function save(\$data,\$table)"; + $script['save'][] = "\t{"; + $script['save'][] = "\t\t// import the data if there is any"; + $script['save'][] = "\t\tif(###-#-#-Component###Helper::checkArray(\$data['array']))"; + $script['save'][] = "\t\t{"; + $script['save'][] = "\t\t\t// get user object"; + $script['save'][] = "\t\t\t\$user \t\t= JFactory::getUser();"; + $script['save'][] = "\t\t\t// remove header if it has headers"; + $script['save'][] = "\t\t\t\$id_key \t= \$data['target_headers']['id'];"; + $script['save'][] = "\t\t\t\$published_key \t= \$data['target_headers']['published'];"; + $script['save'][] = "\t\t\t\$ordering_key \t= \$data['target_headers']['ordering'];"; + $script['save'][] = "\t\t\t// get the first array set"; + $script['save'][] = "\t\t\t\$firstSet = reset(\$data['array']);"; + $script['save'][] = ""; + $script['save'][] = "\t\t\t// check if first array is a header array and remove if true"; + $script['save'][] = "\t\t\tif(\$firstSet[\$id_key] == 'id' || \$firstSet[\$published_key] == 'published' || \$firstSet[\$ordering_key] == 'ordering')"; + $script['save'][] = "\t\t\t{"; + $script['save'][] = "\t\t\t\tarray_shift(\$data['array']);"; + $script['save'][] = "\t\t\t}"; + $script['save'][] = "\t\t\t"; + $script['save'][] = "\t\t\t// make sure there is still values in array and that it was not only headers"; + $script['save'][] = "\t\t\tif(###-#-#-Component###Helper::checkArray(\$data['array']) && \$user->authorise(\$table.'.import', 'com_###-#-#-component###') && \$user->authorise('core.import', 'com_###-#-#-component###'))"; + $script['save'][] = "\t\t\t{"; + $script['save'][] = "\t\t\t\t// set target."; + $script['save'][] = "\t\t\t\t\$target\t= array_flip(\$data['target_headers']);"; + $script['save'][] = "\t\t\t\t// Get a db connection."; + $script['save'][] = "\t\t\t\t\$db = JFactory::getDbo();"; + $script['save'][] = "\t\t\t\t// set some defaults"; + $script['save'][] = "\t\t\t\t\$todayDate\t\t= JFactory::getDate()->toSql();"; + $script['save'][] = "\t\t\t\t// get global action permissions"; + $script['save'][] = "\t\t\t\t\$canDo\t\t\t= ###-#-#-Component###Helper::getActions(\$table);"; + $script['save'][] = "\t\t\t\t\$canEdit\t\t= \$canDo->get('core.edit');"; + $script['save'][] = "\t\t\t\t\$canState\t\t= \$canDo->get('core.edit.state');"; + $script['save'][] = "\t\t\t\t\$canCreate\t\t= \$canDo->get('core.create');"; + $script['save'][] = "\t\t\t\t\$hasAlias\t\t= \$this->getAliasesUsed(\$table);"; + $script['save'][] = "\t\t\t\t// prosses the data"; + $script['save'][] = "\t\t\t\tforeach(\$data['array'] as \$row)"; + $script['save'][] = "\t\t\t\t{"; + $script['save'][] = "\t\t\t\t\t\$found = false;"; + $script['save'][] = "\t\t\t\t\tif (isset(\$row[\$id_key]) && is_numeric(\$row[\$id_key]) && \$row[\$id_key] > 0)"; + $script['save'][] = "\t\t\t\t\t{"; + $script['save'][] = "\t\t\t\t\t\t// raw items import & update!"; + $script['save'][] = "\t\t\t\t\t\t\$query = \$db->getQuery(true);"; + $script['save'][] = "\t\t\t\t\t\t\$query"; + $script['save'][] = "\t\t\t\t\t\t\t->select('version')"; + $script['save'][] = "\t\t\t\t\t\t\t->from(\$db->quoteName('#__###-#-#-component###_'.\$table))"; + $script['save'][] = "\t\t\t\t\t\t\t->where(\$db->quoteName('id') . ' = '. \$db->quote(\$row[\$id_key]));"; + $script['save'][] = "\t\t\t\t\t\t// Reset the query using our newly populated query object."; + $script['save'][] = "\t\t\t\t\t\t\$db->setQuery(\$query);"; + $script['save'][] = "\t\t\t\t\t\t\$db->execute();"; + $script['save'][] = "\t\t\t\t\t\t\$found = \$db->getNumRows();"; + $script['save'][] = "\t\t\t\t\t}"; + $script['save'][] = "\t\t\t\t\t"; + $script['save'][] = "\t\t\t\t\tif(\$found && \$canEdit)"; + $script['save'][] = "\t\t\t\t\t{"; + $script['save'][] = "\t\t\t\t\t\t// update item"; + $script['save'][] = "\t\t\t\t\t\t\$id \t\t= \$row[\$id_key];"; + $script['save'][] = "\t\t\t\t\t\t\$version\t= \$db->loadResult();"; + $script['save'][] = "\t\t\t\t\t\t// reset all buckets"; + $script['save'][] = "\t\t\t\t\t\t\$query \t\t= \$db->getQuery(true);"; + $script['save'][] = "\t\t\t\t\t\t\$fields \t= array();"; + $script['save'][] = "\t\t\t\t\t\t// Fields to update."; + $script['save'][] = "\t\t\t\t\t\tforeach(\$row as \$key => \$cell)"; + $script['save'][] = "\t\t\t\t\t\t{"; + $script['save'][] = "\t\t\t\t\t\t\t// ignore column"; + $script['save'][] = "\t\t\t\t\t\t\tif ('IGNORE' == \$target[\$key])"; + $script['save'][] = "\t\t\t\t\t\t\t{"; + $script['save'][] = "\t\t\t\t\t\t\t\tcontinue;"; + $script['save'][] = "\t\t\t\t\t\t\t}"; + $script['save'][] = "\t\t\t\t\t\t\t// update modified"; + $script['save'][] = "\t\t\t\t\t\t\tif ('modified_by' == \$target[\$key])"; + $script['save'][] = "\t\t\t\t\t\t\t{"; + $script['save'][] = "\t\t\t\t\t\t\t\tcontinue;"; + $script['save'][] = "\t\t\t\t\t\t\t}"; + $script['save'][] = "\t\t\t\t\t\t\t// update modified"; + $script['save'][] = "\t\t\t\t\t\t\tif ('modified' == \$target[\$key])"; + $script['save'][] = "\t\t\t\t\t\t\t{"; + $script['save'][] = "\t\t\t\t\t\t\t\tcontinue;"; + $script['save'][] = "\t\t\t\t\t\t\t}"; + $script['save'][] = "\t\t\t\t\t\t\t// update version"; + $script['save'][] = "\t\t\t\t\t\t\tif ('version' == \$target[\$key])"; + $script['save'][] = "\t\t\t\t\t\t\t{"; + $script['save'][] = "\t\t\t\t\t\t\t\t\$cell = (int) \$version + 1;"; + $script['save'][] = "\t\t\t\t\t\t\t}"; + $script['save'][] = "\t\t\t\t\t\t\t// verify publish authority"; + $script['save'][] = "\t\t\t\t\t\t\tif ('published' == \$target[\$key] && !\$canState)"; + $script['save'][] = "\t\t\t\t\t\t\t{"; + $script['save'][] = "\t\t\t\t\t\t\t\tcontinue;"; + $script['save'][] = "\t\t\t\t\t\t\t}"; + $script['save'][] = "\t\t\t\t\t\t\t// set to update array"; + $script['save'][] = "\t\t\t\t\t\t\tif(in_array(\$key, \$data['target_headers']) && is_numeric(\$cell))"; + $script['save'][] = "\t\t\t\t\t\t\t{"; + $script['save'][] = "\t\t\t\t\t\t\t\t\$fields[] = \$db->quoteName(\$target[\$key]) . ' = ' . \$cell;"; + $script['save'][] = "\t\t\t\t\t\t\t}"; + $script['save'][] = "\t\t\t\t\t\t\telseif(in_array(\$key, \$data['target_headers']) && is_string(\$cell))"; + $script['save'][] = "\t\t\t\t\t\t\t{"; + $script['save'][] = "\t\t\t\t\t\t\t\t\$fields[] = \$db->quoteName(\$target[\$key]) . ' = ' . \$db->quote(\$cell);"; + $script['save'][] = "\t\t\t\t\t\t\t}"; + $script['save'][] = "\t\t\t\t\t\t\telseif(in_array(\$key, \$data['target_headers']) && is_null(\$cell))"; + $script['save'][] = "\t\t\t\t\t\t\t{"; + $script['save'][] = "\t\t\t\t\t\t\t\t// if import data is null then set empty"; + $script['save'][] = "\t\t\t\t\t\t\t\t\$fields[] = \$db->quoteName(\$target[\$key]) . \" = ''\";"; + $script['save'][] = "\t\t\t\t\t\t\t}"; + $script['save'][] = "\t\t\t\t\t\t}"; + $script['save'][] = "\t\t\t\t\t\t// load the defaults"; + $script['save'][] = "\t\t\t\t\t\t\$fields[]\t= \$db->quoteName('modified_by') . ' = ' . \$db->quote(\$user->id);"; + $script['save'][] = "\t\t\t\t\t\t\$fields[]\t= \$db->quoteName('modified') . ' = ' . \$db->quote(\$todayDate);"; + $script['save'][] = "\t\t\t\t\t\t// Conditions for which records should be updated."; + $script['save'][] = "\t\t\t\t\t\t\$conditions = array("; + $script['save'][] = "\t\t\t\t\t\t\t\$db->quoteName('id') . ' = ' . \$id"; + $script['save'][] = "\t\t\t\t\t\t);"; + $script['save'][] = "\t\t\t\t\t\t"; + $script['save'][] = "\t\t\t\t\t\t\$query->update(\$db->quoteName('#__###-#-#-component###_'.\$table))->set(\$fields)->where(\$conditions);"; + $script['save'][] = "\t\t\t\t\t\t\$db->setQuery(\$query);"; + $script['save'][] = "\t\t\t\t\t\t\$db->execute();"; + $script['save'][] = "\t\t\t\t\t}"; + $script['save'][] = "\t\t\t\t\telseif (\$canCreate)"; + $script['save'][] = "\t\t\t\t\t{"; + $script['save'][] = "\t\t\t\t\t\t// insert item"; + $script['save'][] = "\t\t\t\t\t\t\$query = \$db->getQuery(true);"; + $script['save'][] = "\t\t\t\t\t\t// reset all buckets"; + $script['save'][] = "\t\t\t\t\t\t\$columns \t= array();"; + $script['save'][] = "\t\t\t\t\t\t\$values \t= array();"; + $script['save'][] = "\t\t\t\t\t\t\$version\t= false;"; + $script['save'][] = "\t\t\t\t\t\t// Insert columns. Insert values."; + $script['save'][] = "\t\t\t\t\t\tforeach(\$row as \$key => \$cell)"; + $script['save'][] = "\t\t\t\t\t\t{"; + $script['save'][] = "\t\t\t\t\t\t\t// ignore column"; + $script['save'][] = "\t\t\t\t\t\t\tif ('IGNORE' == \$target[\$key])"; + $script['save'][] = "\t\t\t\t\t\t\t{"; + $script['save'][] = "\t\t\t\t\t\t\t\tcontinue;"; + $script['save'][] = "\t\t\t\t\t\t\t}"; + $script['save'][] = "\t\t\t\t\t\t\t// remove id"; + $script['save'][] = "\t\t\t\t\t\t\tif ('id' == \$target[\$key])"; + $script['save'][] = "\t\t\t\t\t\t\t{"; + $script['save'][] = "\t\t\t\t\t\t\t\tcontinue;"; + $script['save'][] = "\t\t\t\t\t\t\t}"; + $script['save'][] = "\t\t\t\t\t\t\t// update created"; + $script['save'][] = "\t\t\t\t\t\t\tif ('created_by' == \$target[\$key])"; + $script['save'][] = "\t\t\t\t\t\t\t{"; + $script['save'][] = "\t\t\t\t\t\t\t\tcontinue;"; + $script['save'][] = "\t\t\t\t\t\t\t}"; + $script['save'][] = "\t\t\t\t\t\t\t// update created"; + $script['save'][] = "\t\t\t\t\t\t\tif ('created' == \$target[\$key])"; + $script['save'][] = "\t\t\t\t\t\t\t{"; + $script['save'][] = "\t\t\t\t\t\t\t\tcontinue;"; + $script['save'][] = "\t\t\t\t\t\t\t}"; + $script['save'][] = "\t\t\t\t\t\t\t// Make sure the alias is incremented"; + $script['save'][] = "\t\t\t\t\t\t\tif ('alias' == \$target[\$key])"; + $script['save'][] = "\t\t\t\t\t\t\t{"; + $script['save'][] = "\t\t\t\t\t\t\t\t\$cell = \$this->getAlias(\$cell,\$table);"; + $script['save'][] = "\t\t\t\t\t\t\t}"; + $script['save'][] = "\t\t\t\t\t\t\t// update version"; + $script['save'][] = "\t\t\t\t\t\t\tif ('version' == \$target[\$key])"; + $script['save'][] = "\t\t\t\t\t\t\t{"; + $script['save'][] = "\t\t\t\t\t\t\t\t\$cell = 1;"; + $script['save'][] = "\t\t\t\t\t\t\t\t\$version = true;"; + $script['save'][] = "\t\t\t\t\t\t\t}"; + $script['save'][] = "\t\t\t\t\t\t\t// set to insert array"; + $script['save'][] = "\t\t\t\t\t\t\tif(in_array(\$key, \$data['target_headers']) && is_numeric(\$cell))"; + $script['save'][] = "\t\t\t\t\t\t\t{"; + $script['save'][] = "\t\t\t\t\t\t\t\t\$columns[] \t= \$target[\$key];"; + $script['save'][] = "\t\t\t\t\t\t\t\t\$values[] \t= \$cell;"; + $script['save'][] = "\t\t\t\t\t\t\t}"; + $script['save'][] = "\t\t\t\t\t\t\telseif(in_array(\$key, \$data['target_headers']) && is_string(\$cell))"; + $script['save'][] = "\t\t\t\t\t\t\t{"; + $script['save'][] = "\t\t\t\t\t\t\t\t\$columns[] \t= \$target[\$key];"; + $script['save'][] = "\t\t\t\t\t\t\t\t\$values[] \t= \$db->quote(\$cell);"; + $script['save'][] = "\t\t\t\t\t\t\t}"; + $script['save'][] = "\t\t\t\t\t\t\telseif(in_array(\$key, \$data['target_headers']) && is_null(\$cell))"; + $script['save'][] = "\t\t\t\t\t\t\t{"; + $script['save'][] = "\t\t\t\t\t\t\t\t// if import data is null then set empty"; + $script['save'][] = "\t\t\t\t\t\t\t\t\$columns[] \t= \$target[\$key];"; + $script['save'][] = "\t\t\t\t\t\t\t\t\$values[] \t= \"''\";"; + $script['save'][] = "\t\t\t\t\t\t\t}"; + $script['save'][] = "\t\t\t\t\t\t}"; + $script['save'][] = "\t\t\t\t\t\t// load the defaults"; + $script['save'][] = "\t\t\t\t\t\t\$columns[] \t= 'created_by';"; + $script['save'][] = "\t\t\t\t\t\t\$values[] \t= \$db->quote(\$user->id);"; + $script['save'][] = "\t\t\t\t\t\t\$columns[] \t= 'created';"; + $script['save'][] = "\t\t\t\t\t\t\$values[] \t= \$db->quote(\$todayDate);"; + $script['save'][] = "\t\t\t\t\t\tif (!\$version)"; + $script['save'][] = "\t\t\t\t\t\t{"; + $script['save'][] = "\t\t\t\t\t\t\t\$columns[] \t= 'version';"; + $script['save'][] = "\t\t\t\t\t\t\t\$values[] \t= 1;"; + $script['save'][] = "\t\t\t\t\t\t}"; + $script['save'][] = "\t\t\t\t\t\t// Prepare the insert query."; + $script['save'][] = "\t\t\t\t\t\t\$query"; + $script['save'][] = "\t\t\t\t\t\t\t->insert(\$db->quoteName('#__###-#-#-component###_'.\$table))"; + $script['save'][] = "\t\t\t\t\t\t\t->columns(\$db->quoteName(\$columns))"; + $script['save'][] = "\t\t\t\t\t\t\t->values(implode(',', \$values));"; + $script['save'][] = "\t\t\t\t\t\t// Set the query using our newly populated query object and execute it."; + $script['save'][] = "\t\t\t\t\t\t\$db->setQuery(\$query);"; + $script['save'][] = "\t\t\t\t\t\t\$done = \$db->execute();"; + $script['save'][] = "\t\t\t\t\t\tif (\$done)"; + $script['save'][] = "\t\t\t\t\t\t{"; + $script['save'][] = "\t\t\t\t\t\t\t\$aId = \$db->insertid();"; + $script['save'][] = "\t\t\t\t\t\t\t// make sure the access of asset is set"; + $script['save'][] = "\t\t\t\t\t\t\t###-#-#-Component###Helper::setAsset(\$aId,\$table);"; + $script['save'][] = "\t\t\t\t\t\t}"; + $script['save'][] = "\t\t\t\t\t}"; + $script['save'][] = "\t\t\t\t\telse"; + $script['save'][] = "\t\t\t\t\t{"; + $script['save'][] = "\t\t\t\t\t\treturn false;"; + $script['save'][] = "\t\t\t\t\t}"; + $script['save'][] = "\t\t\t\t}"; + $script['save'][] = "\t\t\t\treturn true;"; + $script['save'][] = "\t\t\t}"; + $script['save'][] = "\t\t}"; + $script['save'][] = "\t\treturn false;"; + $script['save'][] = "\t}"; + } + elseif ('view' === $type) + { + $script['view'] = array(); + $script['view'][] = ""; + $script['view'][] = ""; + $script['view'][] = "\n
"; + $script['view'][] = "
\" method=\"post\" name=\"adminForm\" id=\"adminForm\" class=\"form-horizontal form-validate\">"; + $script['view'][] = ""; + $script['view'][] = "\n\tsidebar)) : ?>"; + $script['view'][] = "\t\t
"; + $script['view'][] = "\t\t\tsidebar; ?>"; + $script['view'][] = "\t\t
"; + $script['view'][] = "\t\t
"; + $script['view'][] = "\t"; + $script['view'][] = "\t\t
"; + $script['view'][] = "\t"; + $script['view'][] = ""; + $script['view'][] = "\n\thasPackage && ###-#-#-Component###Helper::checkArray(\$this->headerList) && ###-#-#-Component###Helper::checkArray(\$this->headers)) : ?>"; + $script['view'][] = "\t\t
"; + $script['view'][] = "\t\t\t"; + $script['view'][] = "\t\t\t
"; + $script['view'][] = "\t\t\t\t"; + $script['view'][] = "\t\t\t\t
"; + $script['view'][] = "\t\t\t\t\t"; + $script['view'][] = "\t\t\t\t
"; + $script['view'][] = "\t\t\t
"; + $script['view'][] = "\t\t\theaderList as \$name => \$title): ?>"; + $script['view'][] = "\t\t\t\t
"; + $script['view'][] = "\t\t\t\t\t"; + $script['view'][] = "\t\t\t\t\t
"; + $script['view'][] = "\t\t\t\t\t\t"; + $script['view'][] = "\t\t\t\t\t
"; + $script['view'][] = "\t\t\t\t
"; + $script['view'][] = "\t\t\t"; + $script['view'][] = "\t\t\t
"; + $script['view'][] = "\t\t\t\t\" onclick=\"Joomla.continueImport()\" />"; + $script['view'][] = "\t\t\t
"; + $script['view'][] = "\t\t
"; + $script['view'][] = "\t\t"; + $script['view'][] = "\t"; + $script['view'][] = "\t\t 'upload')); ?>"; + $script['view'][] = "\t\t"; + $script['view'][] = "\t\t"; + $script['view'][] = "\t\t\t
"; + $script['view'][] = "\t\t\t\t"; + $script['view'][] = "\t\t\t\t
"; + $script['view'][] = "\t\t\t\t\t"; + $script['view'][] = "\t\t\t\t\t
"; + $script['view'][] = "\t\t\t\t\t\t"; + $script['view'][] = "\t\t\t\t\t
"; + $script['view'][] = "\t\t\t\t
"; + $script['view'][] = "\t\t\t\t
"; + $script['view'][] = "\t\t\t\t\t\" onclick=\"Joomla.submitbutton()\" />    (.csv .xls .ods)"; + $script['view'][] = "\t\t\t\t
"; + $script['view'][] = "\t\t\t
"; + $script['view'][] = "\t\t"; + $script['view'][] = "\t\t"; + $script['view'][] = "\t\t"; + $script['view'][] = "\t\t\t
"; + $script['view'][] = "\t\t\t\t"; + $script['view'][] = "\t\t\t\t
"; + $script['view'][] = "\t\t\t\t\t"; + $script['view'][] = "\t\t\t\t\t
"; + $script['view'][] = "\t\t\t\t\t\tstate->get('import.directory'); ?>\" />"; + $script['view'][] = "\t\t\t\t\t
"; + $script['view'][] = "\t\t\t\t
"; + $script['view'][] = "\t\t\t\t
"; + $script['view'][] = "\t\t\t\t\t\" onclick=\"Joomla.submitbutton3()\" />    (.csv .xls .ods)"; + $script['view'][] = "\t\t\t\t
"; + $script['view'][] = "\t\t\t\t
"; + $script['view'][] = "\t\t"; + $script['view'][] = ""; + $script['view'][] = "\n\t\t"; + $script['view'][] = "\t\t\t
"; + $script['view'][] = "\t\t\t\t"; + $script['view'][] = "\t\t\t\t
"; + $script['view'][] = "\t\t\t\t\t"; + $script['view'][] = "\t\t\t\t\t
"; + $script['view'][] = "\t\t\t\t\t\t"; + $script['view'][] = "\t\t\t\t\t
"; + $script['view'][] = "\t\t\t\t
"; + $script['view'][] = "\t\t\t\t
"; + $script['view'][] = "\t\t\t\t\t\" onclick=\"Joomla.submitbutton4()\" />    (.csv .xls .ods)"; + $script['view'][] = "\t\t\t\t
"; + $script['view'][] = "\t\t\t
"; + $script['view'][] = "\t\t"; + $script['view'][] = "\t\t"; + $script['view'][] = "\t\t"; + $script['view'][] = "\t"; + $script['view'][] = "\t"; + $script['view'][] = "\t"; + $script['view'][] = ""; + $script['view'][] = "
"; + } + elseif ('import' === $type) + { + $script['import'] = array(); + $script['import'][] = "\t/**"; + $script['import'][] = "\t * Import an spreadsheet from either folder, url or upload."; + $script['import'][] = "\t *"; + $script['import'][] = "\t * @return boolean result of import"; + $script['import'][] = "\t *"; + $script['import'][] = "\t */"; + $script['import'][] = "\tpublic function import()"; + $script['import'][] = "\t{"; + $script['import'][] = "\t\t\$this->setState('action', 'import');"; + $script['import'][] = "\t\t\$app \t\t= JFactory::getApplication();"; + $script['import'][] = "\t\t\$session \t= JFactory::getSession();"; + $script['import'][] = "\t\t\$package \t= null;"; + $script['import'][] = "\t\t\$continue\t= false;"; + $script['import'][] = "\t\t// get import type"; + $script['import'][] = "\t\t\$this->getType = \$app->input->getString('gettype', NULL);"; + $script['import'][] = "\t\t// get import type"; + $script['import'][] = "\t\t\$this->dataType\t= \$session->get('dataType_VDM_IMPORTINTO', NULL);"; + $script['import'][] = "\n\t\tif (\$package === null)"; + $script['import'][] = "\t\t{"; + $script['import'][] = "\t\t\tswitch (\$this->getType)"; + $script['import'][] = "\t\t\t{"; + $script['import'][] = "\t\t\t\tcase 'folder':"; + $script['import'][] = "\t\t\t\t\t// Remember the 'Import from Directory' path."; + $script['import'][] = "\t\t\t\t\t\$app->getUserStateFromRequest(\$this->_context . '.import_directory', 'import_directory');"; + $script['import'][] = "\t\t\t\t\t\$package = \$this->_getPackageFromFolder();"; + $script['import'][] = "\t\t\t\t\tbreak;"; + $script['import'][] = "\n\t\t\t\tcase 'upload':"; + $script['import'][] = "\t\t\t\t\t\$package = \$this->_getPackageFromUpload();"; + $script['import'][] = "\t\t\t\t\tbreak;"; + $script['import'][] = "\n\t\t\t\tcase 'url':"; + $script['import'][] = "\t\t\t\t\t\$package = \$this->_getPackageFromUrl();"; + $script['import'][] = "\t\t\t\t\tbreak;"; + $script['import'][] = "\n\t\t\t\tcase 'continue':"; + $script['import'][] = "\t\t\t\t\t\$continue \t= true;"; + $script['import'][] = "\t\t\t\t\t\$package\t= \$session->get('package', null);"; + $script['import'][] = "\t\t\t\t\t\$package\t= json_decode(\$package, true);"; + $script['import'][] = "\t\t\t\t\t// clear session"; + $script['import'][] = "\t\t\t\t\t\$session->clear('package');"; + $script['import'][] = "\t\t\t\t\t\$session->clear('dataType');"; + $script['import'][] = "\t\t\t\t\t\$session->clear('hasPackage');"; + $script['import'][] = "\t\t\t\t\tbreak;"; + $script['import'][] = "\n\t\t\t\tdefault:"; + $script['import'][] = "\t\t\t\t\t\$app->setUserState('com_###-#-#-component###.message', JTe-#-#-xt::_('COM_###-#-#-COMPONENT###_IMPORT_NO_IMPORT_TYPE_FOUND'));"; + $script['import'][] = "\n\t\t\t\t\treturn false;"; + $script['import'][] = "\t\t\t\t\tbreak;"; + $script['import'][] = "\t\t\t}"; + $script['import'][] = "\t\t}"; + $script['import'][] = "\t\t// Was the package valid?"; + $script['import'][] = "\t\tif (!\$package || !\$package['type'])"; + $script['import'][] = "\t\t{"; + $script['import'][] = "\t\t\tif (in_array(\$this->getType, array('upload', 'url')))"; + $script['import'][] = "\t\t\t{"; + $script['import'][] = "\t\t\t\t\$this->remove(\$package['packagename']);"; + $script['import'][] = "\t\t\t}"; + $script['import'][] = "\n\t\t\t\$app->setUserState('com_###-#-#-component###.message', JTe-#-#-xt::_('COM_###-#-#-COMPONENT###_IMPORT_UNABLE_TO_FIND_IMPORT_PACKAGE'));"; + $script['import'][] = "\t\t\treturn false;"; + $script['import'][] = "\t\t}"; + $script['import'][] = "\t\t"; + $script['import'][] = "\t\t// first link data to table headers"; + $script['import'][] = "\t\tif(!\$continue){"; + $script['import'][] = "\t\t\t\$package\t= json_encode(\$package);"; + $script['import'][] = "\t\t\t\$session->set('package', \$package);"; + $script['import'][] = "\t\t\t\$session->set('dataType', \$this->dataType);"; + $script['import'][] = "\t\t\t\$session->set('hasPackage', true);"; + $script['import'][] = "\t\t\treturn true;"; + $script['import'][] = "\t\t}"; + $script['import'][] = "\t\t// set the data"; + $script['import'][] = "\t\t\$headerList = json_decode(\$session->get(\$this->dataType.'_VDM_IMPORTHEADERS', false), true);"; + $script['import'][] = "\t\tif (!\$this->setData(\$package,\$this->dataType,\$headerList))"; + $script['import'][] = "\t\t{"; + $script['import'][] = "\t\t\t// There was an error importing the package"; + $script['import'][] = "\t\t\t\$msg = JTe-#-#-xt::_('COM_###-#-#-COMPONENT###_IMPORT_ERROR');"; + $script['import'][] = "\t\t\t\$back = \$session->get('backto_VDM_IMPORT', NULL);"; + $script['import'][] = "\t\t\tif (\$back)"; + $script['import'][] = "\t\t\t{"; + $script['import'][] = "\t\t\t\t\$app->setUserState('com_###-#-#-component###.redirect_url', 'index.php?option=com_###-#-#-component###&view='.\$back);"; + $script['import'][] = "\t\t\t\t\$session->clear('backto_VDM_IMPORT');"; + $script['import'][] = "\t\t\t}"; + $script['import'][] = "\t\t\t\$result = false;"; + $script['import'][] = "\t\t}"; + $script['import'][] = "\t\telse"; + $script['import'][] = "\t\t{"; + $script['import'][] = "\t\t\t// Package imported sucessfully"; + $script['import'][] = "\t\t\t\$msg = JTe-#-#-xt::sprintf('COM_###-#-#-COMPONENT###_IMPORT_SUCCESS', \$package['packagename']);"; + $script['import'][] = "\t\t\t\$back = \$session->get('backto_VDM_IMPORT', NULL);"; + $script['import'][] = "\t\t\tif (\$back)"; + $script['import'][] = "\t\t\t{"; + $script['import'][] = "\t\t\t \$app->setUserState('com_###-#-#-component###.redirect_url', 'index.php?option=com_###-#-#-component###&view='.\$back);"; + $script['import'][] = "\t\t\t \$session->clear('backto_VDM_IMPORT');"; + $script['import'][] = "\t\t\t}"; + $script['import'][] = "\t\t\t\$result = true;"; + $script['import'][] = "\t\t}"; + $script['import'][] = "\n\t\t// Set some model state values"; + $script['import'][] = "\t\t\$app->enqueueMessage(\$msg);"; + $script['import'][] = "\n\t\t// remove file after import"; + $script['import'][] = "\t\t\$this->remove(\$package['packagename']);"; + $script['import'][] = "\t\t\$session->clear(\$this->getType.'_VDM_IMPORTHEADERS');"; + $script['import'][] = "\t\treturn \$result;"; + $script['import'][] = "\t}"; + } + elseif ('ext' === $type) + { + $script['ext'][] = "\t/**"; + $script['ext'][] = "\t * Check the extension"; + $script['ext'][] = "\t *"; + $script['ext'][] = "\t * @param string \$file Name of the uploaded file"; + $script['ext'][] = "\t *"; + $script['ext'][] = "\t * @return boolean True on success"; + $script['ext'][] = "\t *"; + $script['ext'][] = "\t */"; + $script['ext'][] = "\tprotected function checkExtention(\$file)"; + $script['ext'][] = "\t{"; + $script['ext'][] = "\t\t// check the extention"; + $script['ext'][] = "\t\tswitch(strtolower(pathinfo(\$file, PATHINFO_EXTENSION)))"; + $script['ext'][] = "\t\t{"; + $script['ext'][] = "\t\t\tcase 'xls':"; + $script['ext'][] = "\t\t\tcase 'ods':"; + $script['ext'][] = "\t\t\tcase 'csv':"; + $script['ext'][] = "\t\t\treturn true;"; + $script['ext'][] = "\t\t\tbreak;"; + $script['ext'][] = "\t\t}"; + $script['ext'][] = "\t\treturn false;"; + $script['ext'][] = "\t}"; + } + // return the needed script + if (isset($script[$type])) + { + return str_replace('-#-#-', '', implode("\n",$script[$type])); + } + return false; + } + /** * Load the Component xml manifest. **/ diff --git a/admin/helpers/headercheck.php b/admin/helpers/headercheck.php index 72cf81154..c3f50157f 100644 --- a/admin/helpers/headercheck.php +++ b/admin/helpers/headercheck.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage headercheck.php diff --git a/admin/helpers/html/batch_.php b/admin/helpers/html/batch_.php index 7a02ef1c0..307845323 100644 --- a/admin/helpers/html/batch_.php +++ b/admin/helpers/html/batch_.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage batch_.php diff --git a/admin/helpers/indenter.php b/admin/helpers/indenter.php index 4ee2ca31f..e770ced47 100644 --- a/admin/helpers/indenter.php +++ b/admin/helpers/indenter.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage indenter.php diff --git a/admin/helpers/js.php b/admin/helpers/js.php index ae1792ddd..e0c53e62a 100644 --- a/admin/helpers/js.php +++ b/admin/helpers/js.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage js.php diff --git a/admin/helpers/minify.php b/admin/helpers/minify.php index 590cc279c..c30dfb37a 100644 --- a/admin/helpers/minify.php +++ b/admin/helpers/minify.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage minify.php diff --git a/admin/language/en-GB/en-GB.com_componentbuilder.ini b/admin/language/en-GB/en-GB.com_componentbuilder.ini index ba8cdd008..14ba3d667 100644 --- a/admin/language/en-GB/en-GB.com_componentbuilder.ini +++ b/admin/language/en-GB/en-GB.com_componentbuilder.ini @@ -517,6 +517,10 @@ COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_DISPLAY="Php Import Display" COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_DISPLAY_DESCRIPTION="Add your PHP here!" COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_DISPLAY_HINT="// The display method for the view.html.php file." COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_DISPLAY_LABEL="PHP (display)" +COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_EXT="Php Import Ext" +COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_EXT_DESCRIPTION="Add your PHP here! [Do not add the php tags]" +COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_EXT_HINT="// PHP here for the checkExtension Method" +COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_EXT_LABEL="Check Extension Method PHP" COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_HINT="// PHP Here that should run in the import Method." COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_LABEL="Import Method PHP" COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_SAVE="Php Import Save" @@ -696,6 +700,7 @@ COM_COMPONENTBUILDER_AUTHOR="Author" COM_COMPONENTBUILDER_A_FEW_CLOSED_ISSUES_FROM_GITHUB_IS_LOADING="A few closed issues from Github is loading" COM_COMPONENTBUILDER_A_FEW_OPEN_ISSUES_FROM_GITHUB_IS_LOADING="A few open issues from Github is loading" COM_COMPONENTBUILDER_BACK="Back" +COM_COMPONENTBUILDER_BASIC_METHOD="Basic Method" COM_COMPONENTBUILDER_CLEAR_TMP="Clear tmp" COM_COMPONENTBUILDER_COMPANY="Company" COM_COMPONENTBUILDER_COMPILER="Compiler" @@ -1743,10 +1748,11 @@ COM_COMPONENTBUILDER_EDIT_VERSIONS="Edit Version" COM_COMPONENTBUILDER_EDIT_VERSIONS_DESC=" Allows users in this group to edit versions." COM_COMPONENTBUILDER_EMAIL="Email" COM_COMPONENTBUILDER_EXPORT_COMPLETED="Export Completed!" -COM_COMPONENTBUILDER_EXPORT_COMPONENT="Export Component" +COM_COMPONENTBUILDER_EXPORT_COMPONENTS="Export Components" COM_COMPONENTBUILDER_EXPORT_DATA="Export Data" COM_COMPONENTBUILDER_EXPORT_DATA_DESC=" Allows users in this group to export data." COM_COMPONENTBUILDER_EXPORT_FAILED="Export Failed" +COM_COMPONENTBUILDER_EXPORT_FAILED_PLEASE_TRY_AGAIN_LATTER="Export failed, please try again latter!" COM_COMPONENTBUILDER_FIELD="Field" COM_COMPONENTBUILDER_FIELDS="Fields" COM_COMPONENTBUILDER_FIELDS_ACCESS="Fields Access" @@ -2151,7 +2157,9 @@ COM_COMPONENTBUILDER_HELP_DOCUMENT_URL_LABEL="URL" COM_COMPONENTBUILDER_HELP_DOCUMENT_VERSION_DESC="A count of the number of times this Help Document has been revised." COM_COMPONENTBUILDER_HELP_DOCUMENT_VERSION_LABEL="Revision" COM_COMPONENTBUILDER_HELP_MANAGER="Help" +COM_COMPONENTBUILDER_HERE_YOU_CAN_ADD="Here you can add....." COM_COMPONENTBUILDER_HI="Hi" +COM_COMPONENTBUILDER_IMPORT_COMPONENTS="Import Components" COM_COMPONENTBUILDER_IMPORT_CONTINUE="Continue" COM_COMPONENTBUILDER_IMPORT_DATA="Import Data" COM_COMPONENTBUILDER_IMPORT_DATA_DESC=" Allows users in this group to import data." @@ -2480,8 +2488,8 @@ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXIT="Exit" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPAND="Expand" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPAND_TWO="Expand 2" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPIRED="Expired" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_COMPONENT_BUTTON_ACCESS="Joomla Component Export Component Button Access" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_COMPONENT_BUTTON_ACCESS_DESC=" Allows the users in this group to access the export component button." +COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_COMPONENTS_BUTTON_ACCESS="Joomla Component Export Components Button Access" +COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EXPORT_COMPONENTS_BUTTON_ACCESS_DESC=" Allows the users in this group to access the export components button." COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EYE_CLOSE="Eye Close" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EYE_OPEN="Eye Open" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_FEATURED="Featured" @@ -2544,6 +2552,8 @@ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMAGE="Image" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMAGES="Images" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMAGE_DESCRIPTION="The component image (product box) for the dashboard and install page, must be 300px X 300px." COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMAGE_LABEL="Component Image" +COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMPORT_COMPONENTS_BUTTON_ACCESS="Joomla Component Import Components Button Access" +COM_COMPONENTBUILDER_JOOMLA_COMPONENT_IMPORT_COMPONENTS_BUTTON_ACCESS_DESC=" Allows the users in this group to access the import components button." COM_COMPONENTBUILDER_JOOMLA_COMPONENT_INFO="Info" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_INFO_CIRCLE="Info Circle" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_JOOMLA="Joomla" @@ -3024,6 +3034,7 @@ COM_COMPONENTBUILDER_NEW_ISSUE="New Issue" COM_COMPONENTBUILDER_NEW_NOTICE="New Notice" COM_COMPONENTBUILDER_NO="No" COM_COMPONENTBUILDER_NO_ACCESS_GRANTED="No Access Granted!" +COM_COMPONENTBUILDER_NO_COMPONENTS_WERE_SELECTED_PLEASE_MAKE_A_SELECTION_AND_TRY_AGAIN="No components were selected, please make a selection and try again!" COM_COMPONENTBUILDER_OPENED_BY="opened by" COM_COMPONENTBUILDER_PATH_TO_THE_ZIPPED_PACKAGE_IS_CODESCODE="Path to the zipped package is: %s" COM_COMPONENTBUILDER_PLEASE_ADD_FILES_TO_S="Please add files to (%s)" @@ -3474,6 +3485,7 @@ COM_COMPONENTBUILDER_SITE_VIEW_YES="Yes" COM_COMPONENTBUILDER_SITE_VIEW_YOUTUBE="Youtube" COM_COMPONENTBUILDER_SITE_VIEW_ZOOM_IN="Zoom In" COM_COMPONENTBUILDER_SITE_VIEW_ZOOM_OUT="Zoom Out" +COM_COMPONENTBUILDER_SMART_JCB_COMPONENTS_IMPORT="Smart JCB Components Import" COM_COMPONENTBUILDER_SNIPPET="Snippet" COM_COMPONENTBUILDER_SNIPPETS="Snippets" COM_COMPONENTBUILDER_SNIPPETS_ACCESS="Snippets Access" @@ -3702,5 +3714,7 @@ COM_COMPONENTBUILDER_VERSION="Version" COM_COMPONENTBUILDER_VIEW_MORE_ISSUES_ON_GITHUB="View more issues on Github" COM_COMPONENTBUILDER_WEBSITE="Website" COM_COMPONENTBUILDER_YES="Yes" +COM_COMPONENTBUILDER_YOU_CAN_NOW_SELECT_THE_COMPONENT_BZIPB_PACKAGE_YOU_WOULD_LIKE_TO_IMPORTBR_SMALLPLEASE_NOTE_THAT_SMART_COMPONENT_IMPORT_ONLY_WORKS_WITH_THE_FOLLOWING_FORMAT_BZIPBSMALL="You can now select the component zip package you would like to import.
Please note that smart component import only works with the following format: (.zip)" +COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_IMPORT_A_COMPONENT_PLEASE_CONTACT_YOUR_SYSTEM_ADMINISTRATOR_FOR_MORE_HELP="You do not have permission to import a component, please contact your system administrator for more help." COM_COMPONENTBUILDER_YOU_MUST_SELECT_A_COMPONENT="You must select a component!" COM_COMPONENTBUILDER__SELECT_COMPONENT_="- Select Component -" diff --git a/admin/layouts/admin_view/css_fullwidth.php b/admin/layouts/admin_view/css_fullwidth.php index 641fa4e0f..689d25e3c 100644 --- a/admin/layouts/admin_view/css_fullwidth.php +++ b/admin/layouts/admin_view/css_fullwidth.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage css_fullwidth.php diff --git a/admin/layouts/admin_view/custom_buttons_fullwidth.php b/admin/layouts/admin_view/custom_buttons_fullwidth.php index d33b792a6..ab9cc4692 100644 --- a/admin/layouts/admin_view/custom_buttons_fullwidth.php +++ b/admin/layouts/admin_view/custom_buttons_fullwidth.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage custom_buttons_fullwidth.php diff --git a/admin/layouts/admin_view/custom_buttons_left.php b/admin/layouts/admin_view/custom_buttons_left.php index 36f606c7a..13f91c5f2 100644 --- a/admin/layouts/admin_view/custom_buttons_left.php +++ b/admin/layouts/admin_view/custom_buttons_left.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage custom_buttons_left.php diff --git a/admin/layouts/admin_view/custom_import_fullwidth.php b/admin/layouts/admin_view/custom_import_fullwidth.php index 0ef4dbcdf..48b7d22a5 100644 --- a/admin/layouts/admin_view/custom_import_fullwidth.php +++ b/admin/layouts/admin_view/custom_import_fullwidth.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage custom_import_fullwidth.php @@ -37,7 +37,8 @@ $fields = $displayData->get('fields') ?: array( 'html_import_view', 'php_import', 'php_import_setdata', - 'php_import_save' + 'php_import_save', + 'php_import_ext' ); ?> diff --git a/admin/layouts/admin_view/fields_fullwidth.php b/admin/layouts/admin_view/fields_fullwidth.php index 257b528b4..b03d5da76 100644 --- a/admin/layouts/admin_view/fields_fullwidth.php +++ b/admin/layouts/admin_view/fields_fullwidth.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage fields_fullwidth.php @@ -28,7 +28,7 @@ defined('_JEXEC') or die('Restricted access'); // set the defaults -$items = $displayData->vxvfields; +$items = $displayData->vxwfields; $user = JFactory::getUser(); $id = $displayData->item->id; $edit = "index.php?option=com_componentbuilder&view=fields&task=field.edit"; diff --git a/admin/layouts/admin_view/javascript_fullwidth.php b/admin/layouts/admin_view/javascript_fullwidth.php index 9f9b43e2d..ffd4bf9d0 100644 --- a/admin/layouts/admin_view/javascript_fullwidth.php +++ b/admin/layouts/admin_view/javascript_fullwidth.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage javascript_fullwidth.php diff --git a/admin/layouts/admin_view/linked_components_fullwidth.php b/admin/layouts/admin_view/linked_components_fullwidth.php index a333f14d6..7a0c389ce 100644 --- a/admin/layouts/admin_view/linked_components_fullwidth.php +++ b/admin/layouts/admin_view/linked_components_fullwidth.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage linked_components_fullwidth.php @@ -28,7 +28,7 @@ defined('_JEXEC') or die('Restricted access'); // set the defaults -$items = $displayData->vxwlinked_components; +$items = $displayData->vxxlinked_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/layouts/admin_view/mysql_fullwidth.php b/admin/layouts/admin_view/mysql_fullwidth.php index a12238c8e..9a2cb4894 100644 --- a/admin/layouts/admin_view/mysql_fullwidth.php +++ b/admin/layouts/admin_view/mysql_fullwidth.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage mysql_fullwidth.php diff --git a/admin/layouts/admin_view/mysql_left.php b/admin/layouts/admin_view/mysql_left.php index 39bed69b5..e1a9dc6fc 100644 --- a/admin/layouts/admin_view/mysql_left.php +++ b/admin/layouts/admin_view/mysql_left.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage mysql_left.php diff --git a/admin/layouts/admin_view/php_fullwidth.php b/admin/layouts/admin_view/php_fullwidth.php index cbf3fa193..72fe17435 100644 --- a/admin/layouts/admin_view/php_fullwidth.php +++ b/admin/layouts/admin_view/php_fullwidth.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage php_fullwidth.php diff --git a/admin/layouts/admin_view/publishing.php b/admin/layouts/admin_view/publishing.php index ac42cd460..69cfb45b7 100644 --- a/admin/layouts/admin_view/publishing.php +++ b/admin/layouts/admin_view/publishing.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage publishing.php diff --git a/admin/layouts/admin_view/publlshing.php b/admin/layouts/admin_view/publlshing.php index 26d79dd4b..d24a4e422 100644 --- a/admin/layouts/admin_view/publlshing.php +++ b/admin/layouts/admin_view/publlshing.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage publlshing.php diff --git a/admin/layouts/admin_view/settings_above.php b/admin/layouts/admin_view/settings_above.php index 46f345e70..d9c5d6d86 100644 --- a/admin/layouts/admin_view/settings_above.php +++ b/admin/layouts/admin_view/settings_above.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage settings_above.php diff --git a/admin/layouts/admin_view/settings_left.php b/admin/layouts/admin_view/settings_left.php index 9555c1f64..bcdd47616 100644 --- a/admin/layouts/admin_view/settings_left.php +++ b/admin/layouts/admin_view/settings_left.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage settings_left.php diff --git a/admin/layouts/admin_view/settings_right.php b/admin/layouts/admin_view/settings_right.php index ee4e90a9b..ed9b623a6 100644 --- a/admin/layouts/admin_view/settings_right.php +++ b/admin/layouts/admin_view/settings_right.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage settings_right.php diff --git a/admin/layouts/admin_view/settings_under.php b/admin/layouts/admin_view/settings_under.php index 3604570b2..81630e617 100644 --- a/admin/layouts/admin_view/settings_under.php +++ b/admin/layouts/admin_view/settings_under.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage settings_under.php diff --git a/admin/layouts/batchselection.php b/admin/layouts/batchselection.php index 7e230c413..db79e2093 100644 --- a/admin/layouts/batchselection.php +++ b/admin/layouts/batchselection.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage batchselection.php diff --git a/admin/layouts/custom_admin_view/custom_buttons_fullwidth.php b/admin/layouts/custom_admin_view/custom_buttons_fullwidth.php index 4867fc04c..2b90b7a93 100644 --- a/admin/layouts/custom_admin_view/custom_buttons_fullwidth.php +++ b/admin/layouts/custom_admin_view/custom_buttons_fullwidth.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage custom_buttons_fullwidth.php diff --git a/admin/layouts/custom_admin_view/custom_buttons_left.php b/admin/layouts/custom_admin_view/custom_buttons_left.php index 36f606c7a..13f91c5f2 100644 --- a/admin/layouts/custom_admin_view/custom_buttons_left.php +++ b/admin/layouts/custom_admin_view/custom_buttons_left.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage custom_buttons_left.php diff --git a/admin/layouts/custom_admin_view/custom_script_fullwidth.php b/admin/layouts/custom_admin_view/custom_script_fullwidth.php index 08b9906ef..220a04eea 100644 --- a/admin/layouts/custom_admin_view/custom_script_fullwidth.php +++ b/admin/layouts/custom_admin_view/custom_script_fullwidth.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage custom_script_fullwidth.php diff --git a/admin/layouts/custom_admin_view/details_above.php b/admin/layouts/custom_admin_view/details_above.php index 583f20c8d..f0b3edbd3 100644 --- a/admin/layouts/custom_admin_view/details_above.php +++ b/admin/layouts/custom_admin_view/details_above.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_above.php diff --git a/admin/layouts/custom_admin_view/details_fullwidth.php b/admin/layouts/custom_admin_view/details_fullwidth.php index c9494d392..a738c9ed9 100644 --- a/admin/layouts/custom_admin_view/details_fullwidth.php +++ b/admin/layouts/custom_admin_view/details_fullwidth.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_fullwidth.php diff --git a/admin/layouts/custom_admin_view/details_left.php b/admin/layouts/custom_admin_view/details_left.php index 5cd5950e8..43a3bd9cb 100644 --- a/admin/layouts/custom_admin_view/details_left.php +++ b/admin/layouts/custom_admin_view/details_left.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_left.php diff --git a/admin/layouts/custom_admin_view/details_right.php b/admin/layouts/custom_admin_view/details_right.php index ce9e7e030..a3b1d6e12 100644 --- a/admin/layouts/custom_admin_view/details_right.php +++ b/admin/layouts/custom_admin_view/details_right.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_right.php diff --git a/admin/layouts/custom_admin_view/details_rightside.php b/admin/layouts/custom_admin_view/details_rightside.php index 3bf6a3195..bc62e0485 100644 --- a/admin/layouts/custom_admin_view/details_rightside.php +++ b/admin/layouts/custom_admin_view/details_rightside.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_rightside.php diff --git a/admin/layouts/custom_admin_view/details_under.php b/admin/layouts/custom_admin_view/details_under.php index f18cd36e8..eb22e0b90 100644 --- a/admin/layouts/custom_admin_view/details_under.php +++ b/admin/layouts/custom_admin_view/details_under.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_under.php diff --git a/admin/layouts/custom_admin_view/linked_components_fullwidth.php b/admin/layouts/custom_admin_view/linked_components_fullwidth.php index e67d9193c..27af5cf31 100644 --- a/admin/layouts/custom_admin_view/linked_components_fullwidth.php +++ b/admin/layouts/custom_admin_view/linked_components_fullwidth.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage linked_components_fullwidth.php @@ -28,7 +28,7 @@ defined('_JEXEC') or die('Restricted access'); // set the defaults -$items = $displayData->vyglinked_components; +$items = $displayData->vyhlinked_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/layouts/custom_admin_view/publishing.php b/admin/layouts/custom_admin_view/publishing.php index ac42cd460..69cfb45b7 100644 --- a/admin/layouts/custom_admin_view/publishing.php +++ b/admin/layouts/custom_admin_view/publishing.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage publishing.php diff --git a/admin/layouts/custom_admin_view/publlshing.php b/admin/layouts/custom_admin_view/publlshing.php index 26d79dd4b..d24a4e422 100644 --- a/admin/layouts/custom_admin_view/publlshing.php +++ b/admin/layouts/custom_admin_view/publlshing.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage publlshing.php diff --git a/admin/layouts/custom_code/details_above.php b/admin/layouts/custom_code/details_above.php index a6ccb9149..6a01d0fbf 100644 --- a/admin/layouts/custom_code/details_above.php +++ b/admin/layouts/custom_code/details_above.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_above.php diff --git a/admin/layouts/custom_code/details_fullwidth.php b/admin/layouts/custom_code/details_fullwidth.php index a9357d14e..aefb99fd2 100644 --- a/admin/layouts/custom_code/details_fullwidth.php +++ b/admin/layouts/custom_code/details_fullwidth.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_fullwidth.php diff --git a/admin/layouts/custom_code/details_left.php b/admin/layouts/custom_code/details_left.php index b1c5aca8a..51ac6527a 100644 --- a/admin/layouts/custom_code/details_left.php +++ b/admin/layouts/custom_code/details_left.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_left.php diff --git a/admin/layouts/custom_code/details_right.php b/admin/layouts/custom_code/details_right.php index 4ae86e0de..a4ea31550 100644 --- a/admin/layouts/custom_code/details_right.php +++ b/admin/layouts/custom_code/details_right.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_right.php diff --git a/admin/layouts/custom_code/details_under.php b/admin/layouts/custom_code/details_under.php index f18cd36e8..eb22e0b90 100644 --- a/admin/layouts/custom_code/details_under.php +++ b/admin/layouts/custom_code/details_under.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_under.php diff --git a/admin/layouts/custom_code/publishing.php b/admin/layouts/custom_code/publishing.php index ac42cd460..69cfb45b7 100644 --- a/admin/layouts/custom_code/publishing.php +++ b/admin/layouts/custom_code/publishing.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage publishing.php diff --git a/admin/layouts/custom_code/publlshing.php b/admin/layouts/custom_code/publlshing.php index 26d79dd4b..d24a4e422 100644 --- a/admin/layouts/custom_code/publlshing.php +++ b/admin/layouts/custom_code/publlshing.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage publlshing.php diff --git a/admin/layouts/dynamic_get/abacus_fullwidth.php b/admin/layouts/dynamic_get/abacus_fullwidth.php index 669ec3dc2..86d43b3ea 100644 --- a/admin/layouts/dynamic_get/abacus_fullwidth.php +++ b/admin/layouts/dynamic_get/abacus_fullwidth.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage abacus_fullwidth.php diff --git a/admin/layouts/dynamic_get/abacus_left.php b/admin/layouts/dynamic_get/abacus_left.php index 3b9f9cd2e..11896d209 100644 --- a/admin/layouts/dynamic_get/abacus_left.php +++ b/admin/layouts/dynamic_get/abacus_left.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage abacus_left.php diff --git a/admin/layouts/dynamic_get/custom_script_fullwidth.php b/admin/layouts/dynamic_get/custom_script_fullwidth.php index 5527b0234..366f5ff79 100644 --- a/admin/layouts/dynamic_get/custom_script_fullwidth.php +++ b/admin/layouts/dynamic_get/custom_script_fullwidth.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage custom_script_fullwidth.php diff --git a/admin/layouts/dynamic_get/gettable_above.php b/admin/layouts/dynamic_get/gettable_above.php index b89f74167..e264e5e89 100644 --- a/admin/layouts/dynamic_get/gettable_above.php +++ b/admin/layouts/dynamic_get/gettable_above.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage gettable_above.php diff --git a/admin/layouts/dynamic_get/gettable_fullwidth.php b/admin/layouts/dynamic_get/gettable_fullwidth.php index d5bb55f73..3fe975a12 100644 --- a/admin/layouts/dynamic_get/gettable_fullwidth.php +++ b/admin/layouts/dynamic_get/gettable_fullwidth.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage gettable_fullwidth.php diff --git a/admin/layouts/dynamic_get/gettable_left.php b/admin/layouts/dynamic_get/gettable_left.php index 9d3030e59..f895d4b64 100644 --- a/admin/layouts/dynamic_get/gettable_left.php +++ b/admin/layouts/dynamic_get/gettable_left.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage gettable_left.php diff --git a/admin/layouts/dynamic_get/gettable_right.php b/admin/layouts/dynamic_get/gettable_right.php index 037920e01..d5498c48a 100644 --- a/admin/layouts/dynamic_get/gettable_right.php +++ b/admin/layouts/dynamic_get/gettable_right.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage gettable_right.php diff --git a/admin/layouts/dynamic_get/gettable_under.php b/admin/layouts/dynamic_get/gettable_under.php index d394f4744..771244080 100644 --- a/admin/layouts/dynamic_get/gettable_under.php +++ b/admin/layouts/dynamic_get/gettable_under.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage gettable_under.php diff --git a/admin/layouts/dynamic_get/publishing.php b/admin/layouts/dynamic_get/publishing.php index ac42cd460..69cfb45b7 100644 --- a/admin/layouts/dynamic_get/publishing.php +++ b/admin/layouts/dynamic_get/publishing.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage publishing.php diff --git a/admin/layouts/dynamic_get/publlshing.php b/admin/layouts/dynamic_get/publlshing.php index 26d79dd4b..d24a4e422 100644 --- a/admin/layouts/dynamic_get/publlshing.php +++ b/admin/layouts/dynamic_get/publlshing.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage publlshing.php diff --git a/admin/layouts/field/details_fullwidth.php b/admin/layouts/field/details_fullwidth.php index 6f2a62e5d..420d5dccf 100644 --- a/admin/layouts/field/details_fullwidth.php +++ b/admin/layouts/field/details_fullwidth.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_fullwidth.php diff --git a/admin/layouts/field/details_left.php b/admin/layouts/field/details_left.php index fd261c96b..a54ed6b1c 100644 --- a/admin/layouts/field/details_left.php +++ b/admin/layouts/field/details_left.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_left.php diff --git a/admin/layouts/field/details_right.php b/admin/layouts/field/details_right.php index 8d05540a3..698c6c6f4 100644 --- a/admin/layouts/field/details_right.php +++ b/admin/layouts/field/details_right.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_right.php diff --git a/admin/layouts/field/details_under.php b/admin/layouts/field/details_under.php index f18cd36e8..eb22e0b90 100644 --- a/admin/layouts/field/details_under.php +++ b/admin/layouts/field/details_under.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_under.php diff --git a/admin/layouts/field/linked_admin_views_fullwidth.php b/admin/layouts/field/linked_admin_views_fullwidth.php index 418fb25ba..5b3162a93 100644 --- a/admin/layouts/field/linked_admin_views_fullwidth.php +++ b/admin/layouts/field/linked_admin_views_fullwidth.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage linked_admin_views_fullwidth.php @@ -28,7 +28,7 @@ defined('_JEXEC') or die('Restricted access'); // set the defaults -$items = $displayData->vzylinked_admin_views; +$items = $displayData->vzzlinked_admin_views; $user = JFactory::getUser(); $id = $displayData->item->id; $edit = "index.php?option=com_componentbuilder&view=admin_views&task=admin_view.edit"; diff --git a/admin/layouts/field/publishing.php b/admin/layouts/field/publishing.php index ac42cd460..69cfb45b7 100644 --- a/admin/layouts/field/publishing.php +++ b/admin/layouts/field/publishing.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage publishing.php diff --git a/admin/layouts/field/publlshing.php b/admin/layouts/field/publlshing.php index 26d79dd4b..d24a4e422 100644 --- a/admin/layouts/field/publlshing.php +++ b/admin/layouts/field/publlshing.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage publlshing.php diff --git a/admin/layouts/field/scripts_left.php b/admin/layouts/field/scripts_left.php index 43a05fa49..2bd18c335 100644 --- a/admin/layouts/field/scripts_left.php +++ b/admin/layouts/field/scripts_left.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage scripts_left.php diff --git a/admin/layouts/field/scripts_right.php b/admin/layouts/field/scripts_right.php index c104a0792..7e74dcf1d 100644 --- a/admin/layouts/field/scripts_right.php +++ b/admin/layouts/field/scripts_right.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage scripts_right.php diff --git a/admin/layouts/fieldtype/details_left.php b/admin/layouts/fieldtype/details_left.php index 647770f64..047b2b199 100644 --- a/admin/layouts/fieldtype/details_left.php +++ b/admin/layouts/fieldtype/details_left.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_left.php diff --git a/admin/layouts/fieldtype/details_right.php b/admin/layouts/fieldtype/details_right.php index e549e4b65..272a3ab53 100644 --- a/admin/layouts/fieldtype/details_right.php +++ b/admin/layouts/fieldtype/details_right.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_right.php diff --git a/admin/layouts/fieldtype/fields_fullwidth.php b/admin/layouts/fieldtype/fields_fullwidth.php index af2c29e8d..e05f43dd3 100644 --- a/admin/layouts/fieldtype/fields_fullwidth.php +++ b/admin/layouts/fieldtype/fields_fullwidth.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage fields_fullwidth.php @@ -28,7 +28,7 @@ defined('_JEXEC') or die('Restricted access'); // set the defaults -$items = $displayData->vzzfields; +$items = $displayData->waafields; $user = JFactory::getUser(); $id = $displayData->item->id; $edit = "index.php?option=com_componentbuilder&view=fields&task=field.edit"; diff --git a/admin/layouts/fieldtype/publishing.php b/admin/layouts/fieldtype/publishing.php index ac42cd460..69cfb45b7 100644 --- a/admin/layouts/fieldtype/publishing.php +++ b/admin/layouts/fieldtype/publishing.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage publishing.php diff --git a/admin/layouts/fieldtype/publlshing.php b/admin/layouts/fieldtype/publlshing.php index 26d79dd4b..d24a4e422 100644 --- a/admin/layouts/fieldtype/publlshing.php +++ b/admin/layouts/fieldtype/publlshing.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage publlshing.php diff --git a/admin/layouts/help_document/details_above.php b/admin/layouts/help_document/details_above.php index d546d7324..984d0cdd7 100644 --- a/admin/layouts/help_document/details_above.php +++ b/admin/layouts/help_document/details_above.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_above.php diff --git a/admin/layouts/help_document/details_fullwidth.php b/admin/layouts/help_document/details_fullwidth.php index d6c499314..7851508c6 100644 --- a/admin/layouts/help_document/details_fullwidth.php +++ b/admin/layouts/help_document/details_fullwidth.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_fullwidth.php diff --git a/admin/layouts/help_document/details_left.php b/admin/layouts/help_document/details_left.php index d919d2fe8..d867712c1 100644 --- a/admin/layouts/help_document/details_left.php +++ b/admin/layouts/help_document/details_left.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_left.php diff --git a/admin/layouts/help_document/details_right.php b/admin/layouts/help_document/details_right.php index ffc2db46b..8059419c2 100644 --- a/admin/layouts/help_document/details_right.php +++ b/admin/layouts/help_document/details_right.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_right.php diff --git a/admin/layouts/help_document/details_under.php b/admin/layouts/help_document/details_under.php index f18cd36e8..eb22e0b90 100644 --- a/admin/layouts/help_document/details_under.php +++ b/admin/layouts/help_document/details_under.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_under.php diff --git a/admin/layouts/help_document/publishing.php b/admin/layouts/help_document/publishing.php index ac42cd460..69cfb45b7 100644 --- a/admin/layouts/help_document/publishing.php +++ b/admin/layouts/help_document/publishing.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage publishing.php diff --git a/admin/layouts/help_document/publlshing.php b/admin/layouts/help_document/publlshing.php index ce95e293d..5743436e3 100644 --- a/admin/layouts/help_document/publlshing.php +++ b/admin/layouts/help_document/publlshing.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage publlshing.php diff --git a/admin/layouts/joomla_component/admin_views_fullwidth.php b/admin/layouts/joomla_component/admin_views_fullwidth.php index 253e6b202..f9888e0e6 100644 --- a/admin/layouts/joomla_component/admin_views_fullwidth.php +++ b/admin/layouts/joomla_component/admin_views_fullwidth.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage admin_views_fullwidth.php diff --git a/admin/layouts/joomla_component/custom_admin_views_fullwidth.php b/admin/layouts/joomla_component/custom_admin_views_fullwidth.php index 072383c4b..b77775d80 100644 --- a/admin/layouts/joomla_component/custom_admin_views_fullwidth.php +++ b/admin/layouts/joomla_component/custom_admin_views_fullwidth.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage custom_admin_views_fullwidth.php diff --git a/admin/layouts/joomla_component/details_above.php b/admin/layouts/joomla_component/details_above.php index 583f20c8d..f0b3edbd3 100644 --- a/admin/layouts/joomla_component/details_above.php +++ b/admin/layouts/joomla_component/details_above.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_above.php diff --git a/admin/layouts/joomla_component/details_left.php b/admin/layouts/joomla_component/details_left.php index c439e322f..0f344d781 100644 --- a/admin/layouts/joomla_component/details_left.php +++ b/admin/layouts/joomla_component/details_left.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_left.php diff --git a/admin/layouts/joomla_component/details_right.php b/admin/layouts/joomla_component/details_right.php index 79e4f0f06..70d4d7400 100644 --- a/admin/layouts/joomla_component/details_right.php +++ b/admin/layouts/joomla_component/details_right.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_right.php diff --git a/admin/layouts/joomla_component/details_under.php b/admin/layouts/joomla_component/details_under.php index f18cd36e8..eb22e0b90 100644 --- a/admin/layouts/joomla_component/details_under.php +++ b/admin/layouts/joomla_component/details_under.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_under.php diff --git a/admin/layouts/joomla_component/dynamic_build_beta_fullwidth.php b/admin/layouts/joomla_component/dynamic_build_beta_fullwidth.php index f3311f122..04af55cd8 100644 --- a/admin/layouts/joomla_component/dynamic_build_beta_fullwidth.php +++ b/admin/layouts/joomla_component/dynamic_build_beta_fullwidth.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage dynamic_build_beta_fullwidth.php diff --git a/admin/layouts/joomla_component/dynamic_integration_fullwidth.php b/admin/layouts/joomla_component/dynamic_integration_fullwidth.php index 194d75f27..4de8fa2eb 100644 --- a/admin/layouts/joomla_component/dynamic_integration_fullwidth.php +++ b/admin/layouts/joomla_component/dynamic_integration_fullwidth.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage dynamic_integration_fullwidth.php diff --git a/admin/layouts/joomla_component/libs_helpers_fullwidth.php b/admin/layouts/joomla_component/libs_helpers_fullwidth.php index a2ed46d6a..80beb842c 100644 --- a/admin/layouts/joomla_component/libs_helpers_fullwidth.php +++ b/admin/layouts/joomla_component/libs_helpers_fullwidth.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage libs_helpers_fullwidth.php diff --git a/admin/layouts/joomla_component/mysql_fullwidth.php b/admin/layouts/joomla_component/mysql_fullwidth.php index 93af2553c..40a89a28c 100644 --- a/admin/layouts/joomla_component/mysql_fullwidth.php +++ b/admin/layouts/joomla_component/mysql_fullwidth.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage mysql_fullwidth.php diff --git a/admin/layouts/joomla_component/php_fullwidth.php b/admin/layouts/joomla_component/php_fullwidth.php index 6667116a3..70188127f 100644 --- a/admin/layouts/joomla_component/php_fullwidth.php +++ b/admin/layouts/joomla_component/php_fullwidth.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage php_fullwidth.php diff --git a/admin/layouts/joomla_component/publishing.php b/admin/layouts/joomla_component/publishing.php index ac42cd460..69cfb45b7 100644 --- a/admin/layouts/joomla_component/publishing.php +++ b/admin/layouts/joomla_component/publishing.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage publishing.php diff --git a/admin/layouts/joomla_component/publlshing.php b/admin/layouts/joomla_component/publlshing.php index 26d79dd4b..d24a4e422 100644 --- a/admin/layouts/joomla_component/publlshing.php +++ b/admin/layouts/joomla_component/publlshing.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage publlshing.php diff --git a/admin/layouts/joomla_component/readme_left.php b/admin/layouts/joomla_component/readme_left.php index 3c3bef3ba..7666ffbcb 100644 --- a/admin/layouts/joomla_component/readme_left.php +++ b/admin/layouts/joomla_component/readme_left.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage readme_left.php diff --git a/admin/layouts/joomla_component/readme_right.php b/admin/layouts/joomla_component/readme_right.php index b7373a84c..3fe6e30ad 100644 --- a/admin/layouts/joomla_component/readme_right.php +++ b/admin/layouts/joomla_component/readme_right.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage readme_right.php diff --git a/admin/layouts/joomla_component/settings_left.php b/admin/layouts/joomla_component/settings_left.php index 554768ac5..5160e42e9 100644 --- a/admin/layouts/joomla_component/settings_left.php +++ b/admin/layouts/joomla_component/settings_left.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage settings_left.php diff --git a/admin/layouts/joomla_component/settings_right.php b/admin/layouts/joomla_component/settings_right.php index ccdb3f3c3..f6af92aec 100644 --- a/admin/layouts/joomla_component/settings_right.php +++ b/admin/layouts/joomla_component/settings_right.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage settings_right.php diff --git a/admin/layouts/joomla_component/site_views_fullwidth.php b/admin/layouts/joomla_component/site_views_fullwidth.php index 0f4cc38be..cbf821a95 100644 --- a/admin/layouts/joomla_component/site_views_fullwidth.php +++ b/admin/layouts/joomla_component/site_views_fullwidth.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage site_views_fullwidth.php diff --git a/admin/layouts/layout/custom_script_fullwidth.php b/admin/layouts/layout/custom_script_fullwidth.php index 3c0fc146a..870de4f18 100644 --- a/admin/layouts/layout/custom_script_fullwidth.php +++ b/admin/layouts/layout/custom_script_fullwidth.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage custom_script_fullwidth.php diff --git a/admin/layouts/layout/details_fullwidth.php b/admin/layouts/layout/details_fullwidth.php index c2af6d726..6848e9d5b 100644 --- a/admin/layouts/layout/details_fullwidth.php +++ b/admin/layouts/layout/details_fullwidth.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_fullwidth.php diff --git a/admin/layouts/layout/details_left.php b/admin/layouts/layout/details_left.php index b99f3ce98..8d9f97eed 100644 --- a/admin/layouts/layout/details_left.php +++ b/admin/layouts/layout/details_left.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_left.php diff --git a/admin/layouts/layout/details_right.php b/admin/layouts/layout/details_right.php index befe5dce9..66e180256 100644 --- a/admin/layouts/layout/details_right.php +++ b/admin/layouts/layout/details_right.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_right.php diff --git a/admin/layouts/layout/details_rightside.php b/admin/layouts/layout/details_rightside.php index b398eded4..471c286f7 100644 --- a/admin/layouts/layout/details_rightside.php +++ b/admin/layouts/layout/details_rightside.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_rightside.php diff --git a/admin/layouts/layout/details_under.php b/admin/layouts/layout/details_under.php index f18cd36e8..eb22e0b90 100644 --- a/admin/layouts/layout/details_under.php +++ b/admin/layouts/layout/details_under.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_under.php diff --git a/admin/layouts/layout/publishing.php b/admin/layouts/layout/publishing.php index ac42cd460..69cfb45b7 100644 --- a/admin/layouts/layout/publishing.php +++ b/admin/layouts/layout/publishing.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage publishing.php diff --git a/admin/layouts/layout/publlshing.php b/admin/layouts/layout/publlshing.php index 26d79dd4b..d24a4e422 100644 --- a/admin/layouts/layout/publlshing.php +++ b/admin/layouts/layout/publlshing.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage publlshing.php diff --git a/admin/layouts/site_view/custom_buttons_fullwidth.php b/admin/layouts/site_view/custom_buttons_fullwidth.php index 4867fc04c..2b90b7a93 100644 --- a/admin/layouts/site_view/custom_buttons_fullwidth.php +++ b/admin/layouts/site_view/custom_buttons_fullwidth.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage custom_buttons_fullwidth.php diff --git a/admin/layouts/site_view/custom_buttons_left.php b/admin/layouts/site_view/custom_buttons_left.php index 354cec71d..7c5a9ada8 100644 --- a/admin/layouts/site_view/custom_buttons_left.php +++ b/admin/layouts/site_view/custom_buttons_left.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage custom_buttons_left.php diff --git a/admin/layouts/site_view/custom_buttons_right.php b/admin/layouts/site_view/custom_buttons_right.php index a0965b3d1..45d19d1f9 100644 --- a/admin/layouts/site_view/custom_buttons_right.php +++ b/admin/layouts/site_view/custom_buttons_right.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage custom_buttons_right.php diff --git a/admin/layouts/site_view/details_above.php b/admin/layouts/site_view/details_above.php index 583f20c8d..f0b3edbd3 100644 --- a/admin/layouts/site_view/details_above.php +++ b/admin/layouts/site_view/details_above.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_above.php diff --git a/admin/layouts/site_view/details_fullwidth.php b/admin/layouts/site_view/details_fullwidth.php index c9494d392..a738c9ed9 100644 --- a/admin/layouts/site_view/details_fullwidth.php +++ b/admin/layouts/site_view/details_fullwidth.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_fullwidth.php diff --git a/admin/layouts/site_view/details_left.php b/admin/layouts/site_view/details_left.php index 5cd5950e8..43a3bd9cb 100644 --- a/admin/layouts/site_view/details_left.php +++ b/admin/layouts/site_view/details_left.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_left.php diff --git a/admin/layouts/site_view/details_right.php b/admin/layouts/site_view/details_right.php index befe5dce9..66e180256 100644 --- a/admin/layouts/site_view/details_right.php +++ b/admin/layouts/site_view/details_right.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_right.php diff --git a/admin/layouts/site_view/details_rightside.php b/admin/layouts/site_view/details_rightside.php index 3bf6a3195..bc62e0485 100644 --- a/admin/layouts/site_view/details_rightside.php +++ b/admin/layouts/site_view/details_rightside.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_rightside.php diff --git a/admin/layouts/site_view/details_under.php b/admin/layouts/site_view/details_under.php index f18cd36e8..eb22e0b90 100644 --- a/admin/layouts/site_view/details_under.php +++ b/admin/layouts/site_view/details_under.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_under.php diff --git a/admin/layouts/site_view/javascript_css_fullwidth.php b/admin/layouts/site_view/javascript_css_fullwidth.php index 4c3b3953b..7f83679a6 100644 --- a/admin/layouts/site_view/javascript_css_fullwidth.php +++ b/admin/layouts/site_view/javascript_css_fullwidth.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage javascript_css_fullwidth.php diff --git a/admin/layouts/site_view/linked_components_fullwidth.php b/admin/layouts/site_view/linked_components_fullwidth.php index 27498cbf0..90e7c4c4a 100644 --- a/admin/layouts/site_view/linked_components_fullwidth.php +++ b/admin/layouts/site_view/linked_components_fullwidth.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage linked_components_fullwidth.php @@ -28,7 +28,7 @@ defined('_JEXEC') or die('Restricted access'); // set the defaults -$items = $displayData->vyrlinked_components; +$items = $displayData->vyslinked_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/layouts/site_view/php_fullwidth.php b/admin/layouts/site_view/php_fullwidth.php index 753555938..f0f0335e3 100644 --- a/admin/layouts/site_view/php_fullwidth.php +++ b/admin/layouts/site_view/php_fullwidth.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage php_fullwidth.php diff --git a/admin/layouts/site_view/publishing.php b/admin/layouts/site_view/publishing.php index ac42cd460..69cfb45b7 100644 --- a/admin/layouts/site_view/publishing.php +++ b/admin/layouts/site_view/publishing.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage publishing.php diff --git a/admin/layouts/site_view/publlshing.php b/admin/layouts/site_view/publlshing.php index 26d79dd4b..d24a4e422 100644 --- a/admin/layouts/site_view/publlshing.php +++ b/admin/layouts/site_view/publlshing.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage publlshing.php diff --git a/admin/layouts/snippet/details_above.php b/admin/layouts/snippet/details_above.php index 02db1da6c..85d2f8b73 100644 --- a/admin/layouts/snippet/details_above.php +++ b/admin/layouts/snippet/details_above.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_above.php diff --git a/admin/layouts/snippet/details_left.php b/admin/layouts/snippet/details_left.php index 5b3236ab4..b424160f7 100644 --- a/admin/layouts/snippet/details_left.php +++ b/admin/layouts/snippet/details_left.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_left.php diff --git a/admin/layouts/snippet/details_right.php b/admin/layouts/snippet/details_right.php index b80c3757e..b6585ebbc 100644 --- a/admin/layouts/snippet/details_right.php +++ b/admin/layouts/snippet/details_right.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_right.php diff --git a/admin/layouts/snippet/publishing.php b/admin/layouts/snippet/publishing.php index ac42cd460..69cfb45b7 100644 --- a/admin/layouts/snippet/publishing.php +++ b/admin/layouts/snippet/publishing.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage publishing.php diff --git a/admin/layouts/snippet/publlshing.php b/admin/layouts/snippet/publlshing.php index 26d79dd4b..d24a4e422 100644 --- a/admin/layouts/snippet/publlshing.php +++ b/admin/layouts/snippet/publlshing.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage publlshing.php diff --git a/admin/layouts/template/custom_script_fullwidth.php b/admin/layouts/template/custom_script_fullwidth.php index 3c0fc146a..870de4f18 100644 --- a/admin/layouts/template/custom_script_fullwidth.php +++ b/admin/layouts/template/custom_script_fullwidth.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage custom_script_fullwidth.php diff --git a/admin/layouts/template/details_fullwidth.php b/admin/layouts/template/details_fullwidth.php index 99be26f97..46936a629 100644 --- a/admin/layouts/template/details_fullwidth.php +++ b/admin/layouts/template/details_fullwidth.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_fullwidth.php diff --git a/admin/layouts/template/details_left.php b/admin/layouts/template/details_left.php index b99f3ce98..8d9f97eed 100644 --- a/admin/layouts/template/details_left.php +++ b/admin/layouts/template/details_left.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_left.php diff --git a/admin/layouts/template/details_right.php b/admin/layouts/template/details_right.php index befe5dce9..66e180256 100644 --- a/admin/layouts/template/details_right.php +++ b/admin/layouts/template/details_right.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_right.php diff --git a/admin/layouts/template/details_rightside.php b/admin/layouts/template/details_rightside.php index b398eded4..471c286f7 100644 --- a/admin/layouts/template/details_rightside.php +++ b/admin/layouts/template/details_rightside.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_rightside.php diff --git a/admin/layouts/template/details_under.php b/admin/layouts/template/details_under.php index f18cd36e8..eb22e0b90 100644 --- a/admin/layouts/template/details_under.php +++ b/admin/layouts/template/details_under.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage details_under.php diff --git a/admin/layouts/template/publishing.php b/admin/layouts/template/publishing.php index ac42cd460..69cfb45b7 100644 --- a/admin/layouts/template/publishing.php +++ b/admin/layouts/template/publishing.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage publishing.php diff --git a/admin/layouts/template/publlshing.php b/admin/layouts/template/publlshing.php index 26d79dd4b..d24a4e422 100644 --- a/admin/layouts/template/publlshing.php +++ b/admin/layouts/template/publlshing.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage publlshing.php diff --git a/admin/models/admin_view.php b/admin/models/admin_view.php index fc0acdb08..21204775b 100644 --- a/admin/models/admin_view.php +++ b/admin/models/admin_view.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 104 of this MVC - @build 6th March, 2017 + @version @update number 108 of this MVC + @build 24th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage admin_view.php @@ -95,124 +95,34 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $item->metadata = $registry->toArray(); } - if (!empty($item->html_import_view)) - { - // base64 Decode html_import_view. - $item->html_import_view = base64_decode($item->html_import_view); - } - - if (!empty($item->php_import_setdata)) - { - // base64 Decode php_import_setdata. - $item->php_import_setdata = base64_decode($item->php_import_setdata); - } - - if (!empty($item->css_view)) - { - // base64 Decode css_view. - $item->css_view = base64_decode($item->css_view); - } - - if (!empty($item->php_getitem)) - { - // base64 Decode php_getitem. - $item->php_getitem = base64_decode($item->php_getitem); - } - - if (!empty($item->php_getitems)) - { - // base64 Decode php_getitems. - $item->php_getitems = base64_decode($item->php_getitems); - } - - if (!empty($item->css_views)) - { - // base64 Decode css_views. - $item->css_views = base64_decode($item->css_views); - } - if (!empty($item->php_getitems_after_all)) { // base64 Decode php_getitems_after_all. $item->php_getitems_after_all = base64_decode($item->php_getitems_after_all); } - if (!empty($item->php_getlistquery)) - { - // base64 Decode php_getlistquery. - $item->php_getlistquery = base64_decode($item->php_getlistquery); - } - - if (!empty($item->javascript_view_file)) - { - // base64 Decode javascript_view_file. - $item->javascript_view_file = base64_decode($item->javascript_view_file); - } - - if (!empty($item->php_save)) - { - // base64 Decode php_save. - $item->php_save = base64_decode($item->php_save); - } - - if (!empty($item->php_postsavehook)) - { - // base64 Decode php_postsavehook. - $item->php_postsavehook = base64_decode($item->php_postsavehook); - } - - if (!empty($item->javascript_view_footer)) - { - // base64 Decode javascript_view_footer. - $item->javascript_view_footer = base64_decode($item->javascript_view_footer); - } - - if (!empty($item->php_allowedit)) - { - // base64 Decode php_allowedit. - $item->php_allowedit = base64_decode($item->php_allowedit); - } - - if (!empty($item->php_batchcopy)) - { - // base64 Decode php_batchcopy. - $item->php_batchcopy = base64_decode($item->php_batchcopy); - } - - if (!empty($item->javascript_views_file)) - { - // base64 Decode javascript_views_file. - $item->javascript_views_file = base64_decode($item->javascript_views_file); - } - - if (!empty($item->php_batchmove)) - { - // base64 Decode php_batchmove. - $item->php_batchmove = base64_decode($item->php_batchmove); - } - - if (!empty($item->php_before_publish)) - { - // base64 Decode php_before_publish. - $item->php_before_publish = base64_decode($item->php_before_publish); - } - - if (!empty($item->javascript_views_footer)) - { - // base64 Decode javascript_views_footer. - $item->javascript_views_footer = base64_decode($item->javascript_views_footer); - } - if (!empty($item->php_after_publish)) { // base64 Decode php_after_publish. $item->php_after_publish = base64_decode($item->php_after_publish); } - if (!empty($item->php_before_delete)) + if (!empty($item->php_allowedit)) { - // base64 Decode php_before_delete. - $item->php_before_delete = base64_decode($item->php_before_delete); + // base64 Decode php_allowedit. + $item->php_allowedit = base64_decode($item->php_allowedit); + } + + if (!empty($item->php_save)) + { + // base64 Decode php_save. + $item->php_save = base64_decode($item->php_save); + } + + if (!empty($item->php_batchmove)) + { + // base64 Decode php_batchmove. + $item->php_batchmove = base64_decode($item->php_batchmove); } if (!empty($item->php_after_delete)) @@ -221,10 +131,46 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $item->php_after_delete = base64_decode($item->php_after_delete); } - if (!empty($item->php_controller)) + if (!empty($item->php_getitems)) { - // base64 Decode php_controller. - $item->php_controller = base64_decode($item->php_controller); + // base64 Decode php_getitems. + $item->php_getitems = base64_decode($item->php_getitems); + } + + if (!empty($item->php_getlistquery)) + { + // base64 Decode php_getlistquery. + $item->php_getlistquery = base64_decode($item->php_getlistquery); + } + + if (!empty($item->php_postsavehook)) + { + // base64 Decode php_postsavehook. + $item->php_postsavehook = base64_decode($item->php_postsavehook); + } + + if (!empty($item->php_batchcopy)) + { + // base64 Decode php_batchcopy. + $item->php_batchcopy = base64_decode($item->php_batchcopy); + } + + if (!empty($item->php_before_publish)) + { + // base64 Decode php_before_publish. + $item->php_before_publish = base64_decode($item->php_before_publish); + } + + if (!empty($item->php_before_delete)) + { + // base64 Decode php_before_delete. + $item->php_before_delete = base64_decode($item->php_before_delete); + } + + if (!empty($item->php_import)) + { + // base64 Decode php_import. + $item->php_import = base64_decode($item->php_import); } if (!empty($item->php_document)) @@ -233,6 +179,72 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $item->php_document = base64_decode($item->php_document); } + if (!empty($item->sql)) + { + // base64 Decode sql. + $item->sql = base64_decode($item->sql); + } + + if (!empty($item->php_getitem)) + { + // base64 Decode php_getitem. + $item->php_getitem = base64_decode($item->php_getitem); + } + + if (!empty($item->php_import_display)) + { + // base64 Decode php_import_display. + $item->php_import_display = base64_decode($item->php_import_display); + } + + if (!empty($item->php_import_save)) + { + // base64 Decode php_import_save. + $item->php_import_save = base64_decode($item->php_import_save); + } + + if (!empty($item->css_view)) + { + // base64 Decode css_view. + $item->css_view = base64_decode($item->css_view); + } + + if (!empty($item->css_views)) + { + // base64 Decode css_views. + $item->css_views = base64_decode($item->css_views); + } + + if (!empty($item->javascript_view_file)) + { + // base64 Decode javascript_view_file. + $item->javascript_view_file = base64_decode($item->javascript_view_file); + } + + if (!empty($item->javascript_view_footer)) + { + // base64 Decode javascript_view_footer. + $item->javascript_view_footer = base64_decode($item->javascript_view_footer); + } + + if (!empty($item->javascript_views_file)) + { + // base64 Decode javascript_views_file. + $item->javascript_views_file = base64_decode($item->javascript_views_file); + } + + if (!empty($item->javascript_views_footer)) + { + // base64 Decode javascript_views_footer. + $item->javascript_views_footer = base64_decode($item->javascript_views_footer); + } + + if (!empty($item->php_controller)) + { + // base64 Decode php_controller. + $item->php_controller = base64_decode($item->php_controller); + } + if (!empty($item->php_controller_list)) { // base64 Decode php_controller_list. @@ -245,22 +257,16 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $item->php_model = base64_decode($item->php_model); } - if (!empty($item->sql)) - { - // base64 Decode sql. - $item->sql = base64_decode($item->sql); - } - if (!empty($item->php_model_list)) { // base64 Decode php_model_list. $item->php_model_list = base64_decode($item->php_model_list); } - if (!empty($item->php_import_display)) + if (!empty($item->html_import_view)) { - // base64 Decode php_import_display. - $item->php_import_display = base64_decode($item->php_import_display); + // base64 Decode html_import_view. + $item->html_import_view = base64_decode($item->html_import_view); } if (!empty($item->php_ajaxmethod)) @@ -269,16 +275,16 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $item->php_ajaxmethod = base64_decode($item->php_ajaxmethod); } - if (!empty($item->php_import)) + if (!empty($item->php_import_setdata)) { - // base64 Decode php_import. - $item->php_import = base64_decode($item->php_import); + // base64 Decode php_import_setdata. + $item->php_import_setdata = base64_decode($item->php_import_setdata); } - if (!empty($item->php_import_save)) + if (!empty($item->php_import_ext)) { - // base64 Decode php_import_save. - $item->php_import_save = base64_decode($item->php_import_save); + // base64 Decode php_import_ext. + $item->php_import_ext = base64_decode($item->php_import_ext); } if (!empty($item->id)) @@ -298,7 +304,7 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin * * @return mixed An array of data items on success, false on failure. */ - public function getVxvfields() + public function getVxwfields() { // Get the user object. $user = JFactory::getUser(); @@ -367,13 +373,13 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin foreach ($items as $nr => &$item) { // convert datatype - $item->datatype = $this->selectionTranslationVxvfields($item->datatype, 'datatype'); + $item->datatype = $this->selectionTranslationVxwfields($item->datatype, 'datatype'); // convert indexes - $item->indexes = $this->selectionTranslationVxvfields($item->indexes, 'indexes'); + $item->indexes = $this->selectionTranslationVxwfields($item->indexes, 'indexes'); // convert null_switch - $item->null_switch = $this->selectionTranslationVxvfields($item->null_switch, 'null_switch'); + $item->null_switch = $this->selectionTranslationVxwfields($item->null_switch, 'null_switch'); // convert store - $item->store = $this->selectionTranslationVxvfields($item->store, 'store'); + $item->store = $this->selectionTranslationVxwfields($item->store, 'store'); } } @@ -413,7 +419,7 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin * * @return translatable string */ - public function selectionTranslationVxvfields($value,$name) + public function selectionTranslationVxwfields($value,$name) { // Array of datatype language strings if ($name === 'datatype') @@ -491,7 +497,7 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin * * @return mixed An array of data items on success, false on failure. */ - public function getVxwlinked_components() + public function getVxxlinked_components() { // Get the user object. $user = JFactory::getUser(); @@ -1272,124 +1278,34 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $data['metadata'] = (string) $metadata; } - // Set the html_import_view string to base64 string. - if (isset($data['html_import_view'])) - { - $data['html_import_view'] = base64_encode($data['html_import_view']); - } - - // Set the php_import_setdata string to base64 string. - if (isset($data['php_import_setdata'])) - { - $data['php_import_setdata'] = base64_encode($data['php_import_setdata']); - } - - // Set the css_view string to base64 string. - if (isset($data['css_view'])) - { - $data['css_view'] = base64_encode($data['css_view']); - } - - // Set the php_getitem string to base64 string. - if (isset($data['php_getitem'])) - { - $data['php_getitem'] = base64_encode($data['php_getitem']); - } - - // Set the php_getitems string to base64 string. - if (isset($data['php_getitems'])) - { - $data['php_getitems'] = base64_encode($data['php_getitems']); - } - - // Set the css_views string to base64 string. - if (isset($data['css_views'])) - { - $data['css_views'] = base64_encode($data['css_views']); - } - // Set the php_getitems_after_all string to base64 string. if (isset($data['php_getitems_after_all'])) { $data['php_getitems_after_all'] = base64_encode($data['php_getitems_after_all']); } - // Set the php_getlistquery string to base64 string. - if (isset($data['php_getlistquery'])) - { - $data['php_getlistquery'] = base64_encode($data['php_getlistquery']); - } - - // Set the javascript_view_file string to base64 string. - if (isset($data['javascript_view_file'])) - { - $data['javascript_view_file'] = base64_encode($data['javascript_view_file']); - } - - // Set the php_save string to base64 string. - if (isset($data['php_save'])) - { - $data['php_save'] = base64_encode($data['php_save']); - } - - // Set the php_postsavehook string to base64 string. - if (isset($data['php_postsavehook'])) - { - $data['php_postsavehook'] = base64_encode($data['php_postsavehook']); - } - - // Set the javascript_view_footer string to base64 string. - if (isset($data['javascript_view_footer'])) - { - $data['javascript_view_footer'] = base64_encode($data['javascript_view_footer']); - } - - // Set the php_allowedit string to base64 string. - if (isset($data['php_allowedit'])) - { - $data['php_allowedit'] = base64_encode($data['php_allowedit']); - } - - // Set the php_batchcopy string to base64 string. - if (isset($data['php_batchcopy'])) - { - $data['php_batchcopy'] = base64_encode($data['php_batchcopy']); - } - - // Set the javascript_views_file string to base64 string. - if (isset($data['javascript_views_file'])) - { - $data['javascript_views_file'] = base64_encode($data['javascript_views_file']); - } - - // Set the php_batchmove string to base64 string. - if (isset($data['php_batchmove'])) - { - $data['php_batchmove'] = base64_encode($data['php_batchmove']); - } - - // Set the php_before_publish string to base64 string. - if (isset($data['php_before_publish'])) - { - $data['php_before_publish'] = base64_encode($data['php_before_publish']); - } - - // Set the javascript_views_footer string to base64 string. - if (isset($data['javascript_views_footer'])) - { - $data['javascript_views_footer'] = base64_encode($data['javascript_views_footer']); - } - // Set the php_after_publish string to base64 string. if (isset($data['php_after_publish'])) { $data['php_after_publish'] = base64_encode($data['php_after_publish']); } - // Set the php_before_delete string to base64 string. - if (isset($data['php_before_delete'])) + // Set the php_allowedit string to base64 string. + if (isset($data['php_allowedit'])) { - $data['php_before_delete'] = base64_encode($data['php_before_delete']); + $data['php_allowedit'] = base64_encode($data['php_allowedit']); + } + + // Set the php_save string to base64 string. + if (isset($data['php_save'])) + { + $data['php_save'] = base64_encode($data['php_save']); + } + + // Set the php_batchmove string to base64 string. + if (isset($data['php_batchmove'])) + { + $data['php_batchmove'] = base64_encode($data['php_batchmove']); } // Set the php_after_delete string to base64 string. @@ -1398,10 +1314,46 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $data['php_after_delete'] = base64_encode($data['php_after_delete']); } - // Set the php_controller string to base64 string. - if (isset($data['php_controller'])) + // Set the php_getitems string to base64 string. + if (isset($data['php_getitems'])) { - $data['php_controller'] = base64_encode($data['php_controller']); + $data['php_getitems'] = base64_encode($data['php_getitems']); + } + + // Set the php_getlistquery string to base64 string. + if (isset($data['php_getlistquery'])) + { + $data['php_getlistquery'] = base64_encode($data['php_getlistquery']); + } + + // Set the php_postsavehook string to base64 string. + if (isset($data['php_postsavehook'])) + { + $data['php_postsavehook'] = base64_encode($data['php_postsavehook']); + } + + // Set the php_batchcopy string to base64 string. + if (isset($data['php_batchcopy'])) + { + $data['php_batchcopy'] = base64_encode($data['php_batchcopy']); + } + + // Set the php_before_publish string to base64 string. + if (isset($data['php_before_publish'])) + { + $data['php_before_publish'] = base64_encode($data['php_before_publish']); + } + + // Set the php_before_delete string to base64 string. + if (isset($data['php_before_delete'])) + { + $data['php_before_delete'] = base64_encode($data['php_before_delete']); + } + + // Set the php_import string to base64 string. + if (isset($data['php_import'])) + { + $data['php_import'] = base64_encode($data['php_import']); } // Set the php_document string to base64 string. @@ -1410,6 +1362,72 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $data['php_document'] = base64_encode($data['php_document']); } + // Set the sql string to base64 string. + if (isset($data['sql'])) + { + $data['sql'] = base64_encode($data['sql']); + } + + // Set the php_getitem string to base64 string. + if (isset($data['php_getitem'])) + { + $data['php_getitem'] = base64_encode($data['php_getitem']); + } + + // Set the php_import_display string to base64 string. + if (isset($data['php_import_display'])) + { + $data['php_import_display'] = base64_encode($data['php_import_display']); + } + + // Set the php_import_save string to base64 string. + if (isset($data['php_import_save'])) + { + $data['php_import_save'] = base64_encode($data['php_import_save']); + } + + // Set the css_view string to base64 string. + if (isset($data['css_view'])) + { + $data['css_view'] = base64_encode($data['css_view']); + } + + // Set the css_views string to base64 string. + if (isset($data['css_views'])) + { + $data['css_views'] = base64_encode($data['css_views']); + } + + // Set the javascript_view_file string to base64 string. + if (isset($data['javascript_view_file'])) + { + $data['javascript_view_file'] = base64_encode($data['javascript_view_file']); + } + + // Set the javascript_view_footer string to base64 string. + if (isset($data['javascript_view_footer'])) + { + $data['javascript_view_footer'] = base64_encode($data['javascript_view_footer']); + } + + // Set the javascript_views_file string to base64 string. + if (isset($data['javascript_views_file'])) + { + $data['javascript_views_file'] = base64_encode($data['javascript_views_file']); + } + + // Set the javascript_views_footer string to base64 string. + if (isset($data['javascript_views_footer'])) + { + $data['javascript_views_footer'] = base64_encode($data['javascript_views_footer']); + } + + // Set the php_controller string to base64 string. + if (isset($data['php_controller'])) + { + $data['php_controller'] = base64_encode($data['php_controller']); + } + // Set the php_controller_list string to base64 string. if (isset($data['php_controller_list'])) { @@ -1422,22 +1440,16 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $data['php_model'] = base64_encode($data['php_model']); } - // Set the sql string to base64 string. - if (isset($data['sql'])) - { - $data['sql'] = base64_encode($data['sql']); - } - // Set the php_model_list string to base64 string. if (isset($data['php_model_list'])) { $data['php_model_list'] = base64_encode($data['php_model_list']); } - // Set the php_import_display string to base64 string. - if (isset($data['php_import_display'])) + // Set the html_import_view string to base64 string. + if (isset($data['html_import_view'])) { - $data['php_import_display'] = base64_encode($data['php_import_display']); + $data['html_import_view'] = base64_encode($data['html_import_view']); } // Set the php_ajaxmethod string to base64 string. @@ -1446,16 +1458,16 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $data['php_ajaxmethod'] = base64_encode($data['php_ajaxmethod']); } - // Set the php_import string to base64 string. - if (isset($data['php_import'])) + // Set the php_import_setdata string to base64 string. + if (isset($data['php_import_setdata'])) { - $data['php_import'] = base64_encode($data['php_import']); + $data['php_import_setdata'] = base64_encode($data['php_import_setdata']); } - // Set the php_import_save string to base64 string. - if (isset($data['php_import_save'])) + // Set the php_import_ext string to base64 string. + if (isset($data['php_import_ext'])) { - $data['php_import_save'] = base64_encode($data['php_import_save']); + $data['php_import_ext'] = base64_encode($data['php_import_ext']); } // Sort fields by "Tab" ASC, "Order in Edit" ASC diff --git a/admin/models/admin_views.php b/admin/models/admin_views.php index c948a0f9d..0339ef6ad 100644 --- a/admin/models/admin_views.php +++ b/admin/models/admin_views.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 104 of this MVC - @build 6th March, 2017 + @version @update number 108 of this MVC + @build 24th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage admin_views.php @@ -262,68 +262,70 @@ class ComponentbuilderModelAdmin_views extends JModelList continue; } - // decode html_import_view - $item->html_import_view = base64_decode($item->html_import_view); - // decode php_import_setdata - $item->php_import_setdata = base64_decode($item->php_import_setdata); - // decode css_view - $item->css_view = base64_decode($item->css_view); - // decode php_getitem - $item->php_getitem = base64_decode($item->php_getitem); - // decode php_getitems - $item->php_getitems = base64_decode($item->php_getitems); - // decode css_views - $item->css_views = base64_decode($item->css_views); // decode php_getitems_after_all $item->php_getitems_after_all = base64_decode($item->php_getitems_after_all); - // decode php_getlistquery - $item->php_getlistquery = base64_decode($item->php_getlistquery); - // decode javascript_view_file - $item->javascript_view_file = base64_decode($item->javascript_view_file); - // decode php_save - $item->php_save = base64_decode($item->php_save); - // decode php_postsavehook - $item->php_postsavehook = base64_decode($item->php_postsavehook); - // decode javascript_view_footer - $item->javascript_view_footer = base64_decode($item->javascript_view_footer); - // decode php_allowedit - $item->php_allowedit = base64_decode($item->php_allowedit); - // decode php_batchcopy - $item->php_batchcopy = base64_decode($item->php_batchcopy); - // decode javascript_views_file - $item->javascript_views_file = base64_decode($item->javascript_views_file); - // decode php_batchmove - $item->php_batchmove = base64_decode($item->php_batchmove); - // decode php_before_publish - $item->php_before_publish = base64_decode($item->php_before_publish); - // decode javascript_views_footer - $item->javascript_views_footer = base64_decode($item->javascript_views_footer); // decode php_after_publish $item->php_after_publish = base64_decode($item->php_after_publish); - // decode php_before_delete - $item->php_before_delete = base64_decode($item->php_before_delete); + // decode php_allowedit + $item->php_allowedit = base64_decode($item->php_allowedit); + // decode php_save + $item->php_save = base64_decode($item->php_save); + // decode php_batchmove + $item->php_batchmove = base64_decode($item->php_batchmove); // decode php_after_delete $item->php_after_delete = base64_decode($item->php_after_delete); - // decode php_controller - $item->php_controller = base64_decode($item->php_controller); + // decode php_getitems + $item->php_getitems = base64_decode($item->php_getitems); + // decode php_getlistquery + $item->php_getlistquery = base64_decode($item->php_getlistquery); + // decode php_postsavehook + $item->php_postsavehook = base64_decode($item->php_postsavehook); + // decode php_batchcopy + $item->php_batchcopy = base64_decode($item->php_batchcopy); + // decode php_before_publish + $item->php_before_publish = base64_decode($item->php_before_publish); + // decode php_before_delete + $item->php_before_delete = base64_decode($item->php_before_delete); + // decode php_import + $item->php_import = base64_decode($item->php_import); // decode php_document $item->php_document = base64_decode($item->php_document); + // decode sql + $item->sql = base64_decode($item->sql); + // decode php_getitem + $item->php_getitem = base64_decode($item->php_getitem); + // decode php_import_display + $item->php_import_display = base64_decode($item->php_import_display); + // decode php_import_save + $item->php_import_save = base64_decode($item->php_import_save); + // decode css_view + $item->css_view = base64_decode($item->css_view); + // decode css_views + $item->css_views = base64_decode($item->css_views); + // decode javascript_view_file + $item->javascript_view_file = base64_decode($item->javascript_view_file); + // decode javascript_view_footer + $item->javascript_view_footer = base64_decode($item->javascript_view_footer); + // decode javascript_views_file + $item->javascript_views_file = base64_decode($item->javascript_views_file); + // decode javascript_views_footer + $item->javascript_views_footer = base64_decode($item->javascript_views_footer); + // decode php_controller + $item->php_controller = base64_decode($item->php_controller); // decode php_controller_list $item->php_controller_list = base64_decode($item->php_controller_list); // decode php_model $item->php_model = base64_decode($item->php_model); - // decode sql - $item->sql = base64_decode($item->sql); // decode php_model_list $item->php_model_list = base64_decode($item->php_model_list); - // decode php_import_display - $item->php_import_display = base64_decode($item->php_import_display); + // decode html_import_view + $item->html_import_view = base64_decode($item->html_import_view); // decode php_ajaxmethod $item->php_ajaxmethod = base64_decode($item->php_ajaxmethod); - // decode php_import - $item->php_import = base64_decode($item->php_import); - // decode php_import_save - $item->php_import_save = base64_decode($item->php_import_save); + // decode php_import_setdata + $item->php_import_setdata = base64_decode($item->php_import_setdata); + // decode php_import_ext + $item->php_import_ext = base64_decode($item->php_import_ext); // unset the values we don't want exported. unset($item->asset_id); unset($item->checked_out); diff --git a/admin/models/ajax.php b/admin/models/ajax.php index 2a1c55914..a6023880d 100644 --- a/admin/models/ajax.php +++ b/admin/models/ajax.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage ajax.php @@ -150,631 +150,10 @@ class ComponentbuilderModelAjax extends JModelList } // Used in admin_view - public function getImportScripts($type) + public static function getImportScripts($type) { - $script = array(); - if ('display' == $type) - { - // set the display script - $script['display'][] = "\tprotected \$headerList;"; - $script['display'][] = "\tprotected \$hasPackage = false;"; - $script['display'][] = "\tprotected \$headers;"; - $script['display'][] = "\tprotected \$hasHeader = 0;"; - $script['display'][] = "\tprotected \$dataType;"; - $script['display'][] = "\n\tpublic function display(\$tpl = null)"; - $script['display'][] = "\t{"; - $script['display'][] = "\t\tif (\$this->getLayout() !== 'modal')"; - $script['display'][] = "\t\t{"; - $script['display'][] = "\t\t\t// Include helper submenu"; - $script['display'][] = "\t\t\t###-#-#-Component###Helper::addSubmenu('import');"; - $script['display'][] = "\t\t}"; - $script['display'][] = "\n\t\t// Check for errors."; - $script['display'][] = "\t\tif (count(\$errors = \$this->get('Errors'))){"; - $script['display'][] = "\t\t\tJError::raiseError(500, implode('
', \$errors));"; - $script['display'][] = "\t\t\treturn false;"; - $script['display'][] = "\t\t}"; - $script['display'][] = "\n\t\t\$paths = new stdClass;"; - $script['display'][] = "\t\t\$paths->first = '';"; - $script['display'][] = "\t\t\$state = \$this->get('state');"; - $script['display'][] = "\n\t\t\$this->paths = &\$paths;"; - $script['display'][] = "\t\t\$this->state = &\$state;"; - $script['display'][] = "\t\t// get global action permissions"; - $script['display'][] = "\t\t\$this->canDo = ###-#-#-Component###Helper::getActions('import');"; - $script['display'][] = "\n\t\t// We don't need toolbar in the modal window."; - $script['display'][] = "\t\tif (\$this->getLayout() !== 'modal')"; - $script['display'][] = "\t\t{"; - $script['display'][] = "\t\t\t\$this->addToolbar();"; - $script['display'][] = "\t\t\t\$this->sidebar = JHtmlSidebar::render();"; - $script['display'][] = "\t\t}"; - $script['display'][] = "\n\t\t// get the session object"; - $script['display'][] = "\t\t\$session = JFactory::getSession();"; - $script['display'][] = "\t\t// check if it has package"; - $script['display'][] = "\t\t\$this->hasPackage \t= \$session->get('hasPackage', false);"; - $script['display'][] = "\t\t\$this->dataType \t= \$session->get('dataType', false);"; - $script['display'][] = "\t\tif(\$this->hasPackage && \$this->dataType)"; - $script['display'][] = "\t\t{"; - $script['display'][] = "\t\t\t\$this->headerList \t= json_decode(\$session->get(\$this->dataType.'_VDM_IMPORTHEADERS', false),true);"; - $script['display'][] = "\t\t\t\$this->headers \t\t= ###-#-#-Component###Helper::getFileHeaders(\$this->dataType);"; - $script['display'][] = "\t\t\t// clear the data type"; - $script['display'][] = "\t\t\t\$session->clear('dataType');"; - $script['display'][] = "\t\t}"; - $script['display'][] = "\n\t\t// Display the template"; - $script['display'][] = "\t\tparent::display(\$tpl);"; - $script['display'][] = "\t}"; - } - elseif ('setdata' == $type) - { - // set the setdata script - $script['setdata'] = array(); - $script['setdata'][] = "\t/**"; - $script['setdata'][] = "\t* Set the data from the spreadsheet to the database"; - $script['setdata'][] = "\t*"; - $script['setdata'][] = "\t* @param string \$package Paths to the uploaded package file"; - $script['setdata'][] = "\t*"; - $script['setdata'][] = "\t* @return boolean false on failure"; - $script['setdata'][] = "\t*"; - $script['setdata'][] = "\t**/"; - $script['setdata'][] = "\tprotected function setData(\$package,\$table,\$target_headers)"; - $script['setdata'][] = "\t{"; - $script['setdata'][] = "\t\tif (###-#-#-Component###Helper::checkArray(\$target_headers))"; - $script['setdata'][] = "\t\t{"; - $script['setdata'][] = "\t\t\t// make sure the file is loaded\t\t"; - $script['setdata'][] = "\t\t\tJLoader::import('PHPExcel', JPATH_COMPONENT_ADMINISTRATOR . '/helpers');"; - $script['setdata'][] = "\t\t\t\$jinput = JFactory::getApplication()->input;"; - $script['setdata'][] = "\t\t\tforeach(\$target_headers as \$header)"; - $script['setdata'][] = "\t\t\t{"; - $script['setdata'][] = "\t\t\t\t\$data['target_headers'][\$header] = \$jinput->getString(\$header, null);"; - $script['setdata'][] = "\t\t\t}"; - $script['setdata'][] = "\t\t\t// set the data"; - $script['setdata'][] = "\t\t\tif(isset(\$package['dir']))"; - $script['setdata'][] = "\t\t\t{"; - $script['setdata'][] = "\t\t\t\t\$inputFileType = PHPExcel_IOFactory::identify(\$package['dir']);"; - $script['setdata'][] = "\t\t\t\t\$excelReader = PHPExcel_IOFactory::createReader(\$inputFileType);"; - $script['setdata'][] = "\t\t\t\t\$excelReader->setReadDataOnly(true);"; - $script['setdata'][] = "\t\t\t\t\$excelObj = \$excelReader->load(\$package['dir']);"; - $script['setdata'][] = "\t\t\t\t\$data['array'] = \$excelObj->getActiveSheet()->toArray(null, true,true,true);"; - $script['setdata'][] = "\t\t\t\t\$excelObj->disconnectWorksheets();"; - $script['setdata'][] = "\t\t\t\tunset(\$excelObj);"; - $script['setdata'][] = "\t\t\t\treturn \$this->save(\$data,\$table);"; - $script['setdata'][] = "\t\t\t}"; - $script['setdata'][] = "\t\t}"; - $script['setdata'][] = "\t\treturn false;"; - $script['setdata'][] = "\t}"; - } - elseif ('save' == $type) - { - $script['save'] = array(); - $script['save'][] = "\t/**"; - $script['save'][] = "\t* Save the data from the file to the database"; - $script['save'][] = "\t*"; - $script['save'][] = "\t* @param string \$package Paths to the uploaded package file"; - $script['save'][] = "\t*"; - $script['save'][] = "\t* @return boolean false on failure"; - $script['save'][] = "\t*"; - $script['save'][] = "\t**/"; - $script['save'][] = "\tprotected function save(\$data,\$table)"; - $script['save'][] = "\t{"; - $script['save'][] = "\t\t// import the data if there is any"; - $script['save'][] = "\t\tif(###-#-#-Component###Helper::checkArray(\$data['array']))"; - $script['save'][] = "\t\t{"; - $script['save'][] = "\t\t\t// get user object"; - $script['save'][] = "\t\t\t\$user \t\t= JFactory::getUser();"; - $script['save'][] = "\t\t\t// remove header if it has headers"; - $script['save'][] = "\t\t\t\$id_key \t= \$data['target_headers']['id'];"; - $script['save'][] = "\t\t\t\$published_key \t= \$data['target_headers']['published'];"; - $script['save'][] = "\t\t\t\$ordering_key \t= \$data['target_headers']['ordering'];"; - $script['save'][] = "\t\t\t// get the first array set"; - $script['save'][] = "\t\t\t\$firstSet = reset(\$data['array']);"; - $script['save'][] = ""; - $script['save'][] = "\t\t\t// check if first array is a header array and remove if true"; - $script['save'][] = "\t\t\tif(\$firstSet[\$id_key] == 'id' || \$firstSet[\$published_key] == 'published' || \$firstSet[\$ordering_key] == 'ordering')"; - $script['save'][] = "\t\t\t{"; - $script['save'][] = "\t\t\t\tarray_shift(\$data['array']);"; - $script['save'][] = "\t\t\t}"; - $script['save'][] = "\t\t\t"; - $script['save'][] = "\t\t\t// make sure there is still values in array and that it was not only headers"; - $script['save'][] = "\t\t\tif(###-#-#-Component###Helper::checkArray(\$data['array']) && \$user->authorise(\$table.'.import', 'com_###-#-#-component###') && \$user->authorise('core.import', 'com_###-#-#-component###'))"; - $script['save'][] = "\t\t\t{"; - $script['save'][] = "\t\t\t\t// set target."; - $script['save'][] = "\t\t\t\t\$target\t= array_flip(\$data['target_headers']);"; - $script['save'][] = "\t\t\t\t// Get a db connection."; - $script['save'][] = "\t\t\t\t\$db = JFactory::getDbo();"; - $script['save'][] = "\t\t\t\t// set some defaults"; - $script['save'][] = "\t\t\t\t\$todayDate\t\t= JFactory::getDate()->toSql();"; - $script['save'][] = "\t\t\t\t// get global action permissions"; - $script['save'][] = "\t\t\t\t\$canDo\t\t\t= ###-#-#-Component###Helper::getActions(\$table);"; - $script['save'][] = "\t\t\t\t\$canEdit\t\t= \$canDo->get('core.edit');"; - $script['save'][] = "\t\t\t\t\$canState\t\t= \$canDo->get('core.edit.state');"; - $script['save'][] = "\t\t\t\t\$canCreate\t\t= \$canDo->get('core.create');"; - $script['save'][] = "\t\t\t\t\$hasAlias\t\t= \$this->getAliasesUsed(\$table);"; - $script['save'][] = "\t\t\t\t// prosses the data"; - $script['save'][] = "\t\t\t\tforeach(\$data['array'] as \$row)"; - $script['save'][] = "\t\t\t\t{"; - $script['save'][] = "\t\t\t\t\t\$found = false;"; - $script['save'][] = "\t\t\t\t\tif (isset(\$row[\$id_key]) && is_numeric(\$row[\$id_key]) && \$row[\$id_key] > 0)"; - $script['save'][] = "\t\t\t\t\t{"; - $script['save'][] = "\t\t\t\t\t\t// raw items import & update!"; - $script['save'][] = "\t\t\t\t\t\t\$query = \$db->getQuery(true);"; - $script['save'][] = "\t\t\t\t\t\t\$query"; - $script['save'][] = "\t\t\t\t\t\t\t->select('version')"; - $script['save'][] = "\t\t\t\t\t\t\t->from(\$db->quoteName('#__###-#-#-component###_'.\$table))"; - $script['save'][] = "\t\t\t\t\t\t\t->where(\$db->quoteName('id') . ' = '. \$db->quote(\$row[\$id_key]));"; - $script['save'][] = "\t\t\t\t\t\t// Reset the query using our newly populated query object."; - $script['save'][] = "\t\t\t\t\t\t\$db->setQuery(\$query);"; - $script['save'][] = "\t\t\t\t\t\t\$db->execute();"; - $script['save'][] = "\t\t\t\t\t\t\$found = \$db->getNumRows();"; - $script['save'][] = "\t\t\t\t\t}"; - $script['save'][] = "\t\t\t\t\t"; - $script['save'][] = "\t\t\t\t\tif(\$found && \$canEdit)"; - $script['save'][] = "\t\t\t\t\t{"; - $script['save'][] = "\t\t\t\t\t\t// update item"; - $script['save'][] = "\t\t\t\t\t\t\$id \t\t= \$row[\$id_key];"; - $script['save'][] = "\t\t\t\t\t\t\$version\t= \$db->loadResult();"; - $script['save'][] = "\t\t\t\t\t\t// reset all buckets"; - $script['save'][] = "\t\t\t\t\t\t\$query \t\t= \$db->getQuery(true);"; - $script['save'][] = "\t\t\t\t\t\t\$fields \t= array();"; - $script['save'][] = "\t\t\t\t\t\t// Fields to update."; - $script['save'][] = "\t\t\t\t\t\tforeach(\$row as \$key => \$cell)"; - $script['save'][] = "\t\t\t\t\t\t{"; - $script['save'][] = "\t\t\t\t\t\t\t// ignore column"; - $script['save'][] = "\t\t\t\t\t\t\tif ('IGNORE' == \$target[\$key])"; - $script['save'][] = "\t\t\t\t\t\t\t{"; - $script['save'][] = "\t\t\t\t\t\t\t\tcontinue;"; - $script['save'][] = "\t\t\t\t\t\t\t}"; - $script['save'][] = "\t\t\t\t\t\t\t// update modified"; - $script['save'][] = "\t\t\t\t\t\t\tif ('modified_by' == \$target[\$key])"; - $script['save'][] = "\t\t\t\t\t\t\t{"; - $script['save'][] = "\t\t\t\t\t\t\t\tcontinue;"; - $script['save'][] = "\t\t\t\t\t\t\t}"; - $script['save'][] = "\t\t\t\t\t\t\t// update modified"; - $script['save'][] = "\t\t\t\t\t\t\tif ('modified' == \$target[\$key])"; - $script['save'][] = "\t\t\t\t\t\t\t{"; - $script['save'][] = "\t\t\t\t\t\t\t\tcontinue;"; - $script['save'][] = "\t\t\t\t\t\t\t}"; - $script['save'][] = "\t\t\t\t\t\t\t// update version"; - $script['save'][] = "\t\t\t\t\t\t\tif ('version' == \$target[\$key])"; - $script['save'][] = "\t\t\t\t\t\t\t{"; - $script['save'][] = "\t\t\t\t\t\t\t\t\$cell = (int) \$version + 1;"; - $script['save'][] = "\t\t\t\t\t\t\t}"; - $script['save'][] = "\t\t\t\t\t\t\t// verify publish authority"; - $script['save'][] = "\t\t\t\t\t\t\tif ('published' == \$target[\$key] && !\$canState)"; - $script['save'][] = "\t\t\t\t\t\t\t{"; - $script['save'][] = "\t\t\t\t\t\t\t\tcontinue;"; - $script['save'][] = "\t\t\t\t\t\t\t}"; - $script['save'][] = "\t\t\t\t\t\t\t// set to update array"; - $script['save'][] = "\t\t\t\t\t\t\tif(in_array(\$key, \$data['target_headers']) && is_numeric(\$cell))"; - $script['save'][] = "\t\t\t\t\t\t\t{"; - $script['save'][] = "\t\t\t\t\t\t\t\t\$fields[] = \$db->quoteName(\$target[\$key]) . ' = ' . \$cell;"; - $script['save'][] = "\t\t\t\t\t\t\t}"; - $script['save'][] = "\t\t\t\t\t\t\telseif(in_array(\$key, \$data['target_headers']) && is_string(\$cell))"; - $script['save'][] = "\t\t\t\t\t\t\t{"; - $script['save'][] = "\t\t\t\t\t\t\t\t\$fields[] = \$db->quoteName(\$target[\$key]) . ' = ' . \$db->quote(\$cell);"; - $script['save'][] = "\t\t\t\t\t\t\t}"; - $script['save'][] = "\t\t\t\t\t\t\telseif(in_array(\$key, \$data['target_headers']) && is_null(\$cell))"; - $script['save'][] = "\t\t\t\t\t\t\t{"; - $script['save'][] = "\t\t\t\t\t\t\t\t// if import data is null then set empty"; - $script['save'][] = "\t\t\t\t\t\t\t\t\$fields[] = \$db->quoteName(\$target[\$key]) . \" = ''\";"; - $script['save'][] = "\t\t\t\t\t\t\t}"; - $script['save'][] = "\t\t\t\t\t\t}"; - $script['save'][] = "\t\t\t\t\t\t// load the defaults"; - $script['save'][] = "\t\t\t\t\t\t\$fields[]\t= \$db->quoteName('modified_by') . ' = ' . \$db->quote(\$user->id);"; - $script['save'][] = "\t\t\t\t\t\t\$fields[]\t= \$db->quoteName('modified') . ' = ' . \$db->quote(\$todayDate);"; - $script['save'][] = "\t\t\t\t\t\t// Conditions for which records should be updated."; - $script['save'][] = "\t\t\t\t\t\t\$conditions = array("; - $script['save'][] = "\t\t\t\t\t\t\t\$db->quoteName('id') . ' = ' . \$id"; - $script['save'][] = "\t\t\t\t\t\t);"; - $script['save'][] = "\t\t\t\t\t\t"; - $script['save'][] = "\t\t\t\t\t\t\$query->update(\$db->quoteName('#__###-#-#-component###_'.\$table))->set(\$fields)->where(\$conditions);"; - $script['save'][] = "\t\t\t\t\t\t\$db->setQuery(\$query);"; - $script['save'][] = "\t\t\t\t\t\t\$db->execute();"; - $script['save'][] = "\t\t\t\t\t}"; - $script['save'][] = "\t\t\t\t\telseif (\$canCreate)"; - $script['save'][] = "\t\t\t\t\t{"; - $script['save'][] = "\t\t\t\t\t\t// insert item"; - $script['save'][] = "\t\t\t\t\t\t\$query = \$db->getQuery(true);"; - $script['save'][] = "\t\t\t\t\t\t// reset all buckets"; - $script['save'][] = "\t\t\t\t\t\t\$columns \t= array();"; - $script['save'][] = "\t\t\t\t\t\t\$values \t= array();"; - $script['save'][] = "\t\t\t\t\t\t\$version\t= false;"; - $script['save'][] = "\t\t\t\t\t\t// Insert columns. Insert values."; - $script['save'][] = "\t\t\t\t\t\tforeach(\$row as \$key => \$cell)"; - $script['save'][] = "\t\t\t\t\t\t{"; - $script['save'][] = "\t\t\t\t\t\t\t// ignore column"; - $script['save'][] = "\t\t\t\t\t\t\tif ('IGNORE' == \$target[\$key])"; - $script['save'][] = "\t\t\t\t\t\t\t{"; - $script['save'][] = "\t\t\t\t\t\t\t\tcontinue;"; - $script['save'][] = "\t\t\t\t\t\t\t}"; - $script['save'][] = "\t\t\t\t\t\t\t// remove id"; - $script['save'][] = "\t\t\t\t\t\t\tif ('id' == \$target[\$key])"; - $script['save'][] = "\t\t\t\t\t\t\t{"; - $script['save'][] = "\t\t\t\t\t\t\t\tcontinue;"; - $script['save'][] = "\t\t\t\t\t\t\t}"; - $script['save'][] = "\t\t\t\t\t\t\t// update created"; - $script['save'][] = "\t\t\t\t\t\t\tif ('created_by' == \$target[\$key])"; - $script['save'][] = "\t\t\t\t\t\t\t{"; - $script['save'][] = "\t\t\t\t\t\t\t\tcontinue;"; - $script['save'][] = "\t\t\t\t\t\t\t}"; - $script['save'][] = "\t\t\t\t\t\t\t// update created"; - $script['save'][] = "\t\t\t\t\t\t\tif ('created' == \$target[\$key])"; - $script['save'][] = "\t\t\t\t\t\t\t{"; - $script['save'][] = "\t\t\t\t\t\t\t\tcontinue;"; - $script['save'][] = "\t\t\t\t\t\t\t}"; - $script['save'][] = "\t\t\t\t\t\t\t// Make sure the alias is incremented"; - $script['save'][] = "\t\t\t\t\t\t\tif ('alias' == \$target[\$key])"; - $script['save'][] = "\t\t\t\t\t\t\t{"; - $script['save'][] = "\t\t\t\t\t\t\t\t\$cell = \$this->getAlias(\$cell,\$table);"; - $script['save'][] = "\t\t\t\t\t\t\t}"; - $script['save'][] = "\t\t\t\t\t\t\t// update version"; - $script['save'][] = "\t\t\t\t\t\t\tif ('version' == \$target[\$key])"; - $script['save'][] = "\t\t\t\t\t\t\t{"; - $script['save'][] = "\t\t\t\t\t\t\t\t\$cell = 1;"; - $script['save'][] = "\t\t\t\t\t\t\t\t\$version = true;"; - $script['save'][] = "\t\t\t\t\t\t\t}"; - $script['save'][] = "\t\t\t\t\t\t\t// set to insert array"; - $script['save'][] = "\t\t\t\t\t\t\tif(in_array(\$key, \$data['target_headers']) && is_numeric(\$cell))"; - $script['save'][] = "\t\t\t\t\t\t\t{"; - $script['save'][] = "\t\t\t\t\t\t\t\t\$columns[] \t= \$target[\$key];"; - $script['save'][] = "\t\t\t\t\t\t\t\t\$values[] \t= \$cell;"; - $script['save'][] = "\t\t\t\t\t\t\t}"; - $script['save'][] = "\t\t\t\t\t\t\telseif(in_array(\$key, \$data['target_headers']) && is_string(\$cell))"; - $script['save'][] = "\t\t\t\t\t\t\t{"; - $script['save'][] = "\t\t\t\t\t\t\t\t\$columns[] \t= \$target[\$key];"; - $script['save'][] = "\t\t\t\t\t\t\t\t\$values[] \t= \$db->quote(\$cell);"; - $script['save'][] = "\t\t\t\t\t\t\t}"; - $script['save'][] = "\t\t\t\t\t\t\telseif(in_array(\$key, \$data['target_headers']) && is_null(\$cell))"; - $script['save'][] = "\t\t\t\t\t\t\t{"; - $script['save'][] = "\t\t\t\t\t\t\t\t// if import data is null then set empty"; - $script['save'][] = "\t\t\t\t\t\t\t\t\$columns[] \t= \$target[\$key];"; - $script['save'][] = "\t\t\t\t\t\t\t\t\$values[] \t= \"''\";"; - $script['save'][] = "\t\t\t\t\t\t\t}"; - $script['save'][] = "\t\t\t\t\t\t}"; - $script['save'][] = "\t\t\t\t\t\t// load the defaults"; - $script['save'][] = "\t\t\t\t\t\t\$columns[] \t= 'created_by';"; - $script['save'][] = "\t\t\t\t\t\t\$values[] \t= \$db->quote(\$user->id);"; - $script['save'][] = "\t\t\t\t\t\t\$columns[] \t= 'created';"; - $script['save'][] = "\t\t\t\t\t\t\$values[] \t= \$db->quote(\$todayDate);"; - $script['save'][] = "\t\t\t\t\t\tif (!\$version)"; - $script['save'][] = "\t\t\t\t\t\t{"; - $script['save'][] = "\t\t\t\t\t\t\t\$columns[] \t= 'version';"; - $script['save'][] = "\t\t\t\t\t\t\t\$values[] \t= 1;"; - $script['save'][] = "\t\t\t\t\t\t}"; - $script['save'][] = "\t\t\t\t\t\t// Prepare the insert query."; - $script['save'][] = "\t\t\t\t\t\t\$query"; - $script['save'][] = "\t\t\t\t\t\t\t->insert(\$db->quoteName('#__###-#-#-component###_'.\$table))"; - $script['save'][] = "\t\t\t\t\t\t\t->columns(\$db->quoteName(\$columns))"; - $script['save'][] = "\t\t\t\t\t\t\t->values(implode(',', \$values));"; - $script['save'][] = "\t\t\t\t\t\t// Set the query using our newly populated query object and execute it."; - $script['save'][] = "\t\t\t\t\t\t\$db->setQuery(\$query);"; - $script['save'][] = "\t\t\t\t\t\t\$done = \$db->execute();"; - $script['save'][] = "\t\t\t\t\t\tif (\$done)"; - $script['save'][] = "\t\t\t\t\t\t{"; - $script['save'][] = "\t\t\t\t\t\t\t\$aId = \$db->insertid();"; - $script['save'][] = "\t\t\t\t\t\t\t// make sure the access of asset is set"; - $script['save'][] = "\t\t\t\t\t\t\t###-#-#-Component###Helper::setAsset(\$aId,\$table);"; - $script['save'][] = "\t\t\t\t\t\t}"; - $script['save'][] = "\t\t\t\t\t}"; - $script['save'][] = "\t\t\t\t\telse"; - $script['save'][] = "\t\t\t\t\t{"; - $script['save'][] = "\t\t\t\t\t\treturn false;"; - $script['save'][] = "\t\t\t\t\t}"; - $script['save'][] = "\t\t\t\t}"; - $script['save'][] = "\t\t\t\treturn true;"; - $script['save'][] = "\t\t\t}"; - $script['save'][] = "\t\t}"; - $script['save'][] = "\t\treturn false;"; - $script['save'][] = "\t}"; - } - elseif ('view' == $type) - { - $script['view'] = array(); - $script['view'][] = ""; - $script['view'][] = ""; - $script['view'][] = "\n
"; - $script['view'][] = "
\" method=\"post\" name=\"adminForm\" id=\"adminForm\" class=\"form-horizontal form-validate\">"; - $script['view'][] = ""; - $script['view'][] = "\n\tsidebar)) : ?>"; - $script['view'][] = "\t\t
"; - $script['view'][] = "\t\t\tsidebar; ?>"; - $script['view'][] = "\t\t
"; - $script['view'][] = "\t\t
"; - $script['view'][] = "\t"; - $script['view'][] = "\t\t
"; - $script['view'][] = "\t"; - $script['view'][] = ""; - $script['view'][] = "\n\thasPackage && ###-#-#-Component###Helper::checkArray(\$this->headerList) && ###-#-#-Component###Helper::checkArray(\$this->headers)) : ?>"; - $script['view'][] = "\t\t
"; - $script['view'][] = "\t\t\t"; - $script['view'][] = "\t\t\t
"; - $script['view'][] = "\t\t\t\t"; - $script['view'][] = "\t\t\t\t
"; - $script['view'][] = "\t\t\t\t\t"; - $script['view'][] = "\t\t\t\t
"; - $script['view'][] = "\t\t\t
"; - $script['view'][] = "\t\t\theaderList as \$name => \$title): ?>"; - $script['view'][] = "\t\t\t\t
"; - $script['view'][] = "\t\t\t\t\t"; - $script['view'][] = "\t\t\t\t\t
"; - $script['view'][] = "\t\t\t\t\t\t"; - $script['view'][] = "\t\t\t\t\t
"; - $script['view'][] = "\t\t\t\t
"; - $script['view'][] = "\t\t\t"; - $script['view'][] = "\t\t\t
"; - $script['view'][] = "\t\t\t\t\" onclick=\"Joomla.continueImport()\" />"; - $script['view'][] = "\t\t\t
"; - $script['view'][] = "\t\t
"; - $script['view'][] = "\t\t"; - $script['view'][] = "\t"; - $script['view'][] = "\t\t 'upload')); ?>"; - $script['view'][] = "\t\t"; - $script['view'][] = "\t\t"; - $script['view'][] = "\t\t\t
"; - $script['view'][] = "\t\t\t\t"; - $script['view'][] = "\t\t\t\t
"; - $script['view'][] = "\t\t\t\t\t"; - $script['view'][] = "\t\t\t\t\t
"; - $script['view'][] = "\t\t\t\t\t\t"; - $script['view'][] = "\t\t\t\t\t
"; - $script['view'][] = "\t\t\t\t
"; - $script['view'][] = "\t\t\t\t
"; - $script['view'][] = "\t\t\t\t\t\" onclick=\"Joomla.submitbutton()\" />    (.csv .xls .ods)"; - $script['view'][] = "\t\t\t\t
"; - $script['view'][] = "\t\t\t
"; - $script['view'][] = "\t\t"; - $script['view'][] = "\t\t"; - $script['view'][] = "\t\t"; - $script['view'][] = "\t\t\t
"; - $script['view'][] = "\t\t\t\t"; - $script['view'][] = "\t\t\t\t
"; - $script['view'][] = "\t\t\t\t\t"; - $script['view'][] = "\t\t\t\t\t
"; - $script['view'][] = "\t\t\t\t\t\tstate->get('import.directory'); ?>\" />"; - $script['view'][] = "\t\t\t\t\t
"; - $script['view'][] = "\t\t\t\t
"; - $script['view'][] = "\t\t\t\t
"; - $script['view'][] = "\t\t\t\t\t\" onclick=\"Joomla.submitbutton3()\" />    (.csv .xls .ods)"; - $script['view'][] = "\t\t\t\t
"; - $script['view'][] = "\t\t\t\t
"; - $script['view'][] = "\t\t"; - $script['view'][] = ""; - $script['view'][] = "\n\t\t"; - $script['view'][] = "\t\t\t
"; - $script['view'][] = "\t\t\t\t"; - $script['view'][] = "\t\t\t\t
"; - $script['view'][] = "\t\t\t\t\t"; - $script['view'][] = "\t\t\t\t\t
"; - $script['view'][] = "\t\t\t\t\t\t"; - $script['view'][] = "\t\t\t\t\t
"; - $script['view'][] = "\t\t\t\t
"; - $script['view'][] = "\t\t\t\t
"; - $script['view'][] = "\t\t\t\t\t\" onclick=\"Joomla.submitbutton4()\" />    (.csv .xls .ods)"; - $script['view'][] = "\t\t\t\t
"; - $script['view'][] = "\t\t\t
"; - $script['view'][] = "\t\t"; - $script['view'][] = "\t\t"; - $script['view'][] = "\t\t"; - $script['view'][] = "\t"; - $script['view'][] = "\t"; - $script['view'][] = "\t"; - $script['view'][] = ""; - $script['view'][] = "
"; - } - elseif ('import' == $type) - { - $script['import'] = array(); - $script['import'][] = "\t/**"; - $script['import'][] = "\t * Import an spreadsheet from either folder, url or upload."; - $script['import'][] = "\t *"; - $script['import'][] = "\t * @return boolean result of import"; - $script['import'][] = "\t *"; - $script['import'][] = "\t */"; - $script['import'][] = "\tpublic function import()"; - $script['import'][] = "\t{"; - $script['import'][] = "\t\t\$this->setState('action', 'import');"; - $script['import'][] = "\t\t\$app \t\t= JFactory::getApplication();"; - $script['import'][] = "\t\t\$session \t= JFactory::getSession();"; - $script['import'][] = "\t\t\$package \t= null;"; - $script['import'][] = "\t\t\$continue\t= false;"; - $script['import'][] = "\t\t// get import type"; - $script['import'][] = "\t\t\$this->getType = \$app->input->getString('gettype', NULL);"; - $script['import'][] = "\t\t// get import type"; - $script['import'][] = "\t\t\$this->dataType\t= \$session->get('dataType_VDM_IMPORTINTO', NULL);"; - $script['import'][] = "\n\t\tif (\$package === null)"; - $script['import'][] = "\t\t{"; - $script['import'][] = "\t\t\tswitch (\$this->getType)"; - $script['import'][] = "\t\t\t{"; - $script['import'][] = "\t\t\t\tcase 'folder':"; - $script['import'][] = "\t\t\t\t\t// Remember the 'Import from Directory' path."; - $script['import'][] = "\t\t\t\t\t\$app->getUserStateFromRequest(\$this->_context . '.import_directory', 'import_directory');"; - $script['import'][] = "\t\t\t\t\t\$package = \$this->_getPackageFromFolder();"; - $script['import'][] = "\t\t\t\t\tbreak;"; - $script['import'][] = "\n\t\t\t\tcase 'upload':"; - $script['import'][] = "\t\t\t\t\t\$package = \$this->_getPackageFromUpload();"; - $script['import'][] = "\t\t\t\t\tbreak;"; - $script['import'][] = "\n\t\t\t\tcase 'url':"; - $script['import'][] = "\t\t\t\t\t\$package = \$this->_getPackageFromUrl();"; - $script['import'][] = "\t\t\t\t\tbreak;"; - $script['import'][] = "\n\t\t\t\tcase 'continue':"; - $script['import'][] = "\t\t\t\t\t\$continue \t= true;"; - $script['import'][] = "\t\t\t\t\t\$package\t= \$session->get('package', null);"; - $script['import'][] = "\t\t\t\t\t\$package\t= json_decode(\$package, true);"; - $script['import'][] = "\t\t\t\t\t// clear session"; - $script['import'][] = "\t\t\t\t\t\$session->clear('package');"; - $script['import'][] = "\t\t\t\t\t\$session->clear('dataType');"; - $script['import'][] = "\t\t\t\t\t\$session->clear('hasPackage');"; - $script['import'][] = "\t\t\t\t\tbreak;"; - $script['import'][] = "\n\t\t\t\tdefault:"; - $script['import'][] = "\t\t\t\t\t\$app->setUserState('com_###-#-#-component###.message', JTe-#-#-xt::_('COM_###-#-#-COMPONENT###_IMPORT_NO_IMPORT_TYPE_FOUND'));"; - $script['import'][] = "\n\t\t\t\t\treturn false;"; - $script['import'][] = "\t\t\t\t\tbreak;"; - $script['import'][] = "\t\t\t}"; - $script['import'][] = "\t\t}"; - $script['import'][] = "\t\t// Was the package valid?"; - $script['import'][] = "\t\tif (!\$package || !\$package['type'])"; - $script['import'][] = "\t\t{"; - $script['import'][] = "\t\t\tif (in_array(\$this->getType, array('upload', 'url')))"; - $script['import'][] = "\t\t\t{"; - $script['import'][] = "\t\t\t\t\$this->remove(\$package['packagename']);"; - $script['import'][] = "\t\t\t}"; - $script['import'][] = "\n\t\t\t\$app->setUserState('com_###-#-#-component###.message', JTe-#-#-xt::_('COM_###-#-#-COMPONENT###_IMPORT_UNABLE_TO_FIND_IMPORT_PACKAGE'));"; - $script['import'][] = "\t\t\treturn false;"; - $script['import'][] = "\t\t}"; - $script['import'][] = "\t\t"; - $script['import'][] = "\t\t// first link data to table headers"; - $script['import'][] = "\t\tif(!\$continue){"; - $script['import'][] = "\t\t\t\$package\t= json_encode(\$package);"; - $script['import'][] = "\t\t\t\$session->set('package', \$package);"; - $script['import'][] = "\t\t\t\$session->set('dataType', \$this->dataType);"; - $script['import'][] = "\t\t\t\$session->set('hasPackage', true);"; - $script['import'][] = "\t\t\treturn true;"; - $script['import'][] = "\t\t}"; - $script['import'][] = "\t\t// set the data"; - $script['import'][] = "\t\t\$headerList = json_decode(\$session->get(\$this->dataType.'_VDM_IMPORTHEADERS', false), true);"; - $script['import'][] = "\t\tif (!\$this->setData(\$package,\$this->dataType,\$headerList))"; - $script['import'][] = "\t\t{"; - $script['import'][] = "\t\t\t// There was an error importing the package"; - $script['import'][] = "\t\t\t\$msg = JTe-#-#-xt::_('COM_###-#-#-COMPONENT###_IMPORT_ERROR');"; - $script['import'][] = "\t\t\t\$back = \$session->get('backto_VDM_IMPORT', NULL);"; - $script['import'][] = "\t\t\tif (\$back)"; - $script['import'][] = "\t\t\t{"; - $script['import'][] = "\t\t\t\t\$app->setUserState('com_###-#-#-component###.redirect_url', 'index.php?option=com_###-#-#-component###&view='.\$back);"; - $script['import'][] = "\t\t\t\t\$session->clear('backto_VDM_IMPORT');"; - $script['import'][] = "\t\t\t}"; - $script['import'][] = "\t\t\t\$result = false;"; - $script['import'][] = "\t\t}"; - $script['import'][] = "\t\telse"; - $script['import'][] = "\t\t{"; - $script['import'][] = "\t\t\t// Package imported sucessfully"; - $script['import'][] = "\t\t\t\$msg = JTe-#-#-xt::sprintf('COM_###-#-#-COMPONENT###_IMPORT_SUCCESS', \$package['packagename']);"; - $script['import'][] = "\t\t\t\$back = \$session->get('backto_VDM_IMPORT', NULL);"; - $script['import'][] = "\t\t\tif (\$back)"; - $script['import'][] = "\t\t\t{"; - $script['import'][] = "\t\t\t \$app->setUserState('com_###-#-#-component###.redirect_url', 'index.php?option=com_###-#-#-component###&view='.\$back);"; - $script['import'][] = "\t\t\t \$session->clear('backto_VDM_IMPORT');"; - $script['import'][] = "\t\t\t}"; - $script['import'][] = "\t\t\t\$result = true;"; - $script['import'][] = "\t\t}"; - $script['import'][] = "\n\t\t// Set some model state values"; - $script['import'][] = "\t\t\$app->enqueueMessage(\$msg);"; - $script['import'][] = "\n\t\t// remove file after import"; - $script['import'][] = "\t\t\$this->remove(\$package['packagename']);"; - $script['import'][] = "\t\t\$session->clear(\$this->getType.'_VDM_IMPORTHEADERS');"; - $script['import'][] = "\t\treturn \$result;"; - $script['import'][] = "\t}"; - } - // return the needed script - if (isset($script[$type])) - { - return str_replace('-#-#-', '', implode("\n",$script[$type])); - } - return false; + // get from global helper + return ComponentbuilderHelper::getImportScripts($type); } public function getFieldSelectOptions($id) diff --git a/admin/models/compiler.php b/admin/models/compiler.php index bf210d692..4a8bc6572 100644 --- a/admin/models/compiler.php +++ b/admin/models/compiler.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 46 of this MVC - @build 3rd March, 2017 + @version @update number 47 of this MVC + @build 21st March, 2017 @created 1st February, 2017 @package Component Builder @subpackage compiler.php diff --git a/admin/models/componentbuilder.php b/admin/models/componentbuilder.php index 599f400eb..8e95306d9 100644 --- a/admin/models/componentbuilder.php +++ b/admin/models/componentbuilder.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage componentbuilder.php diff --git a/admin/models/custom_admin_view.php b/admin/models/custom_admin_view.php index 973222d18..f905edd2b 100644 --- a/admin/models/custom_admin_view.php +++ b/admin/models/custom_admin_view.php @@ -179,7 +179,7 @@ class ComponentbuilderModelCustom_admin_view extends JModelAdmin * * @return mixed An array of data items on success, false on failure. */ - public function getVyglinked_components() + public function getVyhlinked_components() { // Get the user object. $user = JFactory::getUser(); diff --git a/admin/models/field.php b/admin/models/field.php index cbf16e108..be0385610 100644 --- a/admin/models/field.php +++ b/admin/models/field.php @@ -141,7 +141,7 @@ class ComponentbuilderModelField extends JModelAdmin * * @return mixed An array of data items on success, false on failure. */ - public function getVzylinked_admin_views() + public function getVzzlinked_admin_views() { // Get the user object. $user = JFactory::getUser(); diff --git a/admin/models/fields/adminviewfolderlist.php b/admin/models/fields/adminviewfolderlist.php index f64b5dbb6..9bb13caa0 100644 --- a/admin/models/fields/adminviewfolderlist.php +++ b/admin/models/fields/adminviewfolderlist.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage adminviewfolderlist.php diff --git a/admin/models/fields/adminviews.php b/admin/models/fields/adminviews.php index f22f7536a..df8c69ead 100644 --- a/admin/models/fields/adminviews.php +++ b/admin/models/fields/adminviews.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage adminviews.php diff --git a/admin/models/fields/articles.php b/admin/models/fields/articles.php index 7ce48d2a9..60ba5244c 100644 --- a/admin/models/fields/articles.php +++ b/admin/models/fields/articles.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage articles.php diff --git a/admin/models/fields/component.php b/admin/models/fields/component.php index 0123f7049..e93f876e3 100644 --- a/admin/models/fields/component.php +++ b/admin/models/fields/component.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage component.php diff --git a/admin/models/fields/customadminviews.php b/admin/models/fields/customadminviews.php index c00cbf0e0..9f40ee66d 100644 --- a/admin/models/fields/customadminviews.php +++ b/admin/models/fields/customadminviews.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage customadminviews.php diff --git a/admin/models/fields/customfilelist.php b/admin/models/fields/customfilelist.php index a26130180..bbc89dc28 100644 --- a/admin/models/fields/customfilelist.php +++ b/admin/models/fields/customfilelist.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage customfilelist.php diff --git a/admin/models/fields/customfolderlist.php b/admin/models/fields/customfolderlist.php index 4d3114427..bb13d3993 100644 --- a/admin/models/fields/customfolderlist.php +++ b/admin/models/fields/customfolderlist.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage customfolderlist.php diff --git a/admin/models/fields/customgets.php b/admin/models/fields/customgets.php index 3dc8da436..ddfc42f8f 100644 --- a/admin/models/fields/customgets.php +++ b/admin/models/fields/customgets.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage customgets.php diff --git a/admin/models/fields/dbtables.php b/admin/models/fields/dbtables.php index 06f972240..13e6f7ae3 100644 --- a/admin/models/fields/dbtables.php +++ b/admin/models/fields/dbtables.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage dbtables.php diff --git a/admin/models/fields/dynamicgets.php b/admin/models/fields/dynamicgets.php index bf4dbaf58..2126abc1e 100644 --- a/admin/models/fields/dynamicgets.php +++ b/admin/models/fields/dynamicgets.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage dynamicgets.php diff --git a/admin/models/fields/fields.php b/admin/models/fields/fields.php index d0420e5c3..b6fe15d21 100644 --- a/admin/models/fields/fields.php +++ b/admin/models/fields/fields.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage fields.php diff --git a/admin/models/fields/fieldsmulti.php b/admin/models/fields/fieldsmulti.php index fbfc186fd..f5967da66 100644 --- a/admin/models/fields/fieldsmulti.php +++ b/admin/models/fields/fieldsmulti.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage fieldsmulti.php diff --git a/admin/models/fields/fieldtypes.php b/admin/models/fields/fieldtypes.php index 98975e2d5..492d4cc46 100644 --- a/admin/models/fields/fieldtypes.php +++ b/admin/models/fields/fieldtypes.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage fieldtypes.php diff --git a/admin/models/fields/maingets.php b/admin/models/fields/maingets.php index d7b3f2ce2..a2bbbb464 100644 --- a/admin/models/fields/maingets.php +++ b/admin/models/fields/maingets.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage maingets.php diff --git a/admin/models/fields/siteviewfolderlist.php b/admin/models/fields/siteviewfolderlist.php index c5d751031..d0fe2a4aa 100644 --- a/admin/models/fields/siteviewfolderlist.php +++ b/admin/models/fields/siteviewfolderlist.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage siteviewfolderlist.php diff --git a/admin/models/fields/siteviews.php b/admin/models/fields/siteviews.php index 207e55ed1..7eb3431e2 100644 --- a/admin/models/fields/siteviews.php +++ b/admin/models/fields/siteviews.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage siteviews.php diff --git a/admin/models/fields/snippets.php b/admin/models/fields/snippets.php index b3c14a5a3..204bf089c 100644 --- a/admin/models/fields/snippets.php +++ b/admin/models/fields/snippets.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage snippets.php diff --git a/admin/models/fieldtype.php b/admin/models/fieldtype.php index ed766c54f..ad1ed92b8 100644 --- a/admin/models/fieldtype.php +++ b/admin/models/fieldtype.php @@ -111,7 +111,7 @@ class ComponentbuilderModelFieldtype extends JModelAdmin * * @return mixed An array of data items on success, false on failure. */ - public function getVzzfields() + public function getWaafields() { // Get the user object. $user = JFactory::getUser(); @@ -195,13 +195,13 @@ class ComponentbuilderModelFieldtype extends JModelAdmin foreach ($items as $nr => &$item) { // convert datatype - $item->datatype = $this->selectionTranslationVzzfields($item->datatype, 'datatype'); + $item->datatype = $this->selectionTranslationWaafields($item->datatype, 'datatype'); // convert indexes - $item->indexes = $this->selectionTranslationVzzfields($item->indexes, 'indexes'); + $item->indexes = $this->selectionTranslationWaafields($item->indexes, 'indexes'); // convert null_switch - $item->null_switch = $this->selectionTranslationVzzfields($item->null_switch, 'null_switch'); + $item->null_switch = $this->selectionTranslationWaafields($item->null_switch, 'null_switch'); // convert store - $item->store = $this->selectionTranslationVzzfields($item->store, 'store'); + $item->store = $this->selectionTranslationWaafields($item->store, 'store'); } } @@ -215,7 +215,7 @@ class ComponentbuilderModelFieldtype extends JModelAdmin * * @return translatable string */ - public function selectionTranslationVzzfields($value,$name) + public function selectionTranslationWaafields($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 513323382..6af715a49 100644 --- a/admin/models/forms/admin_view.js +++ b/admin/models/forms/admin_view.js @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 104 of this MVC - @build 6th March, 2017 + @version @update number 108 of this MVC + @build 24th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage admin_view.js @@ -51,10 +51,11 @@ jform_vvvvvxwvxn_required = false; jform_vvvvvxwvxo_required = false; jform_vvvvvxwvxp_required = false; jform_vvvvvxwvxq_required = false; -jform_vvvvvxyvxr_required = false; +jform_vvvvvxwvxr_required = false; jform_vvvvvxyvxs_required = false; jform_vvvvvxyvxt_required = false; jform_vvvvvxyvxu_required = false; +jform_vvvvvxyvxv_required = false; // Initial Script jQuery(document).ready(function() @@ -899,34 +900,44 @@ function vvvvvxw(add_custom_import_vvvvvxw) jform_vvvvvxwvxn_required = false; } - jQuery('#jform_php_import').closest('.control-group').show(); + jQuery('#jform_php_import_ext').closest('.control-group').show(); if (jform_vvvvvxwvxo_required) + { + updateFieldRequired('php_import_ext',0); + jQuery('#jform_php_import_ext').prop('required','required'); + jQuery('#jform_php_import_ext').attr('aria-required',true); + jQuery('#jform_php_import_ext').addClass('required'); + jform_vvvvvxwvxo_required = false; + } + + jQuery('#jform_php_import').closest('.control-group').show(); + if (jform_vvvvvxwvxp_required) { updateFieldRequired('php_import',0); jQuery('#jform_php_import').prop('required','required'); jQuery('#jform_php_import').attr('aria-required',true); jQuery('#jform_php_import').addClass('required'); - jform_vvvvvxwvxo_required = false; + jform_vvvvvxwvxp_required = false; } jQuery('#jform_php_import_save').closest('.control-group').show(); - if (jform_vvvvvxwvxp_required) + if (jform_vvvvvxwvxq_required) { updateFieldRequired('php_import_save',0); jQuery('#jform_php_import_save').prop('required','required'); jQuery('#jform_php_import_save').attr('aria-required',true); jQuery('#jform_php_import_save').addClass('required'); - jform_vvvvvxwvxp_required = false; + jform_vvvvvxwvxq_required = false; } jQuery('#jform_php_import_setdata').closest('.control-group').show(); - if (jform_vvvvvxwvxq_required) + if (jform_vvvvvxwvxr_required) { updateFieldRequired('php_import_setdata',0); jQuery('#jform_php_import_setdata').prop('required','required'); jQuery('#jform_php_import_setdata').attr('aria-required',true); jQuery('#jform_php_import_setdata').addClass('required'); - jform_vvvvvxwvxq_required = false; + jform_vvvvvxwvxr_required = false; } } @@ -951,32 +962,41 @@ function vvvvvxw(add_custom_import_vvvvvxw) jQuery('#jform_php_import_display').removeClass('required'); jform_vvvvvxwvxn_required = true; } - jQuery('#jform_php_import').closest('.control-group').hide(); + jQuery('#jform_php_import_ext').closest('.control-group').hide(); if (!jform_vvvvvxwvxo_required) + { + updateFieldRequired('php_import_ext',1); + jQuery('#jform_php_import_ext').removeAttr('required'); + jQuery('#jform_php_import_ext').removeAttr('aria-required'); + jQuery('#jform_php_import_ext').removeClass('required'); + jform_vvvvvxwvxo_required = true; + } + jQuery('#jform_php_import').closest('.control-group').hide(); + if (!jform_vvvvvxwvxp_required) { updateFieldRequired('php_import',1); jQuery('#jform_php_import').removeAttr('required'); jQuery('#jform_php_import').removeAttr('aria-required'); jQuery('#jform_php_import').removeClass('required'); - jform_vvvvvxwvxo_required = true; + jform_vvvvvxwvxp_required = true; } jQuery('#jform_php_import_save').closest('.control-group').hide(); - if (!jform_vvvvvxwvxp_required) + if (!jform_vvvvvxwvxq_required) { updateFieldRequired('php_import_save',1); jQuery('#jform_php_import_save').removeAttr('required'); jQuery('#jform_php_import_save').removeAttr('aria-required'); jQuery('#jform_php_import_save').removeClass('required'); - jform_vvvvvxwvxp_required = true; + jform_vvvvvxwvxq_required = true; } jQuery('#jform_php_import_setdata').closest('.control-group').hide(); - if (!jform_vvvvvxwvxq_required) + if (!jform_vvvvvxwvxr_required) { updateFieldRequired('php_import_setdata',1); jQuery('#jform_php_import_setdata').removeAttr('required'); jQuery('#jform_php_import_setdata').removeAttr('aria-required'); jQuery('#jform_php_import_setdata').removeClass('required'); - jform_vvvvvxwvxq_required = true; + jform_vvvvvxwvxr_required = true; } } } @@ -1003,43 +1023,43 @@ function vvvvvxy(add_custom_button_vvvvvxy) { jQuery('#jform_custom_button').closest('.control-group').show(); jQuery('#jform_php_controller').closest('.control-group').show(); - if (jform_vvvvvxyvxr_required) + if (jform_vvvvvxyvxs_required) { updateFieldRequired('php_controller',0); jQuery('#jform_php_controller').prop('required','required'); jQuery('#jform_php_controller').attr('aria-required',true); jQuery('#jform_php_controller').addClass('required'); - jform_vvvvvxyvxr_required = false; + jform_vvvvvxyvxs_required = false; } jQuery('#jform_php_controller_list').closest('.control-group').show(); - if (jform_vvvvvxyvxs_required) + if (jform_vvvvvxyvxt_required) { updateFieldRequired('php_controller_list',0); jQuery('#jform_php_controller_list').prop('required','required'); jQuery('#jform_php_controller_list').attr('aria-required',true); jQuery('#jform_php_controller_list').addClass('required'); - jform_vvvvvxyvxs_required = false; + jform_vvvvvxyvxt_required = false; } jQuery('#jform_php_model').closest('.control-group').show(); - if (jform_vvvvvxyvxt_required) + if (jform_vvvvvxyvxu_required) { updateFieldRequired('php_model',0); jQuery('#jform_php_model').prop('required','required'); jQuery('#jform_php_model').attr('aria-required',true); jQuery('#jform_php_model').addClass('required'); - jform_vvvvvxyvxt_required = false; + jform_vvvvvxyvxu_required = false; } jQuery('#jform_php_model_list').closest('.control-group').show(); - if (jform_vvvvvxyvxu_required) + if (jform_vvvvvxyvxv_required) { updateFieldRequired('php_model_list',0); jQuery('#jform_php_model_list').prop('required','required'); jQuery('#jform_php_model_list').attr('aria-required',true); jQuery('#jform_php_model_list').addClass('required'); - jform_vvvvvxyvxu_required = false; + jform_vvvvvxyvxv_required = false; } } @@ -1047,40 +1067,40 @@ function vvvvvxy(add_custom_button_vvvvvxy) { jQuery('#jform_custom_button').closest('.control-group').hide(); jQuery('#jform_php_controller').closest('.control-group').hide(); - if (!jform_vvvvvxyvxr_required) + if (!jform_vvvvvxyvxs_required) { updateFieldRequired('php_controller',1); jQuery('#jform_php_controller').removeAttr('required'); jQuery('#jform_php_controller').removeAttr('aria-required'); jQuery('#jform_php_controller').removeClass('required'); - jform_vvvvvxyvxr_required = true; + jform_vvvvvxyvxs_required = true; } jQuery('#jform_php_controller_list').closest('.control-group').hide(); - if (!jform_vvvvvxyvxs_required) + if (!jform_vvvvvxyvxt_required) { updateFieldRequired('php_controller_list',1); jQuery('#jform_php_controller_list').removeAttr('required'); jQuery('#jform_php_controller_list').removeAttr('aria-required'); jQuery('#jform_php_controller_list').removeClass('required'); - jform_vvvvvxyvxs_required = true; + jform_vvvvvxyvxt_required = true; } jQuery('#jform_php_model').closest('.control-group').hide(); - if (!jform_vvvvvxyvxt_required) + if (!jform_vvvvvxyvxu_required) { updateFieldRequired('php_model',1); jQuery('#jform_php_model').removeAttr('required'); jQuery('#jform_php_model').removeAttr('aria-required'); jQuery('#jform_php_model').removeClass('required'); - jform_vvvvvxyvxt_required = true; + jform_vvvvvxyvxu_required = true; } jQuery('#jform_php_model_list').closest('.control-group').hide(); - if (!jform_vvvvvxyvxu_required) + if (!jform_vvvvvxyvxv_required) { updateFieldRequired('php_model_list',1); jQuery('#jform_php_model_list').removeAttr('required'); jQuery('#jform_php_model_list').removeAttr('aria-required'); jQuery('#jform_php_model_list').removeClass('required'); - jform_vvvvvxyvxu_required = true; + jform_vvvvvxyvxv_required = true; } } } @@ -1201,6 +1221,7 @@ function getImportScripts(id){ var current_setdata = jQuery('textarea#jform_php_import_setdata').val(); var current_save = jQuery('textarea#jform_php_import_save').val(); var current_view = jQuery('textarea#jform_html_import_view').val(); + var current_ext = jQuery('textarea#jform_php_import_ext').val(); // set the display method script if(current_import_display.length == 0){ getImportScripts_server('display').done(function(result) { @@ -1241,5 +1262,13 @@ function getImportScripts(id){ } }); } + // set the import ext script + if(current_ext.length == 0){ + getImportScripts_server('ext').done(function(result) { + if(result){ + jQuery('textarea#jform_php_import_ext').val(result); + } + }); + } } } diff --git a/admin/models/forms/admin_view.xml b/admin/models/forms/admin_view.xml index 8ed840ed0..6865450da 100644 --- a/admin/models/forms/admin_view.xml +++ b/admin/models/forms/admin_view.xml @@ -149,34 +149,32 @@ message="Error! Please add some short description here." hint="COM_COMPONENTBUILDER_ADMIN_VIEW_SHORT_DESCRIPTION_HINT" /> - + - - - - - + type="textarea" + name="php_getitems_after_all" + label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_GETITEMS_AFTER_ALL_LABEL" + rows="30" + cols="15" + description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_GETITEMS_AFTER_ALL_DESCRIPTION" + class="text_area span12" + filter="raw" + hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_GETITEMS_AFTER_ALL_HINT" + required="true" + /> + - - - - + type="textarea" + name="php_after_publish" + label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_AFTER_PUBLISH_LABEL" + rows="30" + cols="15" + description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_AFTER_PUBLISH_DESCRIPTION" + class="text_area span12" + filter="raw" + hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_AFTER_PUBLISH_HINT" + required="true" + /> COM_COMPONENTBUILDER_ADMIN_VIEW_REMOVE - + - - - - + type="textarea" + name="php_allowedit" + label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_ALLOWEDIT_LABEL" + rows="30" + cols="15" + description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_ALLOWEDIT_DESCRIPTION" + class="text_area span12" + filter="raw" + hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_ALLOWEDIT_HINT" + required="true" + /> - + - + COM_COMPONENTBUILDER_ADMIN_VIEW_TABLE + - + - - - - + type="textarea" + name="php_save" + label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_SAVE_LABEL" + rows="30" + cols="15" + description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_SAVE_DESCRIPTION" + class="text_area span12" + filter="raw" + hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_SAVE_HINT" + required="true" + /> - + - - - - + type="textarea" + name="php_batchmove" + label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BATCHMOVE_LABEL" + rows="30" + cols="15" + description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BATCHMOVE_DESCRIPTION" + class="text_area span12" + filter="raw" + hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BATCHMOVE_HINT" + required="true" + /> - + - - - - + type="textarea" + name="php_after_delete" + label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_AFTER_DELETE_LABEL" + rows="30" + cols="15" + description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_AFTER_DELETE_DESCRIPTION" + class="text_area span12" + filter="raw" + hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_AFTER_DELETE_HINT" + required="true" + /> - - + + - + - - - - + type="textarea" + name="php_getitems" + label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_GETITEMS_LABEL" + rows="30" + cols="15" + description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_GETITEMS_DESCRIPTION" + class="text_area span12" + filter="raw" + hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_GETITEMS_HINT" + required="true" + /> - + - - - - + type="textarea" + name="php_getlistquery" + label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_GETLISTQUERY_LABEL" + rows="30" + cols="15" + description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_GETLISTQUERY_DESCRIPTION" + class="text_area span12" + filter="raw" + hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_GETLISTQUERY_HINT" + required="true" + /> - + - - - - + type="textarea" + name="php_postsavehook" + label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_POSTSAVEHOOK_LABEL" + rows="30" + cols="15" + description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_POSTSAVEHOOK_DESCRIPTION" + class="text_area span12" + filter="raw" + hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_POSTSAVEHOOK_HINT" + required="true" + /> - + - - - - + type="textarea" + name="php_batchcopy" + label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BATCHCOPY_LABEL" + rows="30" + cols="15" + description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BATCHCOPY_DESCRIPTION" + class="text_area span12" + filter="raw" + hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BATCHCOPY_HINT" + required="true" + /> - + - - - - + type="textarea" + name="php_before_publish" + label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BEFORE_PUBLISH_LABEL" + rows="30" + cols="15" + description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BEFORE_PUBLISH_DESCRIPTION" + class="text_area span12" + filter="raw" + hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BEFORE_PUBLISH_HINT" + required="true" + /> - - - - - - - + - + - - - - + type="textarea" + name="php_import" + label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_LABEL" + rows="30" + cols="15" + description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_DESCRIPTION" + class="text_area span12" + filter="raw" + hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_HINT" + required="true" + /> + + COM_COMPONENTBUILDER_ADMIN_VIEW_READONLY - + - - - - - + type="textarea" + name="sql" + label="COM_COMPONENTBUILDER_ADMIN_VIEW_SQL_LABEL" + rows="30" + cols="15" + description="COM_COMPONENTBUILDER_ADMIN_VIEW_SQL_DESCRIPTION" + class="text_area span12" + filter="raw" + hint="COM_COMPONENTBUILDER_ADMIN_VIEW_SQL_HINT" + required="true" + /> + - - - - - + type="textarea" + name="php_getitem" + label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_GETITEM_LABEL" + rows="30" + cols="15" + description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_GETITEM_DESCRIPTION" + class="text_area span12" + filter="raw" + hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_GETITEM_HINT" + required="true" + /> + - - - - + type="textarea" + name="php_import_display" + label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_DISPLAY_LABEL" + rows="30" + cols="15" + description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_DISPLAY_DESCRIPTION" + class="text_area span12" + filter="raw" + hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_DISPLAY_HINT" + required="true" + /> - + @@ -1081,6 +1038,20 @@ + + + + + + - + + type="radio" + name="add_php_getitems" + label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_GETITEMS_LABEL" + class="btn-group btn-group-yesno" + default="0" + required="true"> + + + + COM_COMPONENTBUILDER_ADMIN_VIEW_NO - + + type="radio" + name="add_php_getitems_after_all" + label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_GETITEMS_AFTER_ALL_LABEL" + class="btn-group btn-group-yesno" + default="0" + required="true"> + + + + - + + type="radio" + name="add_php_getlistquery" + label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_GETLISTQUERY_LABEL" + class="btn-group btn-group-yesno" + default="0" + required="true"> + + + + COM_COMPONENTBUILDER_ADMIN_VIEW_NO - + + type="radio" + name="add_php_save" + label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_SAVE_LABEL" + class="btn-group btn-group-yesno" + default="0" + required="true"> + + + + - + + type="radio" + name="add_php_postsavehook" + label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_POSTSAVEHOOK_LABEL" + class="btn-group btn-group-yesno" + default="0" + required="true"> + + + + COM_COMPONENTBUILDER_ADMIN_VIEW_NO - + + type="radio" + name="add_php_allowedit" + label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_ALLOWEDIT_LABEL" + class="btn-group btn-group-yesno" + default="0" + required="true"> + + + + - + + type="radio" + name="add_php_batchcopy" + label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_BATCHCOPY_LABEL" + class="btn-group btn-group-yesno" + default="0" + required="true"> + + + + COM_COMPONENTBUILDER_ADMIN_VIEW_NO - + + type="radio" + name="add_php_batchmove" + label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_BATCHMOVE_LABEL" + class="btn-group btn-group-yesno" + default="0" + required="true"> + + + + - + + type="radio" + name="add_php_before_publish" + label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_BEFORE_PUBLISH_LABEL" + class="btn-group btn-group-yesno" + default="0" + required="true"> + + + + COM_COMPONENTBUILDER_ADMIN_VIEW_NO - + + type="radio" + name="add_php_after_publish" + label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_AFTER_PUBLISH_LABEL" + class="btn-group btn-group-yesno" + default="0" + required="true"> + + + + - + + type="radio" + name="add_php_before_delete" + label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_BEFORE_DELETE_LABEL" + class="btn-group btn-group-yesno" + default="0" + required="true"> + + + + COM_COMPONENTBUILDER_ADMIN_VIEW_NO - + + type="radio" + name="add_php_after_delete" + label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_AFTER_DELETE_LABEL" + class="btn-group btn-group-yesno" + default="0" + required="true"> + + + + - + + type="radio" + name="add_php_document" + label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_DOCUMENT_LABEL" + class="btn-group btn-group-yesno" + default="0" + required="true"> + + + + - + + type="radio" + name="add_sql" + label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_SQL_LABEL" + class="btn-group btn-group-yesno" + default="0" + required="true"> + + + + - + - - - + type="repeatable" + name="addtables" + label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADDTABLES_LABEL" + id="addtables" + class="addtable" + select="COM_COMPONENTBUILDER_ADMIN_VIEW_ADDTABLES_SELECT" + icon="list" + maximum="50"> + + + - - + + - - + + + + + + COM_COMPONENTBUILDER_ADMIN_VIEW_NO - + @@ -2039,17 +2052,17 @@ hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_AJAXMETHOD_HINT" required="true" /> - + @@ -2190,17 +2203,17 @@ - + diff --git a/admin/models/forms/custom_admin_view.js b/admin/models/forms/custom_admin_view.js index 4032c3c19..7fa707405 100644 --- a/admin/models/forms/custom_admin_view.js +++ b/admin/models/forms/custom_admin_view.js @@ -23,15 +23,15 @@ /-----------------------------------------------------------------------------------------------------------------------------*/ // Some Global Values -jform_vvvvvxzvxx_required = false; -jform_vvvvvyavxy_required = false; -jform_vvvvvybvxz_required = false; -jform_vvvvvycvya_required = false; -jform_vvvvvydvyb_required = false; -jform_vvvvvyevyc_required = false; -jform_vvvvvyfvyd_required = false; +jform_vvvvvxzvxy_required = false; +jform_vvvvvyavxz_required = false; +jform_vvvvvybvya_required = false; +jform_vvvvvycvyb_required = false; +jform_vvvvvydvyc_required = false; +jform_vvvvvyevyd_required = false; jform_vvvvvyfvye_required = false; -jform_vvvvvygvyf_required = false; +jform_vvvvvyfvyf_required = false; +jform_vvvvvygvyg_required = false; // Initial Script jQuery(document).ready(function() @@ -68,26 +68,26 @@ function vvvvvxz(add_php_view_vvvvvxz) if (add_php_view_vvvvvxz == 1) { jQuery('#jform_php_view').closest('.control-group').show(); - if (jform_vvvvvxzvxx_required) + if (jform_vvvvvxzvxy_required) { updateFieldRequired('php_view',0); jQuery('#jform_php_view').prop('required','required'); jQuery('#jform_php_view').attr('aria-required',true); jQuery('#jform_php_view').addClass('required'); - jform_vvvvvxzvxx_required = false; + jform_vvvvvxzvxy_required = false; } } else { jQuery('#jform_php_view').closest('.control-group').hide(); - if (!jform_vvvvvxzvxx_required) + if (!jform_vvvvvxzvxy_required) { updateFieldRequired('php_view',1); jQuery('#jform_php_view').removeAttr('required'); jQuery('#jform_php_view').removeAttr('aria-required'); jQuery('#jform_php_view').removeClass('required'); - jform_vvvvvxzvxx_required = true; + jform_vvvvvxzvxy_required = true; } } } @@ -99,26 +99,26 @@ function vvvvvya(add_php_jview_display_vvvvvya) if (add_php_jview_display_vvvvvya == 1) { jQuery('#jform_php_jview_display').closest('.control-group').show(); - if (jform_vvvvvyavxy_required) + if (jform_vvvvvyavxz_required) { updateFieldRequired('php_jview_display',0); jQuery('#jform_php_jview_display').prop('required','required'); jQuery('#jform_php_jview_display').attr('aria-required',true); jQuery('#jform_php_jview_display').addClass('required'); - jform_vvvvvyavxy_required = false; + jform_vvvvvyavxz_required = false; } } else { jQuery('#jform_php_jview_display').closest('.control-group').hide(); - if (!jform_vvvvvyavxy_required) + if (!jform_vvvvvyavxz_required) { updateFieldRequired('php_jview_display',1); jQuery('#jform_php_jview_display').removeAttr('required'); jQuery('#jform_php_jview_display').removeAttr('aria-required'); jQuery('#jform_php_jview_display').removeClass('required'); - jform_vvvvvyavxy_required = true; + jform_vvvvvyavxz_required = true; } } } @@ -130,26 +130,26 @@ function vvvvvyb(add_php_jview_vvvvvyb) if (add_php_jview_vvvvvyb == 1) { jQuery('#jform_php_jview').closest('.control-group').show(); - if (jform_vvvvvybvxz_required) + if (jform_vvvvvybvya_required) { updateFieldRequired('php_jview',0); jQuery('#jform_php_jview').prop('required','required'); jQuery('#jform_php_jview').attr('aria-required',true); jQuery('#jform_php_jview').addClass('required'); - jform_vvvvvybvxz_required = false; + jform_vvvvvybvya_required = false; } } else { jQuery('#jform_php_jview').closest('.control-group').hide(); - if (!jform_vvvvvybvxz_required) + if (!jform_vvvvvybvya_required) { updateFieldRequired('php_jview',1); jQuery('#jform_php_jview').removeAttr('required'); jQuery('#jform_php_jview').removeAttr('aria-required'); jQuery('#jform_php_jview').removeClass('required'); - jform_vvvvvybvxz_required = true; + jform_vvvvvybvya_required = true; } } } @@ -161,26 +161,26 @@ function vvvvvyc(add_php_document_vvvvvyc) if (add_php_document_vvvvvyc == 1) { jQuery('#jform_php_document').closest('.control-group').show(); - if (jform_vvvvvycvya_required) + if (jform_vvvvvycvyb_required) { updateFieldRequired('php_document',0); jQuery('#jform_php_document').prop('required','required'); jQuery('#jform_php_document').attr('aria-required',true); jQuery('#jform_php_document').addClass('required'); - jform_vvvvvycvya_required = false; + jform_vvvvvycvyb_required = false; } } else { jQuery('#jform_php_document').closest('.control-group').hide(); - if (!jform_vvvvvycvya_required) + if (!jform_vvvvvycvyb_required) { updateFieldRequired('php_document',1); jQuery('#jform_php_document').removeAttr('required'); jQuery('#jform_php_document').removeAttr('aria-required'); jQuery('#jform_php_document').removeClass('required'); - jform_vvvvvycvya_required = true; + jform_vvvvvycvyb_required = true; } } } @@ -192,26 +192,26 @@ function vvvvvyd(add_css_document_vvvvvyd) if (add_css_document_vvvvvyd == 1) { jQuery('#jform_css_document').closest('.control-group').show(); - if (jform_vvvvvydvyb_required) + if (jform_vvvvvydvyc_required) { updateFieldRequired('css_document',0); jQuery('#jform_css_document').prop('required','required'); jQuery('#jform_css_document').attr('aria-required',true); jQuery('#jform_css_document').addClass('required'); - jform_vvvvvydvyb_required = false; + jform_vvvvvydvyc_required = false; } } else { jQuery('#jform_css_document').closest('.control-group').hide(); - if (!jform_vvvvvydvyb_required) + if (!jform_vvvvvydvyc_required) { updateFieldRequired('css_document',1); jQuery('#jform_css_document').removeAttr('required'); jQuery('#jform_css_document').removeAttr('aria-required'); jQuery('#jform_css_document').removeClass('required'); - jform_vvvvvydvyb_required = true; + jform_vvvvvydvyc_required = true; } } } @@ -223,26 +223,26 @@ function vvvvvye(add_js_document_vvvvvye) if (add_js_document_vvvvvye == 1) { jQuery('#jform_js_document').closest('.control-group').show(); - if (jform_vvvvvyevyc_required) + if (jform_vvvvvyevyd_required) { updateFieldRequired('js_document',0); jQuery('#jform_js_document').prop('required','required'); jQuery('#jform_js_document').attr('aria-required',true); jQuery('#jform_js_document').addClass('required'); - jform_vvvvvyevyc_required = false; + jform_vvvvvyevyd_required = false; } } else { jQuery('#jform_js_document').closest('.control-group').hide(); - if (!jform_vvvvvyevyc_required) + if (!jform_vvvvvyevyd_required) { updateFieldRequired('js_document',1); jQuery('#jform_js_document').removeAttr('required'); jQuery('#jform_js_document').removeAttr('aria-required'); jQuery('#jform_js_document').removeClass('required'); - jform_vvvvvyevyc_required = true; + jform_vvvvvyevyd_required = true; } } } @@ -255,23 +255,23 @@ function vvvvvyf(add_custom_button_vvvvvyf) { jQuery('#jform_custom_button').closest('.control-group').show(); jQuery('#jform_php_controller').closest('.control-group').show(); - if (jform_vvvvvyfvyd_required) + if (jform_vvvvvyfvye_required) { updateFieldRequired('php_controller',0); jQuery('#jform_php_controller').prop('required','required'); jQuery('#jform_php_controller').attr('aria-required',true); jQuery('#jform_php_controller').addClass('required'); - jform_vvvvvyfvyd_required = false; + jform_vvvvvyfvye_required = false; } jQuery('#jform_php_model').closest('.control-group').show(); - if (jform_vvvvvyfvye_required) + if (jform_vvvvvyfvyf_required) { updateFieldRequired('php_model',0); jQuery('#jform_php_model').prop('required','required'); jQuery('#jform_php_model').attr('aria-required',true); jQuery('#jform_php_model').addClass('required'); - jform_vvvvvyfvye_required = false; + jform_vvvvvyfvyf_required = false; } } @@ -279,22 +279,22 @@ function vvvvvyf(add_custom_button_vvvvvyf) { jQuery('#jform_custom_button').closest('.control-group').hide(); jQuery('#jform_php_controller').closest('.control-group').hide(); - if (!jform_vvvvvyfvyd_required) + if (!jform_vvvvvyfvye_required) { updateFieldRequired('php_controller',1); jQuery('#jform_php_controller').removeAttr('required'); jQuery('#jform_php_controller').removeAttr('aria-required'); jQuery('#jform_php_controller').removeClass('required'); - jform_vvvvvyfvyd_required = true; + jform_vvvvvyfvye_required = true; } jQuery('#jform_php_model').closest('.control-group').hide(); - if (!jform_vvvvvyfvye_required) + if (!jform_vvvvvyfvyf_required) { updateFieldRequired('php_model',1); jQuery('#jform_php_model').removeAttr('required'); jQuery('#jform_php_model').removeAttr('aria-required'); jQuery('#jform_php_model').removeClass('required'); - jform_vvvvvyfvye_required = true; + jform_vvvvvyfvyf_required = true; } } } @@ -306,26 +306,26 @@ function vvvvvyg(add_css_vvvvvyg) if (add_css_vvvvvyg == 1) { jQuery('#jform_css').closest('.control-group').show(); - if (jform_vvvvvygvyf_required) + if (jform_vvvvvygvyg_required) { updateFieldRequired('css',0); jQuery('#jform_css').prop('required','required'); jQuery('#jform_css').attr('aria-required',true); jQuery('#jform_css').addClass('required'); - jform_vvvvvygvyf_required = false; + jform_vvvvvygvyg_required = false; } } else { jQuery('#jform_css').closest('.control-group').hide(); - if (!jform_vvvvvygvyf_required) + if (!jform_vvvvvygvyg_required) { updateFieldRequired('css',1); jQuery('#jform_css').removeAttr('required'); jQuery('#jform_css').removeAttr('aria-required'); jQuery('#jform_css').removeClass('required'); - jform_vvvvvygvyf_required = true; + jform_vvvvvygvyg_required = true; } } } diff --git a/admin/models/forms/custom_code.js b/admin/models/forms/custom_code.js index 637db7877..c7440f10f 100644 --- a/admin/models/forms/custom_code.js +++ b/admin/models/forms/custom_code.js @@ -23,10 +23,10 @@ /-----------------------------------------------------------------------------------------------------------------------------*/ // Some Global Values -jform_vvvvvzovzm_required = false; -jform_vvvvvzpvzn_required = false; +jform_vvvvvzovzn_required = false; jform_vvvvvzpvzo_required = false; jform_vvvvvzpvzp_required = false; +jform_vvvvvzpvzq_required = false; // Initial Script jQuery(document).ready(function() @@ -53,13 +53,13 @@ function vvvvvzo(target_vvvvvzo) if (target_vvvvvzo == 2) { jQuery('#jform_function_name').closest('.control-group').show(); - if (jform_vvvvvzovzm_required) + if (jform_vvvvvzovzn_required) { updateFieldRequired('function_name',0); jQuery('#jform_function_name').prop('required','required'); jQuery('#jform_function_name').attr('aria-required',true); jQuery('#jform_function_name').addClass('required'); - jform_vvvvvzovzm_required = false; + jform_vvvvvzovzn_required = false; } jQuery('.note_jcb_placeholder').closest('.control-group').show(); @@ -68,13 +68,13 @@ function vvvvvzo(target_vvvvvzo) else { jQuery('#jform_function_name').closest('.control-group').hide(); - if (!jform_vvvvvzovzm_required) + if (!jform_vvvvvzovzn_required) { updateFieldRequired('function_name',1); jQuery('#jform_function_name').removeAttr('required'); jQuery('#jform_function_name').removeAttr('aria-required'); jQuery('#jform_function_name').removeClass('required'); - jform_vvvvvzovzm_required = true; + jform_vvvvvzovzn_required = true; } jQuery('.note_jcb_placeholder').closest('.control-group').hide(); jQuery('#jform_system_name').closest('.control-group').hide(); @@ -88,70 +88,70 @@ function vvvvvzp(target_vvvvvzp) if (target_vvvvvzp == 1) { jQuery('#jform_component').closest('.control-group').show(); - if (jform_vvvvvzpvzn_required) + if (jform_vvvvvzpvzo_required) { updateFieldRequired('component',0); jQuery('#jform_component').prop('required','required'); jQuery('#jform_component').attr('aria-required',true); jQuery('#jform_component').addClass('required'); - jform_vvvvvzpvzn_required = false; + jform_vvvvvzpvzo_required = false; } jQuery('#jform_path').closest('.control-group').show(); - if (jform_vvvvvzpvzo_required) + if (jform_vvvvvzpvzp_required) { updateFieldRequired('path',0); jQuery('#jform_path').prop('required','required'); jQuery('#jform_path').attr('aria-required',true); jQuery('#jform_path').addClass('required'); - jform_vvvvvzpvzo_required = false; + jform_vvvvvzpvzp_required = false; } jQuery('#jform_from_line').closest('.control-group').show(); jQuery('#jform_hashtarget').closest('.control-group').show(); jQuery('#jform_to_line').closest('.control-group').show(); jQuery('#jform_type').closest('.control-group').show(); - if (jform_vvvvvzpvzp_required) + if (jform_vvvvvzpvzq_required) { updateFieldRequired('type',0); jQuery('#jform_type').prop('required','required'); jQuery('#jform_type').attr('aria-required',true); jQuery('#jform_type').addClass('required'); - jform_vvvvvzpvzp_required = false; + jform_vvvvvzpvzq_required = false; } } else { jQuery('#jform_component').closest('.control-group').hide(); - if (!jform_vvvvvzpvzn_required) + if (!jform_vvvvvzpvzo_required) { updateFieldRequired('component',1); jQuery('#jform_component').removeAttr('required'); jQuery('#jform_component').removeAttr('aria-required'); jQuery('#jform_component').removeClass('required'); - jform_vvvvvzpvzn_required = true; + jform_vvvvvzpvzo_required = true; } jQuery('#jform_path').closest('.control-group').hide(); - if (!jform_vvvvvzpvzo_required) + if (!jform_vvvvvzpvzp_required) { updateFieldRequired('path',1); jQuery('#jform_path').removeAttr('required'); jQuery('#jform_path').removeAttr('aria-required'); jQuery('#jform_path').removeClass('required'); - jform_vvvvvzpvzo_required = true; + jform_vvvvvzpvzp_required = true; } jQuery('#jform_from_line').closest('.control-group').hide(); jQuery('#jform_hashtarget').closest('.control-group').hide(); jQuery('#jform_to_line').closest('.control-group').hide(); jQuery('#jform_type').closest('.control-group').hide(); - if (!jform_vvvvvzpvzp_required) + if (!jform_vvvvvzpvzq_required) { updateFieldRequired('type',1); jQuery('#jform_type').removeAttr('required'); jQuery('#jform_type').removeAttr('aria-required'); jQuery('#jform_type').removeClass('required'); - jform_vvvvvzpvzp_required = true; + jform_vvvvvzpvzq_required = true; } } } diff --git a/admin/models/forms/dynamic_get.js b/admin/models/forms/dynamic_get.js index 2a2fbdb1c..ddd825e8a 100644 --- a/admin/models/forms/dynamic_get.js +++ b/admin/models/forms/dynamic_get.js @@ -23,24 +23,24 @@ /-----------------------------------------------------------------------------------------------------------------------------*/ // Some Global Values -jform_vvvvvysvyu_required = false; -jform_vvvvvytvyv_required = false; -jform_vvvvvyuvyw_required = false; -jform_vvvvvyvvyx_required = false; -jform_vvvvvywvyy_required = false; -jform_vvvvvyxvyz_required = false; -jform_vvvvvzcvza_required = false; -jform_vvvvvzevzb_required = false; -jform_vvvvvzfvzc_required = false; -jform_vvvvvzhvzd_required = false; +jform_vvvvvysvyv_required = false; +jform_vvvvvytvyw_required = false; +jform_vvvvvyuvyx_required = false; +jform_vvvvvyvvyy_required = false; +jform_vvvvvywvyz_required = false; +jform_vvvvvyxvza_required = false; +jform_vvvvvzcvzb_required = false; +jform_vvvvvzevzc_required = false; +jform_vvvvvzfvzd_required = false; jform_vvvvvzhvze_required = false; -jform_vvvvvzivzf_required = false; -jform_vvvvvzjvzg_required = false; -jform_vvvvvzkvzh_required = false; -jform_vvvvvzmvzi_required = false; +jform_vvvvvzhvzf_required = false; +jform_vvvvvzivzg_required = false; +jform_vvvvvzjvzh_required = false; +jform_vvvvvzkvzi_required = false; jform_vvvvvzmvzj_required = false; jform_vvvvvzmvzk_required = false; -jform_vvvvvznvzl_required = false; +jform_vvvvvzmvzl_required = false; +jform_vvvvvznvzm_required = false; // Initial Script jQuery(document).ready(function() @@ -127,26 +127,26 @@ function vvvvvys(gettype_vvvvvys) if (gettype) { jQuery('#jform_getcustom').closest('.control-group').show(); - if (jform_vvvvvysvyu_required) + if (jform_vvvvvysvyv_required) { updateFieldRequired('getcustom',0); jQuery('#jform_getcustom').prop('required','required'); jQuery('#jform_getcustom').attr('aria-required',true); jQuery('#jform_getcustom').addClass('required'); - jform_vvvvvysvyu_required = false; + jform_vvvvvysvyv_required = false; } } else { jQuery('#jform_getcustom').closest('.control-group').hide(); - if (!jform_vvvvvysvyu_required) + if (!jform_vvvvvysvyv_required) { updateFieldRequired('getcustom',1); jQuery('#jform_getcustom').removeAttr('required'); jQuery('#jform_getcustom').removeAttr('aria-required'); jQuery('#jform_getcustom').removeClass('required'); - jform_vvvvvysvyu_required = true; + jform_vvvvvysvyv_required = true; } } } @@ -182,26 +182,26 @@ function vvvvvyt(main_source_vvvvvyt) if (main_source) { jQuery('#jform_view_table_main').closest('.control-group').show(); - if (jform_vvvvvytvyv_required) + if (jform_vvvvvytvyw_required) { updateFieldRequired('view_table_main',0); jQuery('#jform_view_table_main').prop('required','required'); jQuery('#jform_view_table_main').attr('aria-required',true); jQuery('#jform_view_table_main').addClass('required'); - jform_vvvvvytvyv_required = false; + jform_vvvvvytvyw_required = false; } } else { jQuery('#jform_view_table_main').closest('.control-group').hide(); - if (!jform_vvvvvytvyv_required) + if (!jform_vvvvvytvyw_required) { updateFieldRequired('view_table_main',1); jQuery('#jform_view_table_main').removeAttr('required'); jQuery('#jform_view_table_main').removeAttr('aria-required'); jQuery('#jform_view_table_main').removeClass('required'); - jform_vvvvvytvyv_required = true; + jform_vvvvvytvyw_required = true; } } } @@ -237,26 +237,26 @@ function vvvvvyu(main_source_vvvvvyu) if (main_source) { jQuery('#jform_view_selection').closest('.control-group').show(); - if (jform_vvvvvyuvyw_required) + if (jform_vvvvvyuvyx_required) { updateFieldRequired('view_selection',0); jQuery('#jform_view_selection').prop('required','required'); jQuery('#jform_view_selection').attr('aria-required',true); jQuery('#jform_view_selection').addClass('required'); - jform_vvvvvyuvyw_required = false; + jform_vvvvvyuvyx_required = false; } } else { jQuery('#jform_view_selection').closest('.control-group').hide(); - if (!jform_vvvvvyuvyw_required) + if (!jform_vvvvvyuvyx_required) { updateFieldRequired('view_selection',1); jQuery('#jform_view_selection').removeAttr('required'); jQuery('#jform_view_selection').removeAttr('aria-required'); jQuery('#jform_view_selection').removeClass('required'); - jform_vvvvvyuvyw_required = true; + jform_vvvvvyuvyx_required = true; } } } @@ -292,26 +292,26 @@ function vvvvvyv(main_source_vvvvvyv) if (main_source) { jQuery('#jform_db_table_main').closest('.control-group').show(); - if (jform_vvvvvyvvyx_required) + if (jform_vvvvvyvvyy_required) { updateFieldRequired('db_table_main',0); jQuery('#jform_db_table_main').prop('required','required'); jQuery('#jform_db_table_main').attr('aria-required',true); jQuery('#jform_db_table_main').addClass('required'); - jform_vvvvvyvvyx_required = false; + jform_vvvvvyvvyy_required = false; } } else { jQuery('#jform_db_table_main').closest('.control-group').hide(); - if (!jform_vvvvvyvvyx_required) + if (!jform_vvvvvyvvyy_required) { updateFieldRequired('db_table_main',1); jQuery('#jform_db_table_main').removeAttr('required'); jQuery('#jform_db_table_main').removeAttr('aria-required'); jQuery('#jform_db_table_main').removeClass('required'); - jform_vvvvvyvvyx_required = true; + jform_vvvvvyvvyy_required = true; } } } @@ -347,26 +347,26 @@ function vvvvvyw(main_source_vvvvvyw) if (main_source) { jQuery('#jform_db_selection').closest('.control-group').show(); - if (jform_vvvvvywvyy_required) + if (jform_vvvvvywvyz_required) { updateFieldRequired('db_selection',0); jQuery('#jform_db_selection').prop('required','required'); jQuery('#jform_db_selection').attr('aria-required',true); jQuery('#jform_db_selection').addClass('required'); - jform_vvvvvywvyy_required = false; + jform_vvvvvywvyz_required = false; } } else { jQuery('#jform_db_selection').closest('.control-group').hide(); - if (!jform_vvvvvywvyy_required) + if (!jform_vvvvvywvyz_required) { updateFieldRequired('db_selection',1); jQuery('#jform_db_selection').removeAttr('required'); jQuery('#jform_db_selection').removeAttr('aria-required'); jQuery('#jform_db_selection').removeClass('required'); - jform_vvvvvywvyy_required = true; + jform_vvvvvywvyz_required = true; } } } @@ -389,26 +389,26 @@ function vvvvvyx(addcalculation_vvvvvyx) if (addcalculation_vvvvvyx == 1) { jQuery('#jform_php_calculation').closest('.control-group').show(); - if (jform_vvvvvyxvyz_required) + if (jform_vvvvvyxvza_required) { updateFieldRequired('php_calculation',0); jQuery('#jform_php_calculation').prop('required','required'); jQuery('#jform_php_calculation').attr('aria-required',true); jQuery('#jform_php_calculation').addClass('required'); - jform_vvvvvyxvyz_required = false; + jform_vvvvvyxvza_required = false; } } else { jQuery('#jform_php_calculation').closest('.control-group').hide(); - if (!jform_vvvvvyxvyz_required) + if (!jform_vvvvvyxvza_required) { updateFieldRequired('php_calculation',1); jQuery('#jform_php_calculation').removeAttr('required'); jQuery('#jform_php_calculation').removeAttr('aria-required'); jQuery('#jform_php_calculation').removeClass('required'); - jform_vvvvvyxvyz_required = true; + jform_vvvvvyxvza_required = true; } } } @@ -555,26 +555,26 @@ function vvvvvzc(main_source_vvvvvzc) if (main_source) { jQuery('#jform_php_custom_get').closest('.control-group').show(); - if (jform_vvvvvzcvza_required) + if (jform_vvvvvzcvzb_required) { updateFieldRequired('php_custom_get',0); jQuery('#jform_php_custom_get').prop('required','required'); jQuery('#jform_php_custom_get').attr('aria-required',true); jQuery('#jform_php_custom_get').addClass('required'); - jform_vvvvvzcvza_required = false; + jform_vvvvvzcvzb_required = false; } } else { jQuery('#jform_php_custom_get').closest('.control-group').hide(); - if (!jform_vvvvvzcvza_required) + if (!jform_vvvvvzcvzb_required) { updateFieldRequired('php_custom_get',1); jQuery('#jform_php_custom_get').removeAttr('required'); jQuery('#jform_php_custom_get').removeAttr('aria-required'); jQuery('#jform_php_custom_get').removeClass('required'); - jform_vvvvvzcvza_required = true; + jform_vvvvvzcvzb_required = true; } } } @@ -668,26 +668,26 @@ function vvvvvze(add_php_before_getitem_vvvvvze,gettype_vvvvvze) if (add_php_before_getitem && gettype) { jQuery('#jform_php_before_getitem').closest('.control-group').show(); - if (jform_vvvvvzevzb_required) + if (jform_vvvvvzevzc_required) { updateFieldRequired('php_before_getitem',0); jQuery('#jform_php_before_getitem').prop('required','required'); jQuery('#jform_php_before_getitem').attr('aria-required',true); jQuery('#jform_php_before_getitem').addClass('required'); - jform_vvvvvzevzb_required = false; + jform_vvvvvzevzc_required = false; } } else { jQuery('#jform_php_before_getitem').closest('.control-group').hide(); - if (!jform_vvvvvzevzb_required) + if (!jform_vvvvvzevzc_required) { updateFieldRequired('php_before_getitem',1); jQuery('#jform_php_before_getitem').removeAttr('required'); jQuery('#jform_php_before_getitem').removeAttr('aria-required'); jQuery('#jform_php_before_getitem').removeClass('required'); - jform_vvvvvzevzb_required = true; + jform_vvvvvzevzc_required = true; } } } @@ -746,26 +746,26 @@ function vvvvvzf(add_php_after_getitem_vvvvvzf,gettype_vvvvvzf) if (add_php_after_getitem && gettype) { jQuery('#jform_php_after_getitem').closest('.control-group').show(); - if (jform_vvvvvzfvzc_required) + if (jform_vvvvvzfvzd_required) { updateFieldRequired('php_after_getitem',0); jQuery('#jform_php_after_getitem').prop('required','required'); jQuery('#jform_php_after_getitem').attr('aria-required',true); jQuery('#jform_php_after_getitem').addClass('required'); - jform_vvvvvzfvzc_required = false; + jform_vvvvvzfvzd_required = false; } } else { jQuery('#jform_php_after_getitem').closest('.control-group').hide(); - if (!jform_vvvvvzfvzc_required) + if (!jform_vvvvvzfvzd_required) { updateFieldRequired('php_after_getitem',1); jQuery('#jform_php_after_getitem').removeAttr('required'); jQuery('#jform_php_after_getitem').removeAttr('aria-required'); jQuery('#jform_php_after_getitem').removeClass('required'); - jform_vvvvvzfvzc_required = true; + jform_vvvvvzfvzd_required = true; } } } @@ -812,45 +812,45 @@ function vvvvvzh(gettype_vvvvvzh) if (gettype) { jQuery('#jform_add_php_after_getitem').closest('.control-group').show(); - if (jform_vvvvvzhvzd_required) + if (jform_vvvvvzhvze_required) { updateFieldRequired('add_php_after_getitem',0); jQuery('#jform_add_php_after_getitem').prop('required','required'); jQuery('#jform_add_php_after_getitem').attr('aria-required',true); jQuery('#jform_add_php_after_getitem').addClass('required'); - jform_vvvvvzhvzd_required = false; + jform_vvvvvzhvze_required = false; } jQuery('#jform_add_php_before_getitem').closest('.control-group').show(); - if (jform_vvvvvzhvze_required) + if (jform_vvvvvzhvzf_required) { updateFieldRequired('add_php_before_getitem',0); jQuery('#jform_add_php_before_getitem').prop('required','required'); jQuery('#jform_add_php_before_getitem').attr('aria-required',true); jQuery('#jform_add_php_before_getitem').addClass('required'); - jform_vvvvvzhvze_required = false; + jform_vvvvvzhvzf_required = false; } } else { jQuery('#jform_add_php_after_getitem').closest('.control-group').hide(); - if (!jform_vvvvvzhvzd_required) + if (!jform_vvvvvzhvze_required) { updateFieldRequired('add_php_after_getitem',1); jQuery('#jform_add_php_after_getitem').removeAttr('required'); jQuery('#jform_add_php_after_getitem').removeAttr('aria-required'); jQuery('#jform_add_php_after_getitem').removeClass('required'); - jform_vvvvvzhvzd_required = true; + jform_vvvvvzhvze_required = true; } jQuery('#jform_add_php_before_getitem').closest('.control-group').hide(); - if (!jform_vvvvvzhvze_required) + if (!jform_vvvvvzhvzf_required) { updateFieldRequired('add_php_before_getitem',1); jQuery('#jform_add_php_before_getitem').removeAttr('required'); jQuery('#jform_add_php_before_getitem').removeAttr('aria-required'); jQuery('#jform_add_php_before_getitem').removeClass('required'); - jform_vvvvvzhvze_required = true; + jform_vvvvvzhvzf_required = true; } } } @@ -898,26 +898,26 @@ function vvvvvzi(add_php_getlistquery_vvvvvzi,gettype_vvvvvzi) if (add_php_getlistquery && gettype) { jQuery('#jform_php_getlistquery').closest('.control-group').show(); - if (jform_vvvvvzivzf_required) + if (jform_vvvvvzivzg_required) { updateFieldRequired('php_getlistquery',0); jQuery('#jform_php_getlistquery').prop('required','required'); jQuery('#jform_php_getlistquery').attr('aria-required',true); jQuery('#jform_php_getlistquery').addClass('required'); - jform_vvvvvzivzf_required = false; + jform_vvvvvzivzg_required = false; } } else { jQuery('#jform_php_getlistquery').closest('.control-group').hide(); - if (!jform_vvvvvzivzf_required) + if (!jform_vvvvvzivzg_required) { updateFieldRequired('php_getlistquery',1); jQuery('#jform_php_getlistquery').removeAttr('required'); jQuery('#jform_php_getlistquery').removeAttr('aria-required'); jQuery('#jform_php_getlistquery').removeClass('required'); - jform_vvvvvzivzf_required = true; + jform_vvvvvzivzg_required = true; } } } @@ -976,26 +976,26 @@ function vvvvvzj(add_php_before_getitems_vvvvvzj,gettype_vvvvvzj) if (add_php_before_getitems && gettype) { jQuery('#jform_php_before_getitems').closest('.control-group').show(); - if (jform_vvvvvzjvzg_required) + if (jform_vvvvvzjvzh_required) { updateFieldRequired('php_before_getitems',0); jQuery('#jform_php_before_getitems').prop('required','required'); jQuery('#jform_php_before_getitems').attr('aria-required',true); jQuery('#jform_php_before_getitems').addClass('required'); - jform_vvvvvzjvzg_required = false; + jform_vvvvvzjvzh_required = false; } } else { jQuery('#jform_php_before_getitems').closest('.control-group').hide(); - if (!jform_vvvvvzjvzg_required) + if (!jform_vvvvvzjvzh_required) { updateFieldRequired('php_before_getitems',1); jQuery('#jform_php_before_getitems').removeAttr('required'); jQuery('#jform_php_before_getitems').removeAttr('aria-required'); jQuery('#jform_php_before_getitems').removeClass('required'); - jform_vvvvvzjvzg_required = true; + jform_vvvvvzjvzh_required = true; } } } @@ -1054,26 +1054,26 @@ function vvvvvzk(add_php_after_getitems_vvvvvzk,gettype_vvvvvzk) if (add_php_after_getitems && gettype) { jQuery('#jform_php_after_getitems').closest('.control-group').show(); - if (jform_vvvvvzkvzh_required) + if (jform_vvvvvzkvzi_required) { updateFieldRequired('php_after_getitems',0); jQuery('#jform_php_after_getitems').prop('required','required'); jQuery('#jform_php_after_getitems').attr('aria-required',true); jQuery('#jform_php_after_getitems').addClass('required'); - jform_vvvvvzkvzh_required = false; + jform_vvvvvzkvzi_required = false; } } else { jQuery('#jform_php_after_getitems').closest('.control-group').hide(); - if (!jform_vvvvvzkvzh_required) + if (!jform_vvvvvzkvzi_required) { updateFieldRequired('php_after_getitems',1); jQuery('#jform_php_after_getitems').removeAttr('required'); jQuery('#jform_php_after_getitems').removeAttr('aria-required'); jQuery('#jform_php_after_getitems').removeClass('required'); - jform_vvvvvzkvzh_required = true; + jform_vvvvvzkvzi_required = true; } } } @@ -1120,64 +1120,64 @@ function vvvvvzm(gettype_vvvvvzm) if (gettype) { jQuery('#jform_add_php_after_getitems').closest('.control-group').show(); - if (jform_vvvvvzmvzi_required) + if (jform_vvvvvzmvzj_required) { updateFieldRequired('add_php_after_getitems',0); jQuery('#jform_add_php_after_getitems').prop('required','required'); jQuery('#jform_add_php_after_getitems').attr('aria-required',true); jQuery('#jform_add_php_after_getitems').addClass('required'); - jform_vvvvvzmvzi_required = false; + jform_vvvvvzmvzj_required = false; } jQuery('#jform_add_php_before_getitems').closest('.control-group').show(); - if (jform_vvvvvzmvzj_required) + if (jform_vvvvvzmvzk_required) { updateFieldRequired('add_php_before_getitems',0); jQuery('#jform_add_php_before_getitems').prop('required','required'); jQuery('#jform_add_php_before_getitems').attr('aria-required',true); jQuery('#jform_add_php_before_getitems').addClass('required'); - jform_vvvvvzmvzj_required = false; + jform_vvvvvzmvzk_required = false; } jQuery('#jform_add_php_getlistquery').closest('.control-group').show(); - if (jform_vvvvvzmvzk_required) + if (jform_vvvvvzmvzl_required) { updateFieldRequired('add_php_getlistquery',0); jQuery('#jform_add_php_getlistquery').prop('required','required'); jQuery('#jform_add_php_getlistquery').attr('aria-required',true); jQuery('#jform_add_php_getlistquery').addClass('required'); - jform_vvvvvzmvzk_required = false; + jform_vvvvvzmvzl_required = false; } } else { jQuery('#jform_add_php_after_getitems').closest('.control-group').hide(); - if (!jform_vvvvvzmvzi_required) + if (!jform_vvvvvzmvzj_required) { updateFieldRequired('add_php_after_getitems',1); jQuery('#jform_add_php_after_getitems').removeAttr('required'); jQuery('#jform_add_php_after_getitems').removeAttr('aria-required'); jQuery('#jform_add_php_after_getitems').removeClass('required'); - jform_vvvvvzmvzi_required = true; + jform_vvvvvzmvzj_required = true; } jQuery('#jform_add_php_before_getitems').closest('.control-group').hide(); - if (!jform_vvvvvzmvzj_required) + if (!jform_vvvvvzmvzk_required) { updateFieldRequired('add_php_before_getitems',1); jQuery('#jform_add_php_before_getitems').removeAttr('required'); jQuery('#jform_add_php_before_getitems').removeAttr('aria-required'); jQuery('#jform_add_php_before_getitems').removeClass('required'); - jform_vvvvvzmvzj_required = true; + jform_vvvvvzmvzk_required = true; } jQuery('#jform_add_php_getlistquery').closest('.control-group').hide(); - if (!jform_vvvvvzmvzk_required) + if (!jform_vvvvvzmvzl_required) { updateFieldRequired('add_php_getlistquery',1); jQuery('#jform_add_php_getlistquery').removeAttr('required'); jQuery('#jform_add_php_getlistquery').removeAttr('aria-required'); jQuery('#jform_add_php_getlistquery').removeClass('required'); - jform_vvvvvzmvzk_required = true; + jform_vvvvvzmvzl_required = true; } } } @@ -1213,26 +1213,26 @@ function vvvvvzn(gettype_vvvvvzn) if (gettype) { jQuery('#jform_pagination').closest('.control-group').show(); - if (jform_vvvvvznvzl_required) + if (jform_vvvvvznvzm_required) { updateFieldRequired('pagination',0); jQuery('#jform_pagination').prop('required','required'); jQuery('#jform_pagination').attr('aria-required',true); jQuery('#jform_pagination').addClass('required'); - jform_vvvvvznvzl_required = false; + jform_vvvvvznvzm_required = false; } } else { jQuery('#jform_pagination').closest('.control-group').hide(); - if (!jform_vvvvvznvzl_required) + if (!jform_vvvvvznvzm_required) { updateFieldRequired('pagination',1); jQuery('#jform_pagination').removeAttr('required'); jQuery('#jform_pagination').removeAttr('aria-required'); jQuery('#jform_pagination').removeClass('required'); - jform_vvvvvznvzl_required = true; + jform_vvvvvznvzm_required = true; } } } diff --git a/admin/models/forms/field.js b/admin/models/forms/field.js index 43adc8eab..143464b45 100644 --- a/admin/models/forms/field.js +++ b/admin/models/forms/field.js @@ -23,14 +23,14 @@ /-----------------------------------------------------------------------------------------------------------------------------*/ // Some Global Values -jform_vvvvvzsvzq_required = false; -jform_vvvvvztvzr_required = false; -jform_vvvvvzuvzs_required = false; -jform_vvvvvzvvzt_required = false; -jform_vvvvvzyvzu_required = false; -jform_vvvvvzzvzv_required = false; -jform_vvvvwaavzw_required = false; -jform_vvvvwabvzx_required = false; +jform_vvvvvzsvzr_required = false; +jform_vvvvvztvzs_required = false; +jform_vvvvvzuvzt_required = false; +jform_vvvvvzvvzu_required = false; +jform_vvvvvzyvzv_required = false; +jform_vvvvvzzvzw_required = false; +jform_vvvvwaavzx_required = false; +jform_vvvvwabvzy_required = false; // Initial Script jQuery(document).ready(function() @@ -84,26 +84,26 @@ function vvvvvzs(datalenght_vvvvvzs) if (datalenght) { jQuery('#jform_datalenght_other').closest('.control-group').show(); - if (jform_vvvvvzsvzq_required) + if (jform_vvvvvzsvzr_required) { updateFieldRequired('datalenght_other',0); jQuery('#jform_datalenght_other').prop('required','required'); jQuery('#jform_datalenght_other').attr('aria-required',true); jQuery('#jform_datalenght_other').addClass('required'); - jform_vvvvvzsvzq_required = false; + jform_vvvvvzsvzr_required = false; } } else { jQuery('#jform_datalenght_other').closest('.control-group').hide(); - if (!jform_vvvvvzsvzq_required) + if (!jform_vvvvvzsvzr_required) { updateFieldRequired('datalenght_other',1); jQuery('#jform_datalenght_other').removeAttr('required'); jQuery('#jform_datalenght_other').removeAttr('aria-required'); jQuery('#jform_datalenght_other').removeClass('required'); - jform_vvvvvzsvzq_required = true; + jform_vvvvvzsvzr_required = true; } } } @@ -139,26 +139,26 @@ function vvvvvzt(datadefault_vvvvvzt) if (datadefault) { jQuery('#jform_datadefault_other').closest('.control-group').show(); - if (jform_vvvvvztvzr_required) + if (jform_vvvvvztvzs_required) { updateFieldRequired('datadefault_other',0); jQuery('#jform_datadefault_other').prop('required','required'); jQuery('#jform_datadefault_other').attr('aria-required',true); jQuery('#jform_datadefault_other').addClass('required'); - jform_vvvvvztvzr_required = false; + jform_vvvvvztvzs_required = false; } } else { jQuery('#jform_datadefault_other').closest('.control-group').hide(); - if (!jform_vvvvvztvzr_required) + if (!jform_vvvvvztvzs_required) { updateFieldRequired('datadefault_other',1); jQuery('#jform_datadefault_other').removeAttr('required'); jQuery('#jform_datadefault_other').removeAttr('aria-required'); jQuery('#jform_datadefault_other').removeClass('required'); - jform_vvvvvztvzr_required = true; + jform_vvvvvztvzs_required = true; } } } @@ -196,13 +196,13 @@ function vvvvvzu(datatype_vvvvvzu) jQuery('#jform_datadefault').closest('.control-group').show(); jQuery('#jform_datalenght').closest('.control-group').show(); jQuery('#jform_indexes').closest('.control-group').show(); - if (jform_vvvvvzuvzs_required) + if (jform_vvvvvzuvzt_required) { updateFieldRequired('indexes',0); jQuery('#jform_indexes').prop('required','required'); jQuery('#jform_indexes').attr('aria-required',true); jQuery('#jform_indexes').addClass('required'); - jform_vvvvvzuvzs_required = false; + jform_vvvvvzuvzt_required = false; } } @@ -211,13 +211,13 @@ function vvvvvzu(datatype_vvvvvzu) jQuery('#jform_datadefault').closest('.control-group').hide(); jQuery('#jform_datalenght').closest('.control-group').hide(); jQuery('#jform_indexes').closest('.control-group').hide(); - if (!jform_vvvvvzuvzs_required) + if (!jform_vvvvvzuvzt_required) { updateFieldRequired('indexes',1); jQuery('#jform_indexes').removeAttr('required'); jQuery('#jform_indexes').removeAttr('aria-required'); jQuery('#jform_indexes').removeClass('required'); - jform_vvvvvzuvzs_required = true; + jform_vvvvvzuvzt_required = true; } } } @@ -253,26 +253,26 @@ function vvvvvzv(datatype_vvvvvzv) if (datatype) { jQuery('#jform_store').closest('.control-group').show(); - if (jform_vvvvvzvvzt_required) + if (jform_vvvvvzvvzu_required) { updateFieldRequired('store',0); jQuery('#jform_store').prop('required','required'); jQuery('#jform_store').attr('aria-required',true); jQuery('#jform_store').addClass('required'); - jform_vvvvvzvvzt_required = false; + jform_vvvvvzvvzu_required = false; } } else { jQuery('#jform_store').closest('.control-group').hide(); - if (!jform_vvvvvzvvzt_required) + if (!jform_vvvvvzvvzu_required) { updateFieldRequired('store',1); jQuery('#jform_store').removeAttr('required'); jQuery('#jform_store').removeAttr('aria-required'); jQuery('#jform_store').removeClass('required'); - jform_vvvvvzvvzt_required = true; + jform_vvvvvzvvzu_required = true; } } } @@ -356,26 +356,26 @@ function vvvvvzy(add_css_view_vvvvvzy) if (add_css_view_vvvvvzy == 1) { jQuery('#jform_css_view').closest('.control-group').show(); - if (jform_vvvvvzyvzu_required) + if (jform_vvvvvzyvzv_required) { updateFieldRequired('css_view',0); jQuery('#jform_css_view').prop('required','required'); jQuery('#jform_css_view').attr('aria-required',true); jQuery('#jform_css_view').addClass('required'); - jform_vvvvvzyvzu_required = false; + jform_vvvvvzyvzv_required = false; } } else { jQuery('#jform_css_view').closest('.control-group').hide(); - if (!jform_vvvvvzyvzu_required) + if (!jform_vvvvvzyvzv_required) { updateFieldRequired('css_view',1); jQuery('#jform_css_view').removeAttr('required'); jQuery('#jform_css_view').removeAttr('aria-required'); jQuery('#jform_css_view').removeClass('required'); - jform_vvvvvzyvzu_required = true; + jform_vvvvvzyvzv_required = true; } } } @@ -387,26 +387,26 @@ function vvvvvzz(add_css_views_vvvvvzz) if (add_css_views_vvvvvzz == 1) { jQuery('#jform_css_views').closest('.control-group').show(); - if (jform_vvvvvzzvzv_required) + if (jform_vvvvvzzvzw_required) { updateFieldRequired('css_views',0); jQuery('#jform_css_views').prop('required','required'); jQuery('#jform_css_views').attr('aria-required',true); jQuery('#jform_css_views').addClass('required'); - jform_vvvvvzzvzv_required = false; + jform_vvvvvzzvzw_required = false; } } else { jQuery('#jform_css_views').closest('.control-group').hide(); - if (!jform_vvvvvzzvzv_required) + if (!jform_vvvvvzzvzw_required) { updateFieldRequired('css_views',1); jQuery('#jform_css_views').removeAttr('required'); jQuery('#jform_css_views').removeAttr('aria-required'); jQuery('#jform_css_views').removeClass('required'); - jform_vvvvvzzvzv_required = true; + jform_vvvvvzzvzw_required = true; } } } @@ -418,26 +418,26 @@ function vvvvwaa(add_javascript_view_footer_vvvvwaa) if (add_javascript_view_footer_vvvvwaa == 1) { jQuery('#jform_javascript_view_footer').closest('.control-group').show(); - if (jform_vvvvwaavzw_required) + if (jform_vvvvwaavzx_required) { updateFieldRequired('javascript_view_footer',0); jQuery('#jform_javascript_view_footer').prop('required','required'); jQuery('#jform_javascript_view_footer').attr('aria-required',true); jQuery('#jform_javascript_view_footer').addClass('required'); - jform_vvvvwaavzw_required = false; + jform_vvvvwaavzx_required = false; } } else { jQuery('#jform_javascript_view_footer').closest('.control-group').hide(); - if (!jform_vvvvwaavzw_required) + if (!jform_vvvvwaavzx_required) { updateFieldRequired('javascript_view_footer',1); jQuery('#jform_javascript_view_footer').removeAttr('required'); jQuery('#jform_javascript_view_footer').removeAttr('aria-required'); jQuery('#jform_javascript_view_footer').removeClass('required'); - jform_vvvvwaavzw_required = true; + jform_vvvvwaavzx_required = true; } } } @@ -449,26 +449,26 @@ function vvvvwab(add_javascript_views_footer_vvvvwab) if (add_javascript_views_footer_vvvvwab == 1) { jQuery('#jform_javascript_views_footer').closest('.control-group').show(); - if (jform_vvvvwabvzx_required) + if (jform_vvvvwabvzy_required) { updateFieldRequired('javascript_views_footer',0); jQuery('#jform_javascript_views_footer').prop('required','required'); jQuery('#jform_javascript_views_footer').attr('aria-required',true); jQuery('#jform_javascript_views_footer').addClass('required'); - jform_vvvvwabvzx_required = false; + jform_vvvvwabvzy_required = false; } } else { jQuery('#jform_javascript_views_footer').closest('.control-group').hide(); - if (!jform_vvvvwabvzx_required) + if (!jform_vvvvwabvzy_required) { updateFieldRequired('javascript_views_footer',1); jQuery('#jform_javascript_views_footer').removeAttr('required'); jQuery('#jform_javascript_views_footer').removeAttr('aria-required'); jQuery('#jform_javascript_views_footer').removeClass('required'); - jform_vvvvwabvzx_required = true; + jform_vvvvwabvzy_required = true; } } } diff --git a/admin/models/forms/help_document.js b/admin/models/forms/help_document.js index 8d914335c..5d413bae9 100644 --- a/admin/models/forms/help_document.js +++ b/admin/models/forms/help_document.js @@ -23,12 +23,12 @@ /-----------------------------------------------------------------------------------------------------------------------------*/ // Some Global Values -jform_vvvvwacwaa_required = false; -jform_vvvvwadwab_required = false; -jform_vvvvwaewac_required = false; -jform_vvvvwafwad_required = false; -jform_vvvvwagwae_required = false; -jform_vvvvwahwaf_required = false; +jform_vvvvwacwab_required = false; +jform_vvvvwadwac_required = false; +jform_vvvvwaewad_required = false; +jform_vvvvwafwae_required = false; +jform_vvvvwagwaf_required = false; +jform_vvvvwahwag_required = false; // Initial Script jQuery(document).ready(function() @@ -59,26 +59,26 @@ function vvvvwac(location_vvvvwac) if (location_vvvvwac == 1) { jQuery('#jform_admin_view').closest('.control-group').show(); - if (jform_vvvvwacwaa_required) + if (jform_vvvvwacwab_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_vvvvwacwaa_required = false; + jform_vvvvwacwab_required = false; } } else { jQuery('#jform_admin_view').closest('.control-group').hide(); - if (!jform_vvvvwacwaa_required) + if (!jform_vvvvwacwab_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_vvvvwacwaa_required = true; + jform_vvvvwacwab_required = true; } } } @@ -90,26 +90,26 @@ function vvvvwad(location_vvvvwad) if (location_vvvvwad == 2) { jQuery('#jform_site_view').closest('.control-group').show(); - if (jform_vvvvwadwab_required) + if (jform_vvvvwadwac_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_vvvvwadwab_required = false; + jform_vvvvwadwac_required = false; } } else { jQuery('#jform_site_view').closest('.control-group').hide(); - if (!jform_vvvvwadwab_required) + if (!jform_vvvvwadwac_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_vvvvwadwab_required = true; + jform_vvvvwadwac_required = true; } } } @@ -134,26 +134,26 @@ function vvvvwae(type_vvvvwae) if (type) { jQuery('#jform_url').closest('.control-group').show(); - if (jform_vvvvwaewac_required) + if (jform_vvvvwaewad_required) { updateFieldRequired('url',0); jQuery('#jform_url').prop('required','required'); jQuery('#jform_url').attr('aria-required',true); jQuery('#jform_url').addClass('required'); - jform_vvvvwaewac_required = false; + jform_vvvvwaewad_required = false; } } else { jQuery('#jform_url').closest('.control-group').hide(); - if (!jform_vvvvwaewac_required) + if (!jform_vvvvwaewad_required) { updateFieldRequired('url',1); jQuery('#jform_url').removeAttr('required'); jQuery('#jform_url').removeAttr('aria-required'); jQuery('#jform_url').removeClass('required'); - jform_vvvvwaewac_required = true; + jform_vvvvwaewad_required = true; } } } @@ -189,26 +189,26 @@ function vvvvwaf(type_vvvvwaf) if (type) { jQuery('#jform_article').closest('.control-group').show(); - if (jform_vvvvwafwad_required) + if (jform_vvvvwafwae_required) { updateFieldRequired('article',0); jQuery('#jform_article').prop('required','required'); jQuery('#jform_article').attr('aria-required',true); jQuery('#jform_article').addClass('required'); - jform_vvvvwafwad_required = false; + jform_vvvvwafwae_required = false; } } else { jQuery('#jform_article').closest('.control-group').hide(); - if (!jform_vvvvwafwad_required) + if (!jform_vvvvwafwae_required) { updateFieldRequired('article',1); jQuery('#jform_article').removeAttr('required'); jQuery('#jform_article').removeAttr('aria-required'); jQuery('#jform_article').removeClass('required'); - jform_vvvvwafwad_required = true; + jform_vvvvwafwae_required = true; } } } @@ -244,26 +244,26 @@ function vvvvwag(type_vvvvwag) if (type) { jQuery('#jform_content-lbl').closest('.control-group').show(); - if (jform_vvvvwagwae_required) + if (jform_vvvvwagwaf_required) { updateFieldRequired('content',0); jQuery('#jform_content').prop('required','required'); jQuery('#jform_content').attr('aria-required',true); jQuery('#jform_content').addClass('required'); - jform_vvvvwagwae_required = false; + jform_vvvvwagwaf_required = false; } } else { jQuery('#jform_content-lbl').closest('.control-group').hide(); - if (!jform_vvvvwagwae_required) + if (!jform_vvvvwagwaf_required) { updateFieldRequired('content',1); jQuery('#jform_content').removeAttr('required'); jQuery('#jform_content').removeAttr('aria-required'); jQuery('#jform_content').removeClass('required'); - jform_vvvvwagwae_required = true; + jform_vvvvwagwaf_required = true; } } } @@ -286,26 +286,26 @@ function vvvvwah(target_vvvvwah) if (target_vvvvwah == 1) { jQuery('#jform_groups').closest('.control-group').show(); - if (jform_vvvvwahwaf_required) + if (jform_vvvvwahwag_required) { updateFieldRequired('groups',0); jQuery('#jform_groups').prop('required','required'); jQuery('#jform_groups').attr('aria-required',true); jQuery('#jform_groups').addClass('required'); - jform_vvvvwahwaf_required = false; + jform_vvvvwahwag_required = false; } } else { jQuery('#jform_groups').closest('.control-group').hide(); - if (!jform_vvvvwahwaf_required) + if (!jform_vvvvwahwag_required) { updateFieldRequired('groups',1); jQuery('#jform_groups').removeAttr('required'); jQuery('#jform_groups').removeAttr('aria-required'); jQuery('#jform_groups').removeClass('required'); - jform_vvvvwahwaf_required = true; + jform_vvvvwahwag_required = true; } } } diff --git a/admin/models/forms/joomla_component.js b/admin/models/forms/joomla_component.js index 473af54b7..03d5500fb 100644 --- a/admin/models/forms/joomla_component.js +++ b/admin/models/forms/joomla_component.js @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 132 of this MVC - @build 20th March, 2017 + @version @update number 182 of this MVC + @build 27th March, 2017 @created 6th May, 2015 @package Component Builder @subpackage joomla_component.js diff --git a/admin/models/forms/layout.js b/admin/models/forms/layout.js index 262b5ceca..5339fa165 100644 --- a/admin/models/forms/layout.js +++ b/admin/models/forms/layout.js @@ -23,7 +23,7 @@ /-----------------------------------------------------------------------------------------------------------------------------*/ // Some Global Values -jform_vvvvvyrvyt_required = false; +jform_vvvvvyrvyu_required = false; // Initial Script jQuery(document).ready(function() @@ -39,26 +39,26 @@ function vvvvvyr(add_php_view_vvvvvyr) if (add_php_view_vvvvvyr == 1) { jQuery('#jform_php_view').closest('.control-group').show(); - if (jform_vvvvvyrvyt_required) + if (jform_vvvvvyrvyu_required) { updateFieldRequired('php_view',0); jQuery('#jform_php_view').prop('required','required'); jQuery('#jform_php_view').attr('aria-required',true); jQuery('#jform_php_view').addClass('required'); - jform_vvvvvyrvyt_required = false; + jform_vvvvvyrvyu_required = false; } } else { jQuery('#jform_php_view').closest('.control-group').hide(); - if (!jform_vvvvvyrvyt_required) + if (!jform_vvvvvyrvyu_required) { updateFieldRequired('php_view',1); jQuery('#jform_php_view').removeAttr('required'); jQuery('#jform_php_view').removeAttr('aria-required'); jQuery('#jform_php_view').removeClass('required'); - jform_vvvvvyrvyt_required = true; + jform_vvvvvyrvyu_required = true; } } } diff --git a/admin/models/forms/site_view.js b/admin/models/forms/site_view.js index da0626f5a..e4f72d3a9 100644 --- a/admin/models/forms/site_view.js +++ b/admin/models/forms/site_view.js @@ -23,16 +23,16 @@ /-----------------------------------------------------------------------------------------------------------------------------*/ // Some Global Values -jform_vvvvvyhvyh_required = false; -jform_vvvvvyivyi_required = false; -jform_vvvvvyjvyj_required = false; -jform_vvvvvykvyk_required = false; -jform_vvvvvylvyl_required = false; -jform_vvvvvymvym_required = false; -jform_vvvvvynvyn_required = false; -jform_vvvvvyovyo_required = false; -jform_vvvvvypvyp_required = false; +jform_vvvvvyhvyi_required = false; +jform_vvvvvyivyj_required = false; +jform_vvvvvyjvyk_required = false; +jform_vvvvvykvyl_required = false; +jform_vvvvvylvym_required = false; +jform_vvvvvymvyn_required = false; +jform_vvvvvynvyo_required = false; +jform_vvvvvyovyp_required = false; jform_vvvvvypvyq_required = false; +jform_vvvvvypvyr_required = false; // Initial Script jQuery(document).ready(function() @@ -72,26 +72,26 @@ function vvvvvyh(add_php_view_vvvvvyh) if (add_php_view_vvvvvyh == 1) { jQuery('#jform_php_view').closest('.control-group').show(); - if (jform_vvvvvyhvyh_required) + if (jform_vvvvvyhvyi_required) { updateFieldRequired('php_view',0); jQuery('#jform_php_view').prop('required','required'); jQuery('#jform_php_view').attr('aria-required',true); jQuery('#jform_php_view').addClass('required'); - jform_vvvvvyhvyh_required = false; + jform_vvvvvyhvyi_required = false; } } else { jQuery('#jform_php_view').closest('.control-group').hide(); - if (!jform_vvvvvyhvyh_required) + if (!jform_vvvvvyhvyi_required) { updateFieldRequired('php_view',1); jQuery('#jform_php_view').removeAttr('required'); jQuery('#jform_php_view').removeAttr('aria-required'); jQuery('#jform_php_view').removeClass('required'); - jform_vvvvvyhvyh_required = true; + jform_vvvvvyhvyi_required = true; } } } @@ -103,26 +103,26 @@ function vvvvvyi(add_php_jview_display_vvvvvyi) if (add_php_jview_display_vvvvvyi == 1) { jQuery('#jform_php_jview_display').closest('.control-group').show(); - if (jform_vvvvvyivyi_required) + if (jform_vvvvvyivyj_required) { updateFieldRequired('php_jview_display',0); jQuery('#jform_php_jview_display').prop('required','required'); jQuery('#jform_php_jview_display').attr('aria-required',true); jQuery('#jform_php_jview_display').addClass('required'); - jform_vvvvvyivyi_required = false; + jform_vvvvvyivyj_required = false; } } else { jQuery('#jform_php_jview_display').closest('.control-group').hide(); - if (!jform_vvvvvyivyi_required) + if (!jform_vvvvvyivyj_required) { updateFieldRequired('php_jview_display',1); jQuery('#jform_php_jview_display').removeAttr('required'); jQuery('#jform_php_jview_display').removeAttr('aria-required'); jQuery('#jform_php_jview_display').removeClass('required'); - jform_vvvvvyivyi_required = true; + jform_vvvvvyivyj_required = true; } } } @@ -134,26 +134,26 @@ function vvvvvyj(add_php_jview_vvvvvyj) if (add_php_jview_vvvvvyj == 1) { jQuery('#jform_php_jview').closest('.control-group').show(); - if (jform_vvvvvyjvyj_required) + if (jform_vvvvvyjvyk_required) { updateFieldRequired('php_jview',0); jQuery('#jform_php_jview').prop('required','required'); jQuery('#jform_php_jview').attr('aria-required',true); jQuery('#jform_php_jview').addClass('required'); - jform_vvvvvyjvyj_required = false; + jform_vvvvvyjvyk_required = false; } } else { jQuery('#jform_php_jview').closest('.control-group').hide(); - if (!jform_vvvvvyjvyj_required) + if (!jform_vvvvvyjvyk_required) { updateFieldRequired('php_jview',1); jQuery('#jform_php_jview').removeAttr('required'); jQuery('#jform_php_jview').removeAttr('aria-required'); jQuery('#jform_php_jview').removeClass('required'); - jform_vvvvvyjvyj_required = true; + jform_vvvvvyjvyk_required = true; } } } @@ -165,26 +165,26 @@ function vvvvvyk(add_php_document_vvvvvyk) if (add_php_document_vvvvvyk == 1) { jQuery('#jform_php_document').closest('.control-group').show(); - if (jform_vvvvvykvyk_required) + if (jform_vvvvvykvyl_required) { updateFieldRequired('php_document',0); jQuery('#jform_php_document').prop('required','required'); jQuery('#jform_php_document').attr('aria-required',true); jQuery('#jform_php_document').addClass('required'); - jform_vvvvvykvyk_required = false; + jform_vvvvvykvyl_required = false; } } else { jQuery('#jform_php_document').closest('.control-group').hide(); - if (!jform_vvvvvykvyk_required) + if (!jform_vvvvvykvyl_required) { updateFieldRequired('php_document',1); jQuery('#jform_php_document').removeAttr('required'); jQuery('#jform_php_document').removeAttr('aria-required'); jQuery('#jform_php_document').removeClass('required'); - jform_vvvvvykvyk_required = true; + jform_vvvvvykvyl_required = true; } } } @@ -196,26 +196,26 @@ function vvvvvyl(add_css_document_vvvvvyl) if (add_css_document_vvvvvyl == 1) { jQuery('#jform_css_document').closest('.control-group').show(); - if (jform_vvvvvylvyl_required) + if (jform_vvvvvylvym_required) { updateFieldRequired('css_document',0); jQuery('#jform_css_document').prop('required','required'); jQuery('#jform_css_document').attr('aria-required',true); jQuery('#jform_css_document').addClass('required'); - jform_vvvvvylvyl_required = false; + jform_vvvvvylvym_required = false; } } else { jQuery('#jform_css_document').closest('.control-group').hide(); - if (!jform_vvvvvylvyl_required) + if (!jform_vvvvvylvym_required) { updateFieldRequired('css_document',1); jQuery('#jform_css_document').removeAttr('required'); jQuery('#jform_css_document').removeAttr('aria-required'); jQuery('#jform_css_document').removeClass('required'); - jform_vvvvvylvyl_required = true; + jform_vvvvvylvym_required = true; } } } @@ -227,26 +227,26 @@ function vvvvvym(add_js_document_vvvvvym) if (add_js_document_vvvvvym == 1) { jQuery('#jform_js_document').closest('.control-group').show(); - if (jform_vvvvvymvym_required) + if (jform_vvvvvymvyn_required) { updateFieldRequired('js_document',0); jQuery('#jform_js_document').prop('required','required'); jQuery('#jform_js_document').attr('aria-required',true); jQuery('#jform_js_document').addClass('required'); - jform_vvvvvymvym_required = false; + jform_vvvvvymvyn_required = false; } } else { jQuery('#jform_js_document').closest('.control-group').hide(); - if (!jform_vvvvvymvym_required) + if (!jform_vvvvvymvyn_required) { updateFieldRequired('js_document',1); jQuery('#jform_js_document').removeAttr('required'); jQuery('#jform_js_document').removeAttr('aria-required'); jQuery('#jform_js_document').removeClass('required'); - jform_vvvvvymvym_required = true; + jform_vvvvvymvyn_required = true; } } } @@ -258,26 +258,26 @@ function vvvvvyn(add_css_vvvvvyn) if (add_css_vvvvvyn == 1) { jQuery('#jform_css').closest('.control-group').show(); - if (jform_vvvvvynvyn_required) + if (jform_vvvvvynvyo_required) { updateFieldRequired('css',0); jQuery('#jform_css').prop('required','required'); jQuery('#jform_css').attr('aria-required',true); jQuery('#jform_css').addClass('required'); - jform_vvvvvynvyn_required = false; + jform_vvvvvynvyo_required = false; } } else { jQuery('#jform_css').closest('.control-group').hide(); - if (!jform_vvvvvynvyn_required) + if (!jform_vvvvvynvyo_required) { updateFieldRequired('css',1); jQuery('#jform_css').removeAttr('required'); jQuery('#jform_css').removeAttr('aria-required'); jQuery('#jform_css').removeClass('required'); - jform_vvvvvynvyn_required = true; + jform_vvvvvynvyo_required = true; } } } @@ -290,13 +290,13 @@ function vvvvvyo(add_php_ajax_vvvvvyo) { jQuery('#jform_ajax_input').closest('.control-group').show(); jQuery('#jform_php_ajaxmethod').closest('.control-group').show(); - if (jform_vvvvvyovyo_required) + if (jform_vvvvvyovyp_required) { updateFieldRequired('php_ajaxmethod',0); jQuery('#jform_php_ajaxmethod').prop('required','required'); jQuery('#jform_php_ajaxmethod').attr('aria-required',true); jQuery('#jform_php_ajaxmethod').addClass('required'); - jform_vvvvvyovyo_required = false; + jform_vvvvvyovyp_required = false; } } @@ -304,13 +304,13 @@ function vvvvvyo(add_php_ajax_vvvvvyo) { jQuery('#jform_ajax_input').closest('.control-group').hide(); jQuery('#jform_php_ajaxmethod').closest('.control-group').hide(); - if (!jform_vvvvvyovyo_required) + if (!jform_vvvvvyovyp_required) { updateFieldRequired('php_ajaxmethod',1); jQuery('#jform_php_ajaxmethod').removeAttr('required'); jQuery('#jform_php_ajaxmethod').removeAttr('aria-required'); jQuery('#jform_php_ajaxmethod').removeClass('required'); - jform_vvvvvyovyo_required = true; + jform_vvvvvyovyp_required = true; } } } @@ -323,23 +323,23 @@ function vvvvvyp(add_custom_button_vvvvvyp) { jQuery('#jform_custom_button').closest('.control-group').show(); jQuery('#jform_php_controller').closest('.control-group').show(); - if (jform_vvvvvypvyp_required) + if (jform_vvvvvypvyq_required) { updateFieldRequired('php_controller',0); jQuery('#jform_php_controller').prop('required','required'); jQuery('#jform_php_controller').attr('aria-required',true); jQuery('#jform_php_controller').addClass('required'); - jform_vvvvvypvyp_required = false; + jform_vvvvvypvyq_required = false; } jQuery('#jform_php_model').closest('.control-group').show(); - if (jform_vvvvvypvyq_required) + if (jform_vvvvvypvyr_required) { updateFieldRequired('php_model',0); jQuery('#jform_php_model').prop('required','required'); jQuery('#jform_php_model').attr('aria-required',true); jQuery('#jform_php_model').addClass('required'); - jform_vvvvvypvyq_required = false; + jform_vvvvvypvyr_required = false; } } @@ -347,22 +347,22 @@ function vvvvvyp(add_custom_button_vvvvvyp) { jQuery('#jform_custom_button').closest('.control-group').hide(); jQuery('#jform_php_controller').closest('.control-group').hide(); - if (!jform_vvvvvypvyp_required) + if (!jform_vvvvvypvyq_required) { updateFieldRequired('php_controller',1); jQuery('#jform_php_controller').removeAttr('required'); jQuery('#jform_php_controller').removeAttr('aria-required'); jQuery('#jform_php_controller').removeClass('required'); - jform_vvvvvypvyp_required = true; + jform_vvvvvypvyq_required = true; } jQuery('#jform_php_model').closest('.control-group').hide(); - if (!jform_vvvvvypvyq_required) + if (!jform_vvvvvypvyr_required) { updateFieldRequired('php_model',1); jQuery('#jform_php_model').removeAttr('required'); jQuery('#jform_php_model').removeAttr('aria-required'); jQuery('#jform_php_model').removeClass('required'); - jform_vvvvvypvyq_required = true; + jform_vvvvvypvyr_required = true; } } } diff --git a/admin/models/forms/template.js b/admin/models/forms/template.js index b8e495702..7844183e4 100644 --- a/admin/models/forms/template.js +++ b/admin/models/forms/template.js @@ -23,7 +23,7 @@ /-----------------------------------------------------------------------------------------------------------------------------*/ // Some Global Values -jform_vvvvvyqvys_required = false; +jform_vvvvvyqvyt_required = false; // Initial Script jQuery(document).ready(function() @@ -39,26 +39,26 @@ function vvvvvyq(add_php_view_vvvvvyq) if (add_php_view_vvvvvyq == 1) { jQuery('#jform_php_view').closest('.control-group').show(); - if (jform_vvvvvyqvys_required) + if (jform_vvvvvyqvyt_required) { updateFieldRequired('php_view',0); jQuery('#jform_php_view').prop('required','required'); jQuery('#jform_php_view').attr('aria-required',true); jQuery('#jform_php_view').addClass('required'); - jform_vvvvvyqvys_required = false; + jform_vvvvvyqvyt_required = false; } } else { jQuery('#jform_php_view').closest('.control-group').hide(); - if (!jform_vvvvvyqvys_required) + if (!jform_vvvvvyqvyt_required) { updateFieldRequired('php_view',1); jQuery('#jform_php_view').removeAttr('required'); jQuery('#jform_php_view').removeAttr('aria-required'); jQuery('#jform_php_view').removeClass('required'); - jform_vvvvvyqvys_required = true; + jform_vvvvvyqvyt_required = true; } } } diff --git a/admin/models/import.php b/admin/models/import.php index a1394ea32..d5d4f4552 100644 --- a/admin/models/import.php +++ b/admin/models/import.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage import.php @@ -31,6 +31,11 @@ defined('_JEXEC') or die('Restricted access'); */ class ComponentbuilderModelImport extends JModelLegacy { + // set uploading values + protected $use_streams = false; + protected $allow_unsafe = false; + protected $safeFileOptions = array(); + /** * @var object JTable object */ @@ -72,10 +77,6 @@ class ComponentbuilderModelImport extends JModelLegacy // Recall the 'Import from Directory' path. $path = $app->getUserStateFromRequest($this->_context . '.import_directory', 'import_directory', $app->get('tmp_path')); $this->setState('import.directory', $path); - // set uploading values - $this->use_streams = false; - $this->allow_unsafe = false; - $this->safeFileOptions = array(); parent::populateState(); } @@ -282,21 +283,16 @@ class ComponentbuilderModelImport extends JModelLegacy } // check the extention - switch(strtolower(pathinfo($p_dir, PATHINFO_EXTENSION))){ - case 'xls': - case 'ods': - case 'csv': - break; - - default: + if(!$this->checkExtension($p_dir)) + { + // set error message $app->enqueueMessage(JText::_('COM_COMPONENTBUILDER_IMPORT_MSG_DOES_NOT_HAVE_A_VALID_FILE_TYPE'), 'warning'); return false; - break; } $package['packagename'] = null; - $package['dir'] = $p_dir; - $package['type'] = $type; + $package['dir'] = $p_dir; + $package['type'] = $type; return $package; } @@ -354,21 +350,15 @@ class ComponentbuilderModelImport extends JModelLegacy $archivename = JPath::clean($archivename); // check the extention - switch(strtolower(pathinfo($archivename, PATHINFO_EXTENSION))){ - case 'xls': - case 'ods': - case 'csv': - break; - - default: + if(!$this->checkExtension($archivename)) + { // Cleanup the import files $this->remove($archivename); $app->enqueueMessage(JText::_('COM_COMPONENTBUILDER_IMPORT_MSG_DOES_NOT_HAVE_A_VALID_FILE_TYPE'), 'warning'); return false; - break; - } + } - $config = JFactory::getConfig(); + $config = JFactory::getConfig(); // set Package Name $check['packagename'] = $archivename; @@ -381,6 +371,28 @@ class ComponentbuilderModelImport extends JModelLegacy return $check; } + /** + * Check the extension + * + * @param string $file Name of the uploaded file + * + * @return boolean True on success + * + */ + protected function checkExtension($file) + { + // check the extention + switch(strtolower(pathinfo($file, PATHINFO_EXTENSION))) + { + case 'xls': + case 'ods': + case 'csv': + return true; + break; + } + return false; + } + /** * Clean up temporary uploaded spreadsheet * diff --git a/admin/models/import_joomla_components.php b/admin/models/import_joomla_components.php new file mode 100644 index 000000000..b573ee460 --- /dev/null +++ b/admin/models/import_joomla_components.php @@ -0,0 +1,1576 @@ + + @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'); + +/** + * Componentbuilder Import_joomla_components Model + */ +class ComponentbuilderModelImport_joomla_components extends JModelLegacy +{ + // set uploading values + protected $use_streams = false; + protected $allow_unsafe = false; + protected $safeFileOptions = array(); + + /** + * @var object JTable object + */ + protected $_table = null; + + /** + * @var object JTable object + */ + protected $_url = null; + + /** + * Model context string. + * + * @var string + */ + protected $_context = 'com_componentbuilder.import_joomla_components'; + + /** + * Import Settings + */ + protected $getType = NULL; + protected $dataType = NULL; + + /** + * Method to auto-populate the model state. + * + * Note. Calling getState in this method will result in recursion. + * + * @return void + * + */ + protected function populateState() + { + $app = JFactory::getApplication('administrator'); + + $this->setState('message', $app->getUserState('com_componentbuilder.message')); + $app->setUserState('com_componentbuilder.message', ''); + + // Recall the 'Import from Directory' path. + $path = $app->getUserStateFromRequest($this->_context . '.import_directory', 'import_directory', $app->get('tmp_path')); + $this->setState('import.directory', $path); + parent::populateState(); + } + + protected $target = false; + protected $newID = array(); + + /** + * Import an spreadsheet from either folder, url or upload. + * + * @return boolean result of import + * + */ + public function import() + { + $this->setState('action', 'import'); + $app = JFactory::getApplication(); + $session = JFactory::getSession(); + $package = null; + $continue = false; + // get import type + $this->getType = $app->input->getString('gettype', NULL); + // get import type + $this->dataType = $session->get('dataType_VDM_IMPORTINTO', NULL); + + if ($package === null) + { + if ($this->dataType === 'smart_package') + { + $this->allow_unsafe = true; + } + switch ($this->getType) + { + case 'folder': + // Remember the 'Import from Directory' path. + $app->getUserStateFromRequest($this->_context . '.import_directory', 'import_directory'); + $package = $this->_getPackageFromFolder(); + break; + + case 'upload': + $package = $this->_getPackageFromUpload(); + break; + + case 'url': + $package = $this->_getPackageFromUrl(); + break; + + case 'continue-basic': + case 'continue-ext': + $continue = true; + $package = $session->get('package', null); + $package = json_decode($package, true); + // clear session + $session->clear('package'); + $session->clear('dataType'); + $session->clear('hasPackage'); + break; + + default: + $app->setUserState('com_componentbuilder.message', JText::_('COM_COMPONENTBUILDER_IMPORT_NO_IMPORT_TYPE_FOUND')); + return false; + break; + } + } + // Was the package valid? + if (!$package || !$package['type']) + { + if (in_array($this->getType, array('upload', 'url'))) + { + $this->remove($package['packagename']); + } + + $app->setUserState('com_componentbuilder.message', JText::_('COM_COMPONENTBUILDER_IMPORT_UNABLE_TO_FIND_IMPORT_PACKAGE')); + return false; + } + + // first link data to table headers + if(!$continue){ + $package = json_encode($package); + $session->set('package', $package); + $session->set('dataType', $this->dataType); + $session->set('hasPackage', true); + return true; + } + // set the data + if ('continue-basic' == $this->getType) + { + $headerList = json_decode($session->get($this->dataType.'_VDM_IMPORTHEADERS', false), true); + } + else + { + $headerList = null; + } + if (!$this->setData($package, $headerList)) + { + // There was an error importing the package + $msg = JText::_('COM_COMPONENTBUILDER_IMPORT_ERROR'); + $back = $session->get('backto_VDM_IMPORT', NULL); + if ($back) + { + $app->setUserState('com_componentbuilder.redirect_url', 'index.php?option=com_componentbuilder&view='.$back); + $session->clear('backto_VDM_IMPORT'); + } + $result = false; + } + else + { + // Package imported sucessfully + $msg = JText::sprintf('COM_COMPONENTBUILDER_IMPORT_SUCCESS', $package['packagename']); + $back = $session->get('backto_VDM_IMPORT', NULL); + if ($back) + { + $app->setUserState('com_componentbuilder.redirect_url', 'index.php?option=com_componentbuilder&view='.$back); + $session->clear('backto_VDM_IMPORT'); + } + $result = true; + } + + // Set some model state values + $app->enqueueMessage($msg); + + // remove file after import + $this->remove($package['packagename']); + $session->clear($this->getType.'_VDM_IMPORTHEADERS'); + return $result; + } + + /** + * Works out an importation spreadsheet from a HTTP upload + * + * @return spreadsheet definition or false on failure + */ + protected function _getPackageFromUpload() + { + // Get the uploaded file information + $app = JFactory::getApplication(); + $input = $app->input; + + // Do not change the filter type 'raw'. We need this to let files containing PHP code to upload. See JInputFiles::get. + $userfile = $input->files->get('import_package', null, 'raw'); + + // Make sure that file uploads are enabled in php + if (!(bool) ini_get('file_uploads')) + { + $app->enqueueMessage(JText::_('COM_COMPONENTBUILDER_IMPORT_MSG_WARNIMPORTFILE'), 'warning'); + return false; + } + + // If there is no uploaded file, we have a problem... + if (!is_array($userfile)) + { + $app->enqueueMessage(JText::_('COM_COMPONENTBUILDER_IMPORT_MSG_NO_FILE_SELECTED'), 'warning'); + return false; + } + + // Check if there was a problem uploading the file. + if ($userfile['error'] || $userfile['size'] < 1) + { + $app->enqueueMessage(JText::_('COM_COMPONENTBUILDER_IMPORT_MSG_WARNIMPORTUPLOADERROR'), 'warning'); + return false; + } + + // Build the appropriate paths + $config = JFactory::getConfig(); + $tmp_dest = $config->get('tmp_path') . '/' . $userfile['name']; + $tmp_src = $userfile['tmp_name']; + + // Move uploaded file + jimport('joomla.filesystem.file'); + $p_file = JFile::upload($tmp_src, $tmp_dest, $this->use_streams, $this->allow_unsafe, $this->safeFileOptions); + + // Was the package downloaded? + if (!$p_file) + { + $session = JFactory::getSession(); + $session->clear('package'); + $session->clear('dataType'); + $session->clear('hasPackage'); + // was not uploaded + return false; + } + + // check that this is a valid spreadsheet + $package = $this->check($userfile['name']); + + return $package; + } + + /** + * Import an spreadsheet from a directory + * + * @return array Spreadsheet details or false on failure + * + */ + protected function _getPackageFromFolder() + { + $app = JFactory::getApplication(); + $input = $app->input; + + // Get the path to the package to import + $p_dir = $input->getString('import_directory'); + $p_dir = JPath::clean($p_dir); + // Did you give us a valid path? + if (!file_exists($p_dir)) + { + $app->enqueueMessage(JText::_('COM_COMPONENTBUILDER_IMPORT_MSG_PLEASE_ENTER_A_PACKAGE_DIRECTORY'), 'warning'); + return false; + } + + // Detect the package type + $type = $this->getType; + + // Did you give us a valid package? + if (!$type) + { + $app->enqueueMessage(JText::_('COM_COMPONENTBUILDER_IMPORT_MSG_PATH_DOES_NOT_HAVE_A_VALID_PACKAGE'), 'warning'); + } + + // check the extention + if(!$this->checkExtension($p_dir)) + { + // set error message + $app->enqueueMessage(JText::_('COM_COMPONENTBUILDER_IMPORT_MSG_DOES_NOT_HAVE_A_VALID_FILE_TYPE'), 'warning'); + return false; + } + + $package['packagename'] = null; + $package['dir'] = $p_dir; + $package['type'] = $type; + + return $package; + } + + /** + * Import an spreadsheet from a URL + * + * @return Package details or false on failure + * + */ + protected function _getPackageFromUrl() + { + $app = JFactory::getApplication(); + $input = $app->input; + + // Get the URL of the package to import + $url = $input->getString('import_url'); + + // Did you give us a URL? + if (!$url) + { + $app->enqueueMessage(JText::_('COM_COMPONENTBUILDER_IMPORT_MSG_ENTER_A_URL'), 'warning'); + return false; + } + + // Download the package at the URL given + $p_file = JInstallerHelper::downloadPackage($url); + + // Was the package downloaded? + if (!$p_file) + { + $app->enqueueMessage(JText::_('COM_COMPONENTBUILDER_IMPORT_MSG_INVALID_URL'), 'warning'); + return false; + } + + // check that this is a valid spreadsheet + $package = $this->check($p_file); + + return $package; + } + + /** + * Check a file and verifies it as a spreadsheet file + * Supports .csv .xlsx .xls and .ods + * + * @param string $p_filename The uploaded package filename or import directory + * + * @return array of elements + * + */ + protected function check($archivename) + { + $app = JFactory::getApplication(); + // Clean the name + $archivename = JPath::clean($archivename); + + // check the extention + if(!$this->checkExtension($archivename)) + { + // Cleanup the import files + $this->remove($archivename); + $app->enqueueMessage(JText::_('COM_COMPONENTBUILDER_IMPORT_MSG_DOES_NOT_HAVE_A_VALID_FILE_TYPE'), 'warning'); + return false; + } + + $config = JFactory::getConfig(); + // set Package Name + $check['packagename'] = $archivename; + + // set directory + $check['dir'] = $config->get('tmp_path'). '/' .$archivename; + + // set type + $check['type'] = $this->getType; + + return $check; + } + + /** + * Check the extension + * + * @param string $file Name of the uploaded file + * + * @return boolean True on success + * + */ + protected function checkExtension($file) + { + // check the extension + switch(strtolower(pathinfo($file, PATHINFO_EXTENSION))) + { + case 'xls': + case 'ods': + case 'csv': + return true; + break; + case 'zip': + if ($this->dataType === 'smart_package') + { + return true; + } + break; + } + return false; + } + + /** + * Clean up temporary uploaded spreadsheet + * + * @param string $package Name of the uploaded spreadsheet file + * + * @return boolean True on success + * + */ + protected function remove($package) + { + jimport('joomla.filesystem.file'); + + $config = JFactory::getConfig(); + $package = $config->get('tmp_path'). '/' .$package; + + // Is the package file a valid file? + if (is_file($package)) + { + JFile::delete($package); + } + elseif (is_file(JPath::clean($package))) + { + // It might also be just a base filename + JFile::delete(JPath::clean($package)); + } + } + + /** + * Set the data from the spreadsheet to the database + * + * @param string $package Paths to the uploaded package file + * + * @return boolean false on failure + * + **/ + protected function setData($package, $target_headers) + { + $jinput = JFactory::getApplication()->input; + // set the data based on the type of import being done + if ('continue-basic' === $this->getType && ComponentbuilderHelper::checkArray($target_headers)) + { + foreach($target_headers as $header) + { + $data['target_headers'][$header] = $jinput->getString($header, null); + } + // make sure the file is loaded + JLoader::import('PHPExcel', JPATH_COMPONENT_ADMINISTRATOR . '/helpers'); + // set the data + if(isset($package['dir'])) + { + $inputFileType = PHPExcel_IOFactory::identify($package['dir']); + $excelReader = PHPExcel_IOFactory::createReader($inputFileType); + $excelReader->setReadDataOnly(true); + $excelObj = $excelReader->load($package['dir']); + $data['array'] = $excelObj->getActiveSheet()->toArray(null, true,true,true); + $excelObj->disconnectWorksheets(); + unset($excelObj); + return $this->saveBasic($data); + } + } + elseif ('continue-ext' === $this->getType) + { + // set the data + if(isset($package['dir'])) + { + // set auto loader + ComponentbuilderHelper::autoLoader('smart'); + // extract the package + if (JFile::exists($package['dir'])) + { + // get the zip adapter + $zip = JArchive::getAdapter('zip'); + // set the directory name + $dir = JFile::stripExt($package['dir']); + // unzip the package + $zip->extract($package['dir'], $dir); + // check for database file + $dbFile = $dir . '/db.vdm'; + if (JFile::exists($dbFile)) + { + // load the data + if ($data = @file_get_contents($dbFile)) + { + // prep the data + $data = unserialize($data); + if (isset($data['joomla_component']) && ComponentbuilderHelper::checkArray($data['joomla_component'])) + { + // save the smart data + if ($this->saveSmartComponents($data, $dir)) + { + ComponentbuilderHelper::removeFolder($dir); + return true; + } + } + } + } + ComponentbuilderHelper::removeFolder($dir); + } + } + } + return false; + } + + /** + * Save the smart components + * + * @param array $data The values to save + * + * @return boolean false on failure + * + **/ + protected function saveSmartComponents($data, $dir) + { + // get user object + $user = JFactory::getUser(); + // Get a db connection. + $db = JFactory::getDbo(); + // set some defaults + $today = JFactory::getDate()->toSql(); + // we first store the fieldtype + if (!$this->saveSmartItems($data, 'fieldtype', $db, $user, $today)) + { + return false; + } + // we then store the field + if (!$this->saveSmartItems($data, 'field', $db, $user, $today)) + { + return false; + } + // we then store the admin_view + if (!$this->saveSmartItems($data, 'admin_view', $db, $user, $today)) + { + return false; + } + // we then store the dynamic_get + if (!$this->saveSmartItems($data, 'dynamic_get', $db, $user, $today)) + { + return false; + } + // we then store the custom_admin_view + if (!$this->saveSmartItems($data, 'custom_admin_view', $db, $user, $today)) + { + return false; + } + // we then store the site_view + if (!$this->saveSmartItems($data, 'site_view', $db, $user, $today)) + { + return false; + } + // we then store the template + if (!$this->saveSmartItems($data, 'template', $db, $user, $today)) + { + return false; + } + // we then store the layout + if (!$this->saveSmartItems($data, 'layout', $db, $user, $today)) + { + return false; + } + // we then store the components + if (!$this->saveSmartItems($data, 'joomla_component', $db, $user, $today)) + { + return false; + } + // we then store the custom_code + if (!$this->saveSmartItems($data, 'custom_code', $db, $user, $today)) + { + return false; + } + // lets move all the files to its correct location + if (!$this->moveSmartStuff($dir)) + { + return false; + } + return true; + } + + /** + * Move the smart content (files & folders) into place + * + * @param string $dir The path to the folders + * + * @return boolean false on failure + * + **/ + protected function moveSmartStuff($dir) + { + // set params + $params = JComponentHelper::getParams('com_componentbuilder'); + // set custom folder path + $customPath = $params->get('custom_folder_path', JPATH_COMPONENT_ADMINISTRATOR.'/custom'); + $imagesPath = JPATH_SITE . '/images'; + // check if we have custom files + if (JFolder::exists($dir . '/custom')) + { + // great we have some custom stuff lets move it + JFolder::copy($dir . '/custom', $customPath,'',true); + } + // check if we have images + if (JFolder::exists($dir . '/images')) + { + // great we have some images lets move them + JFolder::copy($dir . '/images', $imagesPath,'',true); + } + return true; + } + + /** + * Save the smart items + * + * @param array $items The values to save + * @param string $type The type of values + * @param object $db The database object + * @param object $user The user object + * @param string $today The date today + * + * @return boolean false on failure + * + **/ + protected function saveSmartItems(&$items, $type, &$db, &$user, &$today) + { + if (isset($items[$type]) && ComponentbuilderHelper::checkArray($items[$type])) + { + // get global action permissions + $canDo = ComponentbuilderHelper::getActions($type); + $canEdit = $canDo->get('core.edit'); + $canState = $canDo->get('core.edit.state'); + $canCreate = $canDo->get('core.create'); + foreach ($items[$type] as $item) + { + $oldID = $item->id; + // first check if exist + if ($canEdit && $local = $this->getLocalItem($item, $type, $db, true)) + { + $dbDate = strtotime($item->modified); + $localDate = strtotime($local->modified); + // okay we have it local (check if the version is newer) + if ($dbDate > $localDate) /// hmmm not sure about this... may cause issues <-- lets see (some may even want to override the local version even if it is newer) TODO (add switch) + { + // make sure we have the correct ID set + $item->id = $local->id; + // yes it is newer, lets update + if ($id = $this->updateLocalItem($item, $type, $db, $user, $today, $canState)) + { + $this->newID[$type][$oldID] = $id; + } + // we must add some error handler here + } + else + { + $this->newID[$type][$oldID] = $local->id; + } + // we must add some notice handler here + } + elseif ($canCreate && $id = $this->addLocalItem($item, $type, $db, $user, $today)) + { + // not found in local db so add + $this->newID[$type][$oldID] = $id; + } + // we must add some error handler here + } + } + return true; + } + + /** + * Prep the item + * + * @param object $item The item to prep + * @param string $type The type of values + * @param object $user The user object + * @param string $today The date today + * + * @return mixed false on failure + * object on success + * + **/ + protected function prepItem($item, &$type, $action, &$user, &$today) + { + $this->updateAfter = false; + // actions to effect both + if (isset($item->asset_id)) + { + unset($item->asset_id); + } + if (isset($item->checked_out)) + { + $item->checked_out = 0; + } + if (isset($item->checked_out_time)) + { + $item->checked_out_time = '0000-00-00 00:00:00'; + } + // do the id fix for the new ids + switch($type) + { + case 'field': + // update the fieldtype + if (isset($item->fieldtype) && isset($this->newID['fieldtype'][$item->fieldtype])) + { + $item->fieldtype = $this->newID['fieldtype'][$item->fieldtype]; + } + else + { + // we must add some error handler here + return false; + } + break; + case 'dynamic_get': + // update the view_table_main ID + if (isset($item->main_source) && $item->main_source == 1 && isset($item->view_table_main) && is_numeric($item->view_table_main)) + { + if (isset($this->newID['admin_view'][$item->view_table_main])) + { + $item->view_table_main = $this->newID['admin_view'][$item->view_table_main]; + } + else + { + // we must add some error handler here + return false; + } + } + // update the join_view_table + if (isset($item->join_view_table) && ComponentbuilderHelper::checkJson($item->join_view_table)) + { + $join_view_table = json_decode($item->join_view_table, true); + foreach ($join_view_table['view_table'] as $nr => $id) + { + // update the join_view_table + if (isset($this->newID['admin_view'][$id])) + { + $join_view_table['view_table'][$nr] = $this->newID['admin_view'][$id]; + } + else + { + // we must add some error handler here + $join_view_table['view_table'][$nr] = ''; + } + } + // load it back + $item->join_view_table = json_encode($join_view_table); + } + else + { + unset($item->join_view_table); + } + break; + case 'layout': + case 'template': + // update the dynamic_get + if (isset($item->dynamic_get) && isset($this->newID['dynamic_get'][$item->dynamic_get])) + { + $item->dynamic_get = $this->newID['dynamic_get'][$item->dynamic_get]; + } + else + { + unset($item->dynamic_get); + } + break; + case 'custom_admin_view': + case 'site_view': + // update the main_get + if (isset($item->main_get) && isset($this->newID['dynamic_get'][$item->main_get])) + { + $item->main_get = $this->newID['dynamic_get'][$item->main_get]; + } + else + { + // we must add some error handler here + return false; + } + // update the dynamic_get + if (isset($item->dynamic_get) && isset($this->newID['dynamic_get'][$item->dynamic_get])) + { + $item->dynamic_get = $this->newID['dynamic_get'][$item->dynamic_get]; + } + else + { + unset($item->dynamic_get); + } + // update the custom_get + if (isset($item->custom_get) && ComponentbuilderHelper::checkJson($item->custom_get)) + { + $custom_get = json_decode($item->custom_get, true); + foreach ($custom_get as $nr => $get) + { + // update the custom_get + if (isset($this->newID['dynamic_get'][$get])) + { + $custom_get[$nr] = $this->newID['dynamic_get'][$get]; + } + else + { + // we must add some error handler here + unset($custom_get[$nr]); + } + } + // load it back if there is any remaining + if (ComponentbuilderHelper::checkArray($custom_get)) + { + $item->custom_get = json_encode($custom_get); + } + else + { + unset($item->custom_get); + } + } + else + { + unset($item->custom_get); + } + break; + case 'admin_view': + // we must clear the demo content (since it was not moved as far as we know) TODO + unset($item->add_sql); + unset($item->source); + unset($item->addtables); + // update the addfields + if (isset($item->addfields) && ComponentbuilderHelper::checkJson($item->addfields)) + { + $addfields = json_decode($item->addfields, true); + foreach ($addfields['field'] as $nr => $id) + { + // update the addfields + if (isset($this->newID['field'][$id])) + { + $addfields['field'][$nr] = $this->newID['field'][$id]; + } + else + { + // we must add some error handler here + $addfields['field'][$nr] = ''; + } + } + // load it back + $item->addfields = json_encode($addfields); + } + else + { + unset($item->addfields); + } + // update the addlinked_views + if (isset($item->addlinked_views) && ComponentbuilderHelper::checkJson($item->addlinked_views)) + { + $addlinked_views = json_decode($item->addlinked_views, true); + foreach ($addlinked_views['adminview'] as $nr => $id) + { + // update the addlinked_views + if (isset($this->newID['admin_view'][$id])) + { + $addlinked_views['adminview'][$nr] = $this->newID['admin_view'][$id]; + } + else + { + // this is painful but true... + $this->updateAfter = true; + } + } + // load it back + $item->addlinked_views = json_encode($addlinked_views); + } + else + { + unset($item->addlinked_views); + } + // update the addconditions + if (isset($item->addconditions) && ComponentbuilderHelper::checkJson($item->addconditions)) + { + $addconditions = json_decode($item->addconditions, true); + $targets = array('target_field', 'match_field'); + foreach ($targets as $target) + { + foreach ($addconditions[$target] as $nr => $id) + { + // update the addconditions + if (isset($this->newID['field'][$id])) + { + $addconditions[$target][$nr] = $this->newID['field'][$id]; + } + else + { + // we must add some error handler here + $addconditions[$target][$nr] = ''; + } + } + } + // load it back + $item->addconditions = json_encode($addconditions); + } + else + { + unset($item->addconditions); + } + break; + case 'joomla_component': + // update the addconfig + if (isset($item->addconfig) && ComponentbuilderHelper::checkJson($item->addconfig)) + { + $addconfig = json_decode($item->addconfig, true); + foreach ($addconfig['field'] as $nr => $id) + { + // update the addconfig + if (isset($this->newID['field'][$id])) + { + $addconfig['field'][$nr] = $this->newID['field'][$id]; + } + else + { + // we must add some error handler here + $addconfig['field'][$nr] = ''; + } + } + // load it back + $item->addconfig = json_encode($addconfig); + } + // update the addadmin_views + if (isset($item->addadmin_views) && ComponentbuilderHelper::checkJson($item->addadmin_views)) + { + $addadmin_views = json_decode($item->addadmin_views, true); + foreach ($addadmin_views['adminview'] as $nr => $id) + { + // update the addadmin_views + if (isset($this->newID['admin_view'][$id])) + { + $addadmin_views['adminview'][$nr] = $this->newID['admin_view'][$id]; + } + else + { + // we must add some error handler here + $addadmin_views['adminview'][$nr] = ''; + } + } + // load it back + $item->addadmin_views = json_encode($addadmin_views); + } + else + { + unset($item->addadmin_views); + } + // update the addcustom_admin_views + if (isset($item->addcustom_admin_views) && ComponentbuilderHelper::checkJson($item->addcustom_admin_views)) + { + $addcustom_admin_views = json_decode($item->addcustom_admin_views, true); + foreach ($addcustom_admin_views['customadminview'] as $nr => $id) + { + // update the addcustom_admin_views + if (isset($this->newID['custom_admin_view'][$id])) + { + $addcustom_admin_views['customadminview'][$nr] = $this->newID['custom_admin_view'][$id]; + } + else + { + // we must add some error handler here + $addcustom_admin_views['customadminview'][$nr] = ''; + } + } + // load it back + $item->addcustom_admin_views = json_encode($addcustom_admin_views); + } + // update the addsite_views + if (isset($item->addsite_views) && ComponentbuilderHelper::checkJson($item->addsite_views)) + { + $addsite_views = json_decode($item->addsite_views, true); + foreach ($addsite_views['siteview'] as $nr => $id) + { + // update the addsite_views + if (isset($this->newID['site_view'][$id])) + { + $addsite_views['siteview'][$nr] = $this->newID['site_view'][$id]; + } + else + { + // we must add some error handler here + $addsite_views['siteview'][$nr] = ''; + } + } + // load it back + $item->addsite_views = json_encode($addsite_views); + } + break; + case 'custom_code': + // update the component ID where needed + if (isset($item->component) && $item->component > 0) + { + if (isset($this->newID['joomla_component'][$item->component])) + { + $item->component = $this->newID['joomla_component'][$item->component]; + } + else + { + unset($item->component); + } + } + break; + } + // final action prep + switch($action) + { + case 'update': + // set values to follow the update conventions + if (isset($item->created_by)) + { + unset($item->created_by); + } + $item->modified_by = $user->id; + $item->modified = $today; + // return the item + return $item; + break; + case 'add': + // remove the ID + unset($item->id); + // set values to follow the adding conventions + $item->created_by = $user->id; + $item->modified_by = $user->id; + $item->modified = $today; + // return the item + return $item; + break; + } + return false; + } + + /** + * Update the local item + * + * @param object $item The item to update + * @param string $type The type of values + * @param object $db The database object + * @param object $user The user object + * @param string $today The date today + * @param bool $canState The switch to set state + * + * @return mixed false on failure + * ID int on success + * + **/ + protected function updateLocalItem(&$item, &$type, &$db, &$user, &$today, &$canState) + { + // prep the item + if ($update = $this->prepItem($item, $type, 'update', $user, $today)) + { + // remove the published state if not allowed to edit it + if (!$canState && isset($update->published)) + { + unset($update->published); + } + // update the item + if ($result = $db->updateObject('#__componentbuilder_' . $type, $update, 'id')) + { + // return current ID + return $update->id; + } + } + return false; + } + + /** + * add the local item + * + * @param object $item The item to update + * @param string $type The type of values + * @param object $db The database object + * @param object $user The user object + * @param string $today The date today + * + * @return mixed false on failure + * ID int on success + * + **/ + protected function addLocalItem(&$item, &$type, &$db, &$user, &$today) + { + // prep the item + if ($add = $this->prepItem($item, $type, 'add', $user, $today)) + { + // insert/add the item + if ($result = $db->insertObject('#__componentbuilder_' . $type, $add)) + { + $aId = $db->insertid(); + // make sure the access of asset is set + ComponentbuilderHelper::setAsset($aId, $type); + // set new ID + return $aId; + } + } + return false; + } + + /** + * Get the local item + * + * @param object $item The item to get + * @param string $type The type of values + * @param object $db The database object + * @param bool $retry The retry switch + * @param bool $get The query get switch + * + * @return mixed false on failure + * ID int on success + * + **/ + protected function getLocalItem(&$item, &$type, &$db, $retry = false, $get = 1) + { + $query = $db->getQuery(true); + $query->select($db->quoteName('a.*')); + $query->from($db->quoteName('#__componentbuilder_' . $type, 'a')); + if ($get == 1) + { + $query->where($db->quoteName('a.created') . ' = '. $db->quote($item->created)); + $query->where($db->quoteName('a.id') .' = '. (int) $item->id); + } + elseif (componentbuilderHelper::checkArray($get)) + { + foreach ($get as $field) + { + if (isset($item->$field)) + { + if (is_numeric($item->$field) && is_int($item->$field)) + { + $query->where($db->quoteName('a.' . $field) . ' = '. (int) $item->$field); + } + elseif (is_numeric($item->$field) && is_float($item->$field)) + { + $query->where($db->quoteName('a.' . $field) . ' = '. (float) $item->$field); + } + elseif(componentbuilderHelper::checkString($item->$field)) // do not allow empty strings (since it could be major mis match) + { + $query->where($db->quoteName('a.' . $field) . ' = '. $db->quote($item->$field)); + } + else + { + return false; + } + } + else + { + return false; + } + } + } + elseif (isset($item->$get) && is_numeric($item->$get)) + { + if (is_int($item->$get)) + { + $query->where($db->quoteName('a.' . $get) . ' = '. (int) $item->$get); + } + elseif (is_float($item->$get)) + { + $query->where($db->quoteName('a.' . $get) . ' = '. (float) $item->$get); + } + else + { + return false; // really not needed but who knows for sure... + } + } + elseif (isset($item->$get) && componentbuilderHelper::checkString($item->$get)) // do not allow empty strings (since it could be major mis match) + { + $query->where($db->quoteName('a.' . $get) . ' = '. $db->quote($item->$get)); + } + else + { + return false; + } + // see if we get an item + $db->setQuery($query); + $db->execute(); + if ($db->getNumRows()) + { + return $db->loadObject(); + } + elseif ($retry) + { + $retryAgain = false; + // set the getter + switch ($type) + { + case 'fieldtype': + // get by name (since there should only be one of each name) + $getter = 'name'; + break; + case 'field': + // get by name and xml to target correct field + $getter = array('name', 'xml'); // risky will look at this again (to add fieldtype) + break; + case 'site_view': + case 'custom_admin_view': + // get by name, system_name and codename + $getter = array('name', 'system_name', 'codename'); // risky will look at this again (to add main_get) + break; + case 'template': + case 'layout': + // get by code name (since there should only be one) + $getter = 'alias'; + break; + case 'custom_code': + // get by code to insure its correctly matched + $getter = array('code', 'comment_type', 'target'); + // add some more advanced search + if (isset($item->path) && ComponentbuilderHelper::checkString($item->path)) + { + $getter[] = 'path'; + } + elseif (isset($item->function_name) && ComponentbuilderHelper::checkString($item->function_name)) + { + $getter[] = 'function_name'; + } + elseif (isset($item->hashtarget) && ComponentbuilderHelper::checkString($item->hashtarget)) + { + $getter[] = 'hashtarget'; + } + break; + case 'dynamic_get': + if ($retry == 2) + { + // get by name ... + $getter = array('name', 'gettype', 'main_source'); // risky will look at this again + // add some more advanced search + if (isset($item->main_source) && $item->main_source == 1 && isset($item->view_selection) && ComponentbuilderHelper::checkString($item->view_selection)) + { + $getter[] = 'view_selection'; + } + elseif (isset($item->main_source) && $item->main_source == 2 && isset($item->db_selection) && ComponentbuilderHelper::checkString($item->db_selection)) + { + $getter[] = 'db_selection'; + } + elseif (isset($item->main_source) && $item->main_source == 3 && isset($item->php_custom_get) && ComponentbuilderHelper::checkString($item->php_custom_get)) + { + $getter[] = 'php_custom_get'; + } + // add some extra + if (isset($item->getcustom) && ComponentbuilderHelper::checkString($item->getcustom)) + { + $getter[] = 'getcustom'; + } + } + else + { + // get by id name gettype and main_source + $getter = array('id', 'name', 'gettype', 'main_source'); // risky will look at this again + $retryAgain = 2; + } + break; + case 'admin_view': + if ($retry == 2) + { + // get by name ... + $getter = array('name_list', 'name_single', 'short_description', 'system_name'); // risky will look at this again + } + else + { + // get by id name ... + $getter = array('id', 'name_list', 'name_single', 'short_description', 'system_name'); // risky will look at this again + $retryAgain = 2; + } + break; + case 'joomla_component': + if ($retry == 2) + { + // get by name ... + $getter = array('name', 'name_code', 'short_description', 'author', 'email', 'component_version', 'companyname', 'system_name', 'website', 'bom', 'copyright', 'license'); // risky will look at this again + } + else + { + // get by id name ... + $getter = array('id', 'name', 'name_code', 'short_description', 'author', 'component_version', 'companyname', 'system_name'); // risky will look at this again + $retryAgain = 2; + } + break; + default: + // can't be found so return false + return false; + break; + } + // we try again + return $this->getLocalItem($item, $type, $db, $retryAgain, $getter); + } + return false; + } + + /** + * Save the data from the file to the database + * + * @param array $data The values to save + * + * @return boolean false on failure + * + **/ + protected function saveBasic($data) + { + // import the data if there is any + if(ComponentbuilderHelper::checkArray($data['array'])) + { + // get user object + $user = JFactory::getUser(); + // remove header if it has headers + $id_key = $data['target_headers']['id']; + $published_key = $data['target_headers']['published']; + $ordering_key = $data['target_headers']['ordering']; + // get the first array set + $firstSet = reset($data['array']); + + // check if first array is a header array and remove if true + if($firstSet[$id_key] == 'id' || $firstSet[$published_key] == 'published' || $firstSet[$ordering_key] == 'ordering') + { + array_shift($data['array']); + } + + // make sure there is still values in array and that it was not only headers + if(ComponentbuilderHelper::checkArray($data['array']) && $user->authorise($this->dataType.'.import', 'com_componentbuilder') && $user->authorise('core.import', 'com_componentbuilder')) + { + // set target. + $target = array_flip($data['target_headers']); + // Get a db connection. + $db = JFactory::getDbo(); + // set some defaults + $todayDate = JFactory::getDate()->toSql(); + // get global action permissions + $canDo = ComponentbuilderHelper::getActions($this->dataType); + $canEdit = $canDo->get('core.edit'); + $canState = $canDo->get('core.edit.state'); + $canCreate = $canDo->get('core.create'); + $hasAlias = $this->getAliasesUsed($this->dataType); + // prosses the data + foreach($data['array'] as $row) + { + $found = false; + if (isset($row[$id_key]) && is_numeric($row[$id_key]) && $row[$id_key] > 0) + { + // raw items import & update! + $query = $db->getQuery(true); + $query + ->select('version') + ->from($db->quoteName('#__componentbuilder_'.$this->dataType)) + ->where($db->quoteName('id') . ' = '. $db->quote($row[$id_key])); + // Reset the query using our newly populated query object. + $db->setQuery($query); + $db->execute(); + $found = $db->getNumRows(); + } + + if($found && $canEdit) + { + // update item + $id = $row[$id_key]; + $version = $db->loadResult(); + // reset all buckets + $query = $db->getQuery(true); + $fields = array(); + // Fields to update. + foreach($row as $key => $cell) + { + // ignore column + if ('IGNORE' == $target[$key]) + { + continue; + } + // update modified + if ('modified_by' == $target[$key]) + { + continue; + } + // update modified + if ('modified' == $target[$key]) + { + continue; + } + // update version + if ('version' == $target[$key]) + { + $cell = (int) $version + 1; + } + // verify publish authority + if ('published' == $target[$key] && !$canState) + { + continue; + } + // set to update array + if(in_array($key, $data['target_headers']) && is_numeric($cell)) + { + $fields[] = $db->quoteName($target[$key]) . ' = ' . $cell; + } + elseif(in_array($key, $data['target_headers']) && is_string($cell)) + { + $fields[] = $db->quoteName($target[$key]) . ' = ' . $db->quote($cell); + } + elseif(in_array($key, $data['target_headers']) && is_null($cell)) + { + // if import data is null then set empty + $fields[] = $db->quoteName($target[$key]) . " = ''"; + } + } + // load the defaults + $fields[] = $db->quoteName('modified_by') . ' = ' . $db->quote($user->id); + $fields[] = $db->quoteName('modified') . ' = ' . $db->quote($todayDate); + // Conditions for which records should be updated. + $conditions = array( + $db->quoteName('id') . ' = ' . $id + ); + $query->update($db->quoteName('#__componentbuilder_' . $this->dataType))->set($fields)->where($conditions); + $db->setQuery($query); + $db->execute(); + } + elseif ($canCreate) + { + // insert item + $query = $db->getQuery(true); + // reset all buckets + $columns = array(); + $values = array(); + $version = false; + // Insert columns. Insert values. + foreach($row as $key => $cell) + { + // ignore column + if ('IGNORE' == $target[$key]) + { + continue; + } + // remove id + if ('id' == $target[$key]) + { + continue; + } + // update created + if ('created_by' == $target[$key]) + { + continue; + } + // update created + if ('created' == $target[$key]) + { + continue; + } + // Make sure the alias is incremented + if ('alias' == $target[$key]) + { + $cell = $this->getAlias($cell,$this->dataType); + } + // update version + if ('version' == $target[$key]) + { + $cell = 1; + $version = true; + } + // set to insert array + if(in_array($key, $data['target_headers']) && is_numeric($cell)) + { + $columns[] = $target[$key]; + $values[] = $cell; + } + elseif(in_array($key, $data['target_headers']) && is_string($cell)) + { + $columns[] = $target[$key]; + $values[] = $db->quote($cell); + } + elseif(in_array($key, $data['target_headers']) && is_null($cell)) + { + // if import data is null then set empty + $columns[] = $target[$key]; + $values[] = "''"; + } + } + // load the defaults + $columns[] = 'created_by'; + $values[] = $db->quote($user->id); + $columns[] = 'created'; + $values[] = $db->quote($todayDate); + if (!$version) + { + $columns[] = 'version'; + $values[] = 1; + } + // Prepare the insert query. + $query + ->insert($db->quoteName('#__componentbuilder_'.$this->dataType)) + ->columns($db->quoteName($columns)) + ->values(implode(',', $values)); + // Set the query using our newly populated query object and execute it. + $db->setQuery($query); + $done = $db->execute(); + if ($done) + { + $aId = $db->insertid(); + // make sure the access of asset is set + ComponentbuilderHelper::setAsset($aId,$this->dataType); + } + } + else + { + return false; + } + } + return true; + } + } + return false; + } + + protected function getAlias($name,$type = false) + { + // sanitize the name to an alias + if (JFactory::getConfig()->get('unicodeslugs') == 1) + { + $alias = JFilterOutput::stringURLUnicodeSlug($name); + } + else + { + $alias = JFilterOutput::stringURLSafe($name); + } + // must be a uniqe alias + if ($type) + { + return $this->getUniqe($alias,'alias',$type); + } + return $alias; + } + + /** + * Method to generate a uniqe value. + * + * @param string $field name. + * @param string $value data. + * @param string $type table. + * + * @return string New value. + */ + protected function getUniqe($value,$field,$type) + { + // insure the filed is always uniqe + while (isset($this->uniqeValueArray[$type][$field][$value])) + { + $value = JString::increment($value, 'dash'); + } + $this->uniqeValueArray[$type][$field][$value] = $value; + return $value; + } + + protected function getAliasesUsed($table) + { + // Get a db connection. + $db = JFactory::getDbo(); + // first we check if there is a alias column + $columns = $db->getTableColumns('#__componentbuilder_'.$table); + if(isset($columns['alias'])){ + // Create a new query object. + $query = $db->getQuery(true); + $query->select($db->quoteName(array('alias'))); + $query->from($db->quoteName('#__componentbuilder_'.$table)); + $db->setQuery($query); + $db->execute(); + if ($db->getNumRows()) + { + $aliases = $db->loadColumn(); + foreach($aliases as $alias) + { + $this->uniqeValueArray[$table]['alias'][$alias] = $alias; + } + } + return true; + } + return false; + } +} diff --git a/admin/models/joomla_component.php b/admin/models/joomla_component.php index 57ba2d7b3..862ba1a95 100644 --- a/admin/models/joomla_component.php +++ b/admin/models/joomla_component.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 132 of this MVC - @build 20th March, 2017 + @version @update number 182 of this MVC + @build 27th March, 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 ab7235810..7770e860d 100644 --- a/admin/models/joomla_components.php +++ b/admin/models/joomla_components.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 132 of this MVC - @build 20th March, 2017 + @version @update number 182 of this MVC + @build 27th March, 2017 @created 6th May, 2015 @package Component Builder @subpackage joomla_components.php @@ -130,7 +130,7 @@ class ComponentbuilderModelJoomla_components extends JModelList // add custom code $this->setData($user, $db, 'custom_code', $pks, 'component'); // start loading the components - $this->smartExport['components'] = array(); + $this->smartExport['joomla_component'] = array(); foreach ($items as $nr => &$item) { $access = ($user->authorise('joomla_component.access', 'com_componentbuilder.joomla_component.' . (int) $item->id) && $user->authorise('joomla_component.access', 'com_componentbuilder')); @@ -143,6 +143,8 @@ class ComponentbuilderModelJoomla_components extends JModelList $this->moveIt($item->addfiles, 'file'); // build folders $this->moveIt($item->addfolders, 'folder'); + // component image + $this->moveIt(array('image' => array($item->image)), 'image'); // add config fields $this->setData($user, $db, 'field', $item->addconfig, 'field'); // add admin views @@ -154,7 +156,7 @@ class ComponentbuilderModelJoomla_components extends JModelList // set the custom code ID's $this->setCustomCodeIds($item, 'joomla_component'); // load to global object - $this->smartExport['components'][$item->id] = $item; + $this->smartExport['joomla_component'][$item->id] = $item; } // add templates if (ComponentbuilderHelper::checkArray($this->templateIds)) @@ -172,7 +174,7 @@ class ComponentbuilderModelJoomla_components extends JModelList $this->setData($user, $db, 'custom_code', array('custom_code' => $this->customCodeIds), 'custom_code'); } // has any data been set - if (ComponentbuilderHelper::checkArray($this->smartExport['components'])) + if (ComponentbuilderHelper::checkArray($this->smartExport['joomla_component'])) { // set the folder and move the files of each component to the folder return $this->smartExportBuilder(); @@ -257,20 +259,31 @@ class ComponentbuilderModelJoomla_components extends JModelList // now move it foreach ($data[$type] as $item) { - if ('file' === $type || 'image' === $type) + if (ComponentbuilderHelper::checkString($item)) { - if (!JFile::exists($tmpPath.'/'.$item) && JFile::exists($this->customPath.'/'.$item)) + if ('file' === $type) { - // move the file to its place - JFile::copy($this->customPath.'/'.$item, $tmpPath.'/'.$item,'',true); + if (!JFile::exists($tmpPath.'/'.$item) && JFile::exists($this->customPath.'/'.$item)) + { + // move the file to its place + JFile::copy($this->customPath.'/'.$item, $tmpPath.'/'.$item,'',true); + } } - } - if ('folder' === $type) - { - if (!JFolder::exists($tmpPath.'/'.$item) && JFolder::exists($this->customPath.'/'.$item)) + if ('image' === $type) { - // move the folder to its place - JFolder::copy($this->customPath.'/'.$item, $tmpPath.'/'.$item,'',true); + if (!JFile::exists($this->packagePath.'/'.$item) && JFile::exists(JPATH_ROOT.'/'.$item)) + { + // move the file to its place + JFile::copy(JPATH_ROOT.'/'.$item, $this->packagePath.'/'.$item,'',true); + } + } + if ('folder' === $type) + { + if (!JFolder::exists($tmpPath.'/'.$item) && JFolder::exists($this->customPath.'/'.$item)) + { + // move the folder to its place + JFolder::copy($this->customPath.'/'.$item, $tmpPath.'/'.$item,'',true); + } } } } @@ -354,6 +367,17 @@ class ComponentbuilderModelJoomla_components extends JModelList { // add fields $this->setData($user, $db, 'field', $item->addfields, 'field'); + // add admin views + if (isset($item->addlinked_views)) + { + $this->setData($user, $db, 'admin_view', $item->addlinked_views, 'adminview'); + } + // admin icon + $this->moveIt(array('image' => array($item->icon)), 'image'); + // admin icon_add + $this->moveIt(array('image' => array($item->icon_add)), 'image'); + // admin icon_category + $this->moveIt(array('image' => array($item->icon_category)), 'image'); } // actions to take if table is field if ('field' === $table) @@ -377,6 +401,11 @@ class ComponentbuilderModelJoomla_components extends JModelList // add dynamic gets $this->setData($user, $db, 'dynamic_get', array('dynamic_get' => array($item->main_get)), 'dynamic_get'); $this->setData($user, $db, 'dynamic_get', array('dynamic_get' => $item->custom_get), 'dynamic_get'); + if ('custom_admin_view' === $table && isset($item->icon)) + { + // view icon + $this->moveIt(array('image' => array($item->icon)), 'image'); + } } // set the custom code ID's $this->setCustomCodeIds($item, $table); diff --git a/admin/models/site_view.php b/admin/models/site_view.php index df704c045..9350faed0 100644 --- a/admin/models/site_view.php +++ b/admin/models/site_view.php @@ -185,7 +185,7 @@ class ComponentbuilderModelSite_view extends JModelAdmin * * @return mixed An array of data items on success, false on failure. */ - public function getVyrlinked_components() + public function getVyslinked_components() { // Get the user object. $user = JFactory::getUser(); diff --git a/admin/sql/install.mysql.utf8.sql b/admin/sql/install.mysql.utf8.sql index a1d7c7b9a..174767ef2 100644 --- a/admin/sql/install.mysql.utf8.sql +++ b/admin/sql/install.mysql.utf8.sql @@ -192,6 +192,7 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_admin_view` ( `php_getlistquery` MEDIUMTEXT NOT NULL, `php_import` MEDIUMTEXT NOT NULL, `php_import_display` MEDIUMTEXT NOT NULL, + `php_import_ext` MEDIUMTEXT NOT NULL, `php_import_save` MEDIUMTEXT NOT NULL, `php_import_setdata` MEDIUMTEXT NOT NULL, `php_model` MEDIUMTEXT NOT NULL, @@ -223,32 +224,32 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_admin_view` ( KEY `idx_state` (`published`), KEY `idx_name_single` (`name_single`), KEY `idx_name_list` (`name_list`), - KEY `idx_add_php_getitems_after_all` (`add_php_getitems_after_all`), - KEY `idx_add_php_after_publish` (`add_php_after_publish`), KEY `idx_add_fadein` (`add_fadein`), - KEY `idx_add_php_allowedit` (`add_php_allowedit`), - KEY `idx_add_sql` (`add_sql`), - KEY `idx_add_php_save` (`add_php_save`), - KEY `idx_add_php_batchmove` (`add_php_batchmove`), - KEY `idx_add_php_after_delete` (`add_php_after_delete`), - KEY `idx_add_php_getitems` (`add_php_getitems`), - KEY `idx_add_php_getlistquery` (`add_php_getlistquery`), - KEY `idx_add_php_postsavehook` (`add_php_postsavehook`), - KEY `idx_add_php_batchcopy` (`add_php_batchcopy`), - KEY `idx_add_php_before_publish` (`add_php_before_publish`), - KEY `idx_add_php_before_delete` (`add_php_before_delete`), - KEY `idx_add_php_document` (`add_php_document`), - KEY `idx_type` (`type`), - KEY `idx_add_php_getitem` (`add_php_getitem`), - KEY `idx_add_custom_import` (`add_custom_import`), - KEY `idx_add_css_view` (`add_css_view`), - KEY `idx_add_css_views` (`add_css_views`), - KEY `idx_add_javascript_view_file` (`add_javascript_view_file`), - KEY `idx_add_javascript_view_footer` (`add_javascript_view_footer`), - KEY `idx_add_javascript_views_file` (`add_javascript_views_file`), - KEY `idx_add_javascript_views_footer` (`add_javascript_views_footer`), - KEY `idx_add_custom_button` (`add_custom_button`), KEY `idx_source` (`source`), + KEY `idx_type` (`type`), + KEY `idx_add_css_view` (`add_css_view`), + KEY `idx_add_php_getitem` (`add_php_getitem`), + KEY `idx_add_php_getitems` (`add_php_getitems`), + KEY `idx_add_css_views` (`add_css_views`), + KEY `idx_add_php_getitems_after_all` (`add_php_getitems_after_all`), + KEY `idx_add_php_getlistquery` (`add_php_getlistquery`), + KEY `idx_add_javascript_view_file` (`add_javascript_view_file`), + KEY `idx_add_php_save` (`add_php_save`), + KEY `idx_add_php_postsavehook` (`add_php_postsavehook`), + KEY `idx_add_javascript_view_footer` (`add_javascript_view_footer`), + KEY `idx_add_php_allowedit` (`add_php_allowedit`), + KEY `idx_add_php_batchcopy` (`add_php_batchcopy`), + KEY `idx_add_javascript_views_file` (`add_javascript_views_file`), + KEY `idx_add_php_batchmove` (`add_php_batchmove`), + KEY `idx_add_php_before_publish` (`add_php_before_publish`), + KEY `idx_add_javascript_views_footer` (`add_javascript_views_footer`), + KEY `idx_add_php_after_publish` (`add_php_after_publish`), + KEY `idx_add_php_before_delete` (`add_php_before_delete`), + KEY `idx_add_custom_button` (`add_custom_button`), + KEY `idx_add_php_after_delete` (`add_php_after_delete`), + KEY `idx_add_php_document` (`add_php_document`), + KEY `idx_add_sql` (`add_sql`), + KEY `idx_add_custom_import` (`add_custom_import`), KEY `idx_add_php_ajax` (`add_php_ajax`) ) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8; diff --git a/admin/sql/updates/mysql/2.3.7.sql b/admin/sql/updates/mysql/2.3.7.sql new file mode 100644 index 000000000..2b6b7f911 --- /dev/null +++ b/admin/sql/updates/mysql/2.3.7.sql @@ -0,0 +1 @@ +ALTER TABLE `#__componentbuilder_admin_view` ADD `php_import_ext` MEDIUMTEXT NOT NULL AFTER `php_import_display`; diff --git a/admin/tables/admin_view.php b/admin/tables/admin_view.php index ddeb783c8..4c26cc467 100644 --- a/admin/tables/admin_view.php +++ b/admin/tables/admin_view.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 104 of this MVC - @build 6th March, 2017 + @version @update number 108 of this MVC + @build 24th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage admin_view.php diff --git a/admin/tables/joomla_component.php b/admin/tables/joomla_component.php index ae7b25d22..c338be73b 100644 --- a/admin/tables/joomla_component.php +++ b/admin/tables/joomla_component.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 132 of this MVC - @build 20th March, 2017 + @version @update number 182 of this MVC + @build 27th March, 2017 @created 6th May, 2015 @package Component Builder @subpackage joomla_component.php diff --git a/admin/views/admin_view/submitbutton.js b/admin/views/admin_view/submitbutton.js index d14ddba38..1320c082a 100644 --- a/admin/views/admin_view/submitbutton.js +++ b/admin/views/admin_view/submitbutton.js @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 104 of this MVC - @build 6th March, 2017 + @version @update number 108 of this MVC + @build 24th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage submitbutton.js diff --git a/admin/views/admin_view/tmpl/edit.php b/admin/views/admin_view/tmpl/edit.php index 807de803d..f46c98d14 100644 --- a/admin/views/admin_view/tmpl/edit.php +++ b/admin/views/admin_view/tmpl/edit.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 104 of this MVC - @build 6th March, 2017 + @version @update number 108 of this MVC + @build 24th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage edit.php diff --git a/admin/views/admin_view/view.html.php b/admin/views/admin_view/view.html.php index be228a9b1..51cdace95 100644 --- a/admin/views/admin_view/view.html.php +++ b/admin/views/admin_view/view.html.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 104 of this MVC - @build 6th March, 2017 + @version @update number 108 of this MVC + @build 24th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage view.html.php @@ -71,10 +71,10 @@ class ComponentbuilderViewAdmin_view extends JViewLegacy } // Get Linked view data - $this->vxvfields = $this->get('Vxvfields'); + $this->vxwfields = $this->get('Vxwfields'); // Get Linked view data - $this->vxwlinked_components = $this->get('Vxwlinked_components'); + $this->vxxlinked_components = $this->get('Vxxlinked_components'); // Set the toolbar $this->addToolBar(); diff --git a/admin/views/admin_views/tmpl/default.php b/admin/views/admin_views/tmpl/default.php index 0d8e4b739..aac226abb 100644 --- a/admin/views/admin_views/tmpl/default.php +++ b/admin/views/admin_views/tmpl/default.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 104 of this MVC - @build 6th March, 2017 + @version @update number 108 of this MVC + @build 24th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage default.php diff --git a/admin/views/admin_views/tmpl/default_batch_body.php b/admin/views/admin_views/tmpl/default_batch_body.php index 126169a0c..396a8a65d 100644 --- a/admin/views/admin_views/tmpl/default_batch_body.php +++ b/admin/views/admin_views/tmpl/default_batch_body.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 104 of this MVC - @build 6th March, 2017 + @version @update number 108 of this MVC + @build 24th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage default_batch_body.php diff --git a/admin/views/admin_views/tmpl/default_batch_footer.php b/admin/views/admin_views/tmpl/default_batch_footer.php index 1ec7f22b3..1060dfe74 100644 --- a/admin/views/admin_views/tmpl/default_batch_footer.php +++ b/admin/views/admin_views/tmpl/default_batch_footer.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 104 of this MVC - @build 6th March, 2017 + @version @update number 108 of this MVC + @build 24th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage default_batch_footer.php diff --git a/admin/views/admin_views/tmpl/default_body.php b/admin/views/admin_views/tmpl/default_body.php index 9cc4e9fb4..a6ee9650a 100644 --- a/admin/views/admin_views/tmpl/default_body.php +++ b/admin/views/admin_views/tmpl/default_body.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 104 of this MVC - @build 6th March, 2017 + @version @update number 108 of this MVC + @build 24th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage default_body.php diff --git a/admin/views/admin_views/tmpl/default_foot.php b/admin/views/admin_views/tmpl/default_foot.php index c6e36cb7f..d8909bd88 100644 --- a/admin/views/admin_views/tmpl/default_foot.php +++ b/admin/views/admin_views/tmpl/default_foot.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 104 of this MVC - @build 6th March, 2017 + @version @update number 108 of this MVC + @build 24th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage default_foot.php diff --git a/admin/views/admin_views/tmpl/default_head.php b/admin/views/admin_views/tmpl/default_head.php index 0c219669a..cd3132037 100644 --- a/admin/views/admin_views/tmpl/default_head.php +++ b/admin/views/admin_views/tmpl/default_head.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 104 of this MVC - @build 6th March, 2017 + @version @update number 108 of this MVC + @build 24th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage default_head.php diff --git a/admin/views/admin_views/tmpl/default_toolbar.php b/admin/views/admin_views/tmpl/default_toolbar.php index 4eda046f6..1d800771d 100644 --- a/admin/views/admin_views/tmpl/default_toolbar.php +++ b/admin/views/admin_views/tmpl/default_toolbar.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 104 of this MVC - @build 6th March, 2017 + @version @update number 108 of this MVC + @build 24th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage default_toolbar.php diff --git a/admin/views/admin_views/view.html.php b/admin/views/admin_views/view.html.php index 20bed4dcb..5a4d7ffe7 100644 --- a/admin/views/admin_views/view.html.php +++ b/admin/views/admin_views/view.html.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 104 of this MVC - @build 6th March, 2017 + @version @update number 108 of this MVC + @build 24th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage view.html.php diff --git a/admin/views/compiler/tmpl/default.php b/admin/views/compiler/tmpl/default.php index ade8227ec..542fcf08d 100644 --- a/admin/views/compiler/tmpl/default.php +++ b/admin/views/compiler/tmpl/default.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 46 of this MVC - @build 3rd March, 2017 + @version @update number 47 of this MVC + @build 21st March, 2017 @created 1st February, 2017 @package Component Builder @subpackage default.php @@ -144,6 +144,7 @@ jQuery(document).ready(function($) { + +dataType === 'smart_package') ? '.zip' : '.csv .xls .ods'; ?> + +
+
+ + sidebar)) : ?> +
+ sidebar; ?> +
+
+ +
+ + + hasPackage && ComponentbuilderHelper::checkArray($this->headerList) && ComponentbuilderHelper::checkArray($this->headers)) : ?> + $this->activeTab)); ?> + + +
+ +
+ +
+ +
+
+ headerList as $name => $title): ?> +
+ +
+ +
+
+ +
+ +
+
+ + hasPackage && $this->dataType === 'smart_package') : ?> + 'advanced')); ?> + +
+ +
+ +
+
+ + + + + + 'upload')); ?> + + +
+ +
+ +
+ +
+
+
+     () +
+
+ + + +
+ +
+ +
+ +
+
+
+     () +
+
+ + + + +
+ +
+ +
+ +
+
+
+     () +
+
+ + + + + + + +
diff --git a/admin/views/import_joomla_components/tmpl/index.html b/admin/views/import_joomla_components/tmpl/index.html new file mode 100644 index 000000000..fa6d84e80 --- /dev/null +++ b/admin/views/import_joomla_components/tmpl/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/admin/views/import_joomla_components/view.html.php b/admin/views/import_joomla_components/view.html.php new file mode 100644 index 000000000..3aa93f9ae --- /dev/null +++ b/admin/views/import_joomla_components/view.html.php @@ -0,0 +1,114 @@ + + @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'); + +// import Joomla view library +jimport('joomla.application.component.view'); + +/** + * Componentbuilder Import_joomla_components View + */ +class ComponentbuilderViewImport_joomla_components extends JViewLegacy +{ + protected $headerList; + protected $hasPackage = false; + protected $headers; + protected $hasHeader = 0; + 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'); + + $this->paths = &$paths; + $this->state = &$state; + // get global action permissions + $this->canDo = ComponentbuilderHelper::getActions('import'); + + // We don't need toolbar in the modal window. + if ($this->getLayout() !== 'modal') + { + $this->addToolbar(); + $this->sidebar = JHtmlSidebar::render(); + } + // load the application + $app = JFactory::getApplication(); + // get the session object + $session = JFactory::getSession(); + // check if it has package + $this->hasPackage = $session->get('hasPackage', false); + $this->dataType = $session->get('dataType', false); + if($this->hasPackage && $this->dataType && $this->dataType !== 'smart_package') + { + $this->headerList = json_decode($session->get($this->dataType.'_VDM_IMPORTHEADERS', false),true); + $this->headers = ComponentbuilderHelper::getFileHeaders($this->dataType); + // clear the data type + $session->clear('dataType'); + } + elseif (!$this->dataType) + { + $this->dataType = $session->get('dataType_VDM_IMPORTINTO', null); + } + // Display the template + parent::display($tpl); + } + + /** + * Setting the toolbar + */ + protected function addToolBar() + { + JToolBarHelper::title(JText::_('COM_COMPONENTBUILDER_IMPORT_TITLE'), 'upload'); + JHtmlSidebar::setAction('index.php?option=com_componentbuilder&view=import_joomla_components'); + + if ($this->canDo->get('core.admin') || $this->canDo->get('core.options')) + { + JToolBarHelper::preferences('com_componentbuilder'); + } + + // set help url for this view if found + $help_url = ComponentbuilderHelper::getHelpUrl('import_joomla_components'); + if (ComponentbuilderHelper::checkString($help_url)) + { + JToolbarHelper::help('COM_COMPONENTBUILDER_HELP_MANAGER', false, $help_url); + } + } +} diff --git a/admin/views/joomla_component/submitbutton.js b/admin/views/joomla_component/submitbutton.js index 40271bd87..a3355e7b3 100644 --- a/admin/views/joomla_component/submitbutton.js +++ b/admin/views/joomla_component/submitbutton.js @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 132 of this MVC - @build 20th March, 2017 + @version @update number 182 of this MVC + @build 27th March, 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 9dfb9207e..2c5fc7e6b 100644 --- a/admin/views/joomla_component/tmpl/edit.php +++ b/admin/views/joomla_component/tmpl/edit.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 132 of this MVC - @build 20th March, 2017 + @version @update number 182 of this MVC + @build 27th March, 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 4c4aef974..636e42954 100644 --- a/admin/views/joomla_component/view.html.php +++ b/admin/views/joomla_component/view.html.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 132 of this MVC - @build 20th March, 2017 + @version @update number 182 of this MVC + @build 27th March, 2017 @created 6th May, 2015 @package Component Builder @subpackage view.html.php diff --git a/admin/views/joomla_components/tmpl/default.php b/admin/views/joomla_components/tmpl/default.php index a6587d3f0..edfa204ac 100644 --- a/admin/views/joomla_components/tmpl/default.php +++ b/admin/views/joomla_components/tmpl/default.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 132 of this MVC - @build 20th March, 2017 + @version @update number 182 of this MVC + @build 27th March, 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 d7c15c7f2..af1506b12 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 132 of this MVC - @build 20th March, 2017 + @version @update number 182 of this MVC + @build 27th March, 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 c81a3137b..8f183f658 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 132 of this MVC - @build 20th March, 2017 + @version @update number 182 of this MVC + @build 27th March, 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 0b68341da..5bc61b83a 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 132 of this MVC - @build 20th March, 2017 + @version @update number 182 of this MVC + @build 27th March, 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 af2030a9a..4e12038fe 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 132 of this MVC - @build 20th March, 2017 + @version @update number 182 of this MVC + @build 27th March, 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 8555e499d..beea9d90a 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 132 of this MVC - @build 20th March, 2017 + @version @update number 182 of this MVC + @build 27th March, 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 c7b340abd..6ab94e03d 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 132 of this MVC - @build 20th March, 2017 + @version @update number 182 of this MVC + @build 27th March, 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 69aa984b6..c2b3df06d 100644 --- a/admin/views/joomla_components/view.html.php +++ b/admin/views/joomla_components/view.html.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 132 of this MVC - @build 20th March, 2017 + @version @update number 182 of this MVC + @build 27th March, 2017 @created 6th May, 2015 @package Component Builder @subpackage view.html.php @@ -135,10 +135,15 @@ class ComponentbuilderViewJoomla_components extends JViewLegacy $dhtml = $layout->render(array('title' => $title)); $bar->appendButton('Custom', $dhtml, 'batch'); } - if ($this->user->authorise('joomla_component.export_component')) + if ($this->user->authorise('joomla_component.export_components')) { - // add Export Component button. - JToolBarHelper::custom('joomla_components.smartExport', 'download', '', 'COM_COMPONENTBUILDER_EXPORT_COMPONENT', false); + // add Export Components button. + JToolBarHelper::custom('joomla_components.smartExport', 'download', '', 'COM_COMPONENTBUILDER_EXPORT_COMPONENTS', false); + } + if ($this->user->authorise('joomla_component.import_components')) + { + // add Import Components button. + JToolBarHelper::custom('joomla_components.smartImport', 'upload', '', 'COM_COMPONENTBUILDER_IMPORT_COMPONENTS', false); } if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete)) diff --git a/admin/views/site_view/view.html.php b/admin/views/site_view/view.html.php index 9a0a1b551..81478b572 100644 --- a/admin/views/site_view/view.html.php +++ b/admin/views/site_view/view.html.php @@ -71,7 +71,7 @@ class ComponentbuilderViewSite_view extends JViewLegacy } // Get Linked view data - $this->vyrlinked_components = $this->get('Vyrlinked_components'); + $this->vyslinked_components = $this->get('Vyslinked_components'); // Set the toolbar $this->addToolBar(); diff --git a/componentbuilder.xml b/componentbuilder.xml index 1d7788bd0..5fab7636c 100644 --- a/componentbuilder.xml +++ b/componentbuilder.xml @@ -1,15 +1,15 @@ COM_COMPONENTBUILDER - 20th March, 2017 + 27th March, 2017 Llewellyn van der Merwe joomla@vdm.io http://vdm.bz/component-builder Copyright (C) 2015. All Rights Reserved GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html - 2.3.7 + 2.3.8 Component Builder (v.2.3.7) +

Component Builder (v.2.3.8)

The Component Builder for [Joomla](http://www.joomla.org/) that is highly advanced, truly able to build extremely complex components in a fraction of the time. diff --git a/componentbuilder_update_server.xml b/componentbuilder_update_server.xml index c3f5d24da..41f102aa2 100644 --- a/componentbuilder_update_server.xml +++ b/componentbuilder_update_server.xml @@ -696,4 +696,21 @@ http://vdm.bz/component-builder + + Component Builder + Builds Complex Joomla Components + com_componentbuilder + component + 2.3.8 + http://vdm.bz/component-builder + + https://github.com/vdm-io/Joomla-Component-Builder/releases/download/v2.3.8/JCB_v2.3.8.zip + + + stable + + Llewellyn van der Merwe + http://vdm.bz/component-builder + + \ No newline at end of file diff --git a/script.php b/script.php index 92aee586b..46b6e3b04 100644 --- a/script.php +++ b/script.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version 2.3.7 - @build 20th March, 2017 + @version 2.3.8 + @build 27th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage script.php @@ -1361,9 +1361,9 @@ class com_componentbuilderInstallerScript $admin_view->type_title = 'Componentbuilder Admin_view'; $admin_view->type_alias = 'com_componentbuilder.admin_view'; $admin_view->table = '{"special": {"dbtable": "#__componentbuilder_admin_view","key": "id","type": "Admin_view","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}'; - $admin_view->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "null","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"system_name":"system_name","name_single":"name_single","name_list":"name_list","short_description":"short_description","add_php_getitems_after_all":"add_php_getitems_after_all","add_php_after_publish":"add_php_after_publish","description":"description","add_fadein":"add_fadein","add_php_allowedit":"add_php_allowedit","icon":"icon","add_sql":"add_sql","icon_add":"icon_add","icon_category":"icon_category","add_php_save":"add_php_save","add_php_batchmove":"add_php_batchmove","add_php_after_delete":"add_php_after_delete","add_php_getitems":"add_php_getitems","add_php_getlistquery":"add_php_getlistquery","add_php_postsavehook":"add_php_postsavehook","add_php_batchcopy":"add_php_batchcopy","add_php_before_publish":"add_php_before_publish","add_php_before_delete":"add_php_before_delete","html_import_view":"html_import_view","add_php_document":"add_php_document","type":"type","add_php_getitem":"add_php_getitem","add_custom_import":"add_custom_import","not_required":"not_required","php_import_setdata":"php_import_setdata","add_css_view":"add_css_view","css_view":"css_view","php_getitem":"php_getitem","add_css_views":"add_css_views","php_getitems":"php_getitems","css_views":"css_views","php_getitems_after_all":"php_getitems_after_all","add_javascript_view_file":"add_javascript_view_file","php_getlistquery":"php_getlistquery","javascript_view_file":"javascript_view_file","php_save":"php_save","add_javascript_view_footer":"add_javascript_view_footer","php_postsavehook":"php_postsavehook","javascript_view_footer":"javascript_view_footer","php_allowedit":"php_allowedit","add_javascript_views_file":"add_javascript_views_file","php_batchcopy":"php_batchcopy","javascript_views_file":"javascript_views_file","php_batchmove":"php_batchmove","add_javascript_views_footer":"add_javascript_views_footer","php_before_publish":"php_before_publish","javascript_views_footer":"javascript_views_footer","php_after_publish":"php_after_publish","add_custom_button":"add_custom_button","php_before_delete":"php_before_delete","php_after_delete":"php_after_delete","php_controller":"php_controller","php_document":"php_document","php_controller_list":"php_controller_list","source":"source","php_model":"php_model","sql":"sql","php_model_list":"php_model_list","add_php_ajax":"add_php_ajax","php_import_display":"php_import_display","php_ajaxmethod":"php_ajaxmethod","php_import":"php_import","php_import_save":"php_import_save"}}'; + $admin_view->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "null","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"system_name":"system_name","name_single":"name_single","name_list":"name_list","short_description":"short_description","php_getitems_after_all":"php_getitems_after_all","php_after_publish":"php_after_publish","description":"description","add_fadein":"add_fadein","php_allowedit":"php_allowedit","icon":"icon","source":"source","icon_add":"icon_add","icon_category":"icon_category","php_save":"php_save","php_batchmove":"php_batchmove","php_after_delete":"php_after_delete","php_getitems":"php_getitems","php_getlistquery":"php_getlistquery","php_postsavehook":"php_postsavehook","php_batchcopy":"php_batchcopy","php_before_publish":"php_before_publish","php_before_delete":"php_before_delete","php_import":"php_import","php_document":"php_document","type":"type","sql":"sql","php_getitem":"php_getitem","php_import_display":"php_import_display","not_required":"not_required","php_import_save":"php_import_save","add_css_view":"add_css_view","add_php_getitem":"add_php_getitem","css_view":"css_view","add_php_getitems":"add_php_getitems","add_css_views":"add_css_views","add_php_getitems_after_all":"add_php_getitems_after_all","css_views":"css_views","add_php_getlistquery":"add_php_getlistquery","add_javascript_view_file":"add_javascript_view_file","add_php_save":"add_php_save","javascript_view_file":"javascript_view_file","add_php_postsavehook":"add_php_postsavehook","add_javascript_view_footer":"add_javascript_view_footer","add_php_allowedit":"add_php_allowedit","javascript_view_footer":"javascript_view_footer","add_php_batchcopy":"add_php_batchcopy","add_javascript_views_file":"add_javascript_views_file","add_php_batchmove":"add_php_batchmove","javascript_views_file":"javascript_views_file","add_php_before_publish":"add_php_before_publish","add_javascript_views_footer":"add_javascript_views_footer","add_php_after_publish":"add_php_after_publish","javascript_views_footer":"javascript_views_footer","add_php_before_delete":"add_php_before_delete","add_custom_button":"add_custom_button","add_php_after_delete":"add_php_after_delete","add_php_document":"add_php_document","php_controller":"php_controller","add_sql":"add_sql","php_controller_list":"php_controller_list","php_model":"php_model","php_model_list":"php_model_list","add_custom_import":"add_custom_import","add_php_ajax":"add_php_ajax","html_import_view":"html_import_view","php_ajaxmethod":"php_ajaxmethod","php_import_setdata":"php_import_setdata","php_import_ext":"php_import_ext"}}'; $admin_view->router = 'ComponentbuilderHelperRoute::getAdmin_viewRoute'; - $admin_view->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/admin_view.xml","hideFields": ["asset_id","checked_out","checked_out_time","version","not_required"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","add_php_getitems_after_all","add_php_after_publish","add_fadein","add_php_allowedit","add_sql","add_php_save","add_php_batchmove","add_php_after_delete","add_php_getitems","add_php_getlistquery","add_php_postsavehook","add_php_batchcopy","add_php_before_publish","add_php_before_delete","add_php_document","type","add_php_getitem","add_custom_import","not_required","add_css_view","add_css_views","add_javascript_view_file","add_javascript_view_footer","add_javascript_views_file","add_javascript_views_footer","add_custom_button","source","add_php_ajax"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"}]}'; + $admin_view->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/admin_view.xml","hideFields": ["asset_id","checked_out","checked_out_time","version","not_required"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","add_fadein","source","type","not_required","add_css_view","add_php_getitem","add_php_getitems","add_css_views","add_php_getitems_after_all","add_php_getlistquery","add_javascript_view_file","add_php_save","add_php_postsavehook","add_javascript_view_footer","add_php_allowedit","add_php_batchcopy","add_javascript_views_file","add_php_batchmove","add_php_before_publish","add_javascript_views_footer","add_php_after_publish","add_php_before_delete","add_custom_button","add_php_after_delete","add_php_document","add_sql","add_custom_import","add_php_ajax"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"}]}'; // Set the object into the content types table. $admin_view_Inserted = $db->insertObject('#__content_types', $admin_view); @@ -1574,9 +1574,9 @@ class com_componentbuilderInstallerScript $admin_view->type_title = 'Componentbuilder Admin_view'; $admin_view->type_alias = 'com_componentbuilder.admin_view'; $admin_view->table = '{"special": {"dbtable": "#__componentbuilder_admin_view","key": "id","type": "Admin_view","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}'; - $admin_view->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "null","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"system_name":"system_name","name_single":"name_single","name_list":"name_list","short_description":"short_description","add_php_getitems_after_all":"add_php_getitems_after_all","add_php_after_publish":"add_php_after_publish","description":"description","add_fadein":"add_fadein","add_php_allowedit":"add_php_allowedit","icon":"icon","add_sql":"add_sql","icon_add":"icon_add","icon_category":"icon_category","add_php_save":"add_php_save","add_php_batchmove":"add_php_batchmove","add_php_after_delete":"add_php_after_delete","add_php_getitems":"add_php_getitems","add_php_getlistquery":"add_php_getlistquery","add_php_postsavehook":"add_php_postsavehook","add_php_batchcopy":"add_php_batchcopy","add_php_before_publish":"add_php_before_publish","add_php_before_delete":"add_php_before_delete","html_import_view":"html_import_view","add_php_document":"add_php_document","type":"type","add_php_getitem":"add_php_getitem","add_custom_import":"add_custom_import","not_required":"not_required","php_import_setdata":"php_import_setdata","add_css_view":"add_css_view","css_view":"css_view","php_getitem":"php_getitem","add_css_views":"add_css_views","php_getitems":"php_getitems","css_views":"css_views","php_getitems_after_all":"php_getitems_after_all","add_javascript_view_file":"add_javascript_view_file","php_getlistquery":"php_getlistquery","javascript_view_file":"javascript_view_file","php_save":"php_save","add_javascript_view_footer":"add_javascript_view_footer","php_postsavehook":"php_postsavehook","javascript_view_footer":"javascript_view_footer","php_allowedit":"php_allowedit","add_javascript_views_file":"add_javascript_views_file","php_batchcopy":"php_batchcopy","javascript_views_file":"javascript_views_file","php_batchmove":"php_batchmove","add_javascript_views_footer":"add_javascript_views_footer","php_before_publish":"php_before_publish","javascript_views_footer":"javascript_views_footer","php_after_publish":"php_after_publish","add_custom_button":"add_custom_button","php_before_delete":"php_before_delete","php_after_delete":"php_after_delete","php_controller":"php_controller","php_document":"php_document","php_controller_list":"php_controller_list","source":"source","php_model":"php_model","sql":"sql","php_model_list":"php_model_list","add_php_ajax":"add_php_ajax","php_import_display":"php_import_display","php_ajaxmethod":"php_ajaxmethod","php_import":"php_import","php_import_save":"php_import_save"}}'; + $admin_view->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "null","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"system_name":"system_name","name_single":"name_single","name_list":"name_list","short_description":"short_description","php_getitems_after_all":"php_getitems_after_all","php_after_publish":"php_after_publish","description":"description","add_fadein":"add_fadein","php_allowedit":"php_allowedit","icon":"icon","source":"source","icon_add":"icon_add","icon_category":"icon_category","php_save":"php_save","php_batchmove":"php_batchmove","php_after_delete":"php_after_delete","php_getitems":"php_getitems","php_getlistquery":"php_getlistquery","php_postsavehook":"php_postsavehook","php_batchcopy":"php_batchcopy","php_before_publish":"php_before_publish","php_before_delete":"php_before_delete","php_import":"php_import","php_document":"php_document","type":"type","sql":"sql","php_getitem":"php_getitem","php_import_display":"php_import_display","not_required":"not_required","php_import_save":"php_import_save","add_css_view":"add_css_view","add_php_getitem":"add_php_getitem","css_view":"css_view","add_php_getitems":"add_php_getitems","add_css_views":"add_css_views","add_php_getitems_after_all":"add_php_getitems_after_all","css_views":"css_views","add_php_getlistquery":"add_php_getlistquery","add_javascript_view_file":"add_javascript_view_file","add_php_save":"add_php_save","javascript_view_file":"javascript_view_file","add_php_postsavehook":"add_php_postsavehook","add_javascript_view_footer":"add_javascript_view_footer","add_php_allowedit":"add_php_allowedit","javascript_view_footer":"javascript_view_footer","add_php_batchcopy":"add_php_batchcopy","add_javascript_views_file":"add_javascript_views_file","add_php_batchmove":"add_php_batchmove","javascript_views_file":"javascript_views_file","add_php_before_publish":"add_php_before_publish","add_javascript_views_footer":"add_javascript_views_footer","add_php_after_publish":"add_php_after_publish","javascript_views_footer":"javascript_views_footer","add_php_before_delete":"add_php_before_delete","add_custom_button":"add_custom_button","add_php_after_delete":"add_php_after_delete","add_php_document":"add_php_document","php_controller":"php_controller","add_sql":"add_sql","php_controller_list":"php_controller_list","php_model":"php_model","php_model_list":"php_model_list","add_custom_import":"add_custom_import","add_php_ajax":"add_php_ajax","html_import_view":"html_import_view","php_ajaxmethod":"php_ajaxmethod","php_import_setdata":"php_import_setdata","php_import_ext":"php_import_ext"}}'; $admin_view->router = 'ComponentbuilderHelperRoute::getAdmin_viewRoute'; - $admin_view->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/admin_view.xml","hideFields": ["asset_id","checked_out","checked_out_time","version","not_required"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","add_php_getitems_after_all","add_php_after_publish","add_fadein","add_php_allowedit","add_sql","add_php_save","add_php_batchmove","add_php_after_delete","add_php_getitems","add_php_getlistquery","add_php_postsavehook","add_php_batchcopy","add_php_before_publish","add_php_before_delete","add_php_document","type","add_php_getitem","add_custom_import","not_required","add_css_view","add_css_views","add_javascript_view_file","add_javascript_view_footer","add_javascript_views_file","add_javascript_views_footer","add_custom_button","source","add_php_ajax"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"}]}'; + $admin_view->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/admin_view.xml","hideFields": ["asset_id","checked_out","checked_out_time","version","not_required"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","add_fadein","source","type","not_required","add_css_view","add_php_getitem","add_php_getitems","add_css_views","add_php_getitems_after_all","add_php_getlistquery","add_javascript_view_file","add_php_save","add_php_postsavehook","add_javascript_view_footer","add_php_allowedit","add_php_batchcopy","add_javascript_views_file","add_php_batchmove","add_php_before_publish","add_javascript_views_footer","add_php_after_publish","add_php_before_delete","add_custom_button","add_php_after_delete","add_php_document","add_sql","add_custom_import","add_php_ajax"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"}]}'; // Check if admin_view type is already in content_type DB. $admin_view_id = null; @@ -1950,7 +1950,7 @@ class com_componentbuilderInstallerScript echo ' -

Upgrade to Version 2.3.7 Was Successful! Let us know if anything is not working as expected.

'; +

Upgrade to Version 2.3.8 Was Successful! Let us know if anything is not working as expected.

'; } } }