From b0ad2ddffc2400382acd055a2c186eb60be361e0 Mon Sep 17 00:00:00 2001 From: dev Date: Sat, 18 Mar 2017 13:16:07 +0200 Subject: [PATCH 1/5] Added the basic code for controller and model for gh-53 --- README.md | 2 +- admin/README.txt | 2 +- admin/access.xml | 1 + admin/assets/css/joomla_component.css | 4 +- admin/assets/css/joomla_components.css | 4 +- admin/controllers/joomla_component.php | 4 +- admin/controllers/joomla_components.php | 35 +- .../en-GB/en-GB.com_componentbuilder.ini | 13 +- .../joomla_component/settings_left.php | 6 +- .../joomla_component/settings_right.php | 4 +- admin/models/fields/adminviews.php | 4 +- admin/models/forms/joomla_component.js | 4 +- admin/models/forms/joomla_component.xml | 2324 ++++++++--------- admin/models/joomla_component.php | 184 +- admin/models/joomla_components.php | 114 +- admin/sql/install.mysql.utf8.sql | 38 +- admin/tables/joomla_component.php | 4 +- admin/views/joomla_component/submitbutton.js | 4 +- admin/views/joomla_component/tmpl/edit.php | 4 +- admin/views/joomla_component/view.html.php | 4 +- .../views/joomla_components/tmpl/default.php | 4 +- .../tmpl/default_batch_body.php | 4 +- .../tmpl/default_batch_footer.php | 4 +- .../joomla_components/tmpl/default_body.php | 4 +- .../joomla_components/tmpl/default_foot.php | 4 +- .../joomla_components/tmpl/default_head.php | 4 +- .../tmpl/default_toolbar.php | 4 +- admin/views/joomla_components/view.html.php | 11 +- script.php | 8 +- 29 files changed, 1452 insertions(+), 1354 deletions(-) diff --git a/README.md b/README.md index 6eaa11ecc..0c0573152 100644 --- a/README.md +++ b/README.md @@ -108,7 +108,7 @@ Component Builder is mapped as a component in itself on my local development env + *Version*: 2.3.7 + *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*: **92889** ++ *Line count*: **92987** + *File count*: **602** + *Folder count*: **105** diff --git a/admin/README.txt b/admin/README.txt index 6eaa11ecc..0c0573152 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -108,7 +108,7 @@ Component Builder is mapped as a component in itself on my local development env + *Version*: 2.3.7 + *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*: **92889** ++ *Line count*: **92987** + *File count*: **602** + *Folder count*: **105** diff --git a/admin/access.xml b/admin/access.xml index 2f9c85d7c..4c8cd730f 100644 --- a/admin/access.xml +++ b/admin/access.xml @@ -101,6 +101,7 @@ + diff --git a/admin/assets/css/joomla_component.css b/admin/assets/css/joomla_component.css index 01da460b4..4d8c6f0dc 100644 --- a/admin/assets/css/joomla_component.css +++ b/admin/assets/css/joomla_component.css @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 97 of this MVC - @build 3rd March, 2017 + @version @update number 101 of this MVC + @build 18th 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 48fe1a4e9..931759369 100644 --- a/admin/assets/css/joomla_components.css +++ b/admin/assets/css/joomla_components.css @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 97 of this MVC - @build 3rd March, 2017 + @version @update number 101 of this MVC + @build 18th March, 2017 @created 6th May, 2015 @package Component Builder @subpackage joomla_components.css diff --git a/admin/controllers/joomla_component.php b/admin/controllers/joomla_component.php index b303f4eb7..a8c5e9fa1 100644 --- a/admin/controllers/joomla_component.php +++ b/admin/controllers/joomla_component.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 97 of this MVC - @build 3rd March, 2017 + @version @update number 101 of this MVC + @build 18th 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 1f6e42b88..48d8a9442 100644 --- a/admin/controllers/joomla_components.php +++ b/admin/controllers/joomla_components.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 97 of this MVC - @build 3rd March, 2017 + @version @update number 101 of this MVC + @build 18th March, 2017 @created 6th May, 2015 @package Component Builder @subpackage joomla_components.php @@ -107,5 +107,34 @@ class ComponentbuilderControllerJoomla_components extends JControllerAdmin $message = JText::_('COM_COMPONENTBUILDER_IMPORT_FAILED'); $this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=joomla_components', false), $message, 'error'); return; - } + } + + public function exportComponent() + { + // Check for request forgeries + JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); + // check if export is allowed for this user. + $user = JFactory::getUser(); + if ($user->authorise('[[[view]]].export', 'com_componentbuilder') && $user->authorise('core.export', 'com_componentbuilder')) + { + // Get the input + $input = JFactory::getApplication()->input; + $pks = $input->post->get('cid', array(), 'array'); + // Sanitize the input + JArrayHelper::toInteger($pks); + // Get the model + $model = $this->getModel('Joomla_components'); + // get the data to export + $data = $model->getSmartExport($pks); + if (ComponentbuilderHelper::checkArray($data)) + { + // now lets look at what was build + var_dump($data); jexit(); + } + } + // Redirect to the list screen with error. + $message = JText::_('COM_COMPONENTBUILDER_EXPORT_FAILED'); + $this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=joomla_components', false), $message, 'error'); + return; + } } diff --git a/admin/language/en-GB/en-GB.com_componentbuilder.ini b/admin/language/en-GB/en-GB.com_componentbuilder.ini index d9fef9c27..3a18b3662 100644 --- a/admin/language/en-GB/en-GB.com_componentbuilder.ini +++ b/admin/language/en-GB/en-GB.com_componentbuilder.ini @@ -1742,6 +1742,7 @@ COM_COMPONENTBUILDER_EDIT_S="Edit %s" 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_COMPONENT="Export Component" 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" @@ -2314,7 +2315,7 @@ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_SITE_EVENT="Add Site Event" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_SITE_EVENT_LABEL="Add Global Site Event" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_SQL="Add Sql" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_SQL_DESCRIPTION="if set in view" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_SQL_LABEL="Add MySQL" +COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_SQL_LABEL="Add MySQL (to view table)" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_SQL_OPTIONS_DESCRIPTION="if being added" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_SQL_OPTIONS_LABEL="Options" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_UPDATE_SERVER="Add Update Server" @@ -2463,9 +2464,9 @@ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EDIT="Editing the Joomla Component" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EDIT_CREATE_SITE_VIEW_DESCRIPTION="add site edit & create view for this admin view" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EDIT_CREATE_SITE_VIEW_LABEL="Edit/Create Site View" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EMAIL="Email" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EMAIL_DESCRIPTION="Enter Author Email" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EMAIL_HINT="Author Email Here" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EMAIL_LABEL="Author Email" +COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EMAIL_DESCRIPTION="Enter Email" +COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EMAIL_HINT="demo@example.com" +COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EMAIL_LABEL="Email" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EMPTYCONTRIBUTORS="Emptycontributors" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EMPTYCONTRIBUTORS_DESCRIPTION="Set if a list of empty contributor fields should be added." COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EMPTYCONTRIBUTORS_LABEL="Empty Contributor Fields" @@ -2478,6 +2479,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_EYE_CLOSE="Eye Close" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EYE_OPEN="Eye Open" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_FEATURED="Featured" @@ -2892,7 +2895,7 @@ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WARNING_CIRCLE="Warning Circle" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WEBSITE="Website" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WEBSITE_DESCRIPTION="Enter website address" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WEBSITE_HINT="http://www.example.com" -COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WEBSITE_LABEL="Author Website" +COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WEBSITE_LABEL="Website" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WHMCS_KEY="Whmcs Key" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WHMCS_KEY_DESCRIPTION="Add your WHMCS Secret Key here that is needed for this license" COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WHMCS_KEY_HINT="Secret Key" diff --git a/admin/layouts/joomla_component/settings_left.php b/admin/layouts/joomla_component/settings_left.php index 762183c5a..b6c4bb1bc 100644 --- a/admin/layouts/joomla_component/settings_left.php +++ b/admin/layouts/joomla_component/settings_left.php @@ -34,13 +34,13 @@ $fields = $displayData->get('fields') ?: array( 'addadmin_views', 'addcustom_admin_views', 'addsite_views', - 'spacer_hr_e', + 'spacer_hr_a', 'note_mysql_tweak_options', 'sql_tweak', - 'spacer_hr_a', + 'spacer_hr_b', 'note_add_custom_menus', 'addcustommenus', - 'spacer_hr_d', + 'spacer_hr_c', 'note_add_config', 'addconfig' ); diff --git a/admin/layouts/joomla_component/settings_right.php b/admin/layouts/joomla_component/settings_right.php index 98b227df3..ed2c182c5 100644 --- a/admin/layouts/joomla_component/settings_right.php +++ b/admin/layouts/joomla_component/settings_right.php @@ -34,10 +34,10 @@ $fields = $displayData->get('fields') ?: array( 'addcontributors', 'emptycontributors', 'number', - 'spacer_hr_c', + 'spacer_hr_d', 'note_add_files', 'addfiles', - 'spacer_hr_b', + 'spacer_hr_e', 'note_add_folders', 'addfolders' ); diff --git a/admin/models/fields/adminviews.php b/admin/models/fields/adminviews.php index 456114824..1ed37371d 100644 --- a/admin/models/fields/adminviews.php +++ b/admin/models/fields/adminviews.php @@ -151,7 +151,7 @@ class JFormFieldAdminviews extends JFormFieldList { $db = JFactory::getDBO(); $query = $db->getQuery(true); - $query->select($db->quoteName(array('a.id','a.system_name'),array('id','before_system_name'))); + $query->select($db->quoteName(array('a.id','a.system_name'),array('id','adminview_system_name'))); $query->from($db->quoteName('#__componentbuilder_admin_view', 'a')); $query->where($db->quoteName('a.published') . ' = 1'); $query->order('a.system_name ASC'); @@ -163,7 +163,7 @@ class JFormFieldAdminviews extends JFormFieldList $options[] = JHtml::_('select.option', '', 'Select an option'); foreach($items as $item) { - $options[] = JHtml::_('select.option', $item->id, $item->before_system_name); + $options[] = JHtml::_('select.option', $item->id, $item->adminview_system_name); } } return $options; diff --git a/admin/models/forms/joomla_component.js b/admin/models/forms/joomla_component.js index 9d170a05e..30a107f53 100644 --- a/admin/models/forms/joomla_component.js +++ b/admin/models/forms/joomla_component.js @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 97 of this MVC - @build 3rd March, 2017 + @version @update number 101 of this MVC + @build 18th March, 2017 @created 6th May, 2015 @package Component Builder @subpackage joomla_component.js diff --git a/admin/models/forms/joomla_component.xml b/admin/models/forms/joomla_component.xml index f1801480b..c6d4098d8 100644 --- a/admin/models/forms/joomla_component.xml +++ b/admin/models/forms/joomla_component.xml @@ -178,34 +178,6 @@ message="Error! Please add author name here." hint="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_AUTHOR_HINT" /> - - - - - - - - - - - - - - - - - - - + @@ -276,6 +206,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -1145,24 +685,61 @@ message="Error! Please add website here." hint="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WHMCS_URL_HINT" /> - + - + + + + + + + @@ -1172,292 +749,76 @@ - + + + + + - + COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES + + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + type="radio" + name="add_css" + label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ADD_CSS_LABEL" + class="btn-group btn-group-yesno" + default="0" + required="true"> + + + + - + @@ -2735,51 +2098,49 @@ - + - - - - - - - + type="textarea" + name="php_helper_both" + label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_HELPER_BOTH_LABEL" + rows="80" + cols="15" + description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_HELPER_BOTH_DESCRIPTION" + class="text_area span12" + filter="raw" + hint="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_HELPER_BOTH_HINT" + required="true" + /> + + + - - - - + type="textarea" + name="php_helper_admin" + label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_HELPER_ADMIN_LABEL" + rows="80" + cols="15" + description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_HELPER_ADMIN_DESCRIPTION" + class="text_area span12" + filter="raw" + hint="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_HELPER_ADMIN_HINT" + required="true" + /> - + - - - - + type="textarea" + name="php_admin_event" + label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_ADMIN_EVENT_LABEL" + rows="17" + cols="5" + description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_ADMIN_EVENT_DESCRIPTION" + class="text_area span12" + filter="raw" + hint="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_PHP_ADMIN_EVENT_HINT" + required="true" + /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/admin/models/joomla_component.php b/admin/models/joomla_component.php index eb578ed8b..5eb02344f 100644 --- a/admin/models/joomla_component.php +++ b/admin/models/joomla_component.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 97 of this MVC - @build 3rd March, 2017 + @version @update number 101 of this MVC + @build 18th March, 2017 @created 6th May, 2015 @package Component Builder @subpackage joomla_component.php @@ -95,46 +95,16 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin $item->metadata = $registry->toArray(); } - if (!empty($item->readme)) - { - // base64 Decode readme. - $item->readme = base64_decode($item->readme); - } - - if (!empty($item->php_postflight_update)) - { - // base64 Decode php_postflight_update. - $item->php_postflight_update = base64_decode($item->php_postflight_update); - } - - if (!empty($item->buildcompsql)) - { - // base64 Decode buildcompsql. - $item->buildcompsql = base64_decode($item->buildcompsql); - } - - if (!empty($item->php_preflight_update)) - { - // base64 Decode php_preflight_update. - $item->php_preflight_update = base64_decode($item->php_preflight_update); - } - - if (!empty($item->php_helper_both)) - { - // base64 Decode php_helper_both. - $item->php_helper_both = base64_decode($item->php_helper_both); - } - if (!empty($item->php_postflight_install)) { // base64 Decode php_postflight_install. $item->php_postflight_install = base64_decode($item->php_postflight_install); } - if (!empty($item->php_method_uninstall)) + if (!empty($item->readme)) { - // base64 Decode php_method_uninstall. - $item->php_method_uninstall = base64_decode($item->php_method_uninstall); + // base64 Decode readme. + $item->readme = base64_decode($item->readme); } if (!empty($item->php_preflight_install)) @@ -143,12 +113,42 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin $item->php_preflight_install = base64_decode($item->php_preflight_install); } + if (!empty($item->css)) + { + // base64 Decode css. + $item->css = base64_decode($item->css); + } + + if (!empty($item->php_method_uninstall)) + { + // base64 Decode php_method_uninstall. + $item->php_method_uninstall = base64_decode($item->php_method_uninstall); + } + + if (!empty($item->php_preflight_update)) + { + // base64 Decode php_preflight_update. + $item->php_preflight_update = base64_decode($item->php_preflight_update); + } + + if (!empty($item->php_postflight_update)) + { + // base64 Decode php_postflight_update. + $item->php_postflight_update = base64_decode($item->php_postflight_update); + } + if (!empty($item->sql)) { // base64 Decode sql. $item->sql = base64_decode($item->sql); } + if (!empty($item->php_helper_both)) + { + // base64 Decode php_helper_both. + $item->php_helper_both = base64_decode($item->php_helper_both); + } + if (!empty($item->php_helper_admin)) { // base64 Decode php_helper_admin. @@ -173,18 +173,18 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin $item->php_site_event = base64_decode($item->php_site_event); } - if (!empty($item->css)) - { - // base64 Decode css. - $item->css = base64_decode($item->css); - } - if (!empty($item->php_dashboard_methods)) { // base64 Decode php_dashboard_methods. $item->php_dashboard_methods = base64_decode($item->php_dashboard_methods); } + if (!empty($item->buildcompsql)) + { + // base64 Decode buildcompsql. + $item->buildcompsql = base64_decode($item->buildcompsql); + } + // Get the basic encription. $basickey = ComponentbuilderHelper::getCryptKey('basic'); // Get the encription object. @@ -196,16 +196,16 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin $item->update_server_ftp = rtrim($basic->decryptString($item->update_server_ftp), "\0"); } - if (!empty($item->sales_server_ftp) && $basickey && !is_numeric($item->sales_server_ftp) && $item->sales_server_ftp === base64_encode(base64_decode($item->sales_server_ftp, true))) - { - // basic decript data sales_server_ftp. - $item->sales_server_ftp = rtrim($basic->decryptString($item->sales_server_ftp), "\0"); - } - if (!empty($item->whmcs_key) && $basickey && !is_numeric($item->whmcs_key) && $item->whmcs_key === base64_encode(base64_decode($item->whmcs_key, true))) { // basic decript data whmcs_key. $item->whmcs_key = rtrim($basic->decryptString($item->whmcs_key), "\0"); + } + + if (!empty($item->sales_server_ftp) && $basickey && !is_numeric($item->sales_server_ftp) && $item->sales_server_ftp === base64_encode(base64_decode($item->sales_server_ftp, true))) + { + // basic decript data sales_server_ftp. + $item->sales_server_ftp = rtrim($basic->decryptString($item->sales_server_ftp), "\0"); } if (!empty($item->id)) @@ -1252,46 +1252,16 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin $data['metadata'] = (string) $metadata; } - // Set the readme string to base64 string. - if (isset($data['readme'])) - { - $data['readme'] = base64_encode($data['readme']); - } - - // Set the php_postflight_update string to base64 string. - if (isset($data['php_postflight_update'])) - { - $data['php_postflight_update'] = base64_encode($data['php_postflight_update']); - } - - // Set the buildcompsql string to base64 string. - if (isset($data['buildcompsql'])) - { - $data['buildcompsql'] = base64_encode($data['buildcompsql']); - } - - // Set the php_preflight_update string to base64 string. - if (isset($data['php_preflight_update'])) - { - $data['php_preflight_update'] = base64_encode($data['php_preflight_update']); - } - - // Set the php_helper_both string to base64 string. - if (isset($data['php_helper_both'])) - { - $data['php_helper_both'] = base64_encode($data['php_helper_both']); - } - // Set the php_postflight_install string to base64 string. if (isset($data['php_postflight_install'])) { $data['php_postflight_install'] = base64_encode($data['php_postflight_install']); } - // Set the php_method_uninstall string to base64 string. - if (isset($data['php_method_uninstall'])) + // Set the readme string to base64 string. + if (isset($data['readme'])) { - $data['php_method_uninstall'] = base64_encode($data['php_method_uninstall']); + $data['readme'] = base64_encode($data['readme']); } // Set the php_preflight_install string to base64 string. @@ -1300,12 +1270,42 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin $data['php_preflight_install'] = base64_encode($data['php_preflight_install']); } + // Set the css string to base64 string. + if (isset($data['css'])) + { + $data['css'] = base64_encode($data['css']); + } + + // Set the php_method_uninstall string to base64 string. + if (isset($data['php_method_uninstall'])) + { + $data['php_method_uninstall'] = base64_encode($data['php_method_uninstall']); + } + + // Set the php_preflight_update string to base64 string. + if (isset($data['php_preflight_update'])) + { + $data['php_preflight_update'] = base64_encode($data['php_preflight_update']); + } + + // Set the php_postflight_update string to base64 string. + if (isset($data['php_postflight_update'])) + { + $data['php_postflight_update'] = base64_encode($data['php_postflight_update']); + } + // Set the sql string to base64 string. if (isset($data['sql'])) { $data['sql'] = base64_encode($data['sql']); } + // Set the php_helper_both string to base64 string. + if (isset($data['php_helper_both'])) + { + $data['php_helper_both'] = base64_encode($data['php_helper_both']); + } + // Set the php_helper_admin string to base64 string. if (isset($data['php_helper_admin'])) { @@ -1330,18 +1330,18 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin $data['php_site_event'] = base64_encode($data['php_site_event']); } - // Set the css string to base64 string. - if (isset($data['css'])) - { - $data['css'] = base64_encode($data['css']); - } - // Set the php_dashboard_methods string to base64 string. if (isset($data['php_dashboard_methods'])) { $data['php_dashboard_methods'] = base64_encode($data['php_dashboard_methods']); } + // Set the buildcompsql string to base64 string. + if (isset($data['buildcompsql'])) + { + $data['buildcompsql'] = base64_encode($data['buildcompsql']); + } + // Get the basic encription key. $basickey = ComponentbuilderHelper::getCryptKey('basic'); // Get the encription object @@ -1353,18 +1353,18 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin $data['update_server_ftp'] = $basic->encryptString($data['update_server_ftp']); } - // Encript data sales_server_ftp. - if (isset($data['sales_server_ftp']) && $basickey) - { - $data['sales_server_ftp'] = $basic->encryptString($data['sales_server_ftp']); - } - // Encript data whmcs_key. if (isset($data['whmcs_key']) && $basickey) { $data['whmcs_key'] = $basic->encryptString($data['whmcs_key']); } + // Encript data sales_server_ftp. + if (isset($data['sales_server_ftp']) && $basickey) + { + $data['sales_server_ftp'] = $basic->encryptString($data['sales_server_ftp']); + } + // we check if component should be build from sql file ComponentbuilderHelper::dynamicBuilder($data, 1); diff --git a/admin/models/joomla_components.php b/admin/models/joomla_components.php index f006b3264..558907584 100644 --- a/admin/models/joomla_components.php +++ b/admin/models/joomla_components.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 97 of this MVC - @build 3rd March, 2017 + @version @update number 101 of this MVC + @build 18th March, 2017 @created 6th May, 2015 @package Component Builder @subpackage joomla_components.php @@ -54,6 +54,66 @@ class ComponentbuilderModelJoomla_components extends JModelList } parent::__construct($config); + } + + /** + * Method to get list export data. + * + * @return mixed An array of data items on success, false on failure. + */ + public function getSmartExport($pks) + { + // setup the query + if (ComponentbuilderHelper::checkArray($pks)) + { + // Get the user object. + $user = JFactory::getUser(); + // Create a new query object. + $db = JFactory::getDBO(); + $query = $db->getQuery(true); + + // Select some fields + $query->select($db->quoteName('a.*')); + + // From the componentbuilder_joomla_componet table + $query->from($db->quoteName('#__componentbuilder_joomla_component', 'a')); + $query->where('a.id IN (' . implode(',',$pks) . ')'); + + // Implement View Level Access + if (!$user->authorise('core.options', 'com_componentbuilder')) + { + $groups = implode(',', $user->getAuthorisedViewLevels()); + $query->where('a.access IN (' . $groups . ')'); + } + + // Order the results by ordering + $query->order('a.ordering ASC'); + + // Load the items + $db->setQuery($query); + $db->execute(); + if ($db->getNumRows()) + { + $items = $db->loadObjectList(); + // set values to display correctly. + if (ComponentbuilderHelper::checkArray($items)) + { + 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')); + if (!$access) + { + unset($items[$nr]); + continue; + } + + } + } + + return $items; + } + } + return false; } /** @@ -264,46 +324,46 @@ class ComponentbuilderModelJoomla_components extends JModelList // decrypt update_server_ftp $item->update_server_ftp = $basic->decryptString($item->update_server_ftp); } - if ($basickey && !is_numeric($item->sales_server_ftp) && $item->sales_server_ftp === base64_encode(base64_decode($item->sales_server_ftp, true))) - { - // decrypt sales_server_ftp - $item->sales_server_ftp = $basic->decryptString($item->sales_server_ftp); - } - // decode readme - $item->readme = base64_decode($item->readme); - // decode php_postflight_update - $item->php_postflight_update = base64_decode($item->php_postflight_update); - // decode buildcompsql - $item->buildcompsql = base64_decode($item->buildcompsql); - // decode php_preflight_update - $item->php_preflight_update = base64_decode($item->php_preflight_update); - // decode php_helper_both - $item->php_helper_both = base64_decode($item->php_helper_both); // decode php_postflight_install $item->php_postflight_install = base64_decode($item->php_postflight_install); - // decode php_method_uninstall - $item->php_method_uninstall = base64_decode($item->php_method_uninstall); + // decode readme + $item->readme = base64_decode($item->readme); // decode php_preflight_install $item->php_preflight_install = base64_decode($item->php_preflight_install); - // decode sql - $item->sql = base64_decode($item->sql); - // decode php_helper_admin - $item->php_helper_admin = base64_decode($item->php_helper_admin); - // decode php_admin_event - $item->php_admin_event = base64_decode($item->php_admin_event); + // decode css + $item->css = base64_decode($item->css); + // decode php_method_uninstall + $item->php_method_uninstall = base64_decode($item->php_method_uninstall); if ($basickey && !is_numeric($item->whmcs_key) && $item->whmcs_key === base64_encode(base64_decode($item->whmcs_key, true))) { // decrypt whmcs_key $item->whmcs_key = $basic->decryptString($item->whmcs_key); } + // decode php_preflight_update + $item->php_preflight_update = base64_decode($item->php_preflight_update); + // decode php_postflight_update + $item->php_postflight_update = base64_decode($item->php_postflight_update); + // decode sql + $item->sql = base64_decode($item->sql); + if ($basickey && !is_numeric($item->sales_server_ftp) && $item->sales_server_ftp === base64_encode(base64_decode($item->sales_server_ftp, true))) + { + // decrypt sales_server_ftp + $item->sales_server_ftp = $basic->decryptString($item->sales_server_ftp); + } + // decode php_helper_both + $item->php_helper_both = base64_decode($item->php_helper_both); + // decode php_helper_admin + $item->php_helper_admin = base64_decode($item->php_helper_admin); + // decode php_admin_event + $item->php_admin_event = base64_decode($item->php_admin_event); // decode php_helper_site $item->php_helper_site = base64_decode($item->php_helper_site); // decode php_site_event $item->php_site_event = base64_decode($item->php_site_event); - // decode css - $item->css = base64_decode($item->css); // decode php_dashboard_methods $item->php_dashboard_methods = base64_decode($item->php_dashboard_methods); + // decode buildcompsql + $item->buildcompsql = base64_decode($item->buildcompsql); // unset the values we don't want exported. unset($item->asset_id); unset($item->checked_out); diff --git a/admin/sql/install.mysql.utf8.sql b/admin/sql/install.mysql.utf8.sql index 8d363eb21..a1d7c7b9a 100644 --- a/admin/sql/install.mysql.utf8.sql +++ b/admin/sql/install.mysql.utf8.sql @@ -95,34 +95,34 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_joomla_component` ( KEY `idx_modifiedby` (`modified_by`), KEY `idx_state` (`published`), KEY `idx_name_code` (`name_code`), - KEY `idx_add_php_dashboard_methods` (`add_php_dashboard_methods`), - KEY `idx_add_sales_server` (`add_sales_server`), - KEY `idx_name` (`name`), - KEY `idx_adduikit` (`adduikit`), - KEY `idx_add_php_helper_site` (`add_php_helper_site`), - KEY `idx_add_email_helper` (`add_email_helper`), - KEY `idx_debug_linenr` (`debug_linenr`), KEY `idx_add_placeholders` (`add_placeholders`), - KEY `idx_add_admin_event` (`add_admin_event`), + KEY `idx_add_php_dashboard_methods` (`add_php_dashboard_methods`), + KEY `idx_debug_linenr` (`debug_linenr`), KEY `idx_mvc_versiondate` (`mvc_versiondate`), - KEY `idx_add_site_event` (`add_site_event`), - KEY `idx_update_server_target` (`update_server_target`), - KEY `idx_add_update_server` (`add_update_server`), KEY `idx_creatuserhelper` (`creatuserhelper`), - KEY `idx_emptycontributors` (`emptycontributors`), - KEY `idx_add_license` (`add_license`), - KEY `idx_license_type` (`license_type`), - KEY `idx_add_css` (`add_css`), + KEY `idx_add_php_helper_admin` (`add_php_helper_admin`), + KEY `idx_update_server_target` (`update_server_target`), + KEY `idx_add_php_helper_site` (`add_php_helper_site`), KEY `idx_addfootable` (`addfootable`), KEY `idx_add_php_helper_both` (`add_php_helper_both`), - KEY `idx_add_php_helper_admin` (`add_php_helper_admin`), + KEY `idx_add_license` (`add_license`), + KEY `idx_add_admin_event` (`add_admin_event`), + KEY `idx_license_type` (`license_type`), + KEY `idx_add_site_event` (`add_site_event`), + KEY `idx_add_update_server` (`add_update_server`), + KEY `idx_name` (`name`), + KEY `idx_adduikit` (`adduikit`), + KEY `idx_add_css` (`add_css`), + KEY `idx_add_email_helper` (`add_email_helper`), + KEY `idx_add_php_preflight_install` (`add_php_preflight_install`), + KEY `idx_add_php_preflight_update` (`add_php_preflight_update`), KEY `idx_add_php_postflight_install` (`add_php_postflight_install`), KEY `idx_add_php_postflight_update` (`add_php_postflight_update`), KEY `idx_add_php_method_uninstall` (`add_php_method_uninstall`), - KEY `idx_add_php_preflight_install` (`add_php_preflight_install`), - KEY `idx_add_php_preflight_update` (`add_php_preflight_update`), KEY `idx_add_sql` (`add_sql`), - KEY `idx_addreadme` (`addreadme`) + KEY `idx_emptycontributors` (`emptycontributors`), + KEY `idx_addreadme` (`addreadme`), + KEY `idx_add_sales_server` (`add_sales_server`) ) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8; CREATE TABLE IF NOT EXISTS `#__componentbuilder_admin_view` ( diff --git a/admin/tables/joomla_component.php b/admin/tables/joomla_component.php index 00f40e870..fb8f3223c 100644 --- a/admin/tables/joomla_component.php +++ b/admin/tables/joomla_component.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 97 of this MVC - @build 3rd March, 2017 + @version @update number 101 of this MVC + @build 18th March, 2017 @created 6th May, 2015 @package Component Builder @subpackage joomla_component.php diff --git a/admin/views/joomla_component/submitbutton.js b/admin/views/joomla_component/submitbutton.js index 5740d7828..94c99aa83 100644 --- a/admin/views/joomla_component/submitbutton.js +++ b/admin/views/joomla_component/submitbutton.js @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 97 of this MVC - @build 3rd March, 2017 + @version @update number 101 of this MVC + @build 18th 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 7886876ec..240decd35 100644 --- a/admin/views/joomla_component/tmpl/edit.php +++ b/admin/views/joomla_component/tmpl/edit.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 97 of this MVC - @build 3rd March, 2017 + @version @update number 101 of this MVC + @build 18th 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 08c4c7a6a..068a09b01 100644 --- a/admin/views/joomla_component/view.html.php +++ b/admin/views/joomla_component/view.html.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 97 of this MVC - @build 3rd March, 2017 + @version @update number 101 of this MVC + @build 18th 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 b7622df11..1c816b9a2 100644 --- a/admin/views/joomla_components/tmpl/default.php +++ b/admin/views/joomla_components/tmpl/default.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 97 of this MVC - @build 3rd March, 2017 + @version @update number 101 of this MVC + @build 18th 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 aa2d82545..86ddc0a0c 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 97 of this MVC - @build 3rd March, 2017 + @version @update number 101 of this MVC + @build 18th 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 e475d9c2e..7e6141ca0 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 97 of this MVC - @build 3rd March, 2017 + @version @update number 101 of this MVC + @build 18th 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 6ad2ed5ce..cbde0b385 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 97 of this MVC - @build 3rd March, 2017 + @version @update number 101 of this MVC + @build 18th 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 fd74e041f..7455f46f4 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 97 of this MVC - @build 3rd March, 2017 + @version @update number 101 of this MVC + @build 18th 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 452bcefba..1bf29b619 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 97 of this MVC - @build 3rd March, 2017 + @version @update number 101 of this MVC + @build 18th 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 1a1d2e16a..a7fd8a57c 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 97 of this MVC - @build 3rd March, 2017 + @version @update number 101 of this MVC + @build 18th 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 90d87f4d6..d9708af4a 100644 --- a/admin/views/joomla_components/view.html.php +++ b/admin/views/joomla_components/view.html.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 97 of this MVC - @build 3rd March, 2017 + @version @update number 101 of this MVC + @build 18th March, 2017 @created 6th May, 2015 @package Component Builder @subpackage view.html.php @@ -134,7 +134,12 @@ class ComponentbuilderViewJoomla_components extends JViewLegacy // add the button to the page $dhtml = $layout->render(array('title' => $title)); $bar->appendButton('Custom', $dhtml, 'batch'); - } + } + if ($this->user->authorise('joomla_component.export_component')) + { + // add Export Component button. + JToolBarHelper::custom('joomla_components.exportComponent', 'download', '', 'COM_COMPONENTBUILDER_EXPORT_COMPONENT', false); + } if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete)) { diff --git a/script.php b/script.php index 98eda6190..b33a5a147 100644 --- a/script.php +++ b/script.php @@ -1349,9 +1349,9 @@ class com_componentbuilderInstallerScript $joomla_component->type_title = 'Componentbuilder Joomla_component'; $joomla_component->type_alias = 'com_componentbuilder.joomla_component'; $joomla_component->table = '{"special": {"dbtable": "#__componentbuilder_joomla_component","key": "id","type": "Joomla_component","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}'; - $joomla_component->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "readme","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_code":"name_code","component_version":"component_version","short_description":"short_description","companyname":"companyname","author":"author","add_php_dashboard_methods":"add_php_dashboard_methods","add_sales_server":"add_sales_server","update_server_ftp":"update_server_ftp","sales_server_ftp":"sales_server_ftp","readme":"readme","name":"name","adduikit":"adduikit","copyright":"copyright","add_php_helper_site":"add_php_helper_site","add_email_helper":"add_email_helper","buildcomp":"buildcomp","php_postflight_update":"php_postflight_update","buildcompsql":"buildcompsql","php_preflight_update":"php_preflight_update","debug_linenr":"debug_linenr","add_placeholders":"add_placeholders","add_admin_event":"add_admin_event","mvc_versiondate":"mvc_versiondate","add_site_event":"add_site_event","update_server":"update_server","description":"description","php_helper_both":"php_helper_both","update_server_target":"update_server_target","php_postflight_install":"php_postflight_install","license":"license","php_method_uninstall":"php_method_uninstall","bom":"bom","php_preflight_install":"php_preflight_install","image":"image","sql":"sql","number":"number","add_update_server":"add_update_server","creatuserhelper":"creatuserhelper","emptycontributors":"emptycontributors","email":"email","website":"website","add_license":"add_license","license_type":"license_type","php_helper_admin":"php_helper_admin","php_admin_event":"php_admin_event","whmcs_key":"whmcs_key","php_helper_site":"php_helper_site","whmcs_url":"whmcs_url","php_site_event":"php_site_event","add_css":"add_css","addfootable":"addfootable","not_required":"not_required","css":"css","add_php_helper_both":"add_php_helper_both","add_php_helper_admin":"add_php_helper_admin","add_php_postflight_install":"add_php_postflight_install","add_php_postflight_update":"add_php_postflight_update","add_php_method_uninstall":"add_php_method_uninstall","php_dashboard_methods":"php_dashboard_methods","add_php_preflight_install":"add_php_preflight_install","add_php_preflight_update":"add_php_preflight_update","add_sql":"add_sql","addreadme":"addreadme"}}'; + $joomla_component->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "readme","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_code":"name_code","component_version":"component_version","short_description":"short_description","companyname":"companyname","author":"author","update_server_ftp":"update_server_ftp","add_placeholders":"add_placeholders","php_postflight_install":"php_postflight_install","description":"description","add_php_dashboard_methods":"add_php_dashboard_methods","copyright":"copyright","readme":"readme","debug_linenr":"debug_linenr","mvc_versiondate":"mvc_versiondate","creatuserhelper":"creatuserhelper","php_preflight_install":"php_preflight_install","css":"css","php_method_uninstall":"php_method_uninstall","add_php_helper_admin":"add_php_helper_admin","update_server_target":"update_server_target","add_php_helper_site":"add_php_helper_site","email":"email","addfootable":"addfootable","website":"website","add_php_helper_both":"add_php_helper_both","add_license":"add_license","add_admin_event":"add_admin_event","license_type":"license_type","add_site_event":"add_site_event","whmcs_key":"whmcs_key","php_preflight_update":"php_preflight_update","whmcs_url":"whmcs_url","php_postflight_update":"php_postflight_update","license":"license","sql":"sql","bom":"bom","add_update_server":"add_update_server","image":"image","buildcomp":"buildcomp","sales_server_ftp":"sales_server_ftp","not_required":"not_required","name":"name","adduikit":"adduikit","add_css":"add_css","add_email_helper":"add_email_helper","php_helper_both":"php_helper_both","php_helper_admin":"php_helper_admin","php_admin_event":"php_admin_event","php_helper_site":"php_helper_site","php_site_event":"php_site_event","php_dashboard_methods":"php_dashboard_methods","add_php_preflight_install":"add_php_preflight_install","add_php_preflight_update":"add_php_preflight_update","add_php_postflight_install":"add_php_postflight_install","add_php_postflight_update":"add_php_postflight_update","add_php_method_uninstall":"add_php_method_uninstall","add_sql":"add_sql","emptycontributors":"emptycontributors","addreadme":"addreadme","number":"number","update_server":"update_server","add_sales_server":"add_sales_server","buildcompsql":"buildcompsql"}}'; $joomla_component->router = 'ComponentbuilderHelperRoute::getJoomla_componentRoute'; - $joomla_component->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/joomla_component.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_dashboard_methods","add_sales_server","adduikit","add_php_helper_site","add_email_helper","buildcomp","debug_linenr","add_placeholders","add_admin_event","mvc_versiondate","add_site_event","update_server_target","number","add_update_server","creatuserhelper","emptycontributors","add_license","license_type","add_css","addfootable","not_required","add_php_helper_both","add_php_helper_admin","add_php_postflight_install","add_php_postflight_update","add_php_method_uninstall","add_php_preflight_install","add_php_preflight_update","add_sql","addreadme"],"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"}]}'; + $joomla_component->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/joomla_component.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_placeholders","add_php_dashboard_methods","debug_linenr","mvc_versiondate","creatuserhelper","add_php_helper_admin","update_server_target","add_php_helper_site","addfootable","add_php_helper_both","add_license","add_admin_event","license_type","add_site_event","add_update_server","buildcomp","not_required","adduikit","add_css","add_email_helper","add_php_preflight_install","add_php_preflight_update","add_php_postflight_install","add_php_postflight_update","add_php_method_uninstall","add_sql","emptycontributors","addreadme","number","add_sales_server"],"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. $joomla_component_Inserted = $db->insertObject('#__content_types', $joomla_component); @@ -1545,9 +1545,9 @@ class com_componentbuilderInstallerScript $joomla_component->type_title = 'Componentbuilder Joomla_component'; $joomla_component->type_alias = 'com_componentbuilder.joomla_component'; $joomla_component->table = '{"special": {"dbtable": "#__componentbuilder_joomla_component","key": "id","type": "Joomla_component","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}'; - $joomla_component->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "readme","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_code":"name_code","component_version":"component_version","short_description":"short_description","companyname":"companyname","author":"author","add_php_dashboard_methods":"add_php_dashboard_methods","add_sales_server":"add_sales_server","update_server_ftp":"update_server_ftp","sales_server_ftp":"sales_server_ftp","readme":"readme","name":"name","adduikit":"adduikit","copyright":"copyright","add_php_helper_site":"add_php_helper_site","add_email_helper":"add_email_helper","buildcomp":"buildcomp","php_postflight_update":"php_postflight_update","buildcompsql":"buildcompsql","php_preflight_update":"php_preflight_update","debug_linenr":"debug_linenr","add_placeholders":"add_placeholders","add_admin_event":"add_admin_event","mvc_versiondate":"mvc_versiondate","add_site_event":"add_site_event","update_server":"update_server","description":"description","php_helper_both":"php_helper_both","update_server_target":"update_server_target","php_postflight_install":"php_postflight_install","license":"license","php_method_uninstall":"php_method_uninstall","bom":"bom","php_preflight_install":"php_preflight_install","image":"image","sql":"sql","number":"number","add_update_server":"add_update_server","creatuserhelper":"creatuserhelper","emptycontributors":"emptycontributors","email":"email","website":"website","add_license":"add_license","license_type":"license_type","php_helper_admin":"php_helper_admin","php_admin_event":"php_admin_event","whmcs_key":"whmcs_key","php_helper_site":"php_helper_site","whmcs_url":"whmcs_url","php_site_event":"php_site_event","add_css":"add_css","addfootable":"addfootable","not_required":"not_required","css":"css","add_php_helper_both":"add_php_helper_both","add_php_helper_admin":"add_php_helper_admin","add_php_postflight_install":"add_php_postflight_install","add_php_postflight_update":"add_php_postflight_update","add_php_method_uninstall":"add_php_method_uninstall","php_dashboard_methods":"php_dashboard_methods","add_php_preflight_install":"add_php_preflight_install","add_php_preflight_update":"add_php_preflight_update","add_sql":"add_sql","addreadme":"addreadme"}}'; + $joomla_component->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "readme","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_code":"name_code","component_version":"component_version","short_description":"short_description","companyname":"companyname","author":"author","update_server_ftp":"update_server_ftp","add_placeholders":"add_placeholders","php_postflight_install":"php_postflight_install","description":"description","add_php_dashboard_methods":"add_php_dashboard_methods","copyright":"copyright","readme":"readme","debug_linenr":"debug_linenr","mvc_versiondate":"mvc_versiondate","creatuserhelper":"creatuserhelper","php_preflight_install":"php_preflight_install","css":"css","php_method_uninstall":"php_method_uninstall","add_php_helper_admin":"add_php_helper_admin","update_server_target":"update_server_target","add_php_helper_site":"add_php_helper_site","email":"email","addfootable":"addfootable","website":"website","add_php_helper_both":"add_php_helper_both","add_license":"add_license","add_admin_event":"add_admin_event","license_type":"license_type","add_site_event":"add_site_event","whmcs_key":"whmcs_key","php_preflight_update":"php_preflight_update","whmcs_url":"whmcs_url","php_postflight_update":"php_postflight_update","license":"license","sql":"sql","bom":"bom","add_update_server":"add_update_server","image":"image","buildcomp":"buildcomp","sales_server_ftp":"sales_server_ftp","not_required":"not_required","name":"name","adduikit":"adduikit","add_css":"add_css","add_email_helper":"add_email_helper","php_helper_both":"php_helper_both","php_helper_admin":"php_helper_admin","php_admin_event":"php_admin_event","php_helper_site":"php_helper_site","php_site_event":"php_site_event","php_dashboard_methods":"php_dashboard_methods","add_php_preflight_install":"add_php_preflight_install","add_php_preflight_update":"add_php_preflight_update","add_php_postflight_install":"add_php_postflight_install","add_php_postflight_update":"add_php_postflight_update","add_php_method_uninstall":"add_php_method_uninstall","add_sql":"add_sql","emptycontributors":"emptycontributors","addreadme":"addreadme","number":"number","update_server":"update_server","add_sales_server":"add_sales_server","buildcompsql":"buildcompsql"}}'; $joomla_component->router = 'ComponentbuilderHelperRoute::getJoomla_componentRoute'; - $joomla_component->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/joomla_component.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_dashboard_methods","add_sales_server","adduikit","add_php_helper_site","add_email_helper","buildcomp","debug_linenr","add_placeholders","add_admin_event","mvc_versiondate","add_site_event","update_server_target","number","add_update_server","creatuserhelper","emptycontributors","add_license","license_type","add_css","addfootable","not_required","add_php_helper_both","add_php_helper_admin","add_php_postflight_install","add_php_postflight_update","add_php_method_uninstall","add_php_preflight_install","add_php_preflight_update","add_sql","addreadme"],"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"}]}'; + $joomla_component->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/joomla_component.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_placeholders","add_php_dashboard_methods","debug_linenr","mvc_versiondate","creatuserhelper","add_php_helper_admin","update_server_target","add_php_helper_site","addfootable","add_php_helper_both","add_license","add_admin_event","license_type","add_site_event","add_update_server","buildcomp","not_required","adduikit","add_css","add_email_helper","add_php_preflight_install","add_php_preflight_update","add_php_postflight_install","add_php_postflight_update","add_php_method_uninstall","add_sql","emptycontributors","addreadme","number","add_sales_server"],"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 joomla_component type is already in content_type DB. $joomla_component_id = null; -- 2.40.1 From 952d26f1f8f0246b5c3ae53675ca71f00086d55a Mon Sep 17 00:00:00 2001 From: dev Date: Sat, 18 Mar 2017 22:17:15 +0200 Subject: [PATCH 2/5] added the getData method of the component smart export feature --- README.md | 2 +- admin/README.txt | 2 +- admin/assets/css/joomla_component.css | 2 +- admin/assets/css/joomla_components.css | 2 +- admin/controllers/joomla_component.php | 2 +- admin/controllers/joomla_components.php | 11 +- admin/models/forms/joomla_component.js | 2 +- admin/models/joomla_component.php | 2 +- admin/models/joomla_components.php | 266 +++++++++++++++++- admin/tables/joomla_component.php | 2 +- admin/views/joomla_component/submitbutton.js | 2 +- admin/views/joomla_component/tmpl/edit.php | 2 +- admin/views/joomla_component/view.html.php | 2 +- .../views/joomla_components/tmpl/default.php | 2 +- .../tmpl/default_batch_body.php | 2 +- .../tmpl/default_batch_footer.php | 2 +- .../joomla_components/tmpl/default_body.php | 2 +- .../joomla_components/tmpl/default_foot.php | 2 +- .../joomla_components/tmpl/default_head.php | 2 +- .../tmpl/default_toolbar.php | 2 +- admin/views/joomla_components/view.html.php | 4 +- 21 files changed, 285 insertions(+), 32 deletions(-) diff --git a/README.md b/README.md index 0c0573152..85a5fef93 100644 --- a/README.md +++ b/README.md @@ -108,7 +108,7 @@ Component Builder is mapped as a component in itself on my local development env + *Version*: 2.3.7 + *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*: **92987** ++ *Line count*: **93240** + *File count*: **602** + *Folder count*: **105** diff --git a/admin/README.txt b/admin/README.txt index 0c0573152..85a5fef93 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -108,7 +108,7 @@ Component Builder is mapped as a component in itself on my local development env + *Version*: 2.3.7 + *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*: **92987** ++ *Line count*: **93240** + *File count*: **602** + *Folder count*: **105** diff --git a/admin/assets/css/joomla_component.css b/admin/assets/css/joomla_component.css index 4d8c6f0dc..ff824f488 100644 --- a/admin/assets/css/joomla_component.css +++ b/admin/assets/css/joomla_component.css @@ -9,7 +9,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 101 of this MVC + @version @update number 112 of this MVC @build 18th March, 2017 @created 6th May, 2015 @package Component Builder diff --git a/admin/assets/css/joomla_components.css b/admin/assets/css/joomla_components.css index 931759369..30f9e684b 100644 --- a/admin/assets/css/joomla_components.css +++ b/admin/assets/css/joomla_components.css @@ -9,7 +9,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 101 of this MVC + @version @update number 112 of this MVC @build 18th March, 2017 @created 6th May, 2015 @package Component Builder diff --git a/admin/controllers/joomla_component.php b/admin/controllers/joomla_component.php index a8c5e9fa1..64325a639 100644 --- a/admin/controllers/joomla_component.php +++ b/admin/controllers/joomla_component.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 101 of this MVC + @version @update number 112 of this MVC @build 18th March, 2017 @created 6th May, 2015 @package Component Builder diff --git a/admin/controllers/joomla_components.php b/admin/controllers/joomla_components.php index 48d8a9442..2b213d156 100644 --- a/admin/controllers/joomla_components.php +++ b/admin/controllers/joomla_components.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 101 of this MVC + @version @update number 112 of this MVC @build 18th March, 2017 @created 6th May, 2015 @package Component Builder @@ -109,13 +109,13 @@ class ComponentbuilderControllerJoomla_components extends JControllerAdmin return; } - public function exportComponent() + public function smartExport() { // Check for request forgeries JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); // check if export is allowed for this user. $user = JFactory::getUser(); - if ($user->authorise('[[[view]]].export', 'com_componentbuilder') && $user->authorise('core.export', 'com_componentbuilder')) + if ($user->authorise('joomla_component.export', 'com_componentbuilder') && $user->authorise('core.export', 'com_componentbuilder')) { // Get the input $input = JFactory::getApplication()->input; @@ -125,11 +125,10 @@ class ComponentbuilderControllerJoomla_components extends JControllerAdmin // Get the model $model = $this->getModel('Joomla_components'); // get the data to export - $data = $model->getSmartExport($pks); - if (ComponentbuilderHelper::checkArray($data)) + if ($model->getSmartExport($pks)) { // now lets look at what was build - var_dump($data); jexit(); + var_dump($model->smartExport); jexit(); } } // Redirect to the list screen with error. diff --git a/admin/models/forms/joomla_component.js b/admin/models/forms/joomla_component.js index 30a107f53..83ee45d3a 100644 --- a/admin/models/forms/joomla_component.js +++ b/admin/models/forms/joomla_component.js @@ -9,7 +9,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 101 of this MVC + @version @update number 112 of this MVC @build 18th March, 2017 @created 6th May, 2015 @package Component Builder diff --git a/admin/models/joomla_component.php b/admin/models/joomla_component.php index 5eb02344f..aba943a8a 100644 --- a/admin/models/joomla_component.php +++ b/admin/models/joomla_component.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 101 of this MVC + @version @update number 112 of this MVC @build 18th March, 2017 @created 6th May, 2015 @package Component Builder diff --git a/admin/models/joomla_components.php b/admin/models/joomla_components.php index 558907584..f881dd54c 100644 --- a/admin/models/joomla_components.php +++ b/admin/models/joomla_components.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 101 of this MVC + @version @update number 112 of this MVC @build 18th March, 2017 @created 6th May, 2015 @package Component Builder @@ -56,6 +56,10 @@ class ComponentbuilderModelJoomla_components extends JModelList parent::__construct($config); } + public $smartExport = array(); + protected $templateIds = array(); + protected $layoutIds = array(); + /** * Method to get list export data. * @@ -95,9 +99,11 @@ class ComponentbuilderModelJoomla_components extends JModelList if ($db->getNumRows()) { $items = $db->loadObjectList(); - // set values to display correctly. + // check if we have items if (ComponentbuilderHelper::checkArray($items)) { + // start loading the components + $this->smartExport['components'] = 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')); @@ -105,12 +111,260 @@ class ComponentbuilderModelJoomla_components extends JModelList { unset($items[$nr]); continue; - } - + } + // add config fields + $this->setData($user, $db, 'field', $item->addconfig, 'field'); + // add admin views + $this->setData($user, $db, 'admin_view', $item->addadmin_views, 'adminview'); + // add custom admin views + $this->setData($user, $db, 'custom_admin_view', $item->addcustom_admin_views, 'customadminview'); + // add site views + $this->setData($user, $db, 'site_view', $item->addsite_views, 'siteview'); + // load to global object + $this->smartExport['components'][$item->id] = $item; + } + // add templates + if (ComponentbuilderHelper::checkArray($this->templateIds)) + { + $this->setData($user, $db, 'template', array('template' => $this->templateIds), 'template'); + } + // add layouts + if (ComponentbuilderHelper::checkArray($this->layoutIds)) + { + $this->setData($user, $db, 'layout', array('layout' => $this->layoutIds), 'layout'); + } + // has any data been set + if (ComponentbuilderHelper::checkArray($this->smartExport['components'])) + { + return true; } } - - return $items; + } + } + return false; + } + + /** + * Method to get data of a given table. + * + * @return mixed An array of data items on success, false on failure. + */ + protected function setData(&$user, &$db, $table, $values, $key) + { + // if json convert to array + if (ComponentbuilderHelper::checkJson($values)) + { + $values = json_decode($values, true); + } + // make sure we have an array + if (!ComponentbuilderHelper::checkArray($values) || !isset($values[$key]) || !ComponentbuilderHelper::checkArray($values[$key])) + { + return false; + } + $query = $db->getQuery(true); + + // Select some fields + $query->select($db->quoteName('a.*')); + + // From the componentbuilder_ANY table + $query->from($db->quoteName('#__componentbuilder_'. $table, 'a')); + $query->where('a.id IN (' . implode(',',$values[$key]) . ')'); + + // Implement View Level Access + if (!$user->authorise('core.options', 'com_componentbuilder')) + { + $groups = implode(',', $user->getAuthorisedViewLevels()); + $query->where('a.access IN (' . $groups . ')'); + } + + // Order the results by ordering + $query->order('a.ordering ASC'); + + // Load the items + $db->setQuery($query); + $db->execute(); + if ($db->getNumRows()) + { + $items = $db->loadObjectList(); + // check if we have items + if (ComponentbuilderHelper::checkArray($items)) + { + // set search array + if ('site_view' === $table || 'custom_admin_view' === $table) + { + $searchArray = array('php_view','php_jview','php_jview_display','php_document','js_document','css_document','css'); + } + // start loading the data + if (!isset($this->smartExport[$table])) + { + $this->smartExport[$table] = array(); + } + foreach ($items as $nr => &$item) + { + if (isset($this->smartExport[$table][$item->id])) + { + continue; + } + // actions to take if table is admin_view + if ('admin_view' === $table) + { + // add fields + $this->setData($user, $db, 'field', $item->addfields, 'field'); + } + // actions to take if table is field + if ('field' === $table) + { + // add field types + $this->setData($user, $db, 'fieldtype', array('fieldtype' => array($item->fieldtype)), 'fieldtype'); + } + // actions to take if table is site_view and custom_admin_view + if ('site_view' === $table || 'custom_admin_view' === $table) + { + // search for templates & layouts + $this->getTemplateLayout(base64_decode($item->default), $db); + // add search array templates and layouts + foreach ($searchArray as $scripter) + { + if (isset($view->{'add_'.$scripter}) && $view->{'add_'.$scripter} == 1) + { + $this->getTemplateLayout($view->$scripter, $db); + } + } + // 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'); + } + // load to global object + $this->smartExport[$table][$item->id] = $item; + } + } + } + } + + /** + * Set Template and Layout Data + * + * @param string $default The content to check + * + * @return void + * + */ + protected function getTemplateLayout($default, &$db) + { + // set the Template data + $temp1 = ComponentbuilderHelper::getAllBetween($default, "\$this->loadTemplate('","')"); + $temp2 = ComponentbuilderHelper::getAllBetween($default, '$this->loadTemplate("','")'); + $templates = array(); + $again = array(); + if (ComponentbuilderHelper::checkArray($temp1) && ComponentbuilderHelper::checkArray($temp2)) + { + $templates = array_merge($temp1,$temp2); + } + else + { + if (ComponentbuilderHelper::checkArray($temp1)) + { + $templates = $temp1; + } + elseif (ComponentbuilderHelper::checkArray($temp2)) + { + $templates = $temp2; + } + } + if (ComponentbuilderHelper::checkArray($templates)) + { + foreach ($templates as $template) + { + $data = $this->getDataWithAlias($template, 'template', $db); + if (ComponentbuilderHelper::checkArray($data)) + { + if (!isset($this->templateIds[$data['id']])) + { + $this->templateIds[$data['id']] = $data['id']; + // call self to get child data + $again[] = $data['html']; + $again[] = $data['php_view']; + } + } + } + } + // set the layout data + $lay1 = ComponentbuilderHelper::getAllBetween($default, "JLayoutHelper::render('","',"); + $lay2 = ComponentbuilderHelper::getAllBetween($default, 'JLayoutHelper::render("','",');; + if (ComponentbuilderHelper::checkArray($lay1) && ComponentbuilderHelper::checkArray($lay2)) + { + $layouts = array_merge($lay1,$lay2); + } + else + { + if (ComponentbuilderHelper::checkArray($lay1)) + { + $layouts = $lay1; + } + elseif (ComponentbuilderHelper::checkArray($lay2)) + { + $layouts = $lay2; + } + } + if (isset($layouts) && ComponentbuilderHelper::checkArray($layouts)) + { + foreach ($layouts as $layout) + { + $data = $this->getDataWithAlias($layout, 'layout', $db); + if (ComponentbuilderHelper::checkArray($data)) + { + if (!isset($this->layoutIds[$data['id']])) + { + $this->layoutIds[$data['id']] = $data['id']; + // call self to get child data + $again[] = $data['html']; + $again[] = $data['php_view']; + } + } + } + } + if (ComponentbuilderHelper::checkArray($again)) + { + foreach ($again as $get) + { + $this->getTemplateLayout($get, $db); + } + } + } + + /** + * Get Data With Alias + * + * @param string $n_ame The alias name + * @param string $table The table where to find the alias + * @param string $view The view code name + * + * @return array The data found with the alias + * + */ + protected function getDataWithAlias($n_ame, $table, &$db) + { + // Create a new query object. + $query = $db->getQuery(true); + $query->select($db->quoteName(array('a.id', 'a.alias', 'a.'.$table, 'a.php_view', 'a.add_php_view'))); + $query->from('#__componentbuilder_'.$table.' AS a'); + $db->setQuery($query); + $rows = $db->loadObjectList(); + foreach ($rows as $row) + { + $k_ey = ComponentbuilderHelper::safeString($row->alias); + $key = preg_replace("/[^A-Za-z]/", '', $k_ey); + $name = preg_replace("/[^A-Za-z]/", '', $n_ame); + if ($k_ey == $n_ame || $key == $name) + { + $php_view = ''; + if ($row->add_php_view == 1) + { + $php_view = base64_decode($row->php_view); + } + $contnent = base64_decode($row->{$table}); + // return to continue the search + return array('id' => $row->id, 'html' => $contnent, 'php_view' => $php_view); } } return false; diff --git a/admin/tables/joomla_component.php b/admin/tables/joomla_component.php index fb8f3223c..0597e05de 100644 --- a/admin/tables/joomla_component.php +++ b/admin/tables/joomla_component.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 101 of this MVC + @version @update number 112 of this MVC @build 18th March, 2017 @created 6th May, 2015 @package Component Builder diff --git a/admin/views/joomla_component/submitbutton.js b/admin/views/joomla_component/submitbutton.js index 94c99aa83..6d423a162 100644 --- a/admin/views/joomla_component/submitbutton.js +++ b/admin/views/joomla_component/submitbutton.js @@ -9,7 +9,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 101 of this MVC + @version @update number 112 of this MVC @build 18th March, 2017 @created 6th May, 2015 @package Component Builder diff --git a/admin/views/joomla_component/tmpl/edit.php b/admin/views/joomla_component/tmpl/edit.php index 240decd35..041724ed1 100644 --- a/admin/views/joomla_component/tmpl/edit.php +++ b/admin/views/joomla_component/tmpl/edit.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 101 of this MVC + @version @update number 112 of this MVC @build 18th March, 2017 @created 6th May, 2015 @package Component Builder diff --git a/admin/views/joomla_component/view.html.php b/admin/views/joomla_component/view.html.php index 068a09b01..e1307fa43 100644 --- a/admin/views/joomla_component/view.html.php +++ b/admin/views/joomla_component/view.html.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 101 of this MVC + @version @update number 112 of this MVC @build 18th March, 2017 @created 6th May, 2015 @package Component Builder diff --git a/admin/views/joomla_components/tmpl/default.php b/admin/views/joomla_components/tmpl/default.php index 1c816b9a2..c795d647b 100644 --- a/admin/views/joomla_components/tmpl/default.php +++ b/admin/views/joomla_components/tmpl/default.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 101 of this MVC + @version @update number 112 of this MVC @build 18th March, 2017 @created 6th May, 2015 @package Component Builder diff --git a/admin/views/joomla_components/tmpl/default_batch_body.php b/admin/views/joomla_components/tmpl/default_batch_body.php index 86ddc0a0c..112b91f54 100644 --- a/admin/views/joomla_components/tmpl/default_batch_body.php +++ b/admin/views/joomla_components/tmpl/default_batch_body.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 101 of this MVC + @version @update number 112 of this MVC @build 18th March, 2017 @created 6th May, 2015 @package Component Builder diff --git a/admin/views/joomla_components/tmpl/default_batch_footer.php b/admin/views/joomla_components/tmpl/default_batch_footer.php index 7e6141ca0..24b04be1f 100644 --- a/admin/views/joomla_components/tmpl/default_batch_footer.php +++ b/admin/views/joomla_components/tmpl/default_batch_footer.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 101 of this MVC + @version @update number 112 of this MVC @build 18th March, 2017 @created 6th May, 2015 @package Component Builder diff --git a/admin/views/joomla_components/tmpl/default_body.php b/admin/views/joomla_components/tmpl/default_body.php index cbde0b385..198ac25ac 100644 --- a/admin/views/joomla_components/tmpl/default_body.php +++ b/admin/views/joomla_components/tmpl/default_body.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 101 of this MVC + @version @update number 112 of this MVC @build 18th March, 2017 @created 6th May, 2015 @package Component Builder diff --git a/admin/views/joomla_components/tmpl/default_foot.php b/admin/views/joomla_components/tmpl/default_foot.php index 7455f46f4..d24f6857a 100644 --- a/admin/views/joomla_components/tmpl/default_foot.php +++ b/admin/views/joomla_components/tmpl/default_foot.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 101 of this MVC + @version @update number 112 of this MVC @build 18th March, 2017 @created 6th May, 2015 @package Component Builder diff --git a/admin/views/joomla_components/tmpl/default_head.php b/admin/views/joomla_components/tmpl/default_head.php index 1bf29b619..c59badd20 100644 --- a/admin/views/joomla_components/tmpl/default_head.php +++ b/admin/views/joomla_components/tmpl/default_head.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 101 of this MVC + @version @update number 112 of this MVC @build 18th March, 2017 @created 6th May, 2015 @package Component Builder diff --git a/admin/views/joomla_components/tmpl/default_toolbar.php b/admin/views/joomla_components/tmpl/default_toolbar.php index a7fd8a57c..9acd49e49 100644 --- a/admin/views/joomla_components/tmpl/default_toolbar.php +++ b/admin/views/joomla_components/tmpl/default_toolbar.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 101 of this MVC + @version @update number 112 of this MVC @build 18th March, 2017 @created 6th May, 2015 @package Component Builder diff --git a/admin/views/joomla_components/view.html.php b/admin/views/joomla_components/view.html.php index d9708af4a..79903d48b 100644 --- a/admin/views/joomla_components/view.html.php +++ b/admin/views/joomla_components/view.html.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 101 of this MVC + @version @update number 112 of this MVC @build 18th March, 2017 @created 6th May, 2015 @package Component Builder @@ -138,7 +138,7 @@ class ComponentbuilderViewJoomla_components extends JViewLegacy if ($this->user->authorise('joomla_component.export_component')) { // add Export Component button. - JToolBarHelper::custom('joomla_components.exportComponent', 'download', '', 'COM_COMPONENTBUILDER_EXPORT_COMPONENT', false); + JToolBarHelper::custom('joomla_components.smartExport', 'download', '', 'COM_COMPONENTBUILDER_EXPORT_COMPONENT', false); } if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete)) -- 2.40.1 From cfd9b33b30a38666f8a4fad2fa6bafa7684252dd Mon Sep 17 00:00:00 2001 From: dev Date: Sun, 19 Mar 2017 00:55:34 +0200 Subject: [PATCH 3/5] added the custom code search and more to gh-53 --- README.md | 2 +- admin/README.txt | 2 +- admin/assets/css/joomla_component.css | 2 +- admin/assets/css/joomla_components.css | 2 +- admin/controllers/joomla_component.php | 2 +- admin/controllers/joomla_components.php | 2 +- admin/models/forms/joomla_component.js | 2 +- admin/models/joomla_component.php | 2 +- admin/models/joomla_components.php | 168 +++++++++++++++++- admin/tables/joomla_component.php | 2 +- admin/views/joomla_component/submitbutton.js | 2 +- admin/views/joomla_component/tmpl/edit.php | 2 +- admin/views/joomla_component/view.html.php | 2 +- .../views/joomla_components/tmpl/default.php | 2 +- .../tmpl/default_batch_body.php | 2 +- .../tmpl/default_batch_footer.php | 2 +- .../joomla_components/tmpl/default_body.php | 2 +- .../joomla_components/tmpl/default_foot.php | 2 +- .../joomla_components/tmpl/default_head.php | 2 +- .../tmpl/default_toolbar.php | 2 +- admin/views/joomla_components/view.html.php | 2 +- 21 files changed, 180 insertions(+), 28 deletions(-) diff --git a/README.md b/README.md index 85a5fef93..2caa2635a 100644 --- a/README.md +++ b/README.md @@ -108,7 +108,7 @@ Component Builder is mapped as a component in itself on my local development env + *Version*: 2.3.7 + *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*: **93240** ++ *Line count*: **93392** + *File count*: **602** + *Folder count*: **105** diff --git a/admin/README.txt b/admin/README.txt index 85a5fef93..2caa2635a 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -108,7 +108,7 @@ Component Builder is mapped as a component in itself on my local development env + *Version*: 2.3.7 + *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*: **93240** ++ *Line count*: **93392** + *File count*: **602** + *Folder count*: **105** diff --git a/admin/assets/css/joomla_component.css b/admin/assets/css/joomla_component.css index ff824f488..fde344d56 100644 --- a/admin/assets/css/joomla_component.css +++ b/admin/assets/css/joomla_component.css @@ -9,7 +9,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 112 of this MVC + @version @update number 122 of this MVC @build 18th March, 2017 @created 6th May, 2015 @package Component Builder diff --git a/admin/assets/css/joomla_components.css b/admin/assets/css/joomla_components.css index 30f9e684b..c656b3078 100644 --- a/admin/assets/css/joomla_components.css +++ b/admin/assets/css/joomla_components.css @@ -9,7 +9,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 112 of this MVC + @version @update number 122 of this MVC @build 18th March, 2017 @created 6th May, 2015 @package Component Builder diff --git a/admin/controllers/joomla_component.php b/admin/controllers/joomla_component.php index 64325a639..98b8f5397 100644 --- a/admin/controllers/joomla_component.php +++ b/admin/controllers/joomla_component.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 112 of this MVC + @version @update number 122 of this MVC @build 18th March, 2017 @created 6th May, 2015 @package Component Builder diff --git a/admin/controllers/joomla_components.php b/admin/controllers/joomla_components.php index 2b213d156..0caa84406 100644 --- a/admin/controllers/joomla_components.php +++ b/admin/controllers/joomla_components.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 112 of this MVC + @version @update number 122 of this MVC @build 18th March, 2017 @created 6th May, 2015 @package Component Builder diff --git a/admin/models/forms/joomla_component.js b/admin/models/forms/joomla_component.js index 83ee45d3a..db9355e96 100644 --- a/admin/models/forms/joomla_component.js +++ b/admin/models/forms/joomla_component.js @@ -9,7 +9,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 112 of this MVC + @version @update number 122 of this MVC @build 18th March, 2017 @created 6th May, 2015 @package Component Builder diff --git a/admin/models/joomla_component.php b/admin/models/joomla_component.php index aba943a8a..f0cbe3adb 100644 --- a/admin/models/joomla_component.php +++ b/admin/models/joomla_component.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 112 of this MVC + @version @update number 122 of this MVC @build 18th March, 2017 @created 6th May, 2015 @package Component Builder diff --git a/admin/models/joomla_components.php b/admin/models/joomla_components.php index f881dd54c..ee55a84b4 100644 --- a/admin/models/joomla_components.php +++ b/admin/models/joomla_components.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 112 of this MVC + @version @update number 122 of this MVC @build 18th March, 2017 @created 6th May, 2015 @package Component Builder @@ -56,9 +56,12 @@ class ComponentbuilderModelJoomla_components extends JModelList parent::__construct($config); } - public $smartExport = array(); - protected $templateIds = array(); - protected $layoutIds = array(); + public $smartExport = array(); + + protected $templateIds = array(); + protected $layoutIds = array(); + protected $customCodeIds = array(); + protected $customCodeM = array(); /** * Method to get list export data. @@ -79,7 +82,7 @@ class ComponentbuilderModelJoomla_components extends JModelList // Select some fields $query->select($db->quoteName('a.*')); - // From the componentbuilder_joomla_componet table + // From the componentbuilder_joomla_component table $query->from($db->quoteName('#__componentbuilder_joomla_component', 'a')); $query->where('a.id IN (' . implode(',',$pks) . ')'); @@ -102,6 +105,8 @@ class ComponentbuilderModelJoomla_components extends JModelList // check if we have items if (ComponentbuilderHelper::checkArray($items)) { + // add custom code + $this->setData($user, $db, 'custom_code', $pks, 'component'); // start loading the components $this->smartExport['components'] = array(); foreach ($items as $nr => &$item) @@ -120,6 +125,8 @@ class ComponentbuilderModelJoomla_components extends JModelList $this->setData($user, $db, 'custom_admin_view', $item->addcustom_admin_views, 'customadminview'); // add site views $this->setData($user, $db, 'site_view', $item->addsite_views, 'siteview'); + // set the custom code ID's + $this->setCustomCodeIds($item, 'joomla_component'); // load to global object $this->smartExport['components'][$item->id] = $item; } @@ -133,6 +140,11 @@ class ComponentbuilderModelJoomla_components extends JModelList { $this->setData($user, $db, 'layout', array('layout' => $this->layoutIds), 'layout'); } + // add custom code + if (ComponentbuilderHelper::checkArray($this->customCodeIds)) + { + $this->setData($user, $db, 'custom_code', array('custom_code' => $this->customCodeIds), 'custom_code'); + } // has any data been set if (ComponentbuilderHelper::checkArray($this->smartExport['components'])) { @@ -157,7 +169,11 @@ class ComponentbuilderModelJoomla_components extends JModelList $values = json_decode($values, true); } // make sure we have an array - if (!ComponentbuilderHelper::checkArray($values) || !isset($values[$key]) || !ComponentbuilderHelper::checkArray($values[$key])) + if (('custom_code' !== $table && 'component' !== $key) && (!ComponentbuilderHelper::checkArray($values) || !isset($values[$key]) || !ComponentbuilderHelper::checkArray($values[$key]))) + { + return false; + } + elseif (!ComponentbuilderHelper::checkArray($values)) { return false; } @@ -168,7 +184,14 @@ class ComponentbuilderModelJoomla_components extends JModelList // From the componentbuilder_ANY table $query->from($db->quoteName('#__componentbuilder_'. $table, 'a')); - $query->where('a.id IN (' . implode(',',$values[$key]) . ')'); + if ('custom_code' === $table && 'component' === $key) + { + $query->where('a.component IN (' . implode(',',$values) . ')'); + } + else + { + $query->where('a.id IN (' . implode(',',$values[$key]) . ')'); + } // Implement View Level Access if (!$user->authorise('core.options', 'com_componentbuilder')) @@ -234,6 +257,8 @@ class ComponentbuilderModelJoomla_components extends JModelList $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'); } + // set the custom code ID's + $this->setCustomCodeIds($item, $table); // load to global object $this->smartExport[$table][$item->id] = $item; } @@ -290,7 +315,7 @@ class ComponentbuilderModelJoomla_components extends JModelList } // set the layout data $lay1 = ComponentbuilderHelper::getAllBetween($default, "JLayoutHelper::render('","',"); - $lay2 = ComponentbuilderHelper::getAllBetween($default, 'JLayoutHelper::render("','",');; + $lay2 = ComponentbuilderHelper::getAllBetween($default, 'JLayoutHelper::render("','",'); if (ComponentbuilderHelper::checkArray($lay1) && ComponentbuilderHelper::checkArray($lay2)) { $layouts = array_merge($lay1,$lay2); @@ -369,6 +394,133 @@ class ComponentbuilderModelJoomla_components extends JModelList } return false; } + + /** + * Set the ids of the found custom code + * + * @param object $item The item being searched + * @param string $target The target table + * + * @return void + * + */ + protected function setCustomCodeIds($item, $target) + { + if ($keys = $this->getCodeSearchKeys($target)) + { + foreach ($keys['search'] as $key) + { + if (!isset($keys['not_base64'][$key])) + { + $value = base64_decode($item->{$key}); + } + else + { + $value = $item->{$key}; + } + // search the value to see if it has custom code + $codeArray = ComponentbuilderHelper::getAllBetween($value, '[CUSTOMC' . 'ODE=',']'); + if (ComponentbuilderHelper::checkArray($codeArray)) + { + foreach ($codeArray as $func) + { + // first make sure we have only the function key + if (strpos($func, '+') !== false) + { + $funcArray = explode('+', $func); + $func = $funcArray[0]; + } + if (!isset($this->customCodeM[$func])) + { + $this->customCodeM[$func] = $func; + // if numeric add to ids + if (is_numeric($func)) + { + $this->customCodeIds[$func] = (int) $func; + } + elseif (ComponentbuilderHelper::checkString($func)) + { + if ($funcID = ComponentbuilderHelper::getVar('custom_code', $func, 'function_name', 'id')) + { + $this->customCodeIds[$funcID] = (int) $funcID; + } + } + } + } + } + } + } + } + + /** + * Get the keys of the values to search custom code in + * + * @param string $targe The table targeted + * + * @return array The query options + * + */ + protected function getCodeSearchKeys($target) + { + $targets = array(); + // #__componentbuilder_joomla_component as a + $targets['joomla_component'] = array(); + $targets['joomla_component']['search'] = array('php_preflight_install','php_postflight_install', + 'php_preflight_update','php_postflight_update','php_method_uninstall', + 'php_helper_admin','php_admin_event','php_helper_both','php_helper_site', + 'php_site_event','php_dashboard_methods','dashboard_tab'); + $targets['joomla_component']['not_base64'] = array('dashboard_tab' => 'json'); + + // #__componentbuilder_admin_view as b + $targets['admin_view'] = array(); + $targets['admin_view']['search'] = array('javascript_view_file','javascript_view_footer','javascript_views_file', + 'javascript_views_footer','php_getitem','php_save','php_postsavehook','php_getitems', + 'php_getitems_after_all','php_getlistquery','php_allowedit','php_before_delete', + 'php_after_delete','php_before_publish','php_after_publish','php_batchcopy', + 'php_batchmove','php_document','php_model','php_controller','php_import_display', + 'php_import','php_import_setdata','php_import_save','html_import_view','php_ajaxmethod'); + $targets['admin_view']['not_base64'] = array(); + + // #__componentbuilder_custom_admin_view as c + $targets['custom_admin_view'] = array(); + $targets['custom_admin_view']['search'] = array('default','php_view','php_jview','php_jview_display','php_document', + 'js_document','css_document','css','php_model','php_controller'); + $targets['custom_admin_view']['not_base64'] = array(); + + // #__componentbuilder_site_view as d + $targets['site_view'] = array(); + $targets['site_view']['search'] = array('default','php_view','php_jview','php_jview_display','php_document', + 'js_document','css_document','css','php_ajaxmethod','php_model','php_controller'); + $targets['site_view']['not_base64'] = array(); + + // #__componentbuilder_field as e + $targets['field'] = array(); + $targets['field']['search'] = array('xml','javascript_view_footer','javascript_views_footer'); + $targets['field']['not_base64'] = array('xml' => 'json'); + + // #__componentbuilder_dynamic_get as f + $targets['dynamic_get'] = array(); + $targets['dynamic_get']['search'] = array('php_before_getitem','php_after_getitem','php_before_getitems','php_after_getitems', + 'php_getlistquery'); + $targets['dynamic_get']['not_base64'] = array(); + + // #__componentbuilder_template as g + $targets['template'] = array(); + $targets['template']['search'] = array('php_view','template'); + $targets['template']['not_base64'] = array(); + + // #__componentbuilder_layout as h + $targets['layout'] = array(); + $targets['layout']['search'] = array('php_view','layout'); + $targets['layout']['not_base64'] = array(); + + // return the query string to search + if (isset($targets[$target])) + { + return $targets[$target]; + } + return false; + } /** * Method to auto-populate the model state. diff --git a/admin/tables/joomla_component.php b/admin/tables/joomla_component.php index 0597e05de..0465bc0f0 100644 --- a/admin/tables/joomla_component.php +++ b/admin/tables/joomla_component.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 112 of this MVC + @version @update number 122 of this MVC @build 18th March, 2017 @created 6th May, 2015 @package Component Builder diff --git a/admin/views/joomla_component/submitbutton.js b/admin/views/joomla_component/submitbutton.js index 6d423a162..c7587f7ea 100644 --- a/admin/views/joomla_component/submitbutton.js +++ b/admin/views/joomla_component/submitbutton.js @@ -9,7 +9,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 112 of this MVC + @version @update number 122 of this MVC @build 18th March, 2017 @created 6th May, 2015 @package Component Builder diff --git a/admin/views/joomla_component/tmpl/edit.php b/admin/views/joomla_component/tmpl/edit.php index 041724ed1..7c1829e38 100644 --- a/admin/views/joomla_component/tmpl/edit.php +++ b/admin/views/joomla_component/tmpl/edit.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 112 of this MVC + @version @update number 122 of this MVC @build 18th March, 2017 @created 6th May, 2015 @package Component Builder diff --git a/admin/views/joomla_component/view.html.php b/admin/views/joomla_component/view.html.php index e1307fa43..a55e97a4c 100644 --- a/admin/views/joomla_component/view.html.php +++ b/admin/views/joomla_component/view.html.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 112 of this MVC + @version @update number 122 of this MVC @build 18th March, 2017 @created 6th May, 2015 @package Component Builder diff --git a/admin/views/joomla_components/tmpl/default.php b/admin/views/joomla_components/tmpl/default.php index c795d647b..fdc42797f 100644 --- a/admin/views/joomla_components/tmpl/default.php +++ b/admin/views/joomla_components/tmpl/default.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 112 of this MVC + @version @update number 122 of this MVC @build 18th March, 2017 @created 6th May, 2015 @package Component Builder diff --git a/admin/views/joomla_components/tmpl/default_batch_body.php b/admin/views/joomla_components/tmpl/default_batch_body.php index 112b91f54..5c30147e2 100644 --- a/admin/views/joomla_components/tmpl/default_batch_body.php +++ b/admin/views/joomla_components/tmpl/default_batch_body.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 112 of this MVC + @version @update number 122 of this MVC @build 18th March, 2017 @created 6th May, 2015 @package Component Builder diff --git a/admin/views/joomla_components/tmpl/default_batch_footer.php b/admin/views/joomla_components/tmpl/default_batch_footer.php index 24b04be1f..9faba4a82 100644 --- a/admin/views/joomla_components/tmpl/default_batch_footer.php +++ b/admin/views/joomla_components/tmpl/default_batch_footer.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 112 of this MVC + @version @update number 122 of this MVC @build 18th March, 2017 @created 6th May, 2015 @package Component Builder diff --git a/admin/views/joomla_components/tmpl/default_body.php b/admin/views/joomla_components/tmpl/default_body.php index 198ac25ac..14cbe9129 100644 --- a/admin/views/joomla_components/tmpl/default_body.php +++ b/admin/views/joomla_components/tmpl/default_body.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 112 of this MVC + @version @update number 122 of this MVC @build 18th March, 2017 @created 6th May, 2015 @package Component Builder diff --git a/admin/views/joomla_components/tmpl/default_foot.php b/admin/views/joomla_components/tmpl/default_foot.php index d24f6857a..20d6f5514 100644 --- a/admin/views/joomla_components/tmpl/default_foot.php +++ b/admin/views/joomla_components/tmpl/default_foot.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 112 of this MVC + @version @update number 122 of this MVC @build 18th March, 2017 @created 6th May, 2015 @package Component Builder diff --git a/admin/views/joomla_components/tmpl/default_head.php b/admin/views/joomla_components/tmpl/default_head.php index c59badd20..a77ae1d76 100644 --- a/admin/views/joomla_components/tmpl/default_head.php +++ b/admin/views/joomla_components/tmpl/default_head.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 112 of this MVC + @version @update number 122 of this MVC @build 18th March, 2017 @created 6th May, 2015 @package Component Builder diff --git a/admin/views/joomla_components/tmpl/default_toolbar.php b/admin/views/joomla_components/tmpl/default_toolbar.php index 9acd49e49..b8df711df 100644 --- a/admin/views/joomla_components/tmpl/default_toolbar.php +++ b/admin/views/joomla_components/tmpl/default_toolbar.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 112 of this MVC + @version @update number 122 of this MVC @build 18th March, 2017 @created 6th May, 2015 @package Component Builder diff --git a/admin/views/joomla_components/view.html.php b/admin/views/joomla_components/view.html.php index 79903d48b..1c523783b 100644 --- a/admin/views/joomla_components/view.html.php +++ b/admin/views/joomla_components/view.html.php @@ -10,7 +10,7 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 112 of this MVC + @version @update number 122 of this MVC @build 18th March, 2017 @created 6th May, 2015 @package Component Builder -- 2.40.1 From 63b1bac95592c07bae698307528853f1cf22f3db Mon Sep 17 00:00:00 2001 From: Llewellyn van der Merwe Date: Tue, 21 Mar 2017 00:07:14 +0200 Subject: [PATCH 4/5] Expanded the export feature of gh-53 to bundle the data into package. --- README.md | 4 +- admin/README.txt | 4 +- admin/assets/css/admin.css | 2 +- admin/assets/css/dashboard.css | 2 +- admin/assets/css/joomla_component.css | 4 +- admin/assets/css/joomla_components.css | 4 +- admin/componentbuilder.php | 2 +- admin/controller.php | 2 +- admin/controllers/ajax.json.php | 2 +- admin/controllers/componentbuilder.php | 2 +- admin/controllers/help.php | 2 +- admin/controllers/import.php | 2 +- admin/controllers/joomla_component.php | 4 +- admin/controllers/joomla_components.php | 27 +++- admin/helpers/compiler.php | 34 +---- admin/helpers/compiler/b_Structure.php | 27 +--- admin/helpers/compiler/e_Interpretation.php | 17 +-- admin/helpers/componentbuilder.php | 124 +++++++++++++++- admin/helpers/headercheck.php | 2 +- admin/helpers/html/batch_.php | 2 +- admin/helpers/indenter.php | 2 +- admin/helpers/js.php | 2 +- admin/helpers/minify.php | 2 +- .../en-GB/en-GB.com_componentbuilder.ini | 2 + admin/layouts/admin_view/css_fullwidth.php | 2 +- .../admin_view/custom_buttons_fullwidth.php | 2 +- .../admin_view/custom_buttons_left.php | 2 +- .../admin_view/custom_import_fullwidth.php | 2 +- admin/layouts/admin_view/fields_fullwidth.php | 2 +- .../admin_view/javascript_fullwidth.php | 2 +- .../linked_components_fullwidth.php | 2 +- admin/layouts/admin_view/mysql_fullwidth.php | 2 +- admin/layouts/admin_view/mysql_left.php | 2 +- admin/layouts/admin_view/php_fullwidth.php | 2 +- admin/layouts/admin_view/publishing.php | 2 +- admin/layouts/admin_view/publlshing.php | 2 +- admin/layouts/admin_view/settings_above.php | 2 +- admin/layouts/admin_view/settings_left.php | 2 +- admin/layouts/admin_view/settings_right.php | 2 +- admin/layouts/admin_view/settings_under.php | 2 +- admin/layouts/batchselection.php | 2 +- .../custom_buttons_fullwidth.php | 2 +- .../custom_admin_view/custom_buttons_left.php | 2 +- .../custom_script_fullwidth.php | 2 +- .../custom_admin_view/details_above.php | 2 +- .../custom_admin_view/details_fullwidth.php | 2 +- .../custom_admin_view/details_left.php | 2 +- .../custom_admin_view/details_right.php | 2 +- .../custom_admin_view/details_rightside.php | 2 +- .../custom_admin_view/details_under.php | 2 +- .../linked_components_fullwidth.php | 2 +- .../layouts/custom_admin_view/publishing.php | 2 +- .../layouts/custom_admin_view/publlshing.php | 2 +- admin/layouts/custom_code/details_above.php | 2 +- .../layouts/custom_code/details_fullwidth.php | 2 +- admin/layouts/custom_code/details_left.php | 2 +- admin/layouts/custom_code/details_right.php | 2 +- admin/layouts/custom_code/details_under.php | 2 +- admin/layouts/custom_code/publishing.php | 2 +- admin/layouts/custom_code/publlshing.php | 2 +- .../layouts/dynamic_get/abacus_fullwidth.php | 2 +- admin/layouts/dynamic_get/abacus_left.php | 2 +- .../dynamic_get/custom_script_fullwidth.php | 2 +- admin/layouts/dynamic_get/gettable_above.php | 2 +- .../dynamic_get/gettable_fullwidth.php | 2 +- admin/layouts/dynamic_get/gettable_left.php | 2 +- admin/layouts/dynamic_get/gettable_right.php | 2 +- admin/layouts/dynamic_get/gettable_under.php | 2 +- admin/layouts/dynamic_get/publishing.php | 2 +- admin/layouts/dynamic_get/publlshing.php | 2 +- admin/layouts/field/details_fullwidth.php | 2 +- admin/layouts/field/details_left.php | 2 +- admin/layouts/field/details_right.php | 2 +- admin/layouts/field/details_under.php | 2 +- .../field/linked_admin_views_fullwidth.php | 2 +- admin/layouts/field/publishing.php | 2 +- admin/layouts/field/publlshing.php | 2 +- admin/layouts/field/scripts_left.php | 2 +- admin/layouts/field/scripts_right.php | 2 +- admin/layouts/fieldtype/details_left.php | 2 +- admin/layouts/fieldtype/details_right.php | 2 +- admin/layouts/fieldtype/fields_fullwidth.php | 2 +- admin/layouts/fieldtype/publishing.php | 2 +- admin/layouts/fieldtype/publlshing.php | 2 +- admin/layouts/help_document/details_above.php | 2 +- .../help_document/details_fullwidth.php | 2 +- admin/layouts/help_document/details_left.php | 2 +- admin/layouts/help_document/details_right.php | 2 +- admin/layouts/help_document/details_under.php | 2 +- admin/layouts/help_document/publishing.php | 2 +- admin/layouts/help_document/publlshing.php | 2 +- .../admin_views_fullwidth.php | 2 +- .../custom_admin_views_fullwidth.php | 2 +- .../joomla_component/details_above.php | 2 +- .../layouts/joomla_component/details_left.php | 2 +- .../joomla_component/details_right.php | 2 +- .../joomla_component/details_under.php | 2 +- .../dynamic_build_beta_fullwidth.php | 2 +- .../dynamic_integration_fullwidth.php | 2 +- .../libs_helpers_fullwidth.php | 2 +- .../joomla_component/mysql_fullwidth.php | 2 +- .../joomla_component/php_fullwidth.php | 2 +- admin/layouts/joomla_component/publishing.php | 2 +- admin/layouts/joomla_component/publlshing.php | 2 +- .../layouts/joomla_component/readme_left.php | 2 +- .../layouts/joomla_component/readme_right.php | 2 +- .../joomla_component/settings_left.php | 2 +- .../joomla_component/settings_right.php | 2 +- .../joomla_component/site_views_fullwidth.php | 2 +- .../layout/custom_script_fullwidth.php | 2 +- admin/layouts/layout/details_fullwidth.php | 2 +- admin/layouts/layout/details_left.php | 2 +- admin/layouts/layout/details_right.php | 2 +- admin/layouts/layout/details_rightside.php | 2 +- admin/layouts/layout/details_under.php | 2 +- admin/layouts/layout/publishing.php | 2 +- admin/layouts/layout/publlshing.php | 2 +- .../site_view/custom_buttons_fullwidth.php | 2 +- .../layouts/site_view/custom_buttons_left.php | 2 +- .../site_view/custom_buttons_right.php | 2 +- admin/layouts/site_view/details_above.php | 2 +- admin/layouts/site_view/details_fullwidth.php | 2 +- admin/layouts/site_view/details_left.php | 2 +- admin/layouts/site_view/details_right.php | 2 +- admin/layouts/site_view/details_rightside.php | 2 +- admin/layouts/site_view/details_under.php | 2 +- .../site_view/javascript_css_fullwidth.php | 2 +- .../site_view/linked_components_fullwidth.php | 2 +- admin/layouts/site_view/php_fullwidth.php | 2 +- admin/layouts/site_view/publishing.php | 2 +- admin/layouts/site_view/publlshing.php | 2 +- admin/layouts/snippet/details_above.php | 2 +- admin/layouts/snippet/details_left.php | 2 +- admin/layouts/snippet/details_right.php | 2 +- admin/layouts/snippet/publishing.php | 2 +- admin/layouts/snippet/publlshing.php | 2 +- .../template/custom_script_fullwidth.php | 2 +- admin/layouts/template/details_fullwidth.php | 2 +- admin/layouts/template/details_left.php | 2 +- admin/layouts/template/details_right.php | 2 +- admin/layouts/template/details_rightside.php | 2 +- admin/layouts/template/details_under.php | 2 +- admin/layouts/template/publishing.php | 2 +- admin/layouts/template/publlshing.php | 2 +- admin/models/ajax.php | 2 +- admin/models/componentbuilder.php | 2 +- admin/models/fields/adminviewfolderlist.php | 2 +- admin/models/fields/adminviews.php | 2 +- admin/models/fields/articles.php | 2 +- admin/models/fields/component.php | 2 +- admin/models/fields/customadminviews.php | 2 +- admin/models/fields/customfilelist.php | 2 +- admin/models/fields/customfolderlist.php | 2 +- admin/models/fields/customgets.php | 2 +- admin/models/fields/dbtables.php | 2 +- admin/models/fields/dynamicgets.php | 2 +- admin/models/fields/fields.php | 2 +- admin/models/fields/fieldsmulti.php | 2 +- admin/models/fields/fieldtypes.php | 2 +- admin/models/fields/maingets.php | 2 +- admin/models/fields/siteviewfolderlist.php | 2 +- admin/models/fields/siteviews.php | 2 +- admin/models/fields/snippets.php | 2 +- admin/models/forms/joomla_component.js | 4 +- admin/models/import.php | 2 +- admin/models/joomla_component.php | 4 +- admin/models/joomla_components.php | 135 +++++++++++++++++- admin/tables/joomla_component.php | 4 +- admin/views/componentbuilder/tmpl/default.php | 2 +- ...sed_issues_the_closed_issues_on_github.php | 2 +- .../componentbuilder/tmpl/default_main.php | 2 +- ..._open_issues_the_open_issues_on_github.php | 2 +- .../tmpl/default_readme_information.php | 2 +- ...t_vast_development_method_notice_board.php | 2 +- .../componentbuilder/tmpl/default_vdm.php | 2 +- admin/views/componentbuilder/view.html.php | 2 +- admin/views/import/tmpl/default.php | 2 +- admin/views/import/view.html.php | 2 +- admin/views/joomla_component/submitbutton.js | 4 +- admin/views/joomla_component/tmpl/edit.php | 4 +- admin/views/joomla_component/view.html.php | 4 +- .../views/joomla_components/tmpl/default.php | 4 +- .../tmpl/default_batch_body.php | 4 +- .../tmpl/default_batch_footer.php | 4 +- .../joomla_components/tmpl/default_body.php | 4 +- .../joomla_components/tmpl/default_foot.php | 4 +- .../joomla_components/tmpl/default_head.php | 4 +- .../tmpl/default_toolbar.php | 4 +- admin/views/joomla_components/view.html.php | 4 +- componentbuilder.xml | 2 +- script.php | 2 +- 191 files changed, 481 insertions(+), 291 deletions(-) diff --git a/README.md b/README.md index 2caa2635a..78d546339 100644 --- a/README.md +++ b/README.md @@ -104,11 +104,11 @@ 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*: 18th March, 2017 ++ *Last Build*: 20th March, 2017 + *Version*: 2.3.7 + *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*: **93392** ++ *Line count*: **93648** + *File count*: **602** + *Folder count*: **105** diff --git a/admin/README.txt b/admin/README.txt index 2caa2635a..78d546339 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -104,11 +104,11 @@ 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*: 18th March, 2017 ++ *Last Build*: 20th March, 2017 + *Version*: 2.3.7 + *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*: **93392** ++ *Line count*: **93648** + *File count*: **602** + *Folder count*: **105** diff --git a/admin/assets/css/admin.css b/admin/assets/css/admin.css index 00048b058..0da2801ba 100644 --- a/admin/assets/css/admin.css +++ b/admin/assets/css/admin.css @@ -10,7 +10,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage admin.css diff --git a/admin/assets/css/dashboard.css b/admin/assets/css/dashboard.css index 22e3b5146..9e6c28f7f 100644 --- a/admin/assets/css/dashboard.css +++ b/admin/assets/css/dashboard.css @@ -10,7 +10,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 fde344d56..e0e599bc0 100644 --- a/admin/assets/css/joomla_component.css +++ b/admin/assets/css/joomla_component.css @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 122 of this MVC - @build 18th March, 2017 + @version @update number 132 of this MVC + @build 20th 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 c656b3078..13d508e5f 100644 --- a/admin/assets/css/joomla_components.css +++ b/admin/assets/css/joomla_components.css @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 122 of this MVC - @build 18th March, 2017 + @version @update number 132 of this MVC + @build 20th March, 2017 @created 6th May, 2015 @package Component Builder @subpackage joomla_components.css diff --git a/admin/componentbuilder.php b/admin/componentbuilder.php index 95666f395..649e869ed 100644 --- a/admin/componentbuilder.php +++ b/admin/componentbuilder.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage componentbuilder.php diff --git a/admin/controller.php b/admin/controller.php index 87f588667..33067763e 100644 --- a/admin/controller.php +++ b/admin/controller.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage controller.php diff --git a/admin/controllers/ajax.json.php b/admin/controllers/ajax.json.php index 739a5aa38..860cd7bc9 100644 --- a/admin/controllers/ajax.json.php +++ b/admin/controllers/ajax.json.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage ajax.json.php diff --git a/admin/controllers/componentbuilder.php b/admin/controllers/componentbuilder.php index 7a0f696e7..eb1efa284 100644 --- a/admin/controllers/componentbuilder.php +++ b/admin/controllers/componentbuilder.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 53b041df9..be7e6ed9b 100644 --- a/admin/controllers/help.php +++ b/admin/controllers/help.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 e588080eb..491ce3cb2 100644 --- a/admin/controllers/import.php +++ b/admin/controllers/import.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage import.php diff --git a/admin/controllers/joomla_component.php b/admin/controllers/joomla_component.php index 98b8f5397..e5abc63be 100644 --- a/admin/controllers/joomla_component.php +++ b/admin/controllers/joomla_component.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 122 of this MVC - @build 18th March, 2017 + @version @update number 132 of this MVC + @build 20th 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 0caa84406..3c50eaba4 100644 --- a/admin/controllers/joomla_components.php +++ b/admin/controllers/joomla_components.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 122 of this MVC - @build 18th March, 2017 + @version @update number 132 of this MVC + @build 20th March, 2017 @created 6th May, 2015 @package Component Builder @subpackage joomla_components.php @@ -124,11 +124,30 @@ class ComponentbuilderControllerJoomla_components extends JControllerAdmin JArrayHelper::toInteger($pks); // Get the model $model = $this->getModel('Joomla_components'); + // set auto loader + ComponentbuilderHelper::autoLoader('smart'); // get the data to export if ($model->getSmartExport($pks)) { - // now lets look at what was build - var_dump($model->smartExport); jexit(); + // Redirect to the list screen with error. + $message = array(); + $message[] = '

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

'; + $message[] = '

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

'; + $this->setRedirect(JRoute::_('index.php?option=com_componentbuilder&view=joomla_components', false), implode('', $message), 'Success'); + return; + } + else + { + if (componentbuilderHelper::checkString($model->packagePath)) + { + // clear all if not successful + ComponentbuilderHelper::removeFolder($model->packagePath); + } + if (componentbuilderHelper::checkString($model->zipPath)) + { + // clear all if not successful + JFile::delete($model->zipPath); + } } } // Redirect to the list screen with error. diff --git a/admin/helpers/compiler.php b/admin/helpers/compiler.php index a1773314d..ed0080ffa 100644 --- a/admin/helpers/compiler.php +++ b/admin/helpers/compiler.php @@ -422,39 +422,9 @@ class Compiler extends Infusion } // the name of the zip file to create $this->filepath = $this->tempPath.'/'.$this->componentFolderName.'.zip'; - // store the current joomla working directory - $joomla = getcwd(); - - // we are changing the working directory to the componet temp folder - chdir($this->componentPath); - - // the full file path of the zip file - $this->filepath = JPath::clean($this->filepath); - - // delete an existing zip file (or use an exclusion parameter in JFolder::files() - JFile::delete($this->filepath); - - // get a list of files in the current directory tree - $files = JFolder::files('.', '', true, true); - $zipArray = array(); - // setup the zip array - foreach ($files as $file) - { - $tmp = array(); - $tmp['name'] = str_replace('./', '', $file); - $tmp['data'] = JFile::read($file); - $tmp['time'] = filemtime($file); - $zipArray[] = $tmp; - } - - // change back to joomla working directory - chdir($joomla); - - // get the zip adapter - $zip = JArchive::getAdapter('zip'); - + //create the zip file - if ($zip->create($this->filepath, $zipArray)) + if (ComponentbuilderHelper::zip($this->componentPath, $this->filepath)) { // now move to backup if zip was made and backup is requered if ($this->backupPath && $this->dynamicIntegration) diff --git a/admin/helpers/compiler/b_Structure.php b/admin/helpers/compiler/b_Structure.php index c0654cac5..7e6c79fb5 100644 --- a/admin/helpers/compiler/b_Structure.php +++ b/admin/helpers/compiler/b_Structure.php @@ -1093,34 +1093,11 @@ class Structure extends Get * @param string $dir The path to folder to remove * @param boolean $git if there is a git folder in that must not be removed * - * @return boolean True in all is removed + * @return boolean True if all is removed * */ protected function removeFolder($dir, $git = false) { - if (JFolder::exists($dir)) - { - $it = new RecursiveDirectoryIterator($dir); - $it = new RecursiveIteratorIterator($it, RecursiveIteratorIterator::CHILD_FIRST); - foreach ($it as $file) - { - if ('.' === $file->getBasename() || '..' === $file->getBasename()) continue; - if ($file->isDir()) - { - if ($git && strpos($file->getPathname(), $dir.'/.git') !== false) continue; - JFolder::delete($file->getPathname()); - } - else - { - if ($git && strpos($file->getPathname(), $dir.'/.git') !== false) continue; - JFile::delete($file->getPathname()); - } - } - if (!$git && JFolder::delete($dir)) - { - return true; - } - } - return false; + return ComponentbuilderHelper::removeFolder($dir, $git); } } diff --git a/admin/helpers/compiler/e_Interpretation.php b/admin/helpers/compiler/e_Interpretation.php index eb178ed6d..9c0599a24 100644 --- a/admin/helpers/compiler/e_Interpretation.php +++ b/admin/helpers/compiler/e_Interpretation.php @@ -3428,22 +3428,9 @@ class Interpretation extends Fields } } - public function writeFile($path,$data) + public function writeFile($path, $data) { - $fh = fopen($path, "w"); - if (!is_resource($fh)) - { - return false; - } - if (fwrite($fh, $data)) - { - // close file. - fclose($fh); - return true; - } - // close file. - fclose($fh); - return false; + return ComponentbuilderHelper::writeFile($path, $data); } public function setMethodGetItem(&$view) diff --git a/admin/helpers/componentbuilder.php b/admin/helpers/componentbuilder.php index 1ec3c9ece..b6c9a549f 100644 --- a/admin/helpers/componentbuilder.php +++ b/admin/helpers/componentbuilder.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage componentbuilder.php @@ -37,13 +37,16 @@ abstract class ComponentbuilderHelper */ public static function autoLoader($type = 'compiler') { - // load the compiler classes - foreach (glob(JPATH_ADMINISTRATOR."/components/com_componentbuilder/helpers/".$type."/*.php") as $autoFile) + // load the type classes + if ('smart' !== $type) { - require_once $autoFile; + foreach (glob(JPATH_ADMINISTRATOR."/components/com_componentbuilder/helpers/".$type."/*.php") as $autoFile) + { + require_once $autoFile; + } } // load only if compiler - if ('compiler' == $type) + if ('compiler' === $type) { // import the Joomla librarys jimport('joomla.filesystem.file'); @@ -53,6 +56,15 @@ abstract class ComponentbuilderHelper // include class to minify js require_once JPATH_ADMINISTRATOR.'/components/com_componentbuilder/helpers/js.php'; } + // load only if smart + if ('smart' === $type) + { + // import the Joomla libraries + jimport('joomla.filesystem.file'); + jimport('joomla.filesystem.folder'); + jimport('joomla.filesystem.archive'); + jimport('joomla.application.component.modellist'); + } // load this for all jimport('joomla.application'); } @@ -66,6 +78,108 @@ abstract class ComponentbuilderHelper $extruder = new Extrusion($data); } + /** + * The zipper method + **/ + public static function zip($workingDIR, &$filepath) + { + // store the current joomla working directory + $joomla = getcwd(); + + // we are changing the working directory to the component temp folder + chdir($workingDIR); + + // the full file path of the zip file + $filepath = JPath::clean($filepath); + + // delete an existing zip file (or use an exclusion parameter in JFolder::files() + JFile::delete($filepath); + + // get a list of files in the current directory tree + $files = JFolder::files('.', '', true, true); + $zipArray = array(); + // setup the zip array + foreach ($files as $file) + { + $tmp = array(); + $tmp['name'] = str_replace('./', '', $file); + $tmp['data'] = JFile::read($file); + $tmp['time'] = filemtime($file); + $zipArray[] = $tmp; + } + + // change back to joomla working directory + chdir($joomla); + + // get the zip adapter + $zip = JArchive::getAdapter('zip'); + + //create the zip file + if ($zip->create($filepath, $zipArray)) + { + return true; + } + return false; + } + + /** + * Remove folders with files + * + * @param string $dir The path to folder to remove + * @param boolean $git if there is a git folder in that must not be removed + * + * @return boolean True in all is removed + * + */ + public static function removeFolder($dir, $git = false) + { + if (JFolder::exists($dir)) + { + $it = new RecursiveDirectoryIterator($dir); + $it = new RecursiveIteratorIterator($it, RecursiveIteratorIterator::CHILD_FIRST); + foreach ($it as $file) + { + if ('.' === $file->getBasename() || '..' === $file->getBasename()) continue; + if ($file->isDir()) + { + if ($git && strpos($file->getPathname(), $dir.'/.git') !== false) continue; + JFolder::delete($file->getPathname()); + } + else + { + if ($git && strpos($file->getPathname(), $dir.'/.git') !== false) continue; + JFile::delete($file->getPathname()); + } + } + if (!$git && JFolder::delete($dir)) + { + return true; + } + } + return false; + } + + /** + * Create file and write data to the file + **/ + public static function writeFile($path, $data) + { + $fh = fopen($path, "w"); + if (!is_resource($fh)) + { + return false; + } + if (fwrite($fh, $data)) + { + // close file. + fclose($fh); + return true; + } + // close file. + fclose($fh); + return false; + } + /** * The user notice info File Name **/ diff --git a/admin/helpers/headercheck.php b/admin/helpers/headercheck.php index 8e9705d27..72cf81154 100644 --- a/admin/helpers/headercheck.php +++ b/admin/helpers/headercheck.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 6be97e40d..7a02ef1c0 100644 --- a/admin/helpers/html/batch_.php +++ b/admin/helpers/html/batch_.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 8f9ba8521..4ee2ca31f 100644 --- a/admin/helpers/indenter.php +++ b/admin/helpers/indenter.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 477f7bd35..ae1792ddd 100644 --- a/admin/helpers/js.php +++ b/admin/helpers/js.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 3b3470e12..590cc279c 100644 --- a/admin/helpers/minify.php +++ b/admin/helpers/minify.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 3a18b3662..ba8cdd008 100644 --- a/admin/language/en-GB/en-GB.com_componentbuilder.ini +++ b/admin/language/en-GB/en-GB.com_componentbuilder.ini @@ -1742,6 +1742,7 @@ COM_COMPONENTBUILDER_EDIT_S="Edit %s" 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_DATA="Export Data" COM_COMPONENTBUILDER_EXPORT_DATA_DESC=" Allows users in this group to export data." @@ -3024,6 +3025,7 @@ COM_COMPONENTBUILDER_NEW_NOTICE="New Notice" COM_COMPONENTBUILDER_NO="No" COM_COMPONENTBUILDER_NO_ACCESS_GRANTED="No Access Granted!" 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)" COM_COMPONENTBUILDER_PLEASE_ADD_FOLDERS_TO_S="Please add folders to (%s)" COM_COMPONENTBUILDER_PLEASE_CHECK_AGAIN_LATTER="Please check again latter." diff --git a/admin/layouts/admin_view/css_fullwidth.php b/admin/layouts/admin_view/css_fullwidth.php index 3cab7d9cc..641fa4e0f 100644 --- a/admin/layouts/admin_view/css_fullwidth.php +++ b/admin/layouts/admin_view/css_fullwidth.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 49f483085..d33b792a6 100644 --- a/admin/layouts/admin_view/custom_buttons_fullwidth.php +++ b/admin/layouts/admin_view/custom_buttons_fullwidth.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 d883b24a2..36f606c7a 100644 --- a/admin/layouts/admin_view/custom_buttons_left.php +++ b/admin/layouts/admin_view/custom_buttons_left.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 253f7b2b6..0ef4dbcdf 100644 --- a/admin/layouts/admin_view/custom_import_fullwidth.php +++ b/admin/layouts/admin_view/custom_import_fullwidth.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage custom_import_fullwidth.php diff --git a/admin/layouts/admin_view/fields_fullwidth.php b/admin/layouts/admin_view/fields_fullwidth.php index 84dba9f3e..257b528b4 100644 --- a/admin/layouts/admin_view/fields_fullwidth.php +++ b/admin/layouts/admin_view/fields_fullwidth.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage fields_fullwidth.php diff --git a/admin/layouts/admin_view/javascript_fullwidth.php b/admin/layouts/admin_view/javascript_fullwidth.php index f3b774d4b..9f9b43e2d 100644 --- a/admin/layouts/admin_view/javascript_fullwidth.php +++ b/admin/layouts/admin_view/javascript_fullwidth.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 7c642f4bd..a333f14d6 100644 --- a/admin/layouts/admin_view/linked_components_fullwidth.php +++ b/admin/layouts/admin_view/linked_components_fullwidth.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage linked_components_fullwidth.php diff --git a/admin/layouts/admin_view/mysql_fullwidth.php b/admin/layouts/admin_view/mysql_fullwidth.php index aae9398ab..a12238c8e 100644 --- a/admin/layouts/admin_view/mysql_fullwidth.php +++ b/admin/layouts/admin_view/mysql_fullwidth.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 65a5e3499..39bed69b5 100644 --- a/admin/layouts/admin_view/mysql_left.php +++ b/admin/layouts/admin_view/mysql_left.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 f4c57e66b..cbf3fa193 100644 --- a/admin/layouts/admin_view/php_fullwidth.php +++ b/admin/layouts/admin_view/php_fullwidth.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 1e88fa5d7..ac42cd460 100644 --- a/admin/layouts/admin_view/publishing.php +++ b/admin/layouts/admin_view/publishing.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 0e3a70f15..26d79dd4b 100644 --- a/admin/layouts/admin_view/publlshing.php +++ b/admin/layouts/admin_view/publlshing.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 13c8eca85..46f345e70 100644 --- a/admin/layouts/admin_view/settings_above.php +++ b/admin/layouts/admin_view/settings_above.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 ec946a2e5..9555c1f64 100644 --- a/admin/layouts/admin_view/settings_left.php +++ b/admin/layouts/admin_view/settings_left.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 06b96542b..ee4e90a9b 100644 --- a/admin/layouts/admin_view/settings_right.php +++ b/admin/layouts/admin_view/settings_right.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 3ca539eaa..3604570b2 100644 --- a/admin/layouts/admin_view/settings_under.php +++ b/admin/layouts/admin_view/settings_under.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 711a24484..7e230c413 100644 --- a/admin/layouts/batchselection.php +++ b/admin/layouts/batchselection.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 e363ace67..4867fc04c 100644 --- a/admin/layouts/custom_admin_view/custom_buttons_fullwidth.php +++ b/admin/layouts/custom_admin_view/custom_buttons_fullwidth.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 d883b24a2..36f606c7a 100644 --- a/admin/layouts/custom_admin_view/custom_buttons_left.php +++ b/admin/layouts/custom_admin_view/custom_buttons_left.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 050526e32..08b9906ef 100644 --- a/admin/layouts/custom_admin_view/custom_script_fullwidth.php +++ b/admin/layouts/custom_admin_view/custom_script_fullwidth.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 5e29bbb1a..583f20c8d 100644 --- a/admin/layouts/custom_admin_view/details_above.php +++ b/admin/layouts/custom_admin_view/details_above.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 b317f4cb5..c9494d392 100644 --- a/admin/layouts/custom_admin_view/details_fullwidth.php +++ b/admin/layouts/custom_admin_view/details_fullwidth.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 59eeec0d8..5cd5950e8 100644 --- a/admin/layouts/custom_admin_view/details_left.php +++ b/admin/layouts/custom_admin_view/details_left.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 4ae9ddd54..ce9e7e030 100644 --- a/admin/layouts/custom_admin_view/details_right.php +++ b/admin/layouts/custom_admin_view/details_right.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 f5d8410a4..3bf6a3195 100644 --- a/admin/layouts/custom_admin_view/details_rightside.php +++ b/admin/layouts/custom_admin_view/details_rightside.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 8ab19eba0..f18cd36e8 100644 --- a/admin/layouts/custom_admin_view/details_under.php +++ b/admin/layouts/custom_admin_view/details_under.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 099ce6106..e67d9193c 100644 --- a/admin/layouts/custom_admin_view/linked_components_fullwidth.php +++ b/admin/layouts/custom_admin_view/linked_components_fullwidth.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage linked_components_fullwidth.php diff --git a/admin/layouts/custom_admin_view/publishing.php b/admin/layouts/custom_admin_view/publishing.php index 1e88fa5d7..ac42cd460 100644 --- a/admin/layouts/custom_admin_view/publishing.php +++ b/admin/layouts/custom_admin_view/publishing.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 0e3a70f15..26d79dd4b 100644 --- a/admin/layouts/custom_admin_view/publlshing.php +++ b/admin/layouts/custom_admin_view/publlshing.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 330924449..a6ccb9149 100644 --- a/admin/layouts/custom_code/details_above.php +++ b/admin/layouts/custom_code/details_above.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 d09d35ee0..a9357d14e 100644 --- a/admin/layouts/custom_code/details_fullwidth.php +++ b/admin/layouts/custom_code/details_fullwidth.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 ce3e87f4c..b1c5aca8a 100644 --- a/admin/layouts/custom_code/details_left.php +++ b/admin/layouts/custom_code/details_left.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 2c0b3124b..4ae86e0de 100644 --- a/admin/layouts/custom_code/details_right.php +++ b/admin/layouts/custom_code/details_right.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 8ab19eba0..f18cd36e8 100644 --- a/admin/layouts/custom_code/details_under.php +++ b/admin/layouts/custom_code/details_under.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 1e88fa5d7..ac42cd460 100644 --- a/admin/layouts/custom_code/publishing.php +++ b/admin/layouts/custom_code/publishing.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 0e3a70f15..26d79dd4b 100644 --- a/admin/layouts/custom_code/publlshing.php +++ b/admin/layouts/custom_code/publlshing.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 9bdc029cd..669ec3dc2 100644 --- a/admin/layouts/dynamic_get/abacus_fullwidth.php +++ b/admin/layouts/dynamic_get/abacus_fullwidth.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 ab9aeb0b9..3b9f9cd2e 100644 --- a/admin/layouts/dynamic_get/abacus_left.php +++ b/admin/layouts/dynamic_get/abacus_left.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 fafa95a91..5527b0234 100644 --- a/admin/layouts/dynamic_get/custom_script_fullwidth.php +++ b/admin/layouts/dynamic_get/custom_script_fullwidth.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 edf898205..b89f74167 100644 --- a/admin/layouts/dynamic_get/gettable_above.php +++ b/admin/layouts/dynamic_get/gettable_above.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 3608774bf..d5bb55f73 100644 --- a/admin/layouts/dynamic_get/gettable_fullwidth.php +++ b/admin/layouts/dynamic_get/gettable_fullwidth.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 32d5e82a6..9d3030e59 100644 --- a/admin/layouts/dynamic_get/gettable_left.php +++ b/admin/layouts/dynamic_get/gettable_left.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 f9acc88aa..037920e01 100644 --- a/admin/layouts/dynamic_get/gettable_right.php +++ b/admin/layouts/dynamic_get/gettable_right.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 7461121ba..d394f4744 100644 --- a/admin/layouts/dynamic_get/gettable_under.php +++ b/admin/layouts/dynamic_get/gettable_under.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 1e88fa5d7..ac42cd460 100644 --- a/admin/layouts/dynamic_get/publishing.php +++ b/admin/layouts/dynamic_get/publishing.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 0e3a70f15..26d79dd4b 100644 --- a/admin/layouts/dynamic_get/publlshing.php +++ b/admin/layouts/dynamic_get/publlshing.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 506359006..6f2a62e5d 100644 --- a/admin/layouts/field/details_fullwidth.php +++ b/admin/layouts/field/details_fullwidth.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 da6c03b6c..fd261c96b 100644 --- a/admin/layouts/field/details_left.php +++ b/admin/layouts/field/details_left.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 b78a03394..8d05540a3 100644 --- a/admin/layouts/field/details_right.php +++ b/admin/layouts/field/details_right.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 8ab19eba0..f18cd36e8 100644 --- a/admin/layouts/field/details_under.php +++ b/admin/layouts/field/details_under.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 8be40513a..418fb25ba 100644 --- a/admin/layouts/field/linked_admin_views_fullwidth.php +++ b/admin/layouts/field/linked_admin_views_fullwidth.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage linked_admin_views_fullwidth.php diff --git a/admin/layouts/field/publishing.php b/admin/layouts/field/publishing.php index 1e88fa5d7..ac42cd460 100644 --- a/admin/layouts/field/publishing.php +++ b/admin/layouts/field/publishing.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 0e3a70f15..26d79dd4b 100644 --- a/admin/layouts/field/publlshing.php +++ b/admin/layouts/field/publlshing.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 e149c6f3c..43a05fa49 100644 --- a/admin/layouts/field/scripts_left.php +++ b/admin/layouts/field/scripts_left.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 a647f9866..c104a0792 100644 --- a/admin/layouts/field/scripts_right.php +++ b/admin/layouts/field/scripts_right.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 2a41f63e3..647770f64 100644 --- a/admin/layouts/fieldtype/details_left.php +++ b/admin/layouts/fieldtype/details_left.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 6a473fe2c..e549e4b65 100644 --- a/admin/layouts/fieldtype/details_right.php +++ b/admin/layouts/fieldtype/details_right.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 62dce4021..af2c29e8d 100644 --- a/admin/layouts/fieldtype/fields_fullwidth.php +++ b/admin/layouts/fieldtype/fields_fullwidth.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage fields_fullwidth.php diff --git a/admin/layouts/fieldtype/publishing.php b/admin/layouts/fieldtype/publishing.php index 1e88fa5d7..ac42cd460 100644 --- a/admin/layouts/fieldtype/publishing.php +++ b/admin/layouts/fieldtype/publishing.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 0e3a70f15..26d79dd4b 100644 --- a/admin/layouts/fieldtype/publlshing.php +++ b/admin/layouts/fieldtype/publlshing.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 90b523b3b..d546d7324 100644 --- a/admin/layouts/help_document/details_above.php +++ b/admin/layouts/help_document/details_above.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 f950063ca..d6c499314 100644 --- a/admin/layouts/help_document/details_fullwidth.php +++ b/admin/layouts/help_document/details_fullwidth.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 3d0bbeca4..d919d2fe8 100644 --- a/admin/layouts/help_document/details_left.php +++ b/admin/layouts/help_document/details_left.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 ca606de8d..ffc2db46b 100644 --- a/admin/layouts/help_document/details_right.php +++ b/admin/layouts/help_document/details_right.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 8ab19eba0..f18cd36e8 100644 --- a/admin/layouts/help_document/details_under.php +++ b/admin/layouts/help_document/details_under.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 1e88fa5d7..ac42cd460 100644 --- a/admin/layouts/help_document/publishing.php +++ b/admin/layouts/help_document/publishing.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 33d0ad7fa..ce95e293d 100644 --- a/admin/layouts/help_document/publlshing.php +++ b/admin/layouts/help_document/publlshing.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 990c22b21..253e6b202 100644 --- a/admin/layouts/joomla_component/admin_views_fullwidth.php +++ b/admin/layouts/joomla_component/admin_views_fullwidth.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 eac269974..072383c4b 100644 --- a/admin/layouts/joomla_component/custom_admin_views_fullwidth.php +++ b/admin/layouts/joomla_component/custom_admin_views_fullwidth.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 5e29bbb1a..583f20c8d 100644 --- a/admin/layouts/joomla_component/details_above.php +++ b/admin/layouts/joomla_component/details_above.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 7a1768d05..c439e322f 100644 --- a/admin/layouts/joomla_component/details_left.php +++ b/admin/layouts/joomla_component/details_left.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 f177ea155..79e4f0f06 100644 --- a/admin/layouts/joomla_component/details_right.php +++ b/admin/layouts/joomla_component/details_right.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 8ab19eba0..f18cd36e8 100644 --- a/admin/layouts/joomla_component/details_under.php +++ b/admin/layouts/joomla_component/details_under.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 7491b603c..f3311f122 100644 --- a/admin/layouts/joomla_component/dynamic_build_beta_fullwidth.php +++ b/admin/layouts/joomla_component/dynamic_build_beta_fullwidth.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 4e60f7e58..194d75f27 100644 --- a/admin/layouts/joomla_component/dynamic_integration_fullwidth.php +++ b/admin/layouts/joomla_component/dynamic_integration_fullwidth.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 b7cd2268a..a2ed46d6a 100644 --- a/admin/layouts/joomla_component/libs_helpers_fullwidth.php +++ b/admin/layouts/joomla_component/libs_helpers_fullwidth.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 b91a3b8d7..93af2553c 100644 --- a/admin/layouts/joomla_component/mysql_fullwidth.php +++ b/admin/layouts/joomla_component/mysql_fullwidth.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 9bb17aa41..6667116a3 100644 --- a/admin/layouts/joomla_component/php_fullwidth.php +++ b/admin/layouts/joomla_component/php_fullwidth.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 1e88fa5d7..ac42cd460 100644 --- a/admin/layouts/joomla_component/publishing.php +++ b/admin/layouts/joomla_component/publishing.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 0e3a70f15..26d79dd4b 100644 --- a/admin/layouts/joomla_component/publlshing.php +++ b/admin/layouts/joomla_component/publlshing.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 d58fd3a11..3c3bef3ba 100644 --- a/admin/layouts/joomla_component/readme_left.php +++ b/admin/layouts/joomla_component/readme_left.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 785d49fa9..b7373a84c 100644 --- a/admin/layouts/joomla_component/readme_right.php +++ b/admin/layouts/joomla_component/readme_right.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 b6c4bb1bc..554768ac5 100644 --- a/admin/layouts/joomla_component/settings_left.php +++ b/admin/layouts/joomla_component/settings_left.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 ed2c182c5..ccdb3f3c3 100644 --- a/admin/layouts/joomla_component/settings_right.php +++ b/admin/layouts/joomla_component/settings_right.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 2be3d0316..0f4cc38be 100644 --- a/admin/layouts/joomla_component/site_views_fullwidth.php +++ b/admin/layouts/joomla_component/site_views_fullwidth.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 8abc8c831..3c0fc146a 100644 --- a/admin/layouts/layout/custom_script_fullwidth.php +++ b/admin/layouts/layout/custom_script_fullwidth.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 7b610cf92..c2af6d726 100644 --- a/admin/layouts/layout/details_fullwidth.php +++ b/admin/layouts/layout/details_fullwidth.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 5f4ef1271..b99f3ce98 100644 --- a/admin/layouts/layout/details_left.php +++ b/admin/layouts/layout/details_left.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 236f88259..befe5dce9 100644 --- a/admin/layouts/layout/details_right.php +++ b/admin/layouts/layout/details_right.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 8025fbb93..b398eded4 100644 --- a/admin/layouts/layout/details_rightside.php +++ b/admin/layouts/layout/details_rightside.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 8ab19eba0..f18cd36e8 100644 --- a/admin/layouts/layout/details_under.php +++ b/admin/layouts/layout/details_under.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 1e88fa5d7..ac42cd460 100644 --- a/admin/layouts/layout/publishing.php +++ b/admin/layouts/layout/publishing.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 0e3a70f15..26d79dd4b 100644 --- a/admin/layouts/layout/publlshing.php +++ b/admin/layouts/layout/publlshing.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 e363ace67..4867fc04c 100644 --- a/admin/layouts/site_view/custom_buttons_fullwidth.php +++ b/admin/layouts/site_view/custom_buttons_fullwidth.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 4ae460932..354cec71d 100644 --- a/admin/layouts/site_view/custom_buttons_left.php +++ b/admin/layouts/site_view/custom_buttons_left.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 6f9249587..a0965b3d1 100644 --- a/admin/layouts/site_view/custom_buttons_right.php +++ b/admin/layouts/site_view/custom_buttons_right.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 5e29bbb1a..583f20c8d 100644 --- a/admin/layouts/site_view/details_above.php +++ b/admin/layouts/site_view/details_above.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 b317f4cb5..c9494d392 100644 --- a/admin/layouts/site_view/details_fullwidth.php +++ b/admin/layouts/site_view/details_fullwidth.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 59eeec0d8..5cd5950e8 100644 --- a/admin/layouts/site_view/details_left.php +++ b/admin/layouts/site_view/details_left.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 236f88259..befe5dce9 100644 --- a/admin/layouts/site_view/details_right.php +++ b/admin/layouts/site_view/details_right.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 f5d8410a4..3bf6a3195 100644 --- a/admin/layouts/site_view/details_rightside.php +++ b/admin/layouts/site_view/details_rightside.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 8ab19eba0..f18cd36e8 100644 --- a/admin/layouts/site_view/details_under.php +++ b/admin/layouts/site_view/details_under.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 d00b68dd2..4c3b3953b 100644 --- a/admin/layouts/site_view/javascript_css_fullwidth.php +++ b/admin/layouts/site_view/javascript_css_fullwidth.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 16d0f8763..27498cbf0 100644 --- a/admin/layouts/site_view/linked_components_fullwidth.php +++ b/admin/layouts/site_view/linked_components_fullwidth.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage linked_components_fullwidth.php diff --git a/admin/layouts/site_view/php_fullwidth.php b/admin/layouts/site_view/php_fullwidth.php index cdceef440..753555938 100644 --- a/admin/layouts/site_view/php_fullwidth.php +++ b/admin/layouts/site_view/php_fullwidth.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 1e88fa5d7..ac42cd460 100644 --- a/admin/layouts/site_view/publishing.php +++ b/admin/layouts/site_view/publishing.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 0e3a70f15..26d79dd4b 100644 --- a/admin/layouts/site_view/publlshing.php +++ b/admin/layouts/site_view/publlshing.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 fafed3d4f..02db1da6c 100644 --- a/admin/layouts/snippet/details_above.php +++ b/admin/layouts/snippet/details_above.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 1b322f5ef..5b3236ab4 100644 --- a/admin/layouts/snippet/details_left.php +++ b/admin/layouts/snippet/details_left.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 21f00dfac..b80c3757e 100644 --- a/admin/layouts/snippet/details_right.php +++ b/admin/layouts/snippet/details_right.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 1e88fa5d7..ac42cd460 100644 --- a/admin/layouts/snippet/publishing.php +++ b/admin/layouts/snippet/publishing.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 0e3a70f15..26d79dd4b 100644 --- a/admin/layouts/snippet/publlshing.php +++ b/admin/layouts/snippet/publlshing.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 8abc8c831..3c0fc146a 100644 --- a/admin/layouts/template/custom_script_fullwidth.php +++ b/admin/layouts/template/custom_script_fullwidth.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 63c1d0456..99be26f97 100644 --- a/admin/layouts/template/details_fullwidth.php +++ b/admin/layouts/template/details_fullwidth.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 5f4ef1271..b99f3ce98 100644 --- a/admin/layouts/template/details_left.php +++ b/admin/layouts/template/details_left.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 236f88259..befe5dce9 100644 --- a/admin/layouts/template/details_right.php +++ b/admin/layouts/template/details_right.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 8025fbb93..b398eded4 100644 --- a/admin/layouts/template/details_rightside.php +++ b/admin/layouts/template/details_rightside.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 8ab19eba0..f18cd36e8 100644 --- a/admin/layouts/template/details_under.php +++ b/admin/layouts/template/details_under.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 1e88fa5d7..ac42cd460 100644 --- a/admin/layouts/template/publishing.php +++ b/admin/layouts/template/publishing.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 0e3a70f15..26d79dd4b 100644 --- a/admin/layouts/template/publlshing.php +++ b/admin/layouts/template/publlshing.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage publlshing.php diff --git a/admin/models/ajax.php b/admin/models/ajax.php index bf0905a92..2a1c55914 100644 --- a/admin/models/ajax.php +++ b/admin/models/ajax.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage ajax.php diff --git a/admin/models/componentbuilder.php b/admin/models/componentbuilder.php index 635d31d6a..599f400eb 100644 --- a/admin/models/componentbuilder.php +++ b/admin/models/componentbuilder.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage componentbuilder.php diff --git a/admin/models/fields/adminviewfolderlist.php b/admin/models/fields/adminviewfolderlist.php index 70be1fdd2..f64b5dbb6 100644 --- a/admin/models/fields/adminviewfolderlist.php +++ b/admin/models/fields/adminviewfolderlist.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 1ed37371d..f22f7536a 100644 --- a/admin/models/fields/adminviews.php +++ b/admin/models/fields/adminviews.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 086a7bbb5..7ce48d2a9 100644 --- a/admin/models/fields/articles.php +++ b/admin/models/fields/articles.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 959a49ed9..0123f7049 100644 --- a/admin/models/fields/component.php +++ b/admin/models/fields/component.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 74dea134e..c00cbf0e0 100644 --- a/admin/models/fields/customadminviews.php +++ b/admin/models/fields/customadminviews.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 cc0f5463b..a26130180 100644 --- a/admin/models/fields/customfilelist.php +++ b/admin/models/fields/customfilelist.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 33d8246e3..4d3114427 100644 --- a/admin/models/fields/customfolderlist.php +++ b/admin/models/fields/customfolderlist.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 72ef5b9cc..3dc8da436 100644 --- a/admin/models/fields/customgets.php +++ b/admin/models/fields/customgets.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 4509780e2..06f972240 100644 --- a/admin/models/fields/dbtables.php +++ b/admin/models/fields/dbtables.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 6116cbc56..bf4dbaf58 100644 --- a/admin/models/fields/dynamicgets.php +++ b/admin/models/fields/dynamicgets.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 8cb64699a..d0420e5c3 100644 --- a/admin/models/fields/fields.php +++ b/admin/models/fields/fields.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 a71b99a3d..fbfc186fd 100644 --- a/admin/models/fields/fieldsmulti.php +++ b/admin/models/fields/fieldsmulti.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 d02ec3ca8..98975e2d5 100644 --- a/admin/models/fields/fieldtypes.php +++ b/admin/models/fields/fieldtypes.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 b4b31a169..d7b3f2ce2 100644 --- a/admin/models/fields/maingets.php +++ b/admin/models/fields/maingets.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 c19b5ff5b..c5d751031 100644 --- a/admin/models/fields/siteviewfolderlist.php +++ b/admin/models/fields/siteviewfolderlist.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 0d793be99..207e55ed1 100644 --- a/admin/models/fields/siteviews.php +++ b/admin/models/fields/siteviews.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th 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 678d46990..b3c14a5a3 100644 --- a/admin/models/fields/snippets.php +++ b/admin/models/fields/snippets.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage snippets.php diff --git a/admin/models/forms/joomla_component.js b/admin/models/forms/joomla_component.js index db9355e96..473af54b7 100644 --- a/admin/models/forms/joomla_component.js +++ b/admin/models/forms/joomla_component.js @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 122 of this MVC - @build 18th March, 2017 + @version @update number 132 of this MVC + @build 20th March, 2017 @created 6th May, 2015 @package Component Builder @subpackage joomla_component.js diff --git a/admin/models/import.php b/admin/models/import.php index 5a6377148..a1394ea32 100644 --- a/admin/models/import.php +++ b/admin/models/import.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage import.php diff --git a/admin/models/joomla_component.php b/admin/models/joomla_component.php index f0cbe3adb..57ba2d7b3 100644 --- a/admin/models/joomla_component.php +++ b/admin/models/joomla_component.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 122 of this MVC - @build 18th March, 2017 + @version @update number 132 of this MVC + @build 20th 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 ee55a84b4..ab7235810 100644 --- a/admin/models/joomla_components.php +++ b/admin/models/joomla_components.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 122 of this MVC - @build 18th March, 2017 + @version @update number 132 of this MVC + @build 20th March, 2017 @created 6th May, 2015 @package Component Builder @subpackage joomla_components.php @@ -56,17 +56,22 @@ class ComponentbuilderModelJoomla_components extends JModelList parent::__construct($config); } - public $smartExport = array(); + public $packagePath = false; + public $zipPath = false; + protected $params; + protected $tempPath; + protected $customPath; + protected $smartExport = array(); protected $templateIds = array(); protected $layoutIds = array(); protected $customCodeIds = array(); protected $customCodeM = array(); /** - * Method to get list export data. + * Method to build the export package * - * @return mixed An array of data items on success, false on failure. + * @return bool on success. */ public function getSmartExport($pks) { @@ -101,10 +106,27 @@ class ComponentbuilderModelJoomla_components extends JModelList $db->execute(); if ($db->getNumRows()) { + // load the items from db $items = $db->loadObjectList(); // check if we have items if (ComponentbuilderHelper::checkArray($items)) { + // set the paths + $comConfig = JFactory::getConfig(); + $this->tempPath = $comConfig->get('tmp_path'); + $this->packagePath = $this->tempPath . '/JCB_smartPackage'; + $this->zipPath = $this->packagePath .'.zip'; + if (JFolder::exists($this->packagePath)) + { + // remove if old folder is found + ComponentbuilderHelper::removeFolder($this->packagePath); + } + // create the folders + JFolder::create($this->packagePath); + // set params + $this->params = JComponentHelper::getParams('com_componentbuilder'); + // set custom folder path + $this->customPath = $this->params->get('custom_folder_path', JPATH_COMPONENT_ADMINISTRATOR.'/custom'); // add custom code $this->setData($user, $db, 'custom_code', $pks, 'component'); // start loading the components @@ -116,7 +138,11 @@ class ComponentbuilderModelJoomla_components extends JModelList { unset($items[$nr]); continue; - } + } + // build files + $this->moveIt($item->addfiles, 'file'); + // build folders + $this->moveIt($item->addfolders, 'folder'); // add config fields $this->setData($user, $db, 'field', $item->addconfig, 'field'); // add admin views @@ -148,7 +174,8 @@ class ComponentbuilderModelJoomla_components extends JModelList // has any data been set if (ComponentbuilderHelper::checkArray($this->smartExport['components'])) { - return true; + // set the folder and move the files of each component to the folder + return $this->smartExportBuilder(); } } } @@ -156,6 +183,100 @@ class ComponentbuilderModelJoomla_components extends JModelList return false; } + /** + * Method to build the package to export + * + * @return void + */ + protected function smartExportBuilder() + { + $this->smartExport = serialize($this->smartExport); + $dbPath = $this->packagePath . '/db.vdm'; + if (JFile::exists($dbPath)) + { + // remove file if found + JFile::delete($dbPath); + } + // write the db data to file in package + if (!ComponentbuilderHelper::writeFile($dbPath, $this->smartExport)) + { + return false; + } + if (JFile::exists($this->zipPath)) + { + // remove file if found + JFile::delete($this->zipPath); + } + // zip the folder + if (!ComponentbuilderHelper::zip($this->packagePath, $this->zipPath)) + { + return false; + } + // remove the folder + if (!ComponentbuilderHelper::removeFolder($this->packagePath)) + { + return false; + } + return true; + } + + /** + * Method to move the files and folder to the package folder + * + * @return bool + */ + protected function moveIt($data, $type) + { + // if json convert to array + if (ComponentbuilderHelper::checkJson($data)) + { + $data = json_decode($data, true); + } + // make sure we have an array + if (!ComponentbuilderHelper::checkArray($data) || !isset($data[$type]) || !ComponentbuilderHelper::checkArray($data[$type])) + { + return false; + } + // set the name of the folder + if ('file' === $type || 'folder' === $type) + { + $name = 'custom'; + } + if ('image' === $type) + { + $name = 'images'; + } + // setup the type path + $tmpPath = $this->packagePath . '/' . $name; + // create type path if not set + if (!JFolder::exists($tmpPath)) + { + // create the folders if not found + JFolder::create($tmpPath); + } + // now move it + foreach ($data[$type] as $item) + { + if ('file' === $type || 'image' === $type) + { + 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)) + { + // move the folder to its place + JFolder::copy($this->customPath.'/'.$item, $tmpPath.'/'.$item,'',true); + } + } + } + return true; + } + /** * Method to get data of a given table. * diff --git a/admin/tables/joomla_component.php b/admin/tables/joomla_component.php index 0465bc0f0..ae7b25d22 100644 --- a/admin/tables/joomla_component.php +++ b/admin/tables/joomla_component.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 122 of this MVC - @build 18th March, 2017 + @version @update number 132 of this MVC + @build 20th March, 2017 @created 6th May, 2015 @package Component Builder @subpackage joomla_component.php diff --git a/admin/views/componentbuilder/tmpl/default.php b/admin/views/componentbuilder/tmpl/default.php index fcb334400..23aee561a 100644 --- a/admin/views/componentbuilder/tmpl/default.php +++ b/admin/views/componentbuilder/tmpl/default.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage default.php diff --git a/admin/views/componentbuilder/tmpl/default_closed_issues_the_closed_issues_on_github.php b/admin/views/componentbuilder/tmpl/default_closed_issues_the_closed_issues_on_github.php index 8a484befa..539f77bf3 100644 --- a/admin/views/componentbuilder/tmpl/default_closed_issues_the_closed_issues_on_github.php +++ b/admin/views/componentbuilder/tmpl/default_closed_issues_the_closed_issues_on_github.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage default_closed_issues_the_closed_issues_on_github.php diff --git a/admin/views/componentbuilder/tmpl/default_main.php b/admin/views/componentbuilder/tmpl/default_main.php index 497c7c596..e2e3a5cf6 100644 --- a/admin/views/componentbuilder/tmpl/default_main.php +++ b/admin/views/componentbuilder/tmpl/default_main.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage default_main.php diff --git a/admin/views/componentbuilder/tmpl/default_open_issues_the_open_issues_on_github.php b/admin/views/componentbuilder/tmpl/default_open_issues_the_open_issues_on_github.php index ab1f7dc97..10e2a2658 100644 --- a/admin/views/componentbuilder/tmpl/default_open_issues_the_open_issues_on_github.php +++ b/admin/views/componentbuilder/tmpl/default_open_issues_the_open_issues_on_github.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage default_open_issues_the_open_issues_on_github.php diff --git a/admin/views/componentbuilder/tmpl/default_readme_information.php b/admin/views/componentbuilder/tmpl/default_readme_information.php index 97008264a..e91547d69 100644 --- a/admin/views/componentbuilder/tmpl/default_readme_information.php +++ b/admin/views/componentbuilder/tmpl/default_readme_information.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage default_readme_information.php diff --git a/admin/views/componentbuilder/tmpl/default_vast_development_method_notice_board.php b/admin/views/componentbuilder/tmpl/default_vast_development_method_notice_board.php index 81490996f..a1e163ba5 100644 --- a/admin/views/componentbuilder/tmpl/default_vast_development_method_notice_board.php +++ b/admin/views/componentbuilder/tmpl/default_vast_development_method_notice_board.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage default_vast_development_method_notice_board.php diff --git a/admin/views/componentbuilder/tmpl/default_vdm.php b/admin/views/componentbuilder/tmpl/default_vdm.php index fc43bdf6d..a5575de66 100644 --- a/admin/views/componentbuilder/tmpl/default_vdm.php +++ b/admin/views/componentbuilder/tmpl/default_vdm.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage default_vdm.php diff --git a/admin/views/componentbuilder/view.html.php b/admin/views/componentbuilder/view.html.php index d2a09d623..29bc009f4 100644 --- a/admin/views/componentbuilder/view.html.php +++ b/admin/views/componentbuilder/view.html.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage view.html.php diff --git a/admin/views/import/tmpl/default.php b/admin/views/import/tmpl/default.php index c3dbde37e..ad31122d7 100644 --- a/admin/views/import/tmpl/default.php +++ b/admin/views/import/tmpl/default.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage default.php diff --git a/admin/views/import/view.html.php b/admin/views/import/view.html.php index 417011ee1..d4780b268 100644 --- a/admin/views/import/view.html.php +++ b/admin/views/import/view.html.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage view.html.php diff --git a/admin/views/joomla_component/submitbutton.js b/admin/views/joomla_component/submitbutton.js index c7587f7ea..40271bd87 100644 --- a/admin/views/joomla_component/submitbutton.js +++ b/admin/views/joomla_component/submitbutton.js @@ -9,8 +9,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 122 of this MVC - @build 18th March, 2017 + @version @update number 132 of this MVC + @build 20th 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 7c1829e38..9dfb9207e 100644 --- a/admin/views/joomla_component/tmpl/edit.php +++ b/admin/views/joomla_component/tmpl/edit.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 122 of this MVC - @build 18th March, 2017 + @version @update number 132 of this MVC + @build 20th 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 a55e97a4c..4c4aef974 100644 --- a/admin/views/joomla_component/view.html.php +++ b/admin/views/joomla_component/view.html.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 122 of this MVC - @build 18th March, 2017 + @version @update number 132 of this MVC + @build 20th 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 fdc42797f..a6587d3f0 100644 --- a/admin/views/joomla_components/tmpl/default.php +++ b/admin/views/joomla_components/tmpl/default.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 122 of this MVC - @build 18th March, 2017 + @version @update number 132 of this MVC + @build 20th 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 5c30147e2..d7c15c7f2 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 122 of this MVC - @build 18th March, 2017 + @version @update number 132 of this MVC + @build 20th 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 9faba4a82..c81a3137b 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 122 of this MVC - @build 18th March, 2017 + @version @update number 132 of this MVC + @build 20th 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 14cbe9129..0b68341da 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 122 of this MVC - @build 18th March, 2017 + @version @update number 132 of this MVC + @build 20th 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 20d6f5514..af2030a9a 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 122 of this MVC - @build 18th March, 2017 + @version @update number 132 of this MVC + @build 20th 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 a77ae1d76..8555e499d 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 122 of this MVC - @build 18th March, 2017 + @version @update number 132 of this MVC + @build 20th 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 b8df711df..c7b340abd 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 122 of this MVC - @build 18th March, 2017 + @version @update number 132 of this MVC + @build 20th 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 1c523783b..69aa984b6 100644 --- a/admin/views/joomla_components/view.html.php +++ b/admin/views/joomla_components/view.html.php @@ -10,8 +10,8 @@ |_| /-------------------------------------------------------------------------------------------------------------------------------/ - @version @update number 122 of this MVC - @build 18th March, 2017 + @version @update number 132 of this MVC + @build 20th March, 2017 @created 6th May, 2015 @package Component Builder @subpackage view.html.php diff --git a/componentbuilder.xml b/componentbuilder.xml index 526fed3ee..1d7788bd0 100644 --- a/componentbuilder.xml +++ b/componentbuilder.xml @@ -1,7 +1,7 @@ COM_COMPONENTBUILDER - 18th March, 2017 + 20th March, 2017 Llewellyn van der Merwe joomla@vdm.io http://vdm.bz/component-builder diff --git a/script.php b/script.php index b33a5a147..92aee586b 100644 --- a/script.php +++ b/script.php @@ -11,7 +11,7 @@ /-------------------------------------------------------------------------------------------------------------------------------/ @version 2.3.7 - @build 18th March, 2017 + @build 20th March, 2017 @created 30th April, 2015 @package Component Builder @subpackage script.php -- 2.40.1 From 8b522f44d94e1aaa0b6c17783a2acf7f60683a22 Mon Sep 17 00:00:00 2001 From: Llewellyn van der Merwe Date: Mon, 27 Mar 2017 14:38:51 +0200 Subject: [PATCH 5/5] Further gh-53 implementation of the export and import of complete components as JCB packages. Fixes gh-56 --- README.md | 14 +- admin/README.txt | 14 +- admin/access.xml | 3 +- admin/assets/css/admin.css | 4 +- admin/assets/css/admin_view.css | 4 +- admin/assets/css/admin_views.css | 4 +- admin/assets/css/compiler.css | 4 +- admin/assets/css/dashboard.css | 4 +- admin/assets/css/joomla_component.css | 4 +- admin/assets/css/joomla_components.css | 4 +- .../compiler/joomla_3/JModelLegacy_import.php | 60 +- .../joomla_3/JModelLegacy_import_custom.php | 39 +- admin/componentbuilder.php | 4 +- admin/controller.php | 4 +- admin/controllers/admin_view.php | 4 +- admin/controllers/admin_views.php | 4 +- admin/controllers/ajax.json.php | 4 +- admin/controllers/compiler.php | 4 +- admin/controllers/componentbuilder.php | 4 +- admin/controllers/help.php | 4 +- admin/controllers/import.php | 4 +- .../controllers/import_joomla_components.php | 67 + admin/controllers/joomla_component.php | 4 +- admin/controllers/joomla_components.php | 40 +- admin/helpers/compiler/a_Get.php | 45 +- admin/helpers/compiler/e_Interpretation.php | 4 +- admin/helpers/componentbuilder.php | 679 ++++++- admin/helpers/headercheck.php | 4 +- admin/helpers/html/batch_.php | 4 +- admin/helpers/indenter.php | 4 +- admin/helpers/js.php | 4 +- admin/helpers/minify.php | 4 +- .../en-GB/en-GB.com_componentbuilder.ini | 20 +- admin/layouts/admin_view/css_fullwidth.php | 4 +- .../admin_view/custom_buttons_fullwidth.php | 4 +- .../admin_view/custom_buttons_left.php | 4 +- .../admin_view/custom_import_fullwidth.php | 7 +- admin/layouts/admin_view/fields_fullwidth.php | 6 +- .../admin_view/javascript_fullwidth.php | 4 +- .../linked_components_fullwidth.php | 6 +- admin/layouts/admin_view/mysql_fullwidth.php | 4 +- admin/layouts/admin_view/mysql_left.php | 4 +- admin/layouts/admin_view/php_fullwidth.php | 4 +- admin/layouts/admin_view/publishing.php | 4 +- admin/layouts/admin_view/publlshing.php | 4 +- admin/layouts/admin_view/settings_above.php | 4 +- admin/layouts/admin_view/settings_left.php | 4 +- admin/layouts/admin_view/settings_right.php | 4 +- admin/layouts/admin_view/settings_under.php | 4 +- admin/layouts/batchselection.php | 4 +- .../custom_buttons_fullwidth.php | 4 +- .../custom_admin_view/custom_buttons_left.php | 4 +- .../custom_script_fullwidth.php | 4 +- .../custom_admin_view/details_above.php | 4 +- .../custom_admin_view/details_fullwidth.php | 4 +- .../custom_admin_view/details_left.php | 4 +- .../custom_admin_view/details_right.php | 4 +- .../custom_admin_view/details_rightside.php | 4 +- .../custom_admin_view/details_under.php | 4 +- .../linked_components_fullwidth.php | 6 +- .../layouts/custom_admin_view/publishing.php | 4 +- .../layouts/custom_admin_view/publlshing.php | 4 +- admin/layouts/custom_code/details_above.php | 4 +- .../layouts/custom_code/details_fullwidth.php | 4 +- admin/layouts/custom_code/details_left.php | 4 +- admin/layouts/custom_code/details_right.php | 4 +- admin/layouts/custom_code/details_under.php | 4 +- admin/layouts/custom_code/publishing.php | 4 +- admin/layouts/custom_code/publlshing.php | 4 +- .../layouts/dynamic_get/abacus_fullwidth.php | 4 +- admin/layouts/dynamic_get/abacus_left.php | 4 +- .../dynamic_get/custom_script_fullwidth.php | 4 +- admin/layouts/dynamic_get/gettable_above.php | 4 +- .../dynamic_get/gettable_fullwidth.php | 4 +- admin/layouts/dynamic_get/gettable_left.php | 4 +- admin/layouts/dynamic_get/gettable_right.php | 4 +- admin/layouts/dynamic_get/gettable_under.php | 4 +- admin/layouts/dynamic_get/publishing.php | 4 +- admin/layouts/dynamic_get/publlshing.php | 4 +- admin/layouts/field/details_fullwidth.php | 4 +- admin/layouts/field/details_left.php | 4 +- admin/layouts/field/details_right.php | 4 +- admin/layouts/field/details_under.php | 4 +- .../field/linked_admin_views_fullwidth.php | 6 +- admin/layouts/field/publishing.php | 4 +- admin/layouts/field/publlshing.php | 4 +- admin/layouts/field/scripts_left.php | 4 +- admin/layouts/field/scripts_right.php | 4 +- admin/layouts/fieldtype/details_left.php | 4 +- admin/layouts/fieldtype/details_right.php | 4 +- admin/layouts/fieldtype/fields_fullwidth.php | 6 +- admin/layouts/fieldtype/publishing.php | 4 +- admin/layouts/fieldtype/publlshing.php | 4 +- admin/layouts/help_document/details_above.php | 4 +- .../help_document/details_fullwidth.php | 4 +- admin/layouts/help_document/details_left.php | 4 +- admin/layouts/help_document/details_right.php | 4 +- admin/layouts/help_document/details_under.php | 4 +- admin/layouts/help_document/publishing.php | 4 +- admin/layouts/help_document/publlshing.php | 4 +- .../admin_views_fullwidth.php | 4 +- .../custom_admin_views_fullwidth.php | 4 +- .../joomla_component/details_above.php | 4 +- .../layouts/joomla_component/details_left.php | 4 +- .../joomla_component/details_right.php | 4 +- .../joomla_component/details_under.php | 4 +- .../dynamic_build_beta_fullwidth.php | 4 +- .../dynamic_integration_fullwidth.php | 4 +- .../libs_helpers_fullwidth.php | 4 +- .../joomla_component/mysql_fullwidth.php | 4 +- .../joomla_component/php_fullwidth.php | 4 +- admin/layouts/joomla_component/publishing.php | 4 +- admin/layouts/joomla_component/publlshing.php | 4 +- .../layouts/joomla_component/readme_left.php | 4 +- .../layouts/joomla_component/readme_right.php | 4 +- .../joomla_component/settings_left.php | 4 +- .../joomla_component/settings_right.php | 4 +- .../joomla_component/site_views_fullwidth.php | 4 +- .../layout/custom_script_fullwidth.php | 4 +- admin/layouts/layout/details_fullwidth.php | 4 +- admin/layouts/layout/details_left.php | 4 +- admin/layouts/layout/details_right.php | 4 +- admin/layouts/layout/details_rightside.php | 4 +- admin/layouts/layout/details_under.php | 4 +- admin/layouts/layout/publishing.php | 4 +- admin/layouts/layout/publlshing.php | 4 +- .../site_view/custom_buttons_fullwidth.php | 4 +- .../layouts/site_view/custom_buttons_left.php | 4 +- .../site_view/custom_buttons_right.php | 4 +- admin/layouts/site_view/details_above.php | 4 +- admin/layouts/site_view/details_fullwidth.php | 4 +- admin/layouts/site_view/details_left.php | 4 +- admin/layouts/site_view/details_right.php | 4 +- admin/layouts/site_view/details_rightside.php | 4 +- admin/layouts/site_view/details_under.php | 4 +- .../site_view/javascript_css_fullwidth.php | 4 +- .../site_view/linked_components_fullwidth.php | 6 +- admin/layouts/site_view/php_fullwidth.php | 4 +- admin/layouts/site_view/publishing.php | 4 +- admin/layouts/site_view/publlshing.php | 4 +- admin/layouts/snippet/details_above.php | 4 +- admin/layouts/snippet/details_left.php | 4 +- admin/layouts/snippet/details_right.php | 4 +- admin/layouts/snippet/publishing.php | 4 +- admin/layouts/snippet/publlshing.php | 4 +- .../template/custom_script_fullwidth.php | 4 +- admin/layouts/template/details_fullwidth.php | 4 +- admin/layouts/template/details_left.php | 4 +- admin/layouts/template/details_right.php | 4 +- admin/layouts/template/details_rightside.php | 4 +- admin/layouts/template/details_under.php | 4 +- admin/layouts/template/publishing.php | 4 +- admin/layouts/template/publlshing.php | 4 +- admin/models/admin_view.php | 522 +++--- admin/models/admin_views.php | 98 +- admin/models/ajax.php | 631 +------ admin/models/compiler.php | 4 +- admin/models/componentbuilder.php | 4 +- admin/models/custom_admin_view.php | 2 +- admin/models/field.php | 2 +- admin/models/fields/adminviewfolderlist.php | 4 +- admin/models/fields/adminviews.php | 4 +- admin/models/fields/articles.php | 4 +- admin/models/fields/component.php | 4 +- admin/models/fields/customadminviews.php | 4 +- admin/models/fields/customfilelist.php | 4 +- admin/models/fields/customfolderlist.php | 4 +- admin/models/fields/customgets.php | 4 +- admin/models/fields/dbtables.php | 4 +- admin/models/fields/dynamicgets.php | 4 +- admin/models/fields/fields.php | 4 +- admin/models/fields/fieldsmulti.php | 4 +- admin/models/fields/fieldtypes.php | 4 +- admin/models/fields/maingets.php | 4 +- admin/models/fields/siteviewfolderlist.php | 4 +- admin/models/fields/siteviews.php | 4 +- admin/models/fields/snippets.php | 4 +- admin/models/fieldtype.php | 12 +- admin/models/forms/admin_view.js | 91 +- admin/models/forms/admin_view.xml | 939 +++++----- admin/models/forms/custom_admin_view.js | 88 +- admin/models/forms/custom_code.js | 36 +- admin/models/forms/dynamic_get.js | 174 +- admin/models/forms/field.js | 80 +- admin/models/forms/help_document.js | 60 +- admin/models/forms/joomla_component.js | 4 +- admin/models/forms/layout.js | 10 +- admin/models/forms/site_view.js | 98 +- admin/models/forms/template.js | 10 +- admin/models/import.php | 64 +- admin/models/import_joomla_components.php | 1576 +++++++++++++++++ admin/models/joomla_component.php | 4 +- admin/models/joomla_components.php | 59 +- admin/models/site_view.php | 2 +- admin/sql/install.mysql.utf8.sql | 49 +- admin/sql/updates/mysql/2.3.7.sql | 1 + admin/tables/admin_view.php | 4 +- admin/tables/joomla_component.php | 4 +- admin/views/admin_view/submitbutton.js | 4 +- admin/views/admin_view/tmpl/edit.php | 4 +- admin/views/admin_view/view.html.php | 8 +- admin/views/admin_views/tmpl/default.php | 4 +- .../admin_views/tmpl/default_batch_body.php | 4 +- .../admin_views/tmpl/default_batch_footer.php | 4 +- admin/views/admin_views/tmpl/default_body.php | 4 +- admin/views/admin_views/tmpl/default_foot.php | 4 +- admin/views/admin_views/tmpl/default_head.php | 4 +- .../admin_views/tmpl/default_toolbar.php | 4 +- admin/views/admin_views/view.html.php | 4 +- admin/views/compiler/tmpl/default.php | 5 +- admin/views/compiler/view.html.php | 8 +- admin/views/componentbuilder/tmpl/default.php | 4 +- ...sed_issues_the_closed_issues_on_github.php | 4 +- .../componentbuilder/tmpl/default_main.php | 4 +- ..._open_issues_the_open_issues_on_github.php | 4 +- .../tmpl/default_readme_information.php | 4 +- ...t_vast_development_method_notice_board.php | 4 +- .../componentbuilder/tmpl/default_vdm.php | 4 +- admin/views/componentbuilder/view.html.php | 4 +- admin/views/custom_admin_view/view.html.php | 2 +- admin/views/field/view.html.php | 2 +- admin/views/fieldtype/view.html.php | 2 +- admin/views/import/tmpl/default.php | 4 +- admin/views/import/view.html.php | 4 +- .../views/import_joomla_components/index.html | 1 + .../import_joomla_components/tmpl/default.php | 263 +++ .../import_joomla_components/tmpl/index.html | 1 + .../import_joomla_components/view.html.php | 114 ++ admin/views/joomla_component/submitbutton.js | 4 +- admin/views/joomla_component/tmpl/edit.php | 4 +- admin/views/joomla_component/view.html.php | 4 +- .../views/joomla_components/tmpl/default.php | 4 +- .../tmpl/default_batch_body.php | 4 +- .../tmpl/default_batch_footer.php | 4 +- .../joomla_components/tmpl/default_body.php | 4 +- .../joomla_components/tmpl/default_foot.php | 4 +- .../joomla_components/tmpl/default_head.php | 4 +- .../tmpl/default_toolbar.php | 4 +- admin/views/joomla_components/view.html.php | 15 +- admin/views/site_view/view.html.php | 2 +- componentbuilder.xml | 6 +- componentbuilder_update_server.xml | 17 + script.php | 14 +- 243 files changed, 4548 insertions(+), 2296 deletions(-) create mode 100644 admin/controllers/import_joomla_components.php create mode 100644 admin/models/import_joomla_components.php create mode 100644 admin/sql/updates/mysql/2.3.7.sql create mode 100644 admin/views/import_joomla_components/index.html create mode 100644 admin/views/import_joomla_components/tmpl/default.php create mode 100644 admin/views/import_joomla_components/tmpl/index.html create mode 100644 admin/views/import_joomla_components/view.html.php 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.

'; } } } -- 2.40.1