From b0ad2ddffc2400382acd055a2c186eb60be361e0 Mon Sep 17 00:00:00 2001 From: dev Date: Sat, 18 Mar 2017 13:16:07 +0200 Subject: [PATCH 1/3] 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/3] 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/3] 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