From 3abae0494ea0c2110b963fa5efe00a3285fe7823 Mon Sep 17 00:00:00 2001 From: Llewellyn van der Merwe Date: Sat, 26 Jan 2019 05:51:48 +0200 Subject: [PATCH] Added the option to set the row_format per table in the admin view. Converted all the JCB tables to have a DYNAMIC row format. Fixed gh-369 so that JCB packages like JMM can be imported. --- README.md | 12 +- admin/README.txt | 12 +- admin/helpers/compiler/a_Get.php | 3 +- admin/helpers/compiler/e_Interpretation.php | 14 +- .../en-GB/en-GB.com_componentbuilder.ini | 9 +- admin/layouts/admin_view/mysql_left.php | 1 + admin/models/admin_view.php | 414 +-- admin/models/admin_views.php | 72 +- admin/models/forms/admin_view.xml | 2224 +++++++++-------- admin/models/forms/field.js | 4 +- admin/sql/install.mysql.utf8.sql | 108 +- admin/sql/updates/mysql/2.9.8.sql | 37 + componentbuilder.xml | 6 +- componentbuilder_update_server.xml | 17 + script.php | 10 +- 15 files changed, 1521 insertions(+), 1422 deletions(-) create mode 100644 admin/sql/updates/mysql/2.9.8.sql diff --git a/README.md b/README.md index 75cf891fd..516a2ee07 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will safe you lots of time and money. A real must have! -You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.9.8) with **ALL** its features and **ALL** concepts totally open-source and free! +You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.9.9) with **ALL** its features and **ALL** concepts totally open-source and free! > Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45) @@ -144,13 +144,13 @@ TODO + *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) + *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder) + *First Build*: 30th April, 2015 -+ *Last Build*: 23rd January, 2019 -+ *Version*: 2.9.8 ++ *Last Build*: 26th January, 2019 ++ *Version*: 2.9.9 + *Copyright*: Copyright (C) 2015 - 2018 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt -+ *Line count*: **194592** -+ *Field count*: **1087** -+ *File count*: **1275** ++ *Line count*: **194678** ++ *Field count*: **1088** ++ *File count*: **1276** + *Folder count*: **201** > This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](http://joomlacomponentbuilder.com). diff --git a/admin/README.txt b/admin/README.txt index 75cf891fd..516a2ee07 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -12,7 +12,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will safe you lots of time and money. A real must have! -You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.9.8) with **ALL** its features and **ALL** concepts totally open-source and free! +You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.9.9) with **ALL** its features and **ALL** concepts totally open-source and free! > Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45) @@ -144,13 +144,13 @@ TODO + *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) + *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder) + *First Build*: 30th April, 2015 -+ *Last Build*: 23rd January, 2019 -+ *Version*: 2.9.8 ++ *Last Build*: 26th January, 2019 ++ *Version*: 2.9.9 + *Copyright*: Copyright (C) 2015 - 2018 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt -+ *Line count*: **194592** -+ *Field count*: **1087** -+ *File count*: **1275** ++ *Line count*: **194678** ++ *Field count*: **1088** ++ *File count*: **1276** + *Folder count*: **201** > This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](http://joomlacomponentbuilder.com). diff --git a/admin/helpers/compiler/a_Get.php b/admin/helpers/compiler/a_Get.php index ed157c52c..01474202e 100644 --- a/admin/helpers/compiler/a_Get.php +++ b/admin/helpers/compiler/a_Get.php @@ -718,7 +718,8 @@ class Get public $mysqlTableKeys = array( 'engine' => array('default' => 'MyISAM'), 'charset' => array('default' => 'utf8'), - 'collate' => array('default' => 'utf8_general_ci') + 'collate' => array('default' => 'utf8_general_ci'), + 'row_format' => array('default' => '') ); /** diff --git a/admin/helpers/compiler/e_Interpretation.php b/admin/helpers/compiler/e_Interpretation.php index 2ed3331bb..9ec391f36 100644 --- a/admin/helpers/compiler/e_Interpretation.php +++ b/admin/helpers/compiler/e_Interpretation.php @@ -6360,7 +6360,13 @@ class Interpretation extends Fields $easy[$_mysqlTableKey] = $this->mysqlTableKeys[$_mysqlTableKey]['default']; } } - $db_ .= PHP_EOL . ") ENGINE=" . $easy['engine'] . " AUTO_INCREMENT=0 DEFAULT CHARSET=" . $easy['charset'] . " DEFAULT COLLATE=" . $easy['collate'] . ";"; + // add a little fix for the row_format + if (ComponentbuilderHelper::checkString($easy['row_format'])) + { + $easy['row_format'] = ' ROW_FORMAT=' . $easy['row_format']; + } + // now build db string + $db_ .= PHP_EOL . ") ENGINE=" . $easy['engine'] . " AUTO_INCREMENT=0 DEFAULT CHARSET=" . $easy['charset'] . " DEFAULT COLLATE=" . $easy['collate'] . $easy['row_format'] . ";"; // check if this is a new table that should be added via update SQL if (isset($this->addSQL['adminview']) && ComponentbuilderHelper::checkArray($this->addSQL['adminview']) && in_array($view, $this->addSQL['adminview'])) @@ -6368,6 +6374,12 @@ class Interpretation extends Fields // build the update array $this->updateSQLBuilder["CREATETABLEIFNOTEXISTS`#__" . $component . "_" . $view . "`"] = $db_; } + // check if the table row_format has changed + if (ComponentbuilderHelper::checkString($easy['row_format']) && isset($this->updateSQL['table_row_format']) && isset($this->updateSQL['table_row_format'][$view])) + { + // build the update array + $this->updateSQLBuilder["ALTERTABLE`#__" . $component . "_" . $view . "`" . trim($easy['row_format'])] = "ALTER TABLE `#__" . $component . "_" . $view . "`" . $easy['row_format'] . ";"; + } // check if the table engine has changed if (isset($this->updateSQL['table_engine']) && isset($this->updateSQL['table_engine'][$view])) { diff --git a/admin/language/en-GB/en-GB.com_componentbuilder.ini b/admin/language/en-GB/en-GB.com_componentbuilder.ini index d49e7bcce..584b5e691 100644 --- a/admin/language/en-GB/en-GB.com_componentbuilder.ini +++ b/admin/language/en-GB/en-GB.com_componentbuilder.ini @@ -543,7 +543,7 @@ COM_COMPONENTBUILDER_ADMIN_VIEW_ALIAS_BUILDER_TYPE="Alias Builder Type" COM_COMPONENTBUILDER_ADMIN_VIEW_ALIAS_BUILDER_TYPE_DESCRIPTION="How should the alias be build for this view" COM_COMPONENTBUILDER_ADMIN_VIEW_ALIAS_BUILDER_TYPE_LABEL="Alias Builder Type" COM_COMPONENTBUILDER_ADMIN_VIEW_ALNUM="ALNUM" -COM_COMPONENTBUILDER_ADMIN_VIEW_ARCHIVE="ARCHIVE" +COM_COMPONENTBUILDER_ADMIN_VIEW_ARCHIVE="Archive" COM_COMPONENTBUILDER_ADMIN_VIEW_ARMSCIIEIGHT_ARMSCIIEIGHT_ARMENIAN_MOST_SUITABLE_COLLATION_ARMSCIIEIGHT_GENERAL_CI="armscii8 - ARMSCII-8 Armenian (most suitable collation = armscii8_general_ci)" COM_COMPONENTBUILDER_ADMIN_VIEW_ARMSCIIEIGHT_BIN_CHARSET_ARMSCIIEIGHT="armscii8_bin (charset = armscii8)" COM_COMPONENTBUILDER_ADMIN_VIEW_ARMSCIIEIGHT_GENERAL_CI_CHARSET_ARMSCIIEIGHT="armscii8_general_ci (charset = armscii8)" @@ -610,7 +610,9 @@ COM_COMPONENTBUILDER_ADMIN_VIEW_COG="Cog" COM_COMPONENTBUILDER_ADMIN_VIEW_COGS="Cogs" COM_COMPONENTBUILDER_ADMIN_VIEW_COMMENT="Comment" COM_COMPONENTBUILDER_ADMIN_VIEW_COMMENTS_TWO="Comments 2" +COM_COMPONENTBUILDER_ADMIN_VIEW_COMPACT="COMPACT" COM_COMPONENTBUILDER_ADMIN_VIEW_COMPASS="Compass" +COM_COMPONENTBUILDER_ADMIN_VIEW_COMPRESSED="COMPRESSED" COM_COMPONENTBUILDER_ADMIN_VIEW_CONTRACT="Contract" COM_COMPONENTBUILDER_ADMIN_VIEW_CONTRACT_TWO="Contract 2" COM_COMPONENTBUILDER_ADMIN_VIEW_CORECREATE="core.create" @@ -685,6 +687,7 @@ COM_COMPONENTBUILDER_ADMIN_VIEW_DESCRIPTION_LABEL="Description" COM_COMPONENTBUILDER_ADMIN_VIEW_DETAILS="Details" COM_COMPONENTBUILDER_ADMIN_VIEW_DOWNLOAD="Download" COM_COMPONENTBUILDER_ADMIN_VIEW_DUMP="Dump" +COM_COMPONENTBUILDER_ADMIN_VIEW_DYNAMIC="DYNAMIC" COM_COMPONENTBUILDER_ADMIN_VIEW_EDIT="Editing the Admin View" COM_COMPONENTBUILDER_ADMIN_VIEW_ENTER="Enter" COM_COMPONENTBUILDER_ADMIN_VIEW_ENVELOPE="Envelope" @@ -890,6 +893,9 @@ COM_COMPONENTBUILDER_ADMIN_VIEW_MYSQL_TABLE_COLLATE_LABEL="mySql Table Collation COM_COMPONENTBUILDER_ADMIN_VIEW_MYSQL_TABLE_ENGINE="Mysql Table Engine" COM_COMPONENTBUILDER_ADMIN_VIEW_MYSQL_TABLE_ENGINE_DESCRIPTION="Select the mySql Table Engine you would like to use for this admin view's table." COM_COMPONENTBUILDER_ADMIN_VIEW_MYSQL_TABLE_ENGINE_LABEL="mySql Table Engines" +COM_COMPONENTBUILDER_ADMIN_VIEW_MYSQL_TABLE_ROW_FORMAT="Mysql Table Row Format" +COM_COMPONENTBUILDER_ADMIN_VIEW_MYSQL_TABLE_ROW_FORMAT_DESCRIPTION="The row format of a table determines how its rows are physically stored, which in turn can affect the performance of queries and DML operations." +COM_COMPONENTBUILDER_ADMIN_VIEW_MYSQL_TABLE_ROW_FORMAT_LABEL="mySql Table Row Format" COM_COMPONENTBUILDER_ADMIN_VIEW_NAME_DESCRIPTION="Enter Name Here" COM_COMPONENTBUILDER_ADMIN_VIEW_NAME_HINT="Name Here" COM_COMPONENTBUILDER_ADMIN_VIEW_NAME_LABEL="Name" @@ -1074,6 +1080,7 @@ COM_COMPONENTBUILDER_ADMIN_VIEW_RADIO_UNCHECKED="Radio Unchecked" COM_COMPONENTBUILDER_ADMIN_VIEW_RAW="RAW" COM_COMPONENTBUILDER_ADMIN_VIEW_READONLY="readonly" COM_COMPONENTBUILDER_ADMIN_VIEW_READWRITE="read/write" +COM_COMPONENTBUILDER_ADMIN_VIEW_REDUNDANT="REDUNDANT" COM_COMPONENTBUILDER_ADMIN_VIEW_REMOVE="Remove" COM_COMPONENTBUILDER_ADMIN_VIEW_REPLY="Reply" COM_COMPONENTBUILDER_ADMIN_VIEW_RUN_EXPANSION_BUTTON_ACCESS="Admin View Run Expansion Button Access" diff --git a/admin/layouts/admin_view/mysql_left.php b/admin/layouts/admin_view/mysql_left.php index 42f2311c6..1605a8cf4 100644 --- a/admin/layouts/admin_view/mysql_left.php +++ b/admin/layouts/admin_view/mysql_left.php @@ -18,6 +18,7 @@ $fields = $displayData->get('fields') ?: array( 'mysql_table_engine', 'mysql_table_charset', 'mysql_table_collate', + 'mysql_table_row_format', 'add_sql', 'source', 'addtables' diff --git a/admin/models/admin_view.php b/admin/models/admin_view.php index ec753ce76..23d4f3099 100644 --- a/admin/models/admin_view.php +++ b/admin/models/admin_view.php @@ -86,58 +86,10 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $item->metadata = $registry->toArray(); } - if (!empty($item->php_batchcopy)) + if (!empty($item->php_import_headers)) { - // base64 Decode php_batchcopy. - $item->php_batchcopy = base64_decode($item->php_batchcopy); - } - - if (!empty($item->php_allowadd)) - { - // base64 Decode php_allowadd. - $item->php_allowadd = base64_decode($item->php_allowadd); - } - - if (!empty($item->php_save)) - { - // base64 Decode php_save. - $item->php_save = base64_decode($item->php_save); - } - - if (!empty($item->php_getform)) - { - // base64 Decode php_getform. - $item->php_getform = base64_decode($item->php_getform); - } - - if (!empty($item->php_getitems_after_all)) - { - // base64 Decode php_getitems_after_all. - $item->php_getitems_after_all = base64_decode($item->php_getitems_after_all); - } - - if (!empty($item->php_import_save)) - { - // base64 Decode php_import_save. - $item->php_import_save = base64_decode($item->php_import_save); - } - - if (!empty($item->php_document)) - { - // base64 Decode php_document. - $item->php_document = base64_decode($item->php_document); - } - - if (!empty($item->php_before_publish)) - { - // base64 Decode php_before_publish. - $item->php_before_publish = base64_decode($item->php_before_publish); - } - - if (!empty($item->php_before_delete)) - { - // base64 Decode php_before_delete. - $item->php_before_delete = base64_decode($item->php_before_delete); + // base64 Decode php_import_headers. + $item->php_import_headers = base64_decode($item->php_import_headers); } if (!empty($item->html_import_view)) @@ -146,96 +98,144 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $item->html_import_view = base64_decode($item->html_import_view); } + if (!empty($item->php_import_save)) + { + // base64 Decode php_import_save. + $item->php_import_save = base64_decode($item->php_import_save); + } + if (!empty($item->php_getitems)) { // base64 Decode php_getitems. $item->php_getitems = base64_decode($item->php_getitems); } + if (!empty($item->php_getitems_after_all)) + { + // base64 Decode php_getitems_after_all. + $item->php_getitems_after_all = base64_decode($item->php_getitems_after_all); + } + if (!empty($item->php_getlistquery)) { // base64 Decode php_getlistquery. $item->php_getlistquery = base64_decode($item->php_getlistquery); } - if (!empty($item->php_before_save)) - { - // base64 Decode php_before_save. - $item->php_before_save = base64_decode($item->php_before_save); - } - - if (!empty($item->php_postsavehook)) - { - // base64 Decode php_postsavehook. - $item->php_postsavehook = base64_decode($item->php_postsavehook); - } - - if (!empty($item->php_allowedit)) - { - // base64 Decode php_allowedit. - $item->php_allowedit = base64_decode($item->php_allowedit); - } - - if (!empty($item->php_batchmove)) - { - // base64 Decode php_batchmove. - $item->php_batchmove = base64_decode($item->php_batchmove); - } - - if (!empty($item->php_after_publish)) - { - // base64 Decode php_after_publish. - $item->php_after_publish = base64_decode($item->php_after_publish); - } - - if (!empty($item->php_after_delete)) - { - // base64 Decode php_after_delete. - $item->php_after_delete = base64_decode($item->php_after_delete); - } - - if (!empty($item->php_import_headers)) - { - // base64 Decode php_import_headers. - $item->php_import_headers = base64_decode($item->php_import_headers); - } - if (!empty($item->css_view)) { // base64 Decode css_view. $item->css_view = base64_decode($item->css_view); } + if (!empty($item->php_getform)) + { + // base64 Decode php_getform. + $item->php_getform = base64_decode($item->php_getform); + } + + if (!empty($item->php_before_save)) + { + // base64 Decode php_before_save. + $item->php_before_save = base64_decode($item->php_before_save); + } + if (!empty($item->css_views)) { // base64 Decode css_views. $item->css_views = base64_decode($item->css_views); } + if (!empty($item->php_save)) + { + // base64 Decode php_save. + $item->php_save = base64_decode($item->php_save); + } + + if (!empty($item->php_postsavehook)) + { + // base64 Decode php_postsavehook. + $item->php_postsavehook = base64_decode($item->php_postsavehook); + } + if (!empty($item->javascript_view_file)) { // base64 Decode javascript_view_file. $item->javascript_view_file = base64_decode($item->javascript_view_file); } + if (!empty($item->php_allowadd)) + { + // base64 Decode php_allowadd. + $item->php_allowadd = base64_decode($item->php_allowadd); + } + + if (!empty($item->php_allowedit)) + { + // base64 Decode php_allowedit. + $item->php_allowedit = base64_decode($item->php_allowedit); + } + if (!empty($item->javascript_view_footer)) { // base64 Decode javascript_view_footer. $item->javascript_view_footer = base64_decode($item->javascript_view_footer); } + if (!empty($item->php_batchcopy)) + { + // base64 Decode php_batchcopy. + $item->php_batchcopy = base64_decode($item->php_batchcopy); + } + + if (!empty($item->php_batchmove)) + { + // base64 Decode php_batchmove. + $item->php_batchmove = base64_decode($item->php_batchmove); + } + if (!empty($item->javascript_views_file)) { // base64 Decode javascript_views_file. $item->javascript_views_file = base64_decode($item->javascript_views_file); } + if (!empty($item->php_before_publish)) + { + // base64 Decode php_before_publish. + $item->php_before_publish = base64_decode($item->php_before_publish); + } + + if (!empty($item->php_after_publish)) + { + // base64 Decode php_after_publish. + $item->php_after_publish = base64_decode($item->php_after_publish); + } + if (!empty($item->javascript_views_footer)) { // base64 Decode javascript_views_footer. $item->javascript_views_footer = base64_decode($item->javascript_views_footer); } + if (!empty($item->php_before_delete)) + { + // base64 Decode php_before_delete. + $item->php_before_delete = base64_decode($item->php_before_delete); + } + + if (!empty($item->php_after_delete)) + { + // base64 Decode php_after_delete. + $item->php_after_delete = base64_decode($item->php_after_delete); + } + + if (!empty($item->php_document)) + { + // base64 Decode php_document. + $item->php_document = base64_decode($item->php_document); + } + if (!empty($item->php_controller)) { // base64 Decode php_controller. @@ -302,6 +302,14 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $item->php_import_ext = base64_decode($item->php_import_ext); } + if (!empty($item->addtables)) + { + // Convert the addtables field to an array. + $addtables = new Registry; + $addtables->loadString($item->addtables); + $item->addtables = $addtables->toArray(); + } + if (!empty($item->addpermissions)) { // Convert the addpermissions field to an array. @@ -326,14 +334,6 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $item->addlinked_views = $addlinked_views->toArray(); } - if (!empty($item->addtables)) - { - // Convert the addtables field to an array. - $addtables = new Registry; - $addtables->loadString($item->addtables); - $item->addtables = $addtables->toArray(); - } - if (!empty($item->alias_builder)) { // Convert the alias_builder field to an array. @@ -1222,6 +1222,19 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $data['system_name'] = $data['name_single']; } + // Set the addtables items to data. + if (isset($data['addtables']) && is_array($data['addtables'])) + { + $addtables = new JRegistry; + $addtables->loadArray($data['addtables']); + $data['addtables'] = (string) $addtables; + } + elseif (!isset($data['addtables'])) + { + // Set the empty addtables to data + $data['addtables'] = ''; + } + // Set the addpermissions items to data. if (isset($data['addpermissions']) && is_array($data['addpermissions'])) { @@ -1261,19 +1274,6 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $data['addlinked_views'] = ''; } - // Set the addtables items to data. - if (isset($data['addtables']) && is_array($data['addtables'])) - { - $addtables = new JRegistry; - $addtables->loadArray($data['addtables']); - $data['addtables'] = (string) $addtables; - } - elseif (!isset($data['addtables'])) - { - // Set the empty addtables to data - $data['addtables'] = ''; - } - // Set the alias_builder items to data. if (isset($data['alias_builder']) && is_array($data['alias_builder'])) { @@ -1313,58 +1313,10 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $data['ajax_input'] = ''; } - // Set the php_batchcopy string to base64 string. - if (isset($data['php_batchcopy'])) + // Set the php_import_headers string to base64 string. + if (isset($data['php_import_headers'])) { - $data['php_batchcopy'] = base64_encode($data['php_batchcopy']); - } - - // Set the php_allowadd string to base64 string. - if (isset($data['php_allowadd'])) - { - $data['php_allowadd'] = base64_encode($data['php_allowadd']); - } - - // Set the php_save string to base64 string. - if (isset($data['php_save'])) - { - $data['php_save'] = base64_encode($data['php_save']); - } - - // Set the php_getform string to base64 string. - if (isset($data['php_getform'])) - { - $data['php_getform'] = base64_encode($data['php_getform']); - } - - // Set the php_getitems_after_all string to base64 string. - if (isset($data['php_getitems_after_all'])) - { - $data['php_getitems_after_all'] = base64_encode($data['php_getitems_after_all']); - } - - // Set the php_import_save string to base64 string. - if (isset($data['php_import_save'])) - { - $data['php_import_save'] = base64_encode($data['php_import_save']); - } - - // Set the php_document string to base64 string. - if (isset($data['php_document'])) - { - $data['php_document'] = base64_encode($data['php_document']); - } - - // Set the php_before_publish string to base64 string. - if (isset($data['php_before_publish'])) - { - $data['php_before_publish'] = base64_encode($data['php_before_publish']); - } - - // Set the php_before_delete string to base64 string. - if (isset($data['php_before_delete'])) - { - $data['php_before_delete'] = base64_encode($data['php_before_delete']); + $data['php_import_headers'] = base64_encode($data['php_import_headers']); } // Set the html_import_view string to base64 string. @@ -1373,96 +1325,144 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin $data['html_import_view'] = base64_encode($data['html_import_view']); } + // Set the php_import_save string to base64 string. + if (isset($data['php_import_save'])) + { + $data['php_import_save'] = base64_encode($data['php_import_save']); + } + // Set the php_getitems string to base64 string. if (isset($data['php_getitems'])) { $data['php_getitems'] = base64_encode($data['php_getitems']); } + // Set the php_getitems_after_all string to base64 string. + if (isset($data['php_getitems_after_all'])) + { + $data['php_getitems_after_all'] = base64_encode($data['php_getitems_after_all']); + } + // Set the php_getlistquery string to base64 string. if (isset($data['php_getlistquery'])) { $data['php_getlistquery'] = base64_encode($data['php_getlistquery']); } - // Set the php_before_save string to base64 string. - if (isset($data['php_before_save'])) - { - $data['php_before_save'] = base64_encode($data['php_before_save']); - } - - // Set the php_postsavehook string to base64 string. - if (isset($data['php_postsavehook'])) - { - $data['php_postsavehook'] = base64_encode($data['php_postsavehook']); - } - - // Set the php_allowedit string to base64 string. - if (isset($data['php_allowedit'])) - { - $data['php_allowedit'] = base64_encode($data['php_allowedit']); - } - - // Set the php_batchmove string to base64 string. - if (isset($data['php_batchmove'])) - { - $data['php_batchmove'] = base64_encode($data['php_batchmove']); - } - - // Set the php_after_publish string to base64 string. - if (isset($data['php_after_publish'])) - { - $data['php_after_publish'] = base64_encode($data['php_after_publish']); - } - - // Set the php_after_delete string to base64 string. - if (isset($data['php_after_delete'])) - { - $data['php_after_delete'] = base64_encode($data['php_after_delete']); - } - - // Set the php_import_headers string to base64 string. - if (isset($data['php_import_headers'])) - { - $data['php_import_headers'] = base64_encode($data['php_import_headers']); - } - // Set the css_view string to base64 string. if (isset($data['css_view'])) { $data['css_view'] = base64_encode($data['css_view']); } + // Set the php_getform string to base64 string. + if (isset($data['php_getform'])) + { + $data['php_getform'] = base64_encode($data['php_getform']); + } + + // Set the php_before_save string to base64 string. + if (isset($data['php_before_save'])) + { + $data['php_before_save'] = base64_encode($data['php_before_save']); + } + // Set the css_views string to base64 string. if (isset($data['css_views'])) { $data['css_views'] = base64_encode($data['css_views']); } + // Set the php_save string to base64 string. + if (isset($data['php_save'])) + { + $data['php_save'] = base64_encode($data['php_save']); + } + + // Set the php_postsavehook string to base64 string. + if (isset($data['php_postsavehook'])) + { + $data['php_postsavehook'] = base64_encode($data['php_postsavehook']); + } + // Set the javascript_view_file string to base64 string. if (isset($data['javascript_view_file'])) { $data['javascript_view_file'] = base64_encode($data['javascript_view_file']); } + // Set the php_allowadd string to base64 string. + if (isset($data['php_allowadd'])) + { + $data['php_allowadd'] = base64_encode($data['php_allowadd']); + } + + // Set the php_allowedit string to base64 string. + if (isset($data['php_allowedit'])) + { + $data['php_allowedit'] = base64_encode($data['php_allowedit']); + } + // Set the javascript_view_footer string to base64 string. if (isset($data['javascript_view_footer'])) { $data['javascript_view_footer'] = base64_encode($data['javascript_view_footer']); } + // Set the php_batchcopy string to base64 string. + if (isset($data['php_batchcopy'])) + { + $data['php_batchcopy'] = base64_encode($data['php_batchcopy']); + } + + // Set the php_batchmove string to base64 string. + if (isset($data['php_batchmove'])) + { + $data['php_batchmove'] = base64_encode($data['php_batchmove']); + } + // Set the javascript_views_file string to base64 string. if (isset($data['javascript_views_file'])) { $data['javascript_views_file'] = base64_encode($data['javascript_views_file']); } + // Set the php_before_publish string to base64 string. + if (isset($data['php_before_publish'])) + { + $data['php_before_publish'] = base64_encode($data['php_before_publish']); + } + + // Set the php_after_publish string to base64 string. + if (isset($data['php_after_publish'])) + { + $data['php_after_publish'] = base64_encode($data['php_after_publish']); + } + // Set the javascript_views_footer string to base64 string. if (isset($data['javascript_views_footer'])) { $data['javascript_views_footer'] = base64_encode($data['javascript_views_footer']); } + // Set the php_before_delete string to base64 string. + if (isset($data['php_before_delete'])) + { + $data['php_before_delete'] = base64_encode($data['php_before_delete']); + } + + // Set the php_after_delete string to base64 string. + if (isset($data['php_after_delete'])) + { + $data['php_after_delete'] = base64_encode($data['php_after_delete']); + } + + // Set the php_document string to base64 string. + if (isset($data['php_document'])) + { + $data['php_document'] = base64_encode($data['php_document']); + } + // Set the php_controller string to base64 string. if (isset($data['php_controller'])) { diff --git a/admin/models/admin_views.php b/admin/models/admin_views.php index b4863f8d2..7866d122f 100644 --- a/admin/models/admin_views.php +++ b/admin/models/admin_views.php @@ -376,56 +376,56 @@ class ComponentbuilderModelAdmin_views extends JModelList continue; } - // decode php_batchcopy - $item->php_batchcopy = base64_decode($item->php_batchcopy); - // decode php_allowadd - $item->php_allowadd = base64_decode($item->php_allowadd); - // decode php_save - $item->php_save = base64_decode($item->php_save); - // decode php_getform - $item->php_getform = base64_decode($item->php_getform); - // decode php_getitems_after_all - $item->php_getitems_after_all = base64_decode($item->php_getitems_after_all); - // decode php_import_save - $item->php_import_save = base64_decode($item->php_import_save); - // decode php_document - $item->php_document = base64_decode($item->php_document); - // decode php_before_publish - $item->php_before_publish = base64_decode($item->php_before_publish); - // decode php_before_delete - $item->php_before_delete = base64_decode($item->php_before_delete); - // decode html_import_view - $item->html_import_view = base64_decode($item->html_import_view); - // decode php_getitems - $item->php_getitems = base64_decode($item->php_getitems); - // decode php_getlistquery - $item->php_getlistquery = base64_decode($item->php_getlistquery); - // decode php_before_save - $item->php_before_save = base64_decode($item->php_before_save); - // decode php_postsavehook - $item->php_postsavehook = base64_decode($item->php_postsavehook); - // decode php_allowedit - $item->php_allowedit = base64_decode($item->php_allowedit); - // decode php_batchmove - $item->php_batchmove = base64_decode($item->php_batchmove); - // decode php_after_publish - $item->php_after_publish = base64_decode($item->php_after_publish); - // decode php_after_delete - $item->php_after_delete = base64_decode($item->php_after_delete); // decode php_import_headers $item->php_import_headers = base64_decode($item->php_import_headers); + // decode html_import_view + $item->html_import_view = base64_decode($item->html_import_view); + // decode php_import_save + $item->php_import_save = base64_decode($item->php_import_save); + // decode php_getitems + $item->php_getitems = base64_decode($item->php_getitems); + // decode php_getitems_after_all + $item->php_getitems_after_all = base64_decode($item->php_getitems_after_all); + // decode php_getlistquery + $item->php_getlistquery = base64_decode($item->php_getlistquery); // decode css_view $item->css_view = base64_decode($item->css_view); + // decode php_getform + $item->php_getform = base64_decode($item->php_getform); + // decode php_before_save + $item->php_before_save = base64_decode($item->php_before_save); // decode css_views $item->css_views = base64_decode($item->css_views); + // decode php_save + $item->php_save = base64_decode($item->php_save); + // decode php_postsavehook + $item->php_postsavehook = base64_decode($item->php_postsavehook); // decode javascript_view_file $item->javascript_view_file = base64_decode($item->javascript_view_file); + // decode php_allowadd + $item->php_allowadd = base64_decode($item->php_allowadd); + // decode php_allowedit + $item->php_allowedit = base64_decode($item->php_allowedit); // decode javascript_view_footer $item->javascript_view_footer = base64_decode($item->javascript_view_footer); + // decode php_batchcopy + $item->php_batchcopy = base64_decode($item->php_batchcopy); + // decode php_batchmove + $item->php_batchmove = base64_decode($item->php_batchmove); // decode javascript_views_file $item->javascript_views_file = base64_decode($item->javascript_views_file); + // decode php_before_publish + $item->php_before_publish = base64_decode($item->php_before_publish); + // decode php_after_publish + $item->php_after_publish = base64_decode($item->php_after_publish); // decode javascript_views_footer $item->javascript_views_footer = base64_decode($item->javascript_views_footer); + // decode php_before_delete + $item->php_before_delete = base64_decode($item->php_before_delete); + // decode php_after_delete + $item->php_after_delete = base64_decode($item->php_after_delete); + // decode php_document + $item->php_document = base64_decode($item->php_document); // decode php_controller $item->php_controller = base64_decode($item->php_controller); // decode php_model diff --git a/admin/models/forms/admin_view.xml b/admin/models/forms/admin_view.xml index a6ca0cccf..0088e9d61 100644 --- a/admin/models/forms/admin_view.xml +++ b/admin/models/forms/admin_view.xml @@ -129,104 +129,76 @@ message="COM_COMPONENTBUILDER_ADMIN_VIEW_SHORT_DESCRIPTION_MESSAGE" hint="COM_COMPONENTBUILDER_ADMIN_VIEW_SHORT_DESCRIPTION_HINT" /> - + - + type="radio" + name="add_php_batchcopy" + label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_BATCHCOPY_LABEL" + class="btn-group btn-group-yesno" + default="0" + required="true"> + + + + + - + type="radio" + name="add_php_allowadd" + label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_ALLOWADD_LABEL" + class="btn-group btn-group-yesno" + default="0" + required="true"> + + + + + - + type="radio" + name="add_php_save" + label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_SAVE_LABEL" + class="btn-group btn-group-yesno" + default="0" + required="true"> + + + + + - + type="radio" + name="add_php_getform" + label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_GETFORM_LABEL" + class="btn-group btn-group-yesno" + default="0" + required="true"> + + + + + - - + type="radio" + name="add_php_getitems_after_all" + label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_GETITEMS_AFTER_ALL_LABEL" + class="btn-group btn-group-yesno" + default="0" + required="true"> + + + + - + + type="radio" + name="add_php_document" + label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_DOCUMENT_LABEL" + class="btn-group btn-group-yesno" + default="0" + required="true"> + + + + @@ -296,42 +265,542 @@ description="COM_COMPONENTBUILDER_ADMIN_VIEW_ICON_ADD_DESCRIPTION" directory="" /> - + - - - + type="radio" + name="add_php_before_publish" + label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_BEFORE_PUBLISH_LABEL" + class="btn-group btn-group-yesno" + default="0" + required="true"> + + + + + +