";
- $script['view'][] = "\t";
- $script['view'][] = "\t\t
";
- $script['view'][] = "\t";
- $script['view'][] = "";
- $script['view'][] = "\n\thasPackage && ###-#-#-Component###Helper::checkArray(\$this->headerList) && ###-#-#-Component###Helper::checkArray(\$this->headers)) : ?>";
- $script['view'][] = "\t\t
";
- $script['view'][] = "\t\t
";
- $script['view'][] = "\t";
- $script['view'][] = "\t\t 'upload')); ?>";
- $script['view'][] = "\t\t";
- $script['view'][] = "\t\t";
- $script['view'][] = "\t\t\t
";
- $script['view'][] = "\t\t";
- $script['view'][] = "\t\t";
- $script['view'][] = "\t\t";
- $script['view'][] = "\t\t\t
";
- $script['view'][] = "\t\t";
- $script['view'][] = "";
- $script['view'][] = "\n\t\t";
- $script['view'][] = "\t\t\t
";
- $script['view'][] = "\t\t";
- $script['view'][] = "\t\t";
- $script['view'][] = "\t\t
";
- $script['view'][] = "\t";
- $script['view'][] = "\t
";
- $script['view'][] = "\t";
- $script['view'][] = "";
- $script['view'][] = "
";
- }
- elseif ('import' == $type)
- {
- $script['import'] = array();
- $script['import'][] = "\t/**";
- $script['import'][] = "\t * Import an spreadsheet from either folder, url or upload.";
- $script['import'][] = "\t *";
- $script['import'][] = "\t * @return boolean result of import";
- $script['import'][] = "\t *";
- $script['import'][] = "\t */";
- $script['import'][] = "\tpublic function import()";
- $script['import'][] = "\t{";
- $script['import'][] = "\t\t\$this->setState('action', 'import');";
- $script['import'][] = "\t\t\$app \t\t= JFactory::getApplication();";
- $script['import'][] = "\t\t\$session \t= JFactory::getSession();";
- $script['import'][] = "\t\t\$package \t= null;";
- $script['import'][] = "\t\t\$continue\t= false;";
- $script['import'][] = "\t\t// get import type";
- $script['import'][] = "\t\t\$this->getType = \$app->input->getString('gettype', NULL);";
- $script['import'][] = "\t\t// get import type";
- $script['import'][] = "\t\t\$this->dataType\t= \$session->get('dataType_VDM_IMPORTINTO', NULL);";
- $script['import'][] = "\n\t\tif (\$package === null)";
- $script['import'][] = "\t\t{";
- $script['import'][] = "\t\t\tswitch (\$this->getType)";
- $script['import'][] = "\t\t\t{";
- $script['import'][] = "\t\t\t\tcase 'folder':";
- $script['import'][] = "\t\t\t\t\t// Remember the 'Import from Directory' path.";
- $script['import'][] = "\t\t\t\t\t\$app->getUserStateFromRequest(\$this->_context . '.import_directory', 'import_directory');";
- $script['import'][] = "\t\t\t\t\t\$package = \$this->_getPackageFromFolder();";
- $script['import'][] = "\t\t\t\t\tbreak;";
- $script['import'][] = "\n\t\t\t\tcase 'upload':";
- $script['import'][] = "\t\t\t\t\t\$package = \$this->_getPackageFromUpload();";
- $script['import'][] = "\t\t\t\t\tbreak;";
- $script['import'][] = "\n\t\t\t\tcase 'url':";
- $script['import'][] = "\t\t\t\t\t\$package = \$this->_getPackageFromUrl();";
- $script['import'][] = "\t\t\t\t\tbreak;";
- $script['import'][] = "\n\t\t\t\tcase 'continue':";
- $script['import'][] = "\t\t\t\t\t\$continue \t= true;";
- $script['import'][] = "\t\t\t\t\t\$package\t= \$session->get('package', null);";
- $script['import'][] = "\t\t\t\t\t\$package\t= json_decode(\$package, true);";
- $script['import'][] = "\t\t\t\t\t// clear session";
- $script['import'][] = "\t\t\t\t\t\$session->clear('package');";
- $script['import'][] = "\t\t\t\t\t\$session->clear('dataType');";
- $script['import'][] = "\t\t\t\t\t\$session->clear('hasPackage');";
- $script['import'][] = "\t\t\t\t\tbreak;";
- $script['import'][] = "\n\t\t\t\tdefault:";
- $script['import'][] = "\t\t\t\t\t\$app->setUserState('com_###-#-#-component###.message', JTe-#-#-xt::_('COM_###-#-#-COMPONENT###_IMPORT_NO_IMPORT_TYPE_FOUND'));";
- $script['import'][] = "\n\t\t\t\t\treturn false;";
- $script['import'][] = "\t\t\t\t\tbreak;";
- $script['import'][] = "\t\t\t}";
- $script['import'][] = "\t\t}";
- $script['import'][] = "\t\t// Was the package valid?";
- $script['import'][] = "\t\tif (!\$package || !\$package['type'])";
- $script['import'][] = "\t\t{";
- $script['import'][] = "\t\t\tif (in_array(\$this->getType, array('upload', 'url')))";
- $script['import'][] = "\t\t\t{";
- $script['import'][] = "\t\t\t\t\$this->remove(\$package['packagename']);";
- $script['import'][] = "\t\t\t}";
- $script['import'][] = "\n\t\t\t\$app->setUserState('com_###-#-#-component###.message', JTe-#-#-xt::_('COM_###-#-#-COMPONENT###_IMPORT_UNABLE_TO_FIND_IMPORT_PACKAGE'));";
- $script['import'][] = "\t\t\treturn false;";
- $script['import'][] = "\t\t}";
- $script['import'][] = "\t\t";
- $script['import'][] = "\t\t// first link data to table headers";
- $script['import'][] = "\t\tif(!\$continue){";
- $script['import'][] = "\t\t\t\$package\t= json_encode(\$package);";
- $script['import'][] = "\t\t\t\$session->set('package', \$package);";
- $script['import'][] = "\t\t\t\$session->set('dataType', \$this->dataType);";
- $script['import'][] = "\t\t\t\$session->set('hasPackage', true);";
- $script['import'][] = "\t\t\treturn true;";
- $script['import'][] = "\t\t}";
- $script['import'][] = "\t\t// set the data";
- $script['import'][] = "\t\t\$headerList = json_decode(\$session->get(\$this->dataType.'_VDM_IMPORTHEADERS', false), true);";
- $script['import'][] = "\t\tif (!\$this->setData(\$package,\$this->dataType,\$headerList))";
- $script['import'][] = "\t\t{";
- $script['import'][] = "\t\t\t// There was an error importing the package";
- $script['import'][] = "\t\t\t\$msg = JTe-#-#-xt::_('COM_###-#-#-COMPONENT###_IMPORT_ERROR');";
- $script['import'][] = "\t\t\t\$back = \$session->get('backto_VDM_IMPORT', NULL);";
- $script['import'][] = "\t\t\tif (\$back)";
- $script['import'][] = "\t\t\t{";
- $script['import'][] = "\t\t\t\t\$app->setUserState('com_###-#-#-component###.redirect_url', 'index.php?option=com_###-#-#-component###&view='.\$back);";
- $script['import'][] = "\t\t\t\t\$session->clear('backto_VDM_IMPORT');";
- $script['import'][] = "\t\t\t}";
- $script['import'][] = "\t\t\t\$result = false;";
- $script['import'][] = "\t\t}";
- $script['import'][] = "\t\telse";
- $script['import'][] = "\t\t{";
- $script['import'][] = "\t\t\t// Package imported sucessfully";
- $script['import'][] = "\t\t\t\$msg = JTe-#-#-xt::sprintf('COM_###-#-#-COMPONENT###_IMPORT_SUCCESS', \$package['packagename']);";
- $script['import'][] = "\t\t\t\$back = \$session->get('backto_VDM_IMPORT', NULL);";
- $script['import'][] = "\t\t\tif (\$back)";
- $script['import'][] = "\t\t\t{";
- $script['import'][] = "\t\t\t \$app->setUserState('com_###-#-#-component###.redirect_url', 'index.php?option=com_###-#-#-component###&view='.\$back);";
- $script['import'][] = "\t\t\t \$session->clear('backto_VDM_IMPORT');";
- $script['import'][] = "\t\t\t}";
- $script['import'][] = "\t\t\t\$result = true;";
- $script['import'][] = "\t\t}";
- $script['import'][] = "\n\t\t// Set some model state values";
- $script['import'][] = "\t\t\$app->enqueueMessage(\$msg);";
- $script['import'][] = "\n\t\t// remove file after import";
- $script['import'][] = "\t\t\$this->remove(\$package['packagename']);";
- $script['import'][] = "\t\t\$session->clear(\$this->getType.'_VDM_IMPORTHEADERS');";
- $script['import'][] = "\t\treturn \$result;";
- $script['import'][] = "\t}";
- }
- // return the needed script
- if (isset($script[$type]))
- {
- return str_replace('-#-#-', '', implode("\n",$script[$type]));
- }
- return false;
+ // get from global helper
+ return ComponentbuilderHelper::getImportScripts($type);
}
public function getFieldSelectOptions($id)
diff --git a/admin/models/compiler.php b/admin/models/compiler.php
index bf210d692..4a8bc6572 100644
--- a/admin/models/compiler.php
+++ b/admin/models/compiler.php
@@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 46 of this MVC
- @build 3rd March, 2017
+ @version @update number 47 of this MVC
+ @build 21st March, 2017
@created 1st February, 2017
@package Component Builder
@subpackage compiler.php
diff --git a/admin/models/componentbuilder.php b/admin/models/componentbuilder.php
index 599f400eb..8e95306d9 100644
--- a/admin/models/componentbuilder.php
+++ b/admin/models/componentbuilder.php
@@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version 2.3.7
- @build 20th March, 2017
+ @version 2.3.8
+ @build 27th March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage componentbuilder.php
diff --git a/admin/models/custom_admin_view.php b/admin/models/custom_admin_view.php
index 973222d18..f905edd2b 100644
--- a/admin/models/custom_admin_view.php
+++ b/admin/models/custom_admin_view.php
@@ -179,7 +179,7 @@ class ComponentbuilderModelCustom_admin_view extends JModelAdmin
*
* @return mixed An array of data items on success, false on failure.
*/
- public function getVyglinked_components()
+ public function getVyhlinked_components()
{
// Get the user object.
$user = JFactory::getUser();
diff --git a/admin/models/field.php b/admin/models/field.php
index cbf16e108..be0385610 100644
--- a/admin/models/field.php
+++ b/admin/models/field.php
@@ -141,7 +141,7 @@ class ComponentbuilderModelField extends JModelAdmin
*
* @return mixed An array of data items on success, false on failure.
*/
- public function getVzylinked_admin_views()
+ public function getVzzlinked_admin_views()
{
// Get the user object.
$user = JFactory::getUser();
diff --git a/admin/models/fields/adminviewfolderlist.php b/admin/models/fields/adminviewfolderlist.php
index f64b5dbb6..9bb13caa0 100644
--- a/admin/models/fields/adminviewfolderlist.php
+++ b/admin/models/fields/adminviewfolderlist.php
@@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version 2.3.7
- @build 20th March, 2017
+ @version 2.3.8
+ @build 27th March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage adminviewfolderlist.php
diff --git a/admin/models/fields/adminviews.php b/admin/models/fields/adminviews.php
index f22f7536a..df8c69ead 100644
--- a/admin/models/fields/adminviews.php
+++ b/admin/models/fields/adminviews.php
@@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version 2.3.7
- @build 20th March, 2017
+ @version 2.3.8
+ @build 27th March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage adminviews.php
diff --git a/admin/models/fields/articles.php b/admin/models/fields/articles.php
index 7ce48d2a9..60ba5244c 100644
--- a/admin/models/fields/articles.php
+++ b/admin/models/fields/articles.php
@@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version 2.3.7
- @build 20th March, 2017
+ @version 2.3.8
+ @build 27th March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage articles.php
diff --git a/admin/models/fields/component.php b/admin/models/fields/component.php
index 0123f7049..e93f876e3 100644
--- a/admin/models/fields/component.php
+++ b/admin/models/fields/component.php
@@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version 2.3.7
- @build 20th March, 2017
+ @version 2.3.8
+ @build 27th March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage component.php
diff --git a/admin/models/fields/customadminviews.php b/admin/models/fields/customadminviews.php
index c00cbf0e0..9f40ee66d 100644
--- a/admin/models/fields/customadminviews.php
+++ b/admin/models/fields/customadminviews.php
@@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version 2.3.7
- @build 20th March, 2017
+ @version 2.3.8
+ @build 27th March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage customadminviews.php
diff --git a/admin/models/fields/customfilelist.php b/admin/models/fields/customfilelist.php
index a26130180..bbc89dc28 100644
--- a/admin/models/fields/customfilelist.php
+++ b/admin/models/fields/customfilelist.php
@@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version 2.3.7
- @build 20th March, 2017
+ @version 2.3.8
+ @build 27th March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage customfilelist.php
diff --git a/admin/models/fields/customfolderlist.php b/admin/models/fields/customfolderlist.php
index 4d3114427..bb13d3993 100644
--- a/admin/models/fields/customfolderlist.php
+++ b/admin/models/fields/customfolderlist.php
@@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version 2.3.7
- @build 20th March, 2017
+ @version 2.3.8
+ @build 27th March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage customfolderlist.php
diff --git a/admin/models/fields/customgets.php b/admin/models/fields/customgets.php
index 3dc8da436..ddfc42f8f 100644
--- a/admin/models/fields/customgets.php
+++ b/admin/models/fields/customgets.php
@@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version 2.3.7
- @build 20th March, 2017
+ @version 2.3.8
+ @build 27th March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage customgets.php
diff --git a/admin/models/fields/dbtables.php b/admin/models/fields/dbtables.php
index 06f972240..13e6f7ae3 100644
--- a/admin/models/fields/dbtables.php
+++ b/admin/models/fields/dbtables.php
@@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version 2.3.7
- @build 20th March, 2017
+ @version 2.3.8
+ @build 27th March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage dbtables.php
diff --git a/admin/models/fields/dynamicgets.php b/admin/models/fields/dynamicgets.php
index bf4dbaf58..2126abc1e 100644
--- a/admin/models/fields/dynamicgets.php
+++ b/admin/models/fields/dynamicgets.php
@@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version 2.3.7
- @build 20th March, 2017
+ @version 2.3.8
+ @build 27th March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage dynamicgets.php
diff --git a/admin/models/fields/fields.php b/admin/models/fields/fields.php
index d0420e5c3..b6fe15d21 100644
--- a/admin/models/fields/fields.php
+++ b/admin/models/fields/fields.php
@@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version 2.3.7
- @build 20th March, 2017
+ @version 2.3.8
+ @build 27th March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage fields.php
diff --git a/admin/models/fields/fieldsmulti.php b/admin/models/fields/fieldsmulti.php
index fbfc186fd..f5967da66 100644
--- a/admin/models/fields/fieldsmulti.php
+++ b/admin/models/fields/fieldsmulti.php
@@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version 2.3.7
- @build 20th March, 2017
+ @version 2.3.8
+ @build 27th March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage fieldsmulti.php
diff --git a/admin/models/fields/fieldtypes.php b/admin/models/fields/fieldtypes.php
index 98975e2d5..492d4cc46 100644
--- a/admin/models/fields/fieldtypes.php
+++ b/admin/models/fields/fieldtypes.php
@@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version 2.3.7
- @build 20th March, 2017
+ @version 2.3.8
+ @build 27th March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage fieldtypes.php
diff --git a/admin/models/fields/maingets.php b/admin/models/fields/maingets.php
index d7b3f2ce2..a2bbbb464 100644
--- a/admin/models/fields/maingets.php
+++ b/admin/models/fields/maingets.php
@@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version 2.3.7
- @build 20th March, 2017
+ @version 2.3.8
+ @build 27th March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage maingets.php
diff --git a/admin/models/fields/siteviewfolderlist.php b/admin/models/fields/siteviewfolderlist.php
index c5d751031..d0fe2a4aa 100644
--- a/admin/models/fields/siteviewfolderlist.php
+++ b/admin/models/fields/siteviewfolderlist.php
@@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version 2.3.7
- @build 20th March, 2017
+ @version 2.3.8
+ @build 27th March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage siteviewfolderlist.php
diff --git a/admin/models/fields/siteviews.php b/admin/models/fields/siteviews.php
index 207e55ed1..7eb3431e2 100644
--- a/admin/models/fields/siteviews.php
+++ b/admin/models/fields/siteviews.php
@@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version 2.3.7
- @build 20th March, 2017
+ @version 2.3.8
+ @build 27th March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage siteviews.php
diff --git a/admin/models/fields/snippets.php b/admin/models/fields/snippets.php
index b3c14a5a3..204bf089c 100644
--- a/admin/models/fields/snippets.php
+++ b/admin/models/fields/snippets.php
@@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version 2.3.7
- @build 20th March, 2017
+ @version 2.3.8
+ @build 27th March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage snippets.php
diff --git a/admin/models/fieldtype.php b/admin/models/fieldtype.php
index ed766c54f..ad1ed92b8 100644
--- a/admin/models/fieldtype.php
+++ b/admin/models/fieldtype.php
@@ -111,7 +111,7 @@ class ComponentbuilderModelFieldtype extends JModelAdmin
*
* @return mixed An array of data items on success, false on failure.
*/
- public function getVzzfields()
+ public function getWaafields()
{
// Get the user object.
$user = JFactory::getUser();
@@ -195,13 +195,13 @@ class ComponentbuilderModelFieldtype extends JModelAdmin
foreach ($items as $nr => &$item)
{
// convert datatype
- $item->datatype = $this->selectionTranslationVzzfields($item->datatype, 'datatype');
+ $item->datatype = $this->selectionTranslationWaafields($item->datatype, 'datatype');
// convert indexes
- $item->indexes = $this->selectionTranslationVzzfields($item->indexes, 'indexes');
+ $item->indexes = $this->selectionTranslationWaafields($item->indexes, 'indexes');
// convert null_switch
- $item->null_switch = $this->selectionTranslationVzzfields($item->null_switch, 'null_switch');
+ $item->null_switch = $this->selectionTranslationWaafields($item->null_switch, 'null_switch');
// convert store
- $item->store = $this->selectionTranslationVzzfields($item->store, 'store');
+ $item->store = $this->selectionTranslationWaafields($item->store, 'store');
}
}
@@ -215,7 +215,7 @@ class ComponentbuilderModelFieldtype extends JModelAdmin
*
* @return translatable string
*/
- public function selectionTranslationVzzfields($value,$name)
+ public function selectionTranslationWaafields($value,$name)
{
// Array of datatype language strings
if ($name === 'datatype')
diff --git a/admin/models/forms/admin_view.js b/admin/models/forms/admin_view.js
index 513323382..6af715a49 100644
--- a/admin/models/forms/admin_view.js
+++ b/admin/models/forms/admin_view.js
@@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 104 of this MVC
- @build 6th March, 2017
+ @version @update number 108 of this MVC
+ @build 24th March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage admin_view.js
@@ -51,10 +51,11 @@ jform_vvvvvxwvxn_required = false;
jform_vvvvvxwvxo_required = false;
jform_vvvvvxwvxp_required = false;
jform_vvvvvxwvxq_required = false;
-jform_vvvvvxyvxr_required = false;
+jform_vvvvvxwvxr_required = false;
jform_vvvvvxyvxs_required = false;
jform_vvvvvxyvxt_required = false;
jform_vvvvvxyvxu_required = false;
+jform_vvvvvxyvxv_required = false;
// Initial Script
jQuery(document).ready(function()
@@ -899,34 +900,44 @@ function vvvvvxw(add_custom_import_vvvvvxw)
jform_vvvvvxwvxn_required = false;
}
- jQuery('#jform_php_import').closest('.control-group').show();
+ jQuery('#jform_php_import_ext').closest('.control-group').show();
if (jform_vvvvvxwvxo_required)
+ {
+ updateFieldRequired('php_import_ext',0);
+ jQuery('#jform_php_import_ext').prop('required','required');
+ jQuery('#jform_php_import_ext').attr('aria-required',true);
+ jQuery('#jform_php_import_ext').addClass('required');
+ jform_vvvvvxwvxo_required = false;
+ }
+
+ jQuery('#jform_php_import').closest('.control-group').show();
+ if (jform_vvvvvxwvxp_required)
{
updateFieldRequired('php_import',0);
jQuery('#jform_php_import').prop('required','required');
jQuery('#jform_php_import').attr('aria-required',true);
jQuery('#jform_php_import').addClass('required');
- jform_vvvvvxwvxo_required = false;
+ jform_vvvvvxwvxp_required = false;
}
jQuery('#jform_php_import_save').closest('.control-group').show();
- if (jform_vvvvvxwvxp_required)
+ if (jform_vvvvvxwvxq_required)
{
updateFieldRequired('php_import_save',0);
jQuery('#jform_php_import_save').prop('required','required');
jQuery('#jform_php_import_save').attr('aria-required',true);
jQuery('#jform_php_import_save').addClass('required');
- jform_vvvvvxwvxp_required = false;
+ jform_vvvvvxwvxq_required = false;
}
jQuery('#jform_php_import_setdata').closest('.control-group').show();
- if (jform_vvvvvxwvxq_required)
+ if (jform_vvvvvxwvxr_required)
{
updateFieldRequired('php_import_setdata',0);
jQuery('#jform_php_import_setdata').prop('required','required');
jQuery('#jform_php_import_setdata').attr('aria-required',true);
jQuery('#jform_php_import_setdata').addClass('required');
- jform_vvvvvxwvxq_required = false;
+ jform_vvvvvxwvxr_required = false;
}
}
@@ -951,32 +962,41 @@ function vvvvvxw(add_custom_import_vvvvvxw)
jQuery('#jform_php_import_display').removeClass('required');
jform_vvvvvxwvxn_required = true;
}
- jQuery('#jform_php_import').closest('.control-group').hide();
+ jQuery('#jform_php_import_ext').closest('.control-group').hide();
if (!jform_vvvvvxwvxo_required)
+ {
+ updateFieldRequired('php_import_ext',1);
+ jQuery('#jform_php_import_ext').removeAttr('required');
+ jQuery('#jform_php_import_ext').removeAttr('aria-required');
+ jQuery('#jform_php_import_ext').removeClass('required');
+ jform_vvvvvxwvxo_required = true;
+ }
+ jQuery('#jform_php_import').closest('.control-group').hide();
+ if (!jform_vvvvvxwvxp_required)
{
updateFieldRequired('php_import',1);
jQuery('#jform_php_import').removeAttr('required');
jQuery('#jform_php_import').removeAttr('aria-required');
jQuery('#jform_php_import').removeClass('required');
- jform_vvvvvxwvxo_required = true;
+ jform_vvvvvxwvxp_required = true;
}
jQuery('#jform_php_import_save').closest('.control-group').hide();
- if (!jform_vvvvvxwvxp_required)
+ if (!jform_vvvvvxwvxq_required)
{
updateFieldRequired('php_import_save',1);
jQuery('#jform_php_import_save').removeAttr('required');
jQuery('#jform_php_import_save').removeAttr('aria-required');
jQuery('#jform_php_import_save').removeClass('required');
- jform_vvvvvxwvxp_required = true;
+ jform_vvvvvxwvxq_required = true;
}
jQuery('#jform_php_import_setdata').closest('.control-group').hide();
- if (!jform_vvvvvxwvxq_required)
+ if (!jform_vvvvvxwvxr_required)
{
updateFieldRequired('php_import_setdata',1);
jQuery('#jform_php_import_setdata').removeAttr('required');
jQuery('#jform_php_import_setdata').removeAttr('aria-required');
jQuery('#jform_php_import_setdata').removeClass('required');
- jform_vvvvvxwvxq_required = true;
+ jform_vvvvvxwvxr_required = true;
}
}
}
@@ -1003,43 +1023,43 @@ function vvvvvxy(add_custom_button_vvvvvxy)
{
jQuery('#jform_custom_button').closest('.control-group').show();
jQuery('#jform_php_controller').closest('.control-group').show();
- if (jform_vvvvvxyvxr_required)
+ if (jform_vvvvvxyvxs_required)
{
updateFieldRequired('php_controller',0);
jQuery('#jform_php_controller').prop('required','required');
jQuery('#jform_php_controller').attr('aria-required',true);
jQuery('#jform_php_controller').addClass('required');
- jform_vvvvvxyvxr_required = false;
+ jform_vvvvvxyvxs_required = false;
}
jQuery('#jform_php_controller_list').closest('.control-group').show();
- if (jform_vvvvvxyvxs_required)
+ if (jform_vvvvvxyvxt_required)
{
updateFieldRequired('php_controller_list',0);
jQuery('#jform_php_controller_list').prop('required','required');
jQuery('#jform_php_controller_list').attr('aria-required',true);
jQuery('#jform_php_controller_list').addClass('required');
- jform_vvvvvxyvxs_required = false;
+ jform_vvvvvxyvxt_required = false;
}
jQuery('#jform_php_model').closest('.control-group').show();
- if (jform_vvvvvxyvxt_required)
+ if (jform_vvvvvxyvxu_required)
{
updateFieldRequired('php_model',0);
jQuery('#jform_php_model').prop('required','required');
jQuery('#jform_php_model').attr('aria-required',true);
jQuery('#jform_php_model').addClass('required');
- jform_vvvvvxyvxt_required = false;
+ jform_vvvvvxyvxu_required = false;
}
jQuery('#jform_php_model_list').closest('.control-group').show();
- if (jform_vvvvvxyvxu_required)
+ if (jform_vvvvvxyvxv_required)
{
updateFieldRequired('php_model_list',0);
jQuery('#jform_php_model_list').prop('required','required');
jQuery('#jform_php_model_list').attr('aria-required',true);
jQuery('#jform_php_model_list').addClass('required');
- jform_vvvvvxyvxu_required = false;
+ jform_vvvvvxyvxv_required = false;
}
}
@@ -1047,40 +1067,40 @@ function vvvvvxy(add_custom_button_vvvvvxy)
{
jQuery('#jform_custom_button').closest('.control-group').hide();
jQuery('#jform_php_controller').closest('.control-group').hide();
- if (!jform_vvvvvxyvxr_required)
+ if (!jform_vvvvvxyvxs_required)
{
updateFieldRequired('php_controller',1);
jQuery('#jform_php_controller').removeAttr('required');
jQuery('#jform_php_controller').removeAttr('aria-required');
jQuery('#jform_php_controller').removeClass('required');
- jform_vvvvvxyvxr_required = true;
+ jform_vvvvvxyvxs_required = true;
}
jQuery('#jform_php_controller_list').closest('.control-group').hide();
- if (!jform_vvvvvxyvxs_required)
+ if (!jform_vvvvvxyvxt_required)
{
updateFieldRequired('php_controller_list',1);
jQuery('#jform_php_controller_list').removeAttr('required');
jQuery('#jform_php_controller_list').removeAttr('aria-required');
jQuery('#jform_php_controller_list').removeClass('required');
- jform_vvvvvxyvxs_required = true;
+ jform_vvvvvxyvxt_required = true;
}
jQuery('#jform_php_model').closest('.control-group').hide();
- if (!jform_vvvvvxyvxt_required)
+ if (!jform_vvvvvxyvxu_required)
{
updateFieldRequired('php_model',1);
jQuery('#jform_php_model').removeAttr('required');
jQuery('#jform_php_model').removeAttr('aria-required');
jQuery('#jform_php_model').removeClass('required');
- jform_vvvvvxyvxt_required = true;
+ jform_vvvvvxyvxu_required = true;
}
jQuery('#jform_php_model_list').closest('.control-group').hide();
- if (!jform_vvvvvxyvxu_required)
+ if (!jform_vvvvvxyvxv_required)
{
updateFieldRequired('php_model_list',1);
jQuery('#jform_php_model_list').removeAttr('required');
jQuery('#jform_php_model_list').removeAttr('aria-required');
jQuery('#jform_php_model_list').removeClass('required');
- jform_vvvvvxyvxu_required = true;
+ jform_vvvvvxyvxv_required = true;
}
}
}
@@ -1201,6 +1221,7 @@ function getImportScripts(id){
var current_setdata = jQuery('textarea#jform_php_import_setdata').val();
var current_save = jQuery('textarea#jform_php_import_save').val();
var current_view = jQuery('textarea#jform_html_import_view').val();
+ var current_ext = jQuery('textarea#jform_php_import_ext').val();
// set the display method script
if(current_import_display.length == 0){
getImportScripts_server('display').done(function(result) {
@@ -1241,5 +1262,13 @@ function getImportScripts(id){
}
});
}
+ // set the import ext script
+ if(current_ext.length == 0){
+ getImportScripts_server('ext').done(function(result) {
+ if(result){
+ jQuery('textarea#jform_php_import_ext').val(result);
+ }
+ });
+ }
}
}
diff --git a/admin/models/forms/admin_view.xml b/admin/models/forms/admin_view.xml
index 8ed840ed0..6865450da 100644
--- a/admin/models/forms/admin_view.xml
+++ b/admin/models/forms/admin_view.xml
@@ -149,34 +149,32 @@
message="Error! Please add some short description here."
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_SHORT_DESCRIPTION_HINT"
/>
-
+
-
-
-
-
-
+ type="textarea"
+ name="php_getitems_after_all"
+ label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_GETITEMS_AFTER_ALL_LABEL"
+ rows="30"
+ cols="15"
+ description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_GETITEMS_AFTER_ALL_DESCRIPTION"
+ class="text_area span12"
+ filter="raw"
+ hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_GETITEMS_AFTER_ALL_HINT"
+ required="true"
+ />
+
-
-
-
-
+ type="textarea"
+ name="php_after_publish"
+ label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_AFTER_PUBLISH_LABEL"
+ rows="30"
+ cols="15"
+ description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_AFTER_PUBLISH_DESCRIPTION"
+ class="text_area span12"
+ filter="raw"
+ hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_AFTER_PUBLISH_HINT"
+ required="true"
+ />
COM_COMPONENTBUILDER_ADMIN_VIEW_REMOVE
-
+
-
-
-
-
+ type="textarea"
+ name="php_allowedit"
+ label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_ALLOWEDIT_LABEL"
+ rows="30"
+ cols="15"
+ description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_ALLOWEDIT_DESCRIPTION"
+ class="text_area span12"
+ filter="raw"
+ hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_ALLOWEDIT_HINT"
+ required="true"
+ />
-
+
-
+ COM_COMPONENTBUILDER_ADMIN_VIEW_TABLE
+
-
+
-
-
-
-
+ type="textarea"
+ name="php_save"
+ label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_SAVE_LABEL"
+ rows="30"
+ cols="15"
+ description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_SAVE_DESCRIPTION"
+ class="text_area span12"
+ filter="raw"
+ hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_SAVE_HINT"
+ required="true"
+ />
-
+
-
-
-
-
+ type="textarea"
+ name="php_batchmove"
+ label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BATCHMOVE_LABEL"
+ rows="30"
+ cols="15"
+ description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BATCHMOVE_DESCRIPTION"
+ class="text_area span12"
+ filter="raw"
+ hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BATCHMOVE_HINT"
+ required="true"
+ />
-
+
-
-
-
-
+ type="textarea"
+ name="php_after_delete"
+ label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_AFTER_DELETE_LABEL"
+ rows="30"
+ cols="15"
+ description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_AFTER_DELETE_DESCRIPTION"
+ class="text_area span12"
+ filter="raw"
+ hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_AFTER_DELETE_HINT"
+ required="true"
+ />
-
-
+
+
-
+
-
-
-
-
+ type="textarea"
+ name="php_getitems"
+ label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_GETITEMS_LABEL"
+ rows="30"
+ cols="15"
+ description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_GETITEMS_DESCRIPTION"
+ class="text_area span12"
+ filter="raw"
+ hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_GETITEMS_HINT"
+ required="true"
+ />
-
+
-
-
-
-
+ type="textarea"
+ name="php_getlistquery"
+ label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_GETLISTQUERY_LABEL"
+ rows="30"
+ cols="15"
+ description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_GETLISTQUERY_DESCRIPTION"
+ class="text_area span12"
+ filter="raw"
+ hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_GETLISTQUERY_HINT"
+ required="true"
+ />
-
+
-
-
-
-
+ type="textarea"
+ name="php_postsavehook"
+ label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_POSTSAVEHOOK_LABEL"
+ rows="30"
+ cols="15"
+ description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_POSTSAVEHOOK_DESCRIPTION"
+ class="text_area span12"
+ filter="raw"
+ hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_POSTSAVEHOOK_HINT"
+ required="true"
+ />
-
+
-
-
-
-
+ type="textarea"
+ name="php_batchcopy"
+ label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BATCHCOPY_LABEL"
+ rows="30"
+ cols="15"
+ description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BATCHCOPY_DESCRIPTION"
+ class="text_area span12"
+ filter="raw"
+ hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BATCHCOPY_HINT"
+ required="true"
+ />
-
+
-
-
-
-
+ type="textarea"
+ name="php_before_publish"
+ label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BEFORE_PUBLISH_LABEL"
+ rows="30"
+ cols="15"
+ description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BEFORE_PUBLISH_DESCRIPTION"
+ class="text_area span12"
+ filter="raw"
+ hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BEFORE_PUBLISH_HINT"
+ required="true"
+ />
-
-
-
-
-
-
-
+
-
+
-
-
-
-
+ type="textarea"
+ name="php_import"
+ label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_LABEL"
+ rows="30"
+ cols="15"
+ description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_DESCRIPTION"
+ class="text_area span12"
+ filter="raw"
+ hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_HINT"
+ required="true"
+ />
+
+
COM_COMPONENTBUILDER_ADMIN_VIEW_READONLY
-
+
-
-
-
-
-
+ type="textarea"
+ name="sql"
+ label="COM_COMPONENTBUILDER_ADMIN_VIEW_SQL_LABEL"
+ rows="30"
+ cols="15"
+ description="COM_COMPONENTBUILDER_ADMIN_VIEW_SQL_DESCRIPTION"
+ class="text_area span12"
+ filter="raw"
+ hint="COM_COMPONENTBUILDER_ADMIN_VIEW_SQL_HINT"
+ required="true"
+ />
+
-
-
-
-
-
+ type="textarea"
+ name="php_getitem"
+ label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_GETITEM_LABEL"
+ rows="30"
+ cols="15"
+ description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_GETITEM_DESCRIPTION"
+ class="text_area span12"
+ filter="raw"
+ hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_GETITEM_HINT"
+ required="true"
+ />
+
-
-
-
-
+ type="textarea"
+ name="php_import_display"
+ label="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_DISPLAY_LABEL"
+ rows="30"
+ cols="15"
+ description="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_DISPLAY_DESCRIPTION"
+ class="text_area span12"
+ filter="raw"
+ hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_IMPORT_DISPLAY_HINT"
+ required="true"
+ />
-
+
@@ -1081,6 +1038,20 @@
+
+
+
+
+
+
-
+
+ type="radio"
+ name="add_php_getitems"
+ label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_GETITEMS_LABEL"
+ class="btn-group btn-group-yesno"
+ default="0"
+ required="true">
+
+
+
+
COM_COMPONENTBUILDER_ADMIN_VIEW_NO
-
+
+ type="radio"
+ name="add_php_getitems_after_all"
+ label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_GETITEMS_AFTER_ALL_LABEL"
+ class="btn-group btn-group-yesno"
+ default="0"
+ required="true">
+
+
+
+
-
+
+ type="radio"
+ name="add_php_getlistquery"
+ label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_GETLISTQUERY_LABEL"
+ class="btn-group btn-group-yesno"
+ default="0"
+ required="true">
+
+
+
+
COM_COMPONENTBUILDER_ADMIN_VIEW_NO
-
+
+ type="radio"
+ name="add_php_save"
+ label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_SAVE_LABEL"
+ class="btn-group btn-group-yesno"
+ default="0"
+ required="true">
+
+
+
+
-
+
+ type="radio"
+ name="add_php_postsavehook"
+ label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_POSTSAVEHOOK_LABEL"
+ class="btn-group btn-group-yesno"
+ default="0"
+ required="true">
+
+
+
+
COM_COMPONENTBUILDER_ADMIN_VIEW_NO
-
+
+ type="radio"
+ name="add_php_allowedit"
+ label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_ALLOWEDIT_LABEL"
+ class="btn-group btn-group-yesno"
+ default="0"
+ required="true">
+
+
+
+
-
+
+ type="radio"
+ name="add_php_batchcopy"
+ label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_BATCHCOPY_LABEL"
+ class="btn-group btn-group-yesno"
+ default="0"
+ required="true">
+
+
+
+
COM_COMPONENTBUILDER_ADMIN_VIEW_NO
-
+
+ type="radio"
+ name="add_php_batchmove"
+ label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_BATCHMOVE_LABEL"
+ class="btn-group btn-group-yesno"
+ default="0"
+ required="true">
+
+
+
+
-
+
+ type="radio"
+ name="add_php_before_publish"
+ label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_BEFORE_PUBLISH_LABEL"
+ class="btn-group btn-group-yesno"
+ default="0"
+ required="true">
+
+
+
+
COM_COMPONENTBUILDER_ADMIN_VIEW_NO
-
+
+ type="radio"
+ name="add_php_after_publish"
+ label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_AFTER_PUBLISH_LABEL"
+ class="btn-group btn-group-yesno"
+ default="0"
+ required="true">
+
+
+
+
-
+
+ type="radio"
+ name="add_php_before_delete"
+ label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_BEFORE_DELETE_LABEL"
+ class="btn-group btn-group-yesno"
+ default="0"
+ required="true">
+
+
+
+
COM_COMPONENTBUILDER_ADMIN_VIEW_NO
-
+
+ type="radio"
+ name="add_php_after_delete"
+ label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_AFTER_DELETE_LABEL"
+ class="btn-group btn-group-yesno"
+ default="0"
+ required="true">
+
+
+
+
-
+
+ type="radio"
+ name="add_php_document"
+ label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_DOCUMENT_LABEL"
+ class="btn-group btn-group-yesno"
+ default="0"
+ required="true">
+
+
+
+
-
+
+ type="radio"
+ name="add_sql"
+ label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_SQL_LABEL"
+ class="btn-group btn-group-yesno"
+ default="0"
+ required="true">
+
+
+
+
-
+
-
-
-
+ type="repeatable"
+ name="addtables"
+ label="COM_COMPONENTBUILDER_ADMIN_VIEW_ADDTABLES_LABEL"
+ id="addtables"
+ class="addtable"
+ select="COM_COMPONENTBUILDER_ADMIN_VIEW_ADDTABLES_SELECT"
+ icon="list"
+ maximum="50">
+
+
+
-
-
+
+
-
-
+
+
+
+
+
+
COM_COMPONENTBUILDER_ADMIN_VIEW_NO
-
+
@@ -2039,17 +2052,17 @@
hint="COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_AJAXMETHOD_HINT"
required="true"
/>
-
+
@@ -2190,17 +2203,17 @@
-
+
diff --git a/admin/models/forms/custom_admin_view.js b/admin/models/forms/custom_admin_view.js
index 4032c3c19..7fa707405 100644
--- a/admin/models/forms/custom_admin_view.js
+++ b/admin/models/forms/custom_admin_view.js
@@ -23,15 +23,15 @@
/-----------------------------------------------------------------------------------------------------------------------------*/
// Some Global Values
-jform_vvvvvxzvxx_required = false;
-jform_vvvvvyavxy_required = false;
-jform_vvvvvybvxz_required = false;
-jform_vvvvvycvya_required = false;
-jform_vvvvvydvyb_required = false;
-jform_vvvvvyevyc_required = false;
-jform_vvvvvyfvyd_required = false;
+jform_vvvvvxzvxy_required = false;
+jform_vvvvvyavxz_required = false;
+jform_vvvvvybvya_required = false;
+jform_vvvvvycvyb_required = false;
+jform_vvvvvydvyc_required = false;
+jform_vvvvvyevyd_required = false;
jform_vvvvvyfvye_required = false;
-jform_vvvvvygvyf_required = false;
+jform_vvvvvyfvyf_required = false;
+jform_vvvvvygvyg_required = false;
// Initial Script
jQuery(document).ready(function()
@@ -68,26 +68,26 @@ function vvvvvxz(add_php_view_vvvvvxz)
if (add_php_view_vvvvvxz == 1)
{
jQuery('#jform_php_view').closest('.control-group').show();
- if (jform_vvvvvxzvxx_required)
+ if (jform_vvvvvxzvxy_required)
{
updateFieldRequired('php_view',0);
jQuery('#jform_php_view').prop('required','required');
jQuery('#jform_php_view').attr('aria-required',true);
jQuery('#jform_php_view').addClass('required');
- jform_vvvvvxzvxx_required = false;
+ jform_vvvvvxzvxy_required = false;
}
}
else
{
jQuery('#jform_php_view').closest('.control-group').hide();
- if (!jform_vvvvvxzvxx_required)
+ if (!jform_vvvvvxzvxy_required)
{
updateFieldRequired('php_view',1);
jQuery('#jform_php_view').removeAttr('required');
jQuery('#jform_php_view').removeAttr('aria-required');
jQuery('#jform_php_view').removeClass('required');
- jform_vvvvvxzvxx_required = true;
+ jform_vvvvvxzvxy_required = true;
}
}
}
@@ -99,26 +99,26 @@ function vvvvvya(add_php_jview_display_vvvvvya)
if (add_php_jview_display_vvvvvya == 1)
{
jQuery('#jform_php_jview_display').closest('.control-group').show();
- if (jform_vvvvvyavxy_required)
+ if (jform_vvvvvyavxz_required)
{
updateFieldRequired('php_jview_display',0);
jQuery('#jform_php_jview_display').prop('required','required');
jQuery('#jform_php_jview_display').attr('aria-required',true);
jQuery('#jform_php_jview_display').addClass('required');
- jform_vvvvvyavxy_required = false;
+ jform_vvvvvyavxz_required = false;
}
}
else
{
jQuery('#jform_php_jview_display').closest('.control-group').hide();
- if (!jform_vvvvvyavxy_required)
+ if (!jform_vvvvvyavxz_required)
{
updateFieldRequired('php_jview_display',1);
jQuery('#jform_php_jview_display').removeAttr('required');
jQuery('#jform_php_jview_display').removeAttr('aria-required');
jQuery('#jform_php_jview_display').removeClass('required');
- jform_vvvvvyavxy_required = true;
+ jform_vvvvvyavxz_required = true;
}
}
}
@@ -130,26 +130,26 @@ function vvvvvyb(add_php_jview_vvvvvyb)
if (add_php_jview_vvvvvyb == 1)
{
jQuery('#jform_php_jview').closest('.control-group').show();
- if (jform_vvvvvybvxz_required)
+ if (jform_vvvvvybvya_required)
{
updateFieldRequired('php_jview',0);
jQuery('#jform_php_jview').prop('required','required');
jQuery('#jform_php_jview').attr('aria-required',true);
jQuery('#jform_php_jview').addClass('required');
- jform_vvvvvybvxz_required = false;
+ jform_vvvvvybvya_required = false;
}
}
else
{
jQuery('#jform_php_jview').closest('.control-group').hide();
- if (!jform_vvvvvybvxz_required)
+ if (!jform_vvvvvybvya_required)
{
updateFieldRequired('php_jview',1);
jQuery('#jform_php_jview').removeAttr('required');
jQuery('#jform_php_jview').removeAttr('aria-required');
jQuery('#jform_php_jview').removeClass('required');
- jform_vvvvvybvxz_required = true;
+ jform_vvvvvybvya_required = true;
}
}
}
@@ -161,26 +161,26 @@ function vvvvvyc(add_php_document_vvvvvyc)
if (add_php_document_vvvvvyc == 1)
{
jQuery('#jform_php_document').closest('.control-group').show();
- if (jform_vvvvvycvya_required)
+ if (jform_vvvvvycvyb_required)
{
updateFieldRequired('php_document',0);
jQuery('#jform_php_document').prop('required','required');
jQuery('#jform_php_document').attr('aria-required',true);
jQuery('#jform_php_document').addClass('required');
- jform_vvvvvycvya_required = false;
+ jform_vvvvvycvyb_required = false;
}
}
else
{
jQuery('#jform_php_document').closest('.control-group').hide();
- if (!jform_vvvvvycvya_required)
+ if (!jform_vvvvvycvyb_required)
{
updateFieldRequired('php_document',1);
jQuery('#jform_php_document').removeAttr('required');
jQuery('#jform_php_document').removeAttr('aria-required');
jQuery('#jform_php_document').removeClass('required');
- jform_vvvvvycvya_required = true;
+ jform_vvvvvycvyb_required = true;
}
}
}
@@ -192,26 +192,26 @@ function vvvvvyd(add_css_document_vvvvvyd)
if (add_css_document_vvvvvyd == 1)
{
jQuery('#jform_css_document').closest('.control-group').show();
- if (jform_vvvvvydvyb_required)
+ if (jform_vvvvvydvyc_required)
{
updateFieldRequired('css_document',0);
jQuery('#jform_css_document').prop('required','required');
jQuery('#jform_css_document').attr('aria-required',true);
jQuery('#jform_css_document').addClass('required');
- jform_vvvvvydvyb_required = false;
+ jform_vvvvvydvyc_required = false;
}
}
else
{
jQuery('#jform_css_document').closest('.control-group').hide();
- if (!jform_vvvvvydvyb_required)
+ if (!jform_vvvvvydvyc_required)
{
updateFieldRequired('css_document',1);
jQuery('#jform_css_document').removeAttr('required');
jQuery('#jform_css_document').removeAttr('aria-required');
jQuery('#jform_css_document').removeClass('required');
- jform_vvvvvydvyb_required = true;
+ jform_vvvvvydvyc_required = true;
}
}
}
@@ -223,26 +223,26 @@ function vvvvvye(add_js_document_vvvvvye)
if (add_js_document_vvvvvye == 1)
{
jQuery('#jform_js_document').closest('.control-group').show();
- if (jform_vvvvvyevyc_required)
+ if (jform_vvvvvyevyd_required)
{
updateFieldRequired('js_document',0);
jQuery('#jform_js_document').prop('required','required');
jQuery('#jform_js_document').attr('aria-required',true);
jQuery('#jform_js_document').addClass('required');
- jform_vvvvvyevyc_required = false;
+ jform_vvvvvyevyd_required = false;
}
}
else
{
jQuery('#jform_js_document').closest('.control-group').hide();
- if (!jform_vvvvvyevyc_required)
+ if (!jform_vvvvvyevyd_required)
{
updateFieldRequired('js_document',1);
jQuery('#jform_js_document').removeAttr('required');
jQuery('#jform_js_document').removeAttr('aria-required');
jQuery('#jform_js_document').removeClass('required');
- jform_vvvvvyevyc_required = true;
+ jform_vvvvvyevyd_required = true;
}
}
}
@@ -255,23 +255,23 @@ function vvvvvyf(add_custom_button_vvvvvyf)
{
jQuery('#jform_custom_button').closest('.control-group').show();
jQuery('#jform_php_controller').closest('.control-group').show();
- if (jform_vvvvvyfvyd_required)
+ if (jform_vvvvvyfvye_required)
{
updateFieldRequired('php_controller',0);
jQuery('#jform_php_controller').prop('required','required');
jQuery('#jform_php_controller').attr('aria-required',true);
jQuery('#jform_php_controller').addClass('required');
- jform_vvvvvyfvyd_required = false;
+ jform_vvvvvyfvye_required = false;
}
jQuery('#jform_php_model').closest('.control-group').show();
- if (jform_vvvvvyfvye_required)
+ if (jform_vvvvvyfvyf_required)
{
updateFieldRequired('php_model',0);
jQuery('#jform_php_model').prop('required','required');
jQuery('#jform_php_model').attr('aria-required',true);
jQuery('#jform_php_model').addClass('required');
- jform_vvvvvyfvye_required = false;
+ jform_vvvvvyfvyf_required = false;
}
}
@@ -279,22 +279,22 @@ function vvvvvyf(add_custom_button_vvvvvyf)
{
jQuery('#jform_custom_button').closest('.control-group').hide();
jQuery('#jform_php_controller').closest('.control-group').hide();
- if (!jform_vvvvvyfvyd_required)
+ if (!jform_vvvvvyfvye_required)
{
updateFieldRequired('php_controller',1);
jQuery('#jform_php_controller').removeAttr('required');
jQuery('#jform_php_controller').removeAttr('aria-required');
jQuery('#jform_php_controller').removeClass('required');
- jform_vvvvvyfvyd_required = true;
+ jform_vvvvvyfvye_required = true;
}
jQuery('#jform_php_model').closest('.control-group').hide();
- if (!jform_vvvvvyfvye_required)
+ if (!jform_vvvvvyfvyf_required)
{
updateFieldRequired('php_model',1);
jQuery('#jform_php_model').removeAttr('required');
jQuery('#jform_php_model').removeAttr('aria-required');
jQuery('#jform_php_model').removeClass('required');
- jform_vvvvvyfvye_required = true;
+ jform_vvvvvyfvyf_required = true;
}
}
}
@@ -306,26 +306,26 @@ function vvvvvyg(add_css_vvvvvyg)
if (add_css_vvvvvyg == 1)
{
jQuery('#jform_css').closest('.control-group').show();
- if (jform_vvvvvygvyf_required)
+ if (jform_vvvvvygvyg_required)
{
updateFieldRequired('css',0);
jQuery('#jform_css').prop('required','required');
jQuery('#jform_css').attr('aria-required',true);
jQuery('#jform_css').addClass('required');
- jform_vvvvvygvyf_required = false;
+ jform_vvvvvygvyg_required = false;
}
}
else
{
jQuery('#jform_css').closest('.control-group').hide();
- if (!jform_vvvvvygvyf_required)
+ if (!jform_vvvvvygvyg_required)
{
updateFieldRequired('css',1);
jQuery('#jform_css').removeAttr('required');
jQuery('#jform_css').removeAttr('aria-required');
jQuery('#jform_css').removeClass('required');
- jform_vvvvvygvyf_required = true;
+ jform_vvvvvygvyg_required = true;
}
}
}
diff --git a/admin/models/forms/custom_code.js b/admin/models/forms/custom_code.js
index 637db7877..c7440f10f 100644
--- a/admin/models/forms/custom_code.js
+++ b/admin/models/forms/custom_code.js
@@ -23,10 +23,10 @@
/-----------------------------------------------------------------------------------------------------------------------------*/
// Some Global Values
-jform_vvvvvzovzm_required = false;
-jform_vvvvvzpvzn_required = false;
+jform_vvvvvzovzn_required = false;
jform_vvvvvzpvzo_required = false;
jform_vvvvvzpvzp_required = false;
+jform_vvvvvzpvzq_required = false;
// Initial Script
jQuery(document).ready(function()
@@ -53,13 +53,13 @@ function vvvvvzo(target_vvvvvzo)
if (target_vvvvvzo == 2)
{
jQuery('#jform_function_name').closest('.control-group').show();
- if (jform_vvvvvzovzm_required)
+ if (jform_vvvvvzovzn_required)
{
updateFieldRequired('function_name',0);
jQuery('#jform_function_name').prop('required','required');
jQuery('#jform_function_name').attr('aria-required',true);
jQuery('#jform_function_name').addClass('required');
- jform_vvvvvzovzm_required = false;
+ jform_vvvvvzovzn_required = false;
}
jQuery('.note_jcb_placeholder').closest('.control-group').show();
@@ -68,13 +68,13 @@ function vvvvvzo(target_vvvvvzo)
else
{
jQuery('#jform_function_name').closest('.control-group').hide();
- if (!jform_vvvvvzovzm_required)
+ if (!jform_vvvvvzovzn_required)
{
updateFieldRequired('function_name',1);
jQuery('#jform_function_name').removeAttr('required');
jQuery('#jform_function_name').removeAttr('aria-required');
jQuery('#jform_function_name').removeClass('required');
- jform_vvvvvzovzm_required = true;
+ jform_vvvvvzovzn_required = true;
}
jQuery('.note_jcb_placeholder').closest('.control-group').hide();
jQuery('#jform_system_name').closest('.control-group').hide();
@@ -88,70 +88,70 @@ function vvvvvzp(target_vvvvvzp)
if (target_vvvvvzp == 1)
{
jQuery('#jform_component').closest('.control-group').show();
- if (jform_vvvvvzpvzn_required)
+ if (jform_vvvvvzpvzo_required)
{
updateFieldRequired('component',0);
jQuery('#jform_component').prop('required','required');
jQuery('#jform_component').attr('aria-required',true);
jQuery('#jform_component').addClass('required');
- jform_vvvvvzpvzn_required = false;
+ jform_vvvvvzpvzo_required = false;
}
jQuery('#jform_path').closest('.control-group').show();
- if (jform_vvvvvzpvzo_required)
+ if (jform_vvvvvzpvzp_required)
{
updateFieldRequired('path',0);
jQuery('#jform_path').prop('required','required');
jQuery('#jform_path').attr('aria-required',true);
jQuery('#jform_path').addClass('required');
- jform_vvvvvzpvzo_required = false;
+ jform_vvvvvzpvzp_required = false;
}
jQuery('#jform_from_line').closest('.control-group').show();
jQuery('#jform_hashtarget').closest('.control-group').show();
jQuery('#jform_to_line').closest('.control-group').show();
jQuery('#jform_type').closest('.control-group').show();
- if (jform_vvvvvzpvzp_required)
+ if (jform_vvvvvzpvzq_required)
{
updateFieldRequired('type',0);
jQuery('#jform_type').prop('required','required');
jQuery('#jform_type').attr('aria-required',true);
jQuery('#jform_type').addClass('required');
- jform_vvvvvzpvzp_required = false;
+ jform_vvvvvzpvzq_required = false;
}
}
else
{
jQuery('#jform_component').closest('.control-group').hide();
- if (!jform_vvvvvzpvzn_required)
+ if (!jform_vvvvvzpvzo_required)
{
updateFieldRequired('component',1);
jQuery('#jform_component').removeAttr('required');
jQuery('#jform_component').removeAttr('aria-required');
jQuery('#jform_component').removeClass('required');
- jform_vvvvvzpvzn_required = true;
+ jform_vvvvvzpvzo_required = true;
}
jQuery('#jform_path').closest('.control-group').hide();
- if (!jform_vvvvvzpvzo_required)
+ if (!jform_vvvvvzpvzp_required)
{
updateFieldRequired('path',1);
jQuery('#jform_path').removeAttr('required');
jQuery('#jform_path').removeAttr('aria-required');
jQuery('#jform_path').removeClass('required');
- jform_vvvvvzpvzo_required = true;
+ jform_vvvvvzpvzp_required = true;
}
jQuery('#jform_from_line').closest('.control-group').hide();
jQuery('#jform_hashtarget').closest('.control-group').hide();
jQuery('#jform_to_line').closest('.control-group').hide();
jQuery('#jform_type').closest('.control-group').hide();
- if (!jform_vvvvvzpvzp_required)
+ if (!jform_vvvvvzpvzq_required)
{
updateFieldRequired('type',1);
jQuery('#jform_type').removeAttr('required');
jQuery('#jform_type').removeAttr('aria-required');
jQuery('#jform_type').removeClass('required');
- jform_vvvvvzpvzp_required = true;
+ jform_vvvvvzpvzq_required = true;
}
}
}
diff --git a/admin/models/forms/dynamic_get.js b/admin/models/forms/dynamic_get.js
index 2a2fbdb1c..ddd825e8a 100644
--- a/admin/models/forms/dynamic_get.js
+++ b/admin/models/forms/dynamic_get.js
@@ -23,24 +23,24 @@
/-----------------------------------------------------------------------------------------------------------------------------*/
// Some Global Values
-jform_vvvvvysvyu_required = false;
-jform_vvvvvytvyv_required = false;
-jform_vvvvvyuvyw_required = false;
-jform_vvvvvyvvyx_required = false;
-jform_vvvvvywvyy_required = false;
-jform_vvvvvyxvyz_required = false;
-jform_vvvvvzcvza_required = false;
-jform_vvvvvzevzb_required = false;
-jform_vvvvvzfvzc_required = false;
-jform_vvvvvzhvzd_required = false;
+jform_vvvvvysvyv_required = false;
+jform_vvvvvytvyw_required = false;
+jform_vvvvvyuvyx_required = false;
+jform_vvvvvyvvyy_required = false;
+jform_vvvvvywvyz_required = false;
+jform_vvvvvyxvza_required = false;
+jform_vvvvvzcvzb_required = false;
+jform_vvvvvzevzc_required = false;
+jform_vvvvvzfvzd_required = false;
jform_vvvvvzhvze_required = false;
-jform_vvvvvzivzf_required = false;
-jform_vvvvvzjvzg_required = false;
-jform_vvvvvzkvzh_required = false;
-jform_vvvvvzmvzi_required = false;
+jform_vvvvvzhvzf_required = false;
+jform_vvvvvzivzg_required = false;
+jform_vvvvvzjvzh_required = false;
+jform_vvvvvzkvzi_required = false;
jform_vvvvvzmvzj_required = false;
jform_vvvvvzmvzk_required = false;
-jform_vvvvvznvzl_required = false;
+jform_vvvvvzmvzl_required = false;
+jform_vvvvvznvzm_required = false;
// Initial Script
jQuery(document).ready(function()
@@ -127,26 +127,26 @@ function vvvvvys(gettype_vvvvvys)
if (gettype)
{
jQuery('#jform_getcustom').closest('.control-group').show();
- if (jform_vvvvvysvyu_required)
+ if (jform_vvvvvysvyv_required)
{
updateFieldRequired('getcustom',0);
jQuery('#jform_getcustom').prop('required','required');
jQuery('#jform_getcustom').attr('aria-required',true);
jQuery('#jform_getcustom').addClass('required');
- jform_vvvvvysvyu_required = false;
+ jform_vvvvvysvyv_required = false;
}
}
else
{
jQuery('#jform_getcustom').closest('.control-group').hide();
- if (!jform_vvvvvysvyu_required)
+ if (!jform_vvvvvysvyv_required)
{
updateFieldRequired('getcustom',1);
jQuery('#jform_getcustom').removeAttr('required');
jQuery('#jform_getcustom').removeAttr('aria-required');
jQuery('#jform_getcustom').removeClass('required');
- jform_vvvvvysvyu_required = true;
+ jform_vvvvvysvyv_required = true;
}
}
}
@@ -182,26 +182,26 @@ function vvvvvyt(main_source_vvvvvyt)
if (main_source)
{
jQuery('#jform_view_table_main').closest('.control-group').show();
- if (jform_vvvvvytvyv_required)
+ if (jform_vvvvvytvyw_required)
{
updateFieldRequired('view_table_main',0);
jQuery('#jform_view_table_main').prop('required','required');
jQuery('#jform_view_table_main').attr('aria-required',true);
jQuery('#jform_view_table_main').addClass('required');
- jform_vvvvvytvyv_required = false;
+ jform_vvvvvytvyw_required = false;
}
}
else
{
jQuery('#jform_view_table_main').closest('.control-group').hide();
- if (!jform_vvvvvytvyv_required)
+ if (!jform_vvvvvytvyw_required)
{
updateFieldRequired('view_table_main',1);
jQuery('#jform_view_table_main').removeAttr('required');
jQuery('#jform_view_table_main').removeAttr('aria-required');
jQuery('#jform_view_table_main').removeClass('required');
- jform_vvvvvytvyv_required = true;
+ jform_vvvvvytvyw_required = true;
}
}
}
@@ -237,26 +237,26 @@ function vvvvvyu(main_source_vvvvvyu)
if (main_source)
{
jQuery('#jform_view_selection').closest('.control-group').show();
- if (jform_vvvvvyuvyw_required)
+ if (jform_vvvvvyuvyx_required)
{
updateFieldRequired('view_selection',0);
jQuery('#jform_view_selection').prop('required','required');
jQuery('#jform_view_selection').attr('aria-required',true);
jQuery('#jform_view_selection').addClass('required');
- jform_vvvvvyuvyw_required = false;
+ jform_vvvvvyuvyx_required = false;
}
}
else
{
jQuery('#jform_view_selection').closest('.control-group').hide();
- if (!jform_vvvvvyuvyw_required)
+ if (!jform_vvvvvyuvyx_required)
{
updateFieldRequired('view_selection',1);
jQuery('#jform_view_selection').removeAttr('required');
jQuery('#jform_view_selection').removeAttr('aria-required');
jQuery('#jform_view_selection').removeClass('required');
- jform_vvvvvyuvyw_required = true;
+ jform_vvvvvyuvyx_required = true;
}
}
}
@@ -292,26 +292,26 @@ function vvvvvyv(main_source_vvvvvyv)
if (main_source)
{
jQuery('#jform_db_table_main').closest('.control-group').show();
- if (jform_vvvvvyvvyx_required)
+ if (jform_vvvvvyvvyy_required)
{
updateFieldRequired('db_table_main',0);
jQuery('#jform_db_table_main').prop('required','required');
jQuery('#jform_db_table_main').attr('aria-required',true);
jQuery('#jform_db_table_main').addClass('required');
- jform_vvvvvyvvyx_required = false;
+ jform_vvvvvyvvyy_required = false;
}
}
else
{
jQuery('#jform_db_table_main').closest('.control-group').hide();
- if (!jform_vvvvvyvvyx_required)
+ if (!jform_vvvvvyvvyy_required)
{
updateFieldRequired('db_table_main',1);
jQuery('#jform_db_table_main').removeAttr('required');
jQuery('#jform_db_table_main').removeAttr('aria-required');
jQuery('#jform_db_table_main').removeClass('required');
- jform_vvvvvyvvyx_required = true;
+ jform_vvvvvyvvyy_required = true;
}
}
}
@@ -347,26 +347,26 @@ function vvvvvyw(main_source_vvvvvyw)
if (main_source)
{
jQuery('#jform_db_selection').closest('.control-group').show();
- if (jform_vvvvvywvyy_required)
+ if (jform_vvvvvywvyz_required)
{
updateFieldRequired('db_selection',0);
jQuery('#jform_db_selection').prop('required','required');
jQuery('#jform_db_selection').attr('aria-required',true);
jQuery('#jform_db_selection').addClass('required');
- jform_vvvvvywvyy_required = false;
+ jform_vvvvvywvyz_required = false;
}
}
else
{
jQuery('#jform_db_selection').closest('.control-group').hide();
- if (!jform_vvvvvywvyy_required)
+ if (!jform_vvvvvywvyz_required)
{
updateFieldRequired('db_selection',1);
jQuery('#jform_db_selection').removeAttr('required');
jQuery('#jform_db_selection').removeAttr('aria-required');
jQuery('#jform_db_selection').removeClass('required');
- jform_vvvvvywvyy_required = true;
+ jform_vvvvvywvyz_required = true;
}
}
}
@@ -389,26 +389,26 @@ function vvvvvyx(addcalculation_vvvvvyx)
if (addcalculation_vvvvvyx == 1)
{
jQuery('#jform_php_calculation').closest('.control-group').show();
- if (jform_vvvvvyxvyz_required)
+ if (jform_vvvvvyxvza_required)
{
updateFieldRequired('php_calculation',0);
jQuery('#jform_php_calculation').prop('required','required');
jQuery('#jform_php_calculation').attr('aria-required',true);
jQuery('#jform_php_calculation').addClass('required');
- jform_vvvvvyxvyz_required = false;
+ jform_vvvvvyxvza_required = false;
}
}
else
{
jQuery('#jform_php_calculation').closest('.control-group').hide();
- if (!jform_vvvvvyxvyz_required)
+ if (!jform_vvvvvyxvza_required)
{
updateFieldRequired('php_calculation',1);
jQuery('#jform_php_calculation').removeAttr('required');
jQuery('#jform_php_calculation').removeAttr('aria-required');
jQuery('#jform_php_calculation').removeClass('required');
- jform_vvvvvyxvyz_required = true;
+ jform_vvvvvyxvza_required = true;
}
}
}
@@ -555,26 +555,26 @@ function vvvvvzc(main_source_vvvvvzc)
if (main_source)
{
jQuery('#jform_php_custom_get').closest('.control-group').show();
- if (jform_vvvvvzcvza_required)
+ if (jform_vvvvvzcvzb_required)
{
updateFieldRequired('php_custom_get',0);
jQuery('#jform_php_custom_get').prop('required','required');
jQuery('#jform_php_custom_get').attr('aria-required',true);
jQuery('#jform_php_custom_get').addClass('required');
- jform_vvvvvzcvza_required = false;
+ jform_vvvvvzcvzb_required = false;
}
}
else
{
jQuery('#jform_php_custom_get').closest('.control-group').hide();
- if (!jform_vvvvvzcvza_required)
+ if (!jform_vvvvvzcvzb_required)
{
updateFieldRequired('php_custom_get',1);
jQuery('#jform_php_custom_get').removeAttr('required');
jQuery('#jform_php_custom_get').removeAttr('aria-required');
jQuery('#jform_php_custom_get').removeClass('required');
- jform_vvvvvzcvza_required = true;
+ jform_vvvvvzcvzb_required = true;
}
}
}
@@ -668,26 +668,26 @@ function vvvvvze(add_php_before_getitem_vvvvvze,gettype_vvvvvze)
if (add_php_before_getitem && gettype)
{
jQuery('#jform_php_before_getitem').closest('.control-group').show();
- if (jform_vvvvvzevzb_required)
+ if (jform_vvvvvzevzc_required)
{
updateFieldRequired('php_before_getitem',0);
jQuery('#jform_php_before_getitem').prop('required','required');
jQuery('#jform_php_before_getitem').attr('aria-required',true);
jQuery('#jform_php_before_getitem').addClass('required');
- jform_vvvvvzevzb_required = false;
+ jform_vvvvvzevzc_required = false;
}
}
else
{
jQuery('#jform_php_before_getitem').closest('.control-group').hide();
- if (!jform_vvvvvzevzb_required)
+ if (!jform_vvvvvzevzc_required)
{
updateFieldRequired('php_before_getitem',1);
jQuery('#jform_php_before_getitem').removeAttr('required');
jQuery('#jform_php_before_getitem').removeAttr('aria-required');
jQuery('#jform_php_before_getitem').removeClass('required');
- jform_vvvvvzevzb_required = true;
+ jform_vvvvvzevzc_required = true;
}
}
}
@@ -746,26 +746,26 @@ function vvvvvzf(add_php_after_getitem_vvvvvzf,gettype_vvvvvzf)
if (add_php_after_getitem && gettype)
{
jQuery('#jform_php_after_getitem').closest('.control-group').show();
- if (jform_vvvvvzfvzc_required)
+ if (jform_vvvvvzfvzd_required)
{
updateFieldRequired('php_after_getitem',0);
jQuery('#jform_php_after_getitem').prop('required','required');
jQuery('#jform_php_after_getitem').attr('aria-required',true);
jQuery('#jform_php_after_getitem').addClass('required');
- jform_vvvvvzfvzc_required = false;
+ jform_vvvvvzfvzd_required = false;
}
}
else
{
jQuery('#jform_php_after_getitem').closest('.control-group').hide();
- if (!jform_vvvvvzfvzc_required)
+ if (!jform_vvvvvzfvzd_required)
{
updateFieldRequired('php_after_getitem',1);
jQuery('#jform_php_after_getitem').removeAttr('required');
jQuery('#jform_php_after_getitem').removeAttr('aria-required');
jQuery('#jform_php_after_getitem').removeClass('required');
- jform_vvvvvzfvzc_required = true;
+ jform_vvvvvzfvzd_required = true;
}
}
}
@@ -812,45 +812,45 @@ function vvvvvzh(gettype_vvvvvzh)
if (gettype)
{
jQuery('#jform_add_php_after_getitem').closest('.control-group').show();
- if (jform_vvvvvzhvzd_required)
+ if (jform_vvvvvzhvze_required)
{
updateFieldRequired('add_php_after_getitem',0);
jQuery('#jform_add_php_after_getitem').prop('required','required');
jQuery('#jform_add_php_after_getitem').attr('aria-required',true);
jQuery('#jform_add_php_after_getitem').addClass('required');
- jform_vvvvvzhvzd_required = false;
+ jform_vvvvvzhvze_required = false;
}
jQuery('#jform_add_php_before_getitem').closest('.control-group').show();
- if (jform_vvvvvzhvze_required)
+ if (jform_vvvvvzhvzf_required)
{
updateFieldRequired('add_php_before_getitem',0);
jQuery('#jform_add_php_before_getitem').prop('required','required');
jQuery('#jform_add_php_before_getitem').attr('aria-required',true);
jQuery('#jform_add_php_before_getitem').addClass('required');
- jform_vvvvvzhvze_required = false;
+ jform_vvvvvzhvzf_required = false;
}
}
else
{
jQuery('#jform_add_php_after_getitem').closest('.control-group').hide();
- if (!jform_vvvvvzhvzd_required)
+ if (!jform_vvvvvzhvze_required)
{
updateFieldRequired('add_php_after_getitem',1);
jQuery('#jform_add_php_after_getitem').removeAttr('required');
jQuery('#jform_add_php_after_getitem').removeAttr('aria-required');
jQuery('#jform_add_php_after_getitem').removeClass('required');
- jform_vvvvvzhvzd_required = true;
+ jform_vvvvvzhvze_required = true;
}
jQuery('#jform_add_php_before_getitem').closest('.control-group').hide();
- if (!jform_vvvvvzhvze_required)
+ if (!jform_vvvvvzhvzf_required)
{
updateFieldRequired('add_php_before_getitem',1);
jQuery('#jform_add_php_before_getitem').removeAttr('required');
jQuery('#jform_add_php_before_getitem').removeAttr('aria-required');
jQuery('#jform_add_php_before_getitem').removeClass('required');
- jform_vvvvvzhvze_required = true;
+ jform_vvvvvzhvzf_required = true;
}
}
}
@@ -898,26 +898,26 @@ function vvvvvzi(add_php_getlistquery_vvvvvzi,gettype_vvvvvzi)
if (add_php_getlistquery && gettype)
{
jQuery('#jform_php_getlistquery').closest('.control-group').show();
- if (jform_vvvvvzivzf_required)
+ if (jform_vvvvvzivzg_required)
{
updateFieldRequired('php_getlistquery',0);
jQuery('#jform_php_getlistquery').prop('required','required');
jQuery('#jform_php_getlistquery').attr('aria-required',true);
jQuery('#jform_php_getlistquery').addClass('required');
- jform_vvvvvzivzf_required = false;
+ jform_vvvvvzivzg_required = false;
}
}
else
{
jQuery('#jform_php_getlistquery').closest('.control-group').hide();
- if (!jform_vvvvvzivzf_required)
+ if (!jform_vvvvvzivzg_required)
{
updateFieldRequired('php_getlistquery',1);
jQuery('#jform_php_getlistquery').removeAttr('required');
jQuery('#jform_php_getlistquery').removeAttr('aria-required');
jQuery('#jform_php_getlistquery').removeClass('required');
- jform_vvvvvzivzf_required = true;
+ jform_vvvvvzivzg_required = true;
}
}
}
@@ -976,26 +976,26 @@ function vvvvvzj(add_php_before_getitems_vvvvvzj,gettype_vvvvvzj)
if (add_php_before_getitems && gettype)
{
jQuery('#jform_php_before_getitems').closest('.control-group').show();
- if (jform_vvvvvzjvzg_required)
+ if (jform_vvvvvzjvzh_required)
{
updateFieldRequired('php_before_getitems',0);
jQuery('#jform_php_before_getitems').prop('required','required');
jQuery('#jform_php_before_getitems').attr('aria-required',true);
jQuery('#jform_php_before_getitems').addClass('required');
- jform_vvvvvzjvzg_required = false;
+ jform_vvvvvzjvzh_required = false;
}
}
else
{
jQuery('#jform_php_before_getitems').closest('.control-group').hide();
- if (!jform_vvvvvzjvzg_required)
+ if (!jform_vvvvvzjvzh_required)
{
updateFieldRequired('php_before_getitems',1);
jQuery('#jform_php_before_getitems').removeAttr('required');
jQuery('#jform_php_before_getitems').removeAttr('aria-required');
jQuery('#jform_php_before_getitems').removeClass('required');
- jform_vvvvvzjvzg_required = true;
+ jform_vvvvvzjvzh_required = true;
}
}
}
@@ -1054,26 +1054,26 @@ function vvvvvzk(add_php_after_getitems_vvvvvzk,gettype_vvvvvzk)
if (add_php_after_getitems && gettype)
{
jQuery('#jform_php_after_getitems').closest('.control-group').show();
- if (jform_vvvvvzkvzh_required)
+ if (jform_vvvvvzkvzi_required)
{
updateFieldRequired('php_after_getitems',0);
jQuery('#jform_php_after_getitems').prop('required','required');
jQuery('#jform_php_after_getitems').attr('aria-required',true);
jQuery('#jform_php_after_getitems').addClass('required');
- jform_vvvvvzkvzh_required = false;
+ jform_vvvvvzkvzi_required = false;
}
}
else
{
jQuery('#jform_php_after_getitems').closest('.control-group').hide();
- if (!jform_vvvvvzkvzh_required)
+ if (!jform_vvvvvzkvzi_required)
{
updateFieldRequired('php_after_getitems',1);
jQuery('#jform_php_after_getitems').removeAttr('required');
jQuery('#jform_php_after_getitems').removeAttr('aria-required');
jQuery('#jform_php_after_getitems').removeClass('required');
- jform_vvvvvzkvzh_required = true;
+ jform_vvvvvzkvzi_required = true;
}
}
}
@@ -1120,64 +1120,64 @@ function vvvvvzm(gettype_vvvvvzm)
if (gettype)
{
jQuery('#jform_add_php_after_getitems').closest('.control-group').show();
- if (jform_vvvvvzmvzi_required)
+ if (jform_vvvvvzmvzj_required)
{
updateFieldRequired('add_php_after_getitems',0);
jQuery('#jform_add_php_after_getitems').prop('required','required');
jQuery('#jform_add_php_after_getitems').attr('aria-required',true);
jQuery('#jform_add_php_after_getitems').addClass('required');
- jform_vvvvvzmvzi_required = false;
+ jform_vvvvvzmvzj_required = false;
}
jQuery('#jform_add_php_before_getitems').closest('.control-group').show();
- if (jform_vvvvvzmvzj_required)
+ if (jform_vvvvvzmvzk_required)
{
updateFieldRequired('add_php_before_getitems',0);
jQuery('#jform_add_php_before_getitems').prop('required','required');
jQuery('#jform_add_php_before_getitems').attr('aria-required',true);
jQuery('#jform_add_php_before_getitems').addClass('required');
- jform_vvvvvzmvzj_required = false;
+ jform_vvvvvzmvzk_required = false;
}
jQuery('#jform_add_php_getlistquery').closest('.control-group').show();
- if (jform_vvvvvzmvzk_required)
+ if (jform_vvvvvzmvzl_required)
{
updateFieldRequired('add_php_getlistquery',0);
jQuery('#jform_add_php_getlistquery').prop('required','required');
jQuery('#jform_add_php_getlistquery').attr('aria-required',true);
jQuery('#jform_add_php_getlistquery').addClass('required');
- jform_vvvvvzmvzk_required = false;
+ jform_vvvvvzmvzl_required = false;
}
}
else
{
jQuery('#jform_add_php_after_getitems').closest('.control-group').hide();
- if (!jform_vvvvvzmvzi_required)
+ if (!jform_vvvvvzmvzj_required)
{
updateFieldRequired('add_php_after_getitems',1);
jQuery('#jform_add_php_after_getitems').removeAttr('required');
jQuery('#jform_add_php_after_getitems').removeAttr('aria-required');
jQuery('#jform_add_php_after_getitems').removeClass('required');
- jform_vvvvvzmvzi_required = true;
+ jform_vvvvvzmvzj_required = true;
}
jQuery('#jform_add_php_before_getitems').closest('.control-group').hide();
- if (!jform_vvvvvzmvzj_required)
+ if (!jform_vvvvvzmvzk_required)
{
updateFieldRequired('add_php_before_getitems',1);
jQuery('#jform_add_php_before_getitems').removeAttr('required');
jQuery('#jform_add_php_before_getitems').removeAttr('aria-required');
jQuery('#jform_add_php_before_getitems').removeClass('required');
- jform_vvvvvzmvzj_required = true;
+ jform_vvvvvzmvzk_required = true;
}
jQuery('#jform_add_php_getlistquery').closest('.control-group').hide();
- if (!jform_vvvvvzmvzk_required)
+ if (!jform_vvvvvzmvzl_required)
{
updateFieldRequired('add_php_getlistquery',1);
jQuery('#jform_add_php_getlistquery').removeAttr('required');
jQuery('#jform_add_php_getlistquery').removeAttr('aria-required');
jQuery('#jform_add_php_getlistquery').removeClass('required');
- jform_vvvvvzmvzk_required = true;
+ jform_vvvvvzmvzl_required = true;
}
}
}
@@ -1213,26 +1213,26 @@ function vvvvvzn(gettype_vvvvvzn)
if (gettype)
{
jQuery('#jform_pagination').closest('.control-group').show();
- if (jform_vvvvvznvzl_required)
+ if (jform_vvvvvznvzm_required)
{
updateFieldRequired('pagination',0);
jQuery('#jform_pagination').prop('required','required');
jQuery('#jform_pagination').attr('aria-required',true);
jQuery('#jform_pagination').addClass('required');
- jform_vvvvvznvzl_required = false;
+ jform_vvvvvznvzm_required = false;
}
}
else
{
jQuery('#jform_pagination').closest('.control-group').hide();
- if (!jform_vvvvvznvzl_required)
+ if (!jform_vvvvvznvzm_required)
{
updateFieldRequired('pagination',1);
jQuery('#jform_pagination').removeAttr('required');
jQuery('#jform_pagination').removeAttr('aria-required');
jQuery('#jform_pagination').removeClass('required');
- jform_vvvvvznvzl_required = true;
+ jform_vvvvvznvzm_required = true;
}
}
}
diff --git a/admin/models/forms/field.js b/admin/models/forms/field.js
index 43adc8eab..143464b45 100644
--- a/admin/models/forms/field.js
+++ b/admin/models/forms/field.js
@@ -23,14 +23,14 @@
/-----------------------------------------------------------------------------------------------------------------------------*/
// Some Global Values
-jform_vvvvvzsvzq_required = false;
-jform_vvvvvztvzr_required = false;
-jform_vvvvvzuvzs_required = false;
-jform_vvvvvzvvzt_required = false;
-jform_vvvvvzyvzu_required = false;
-jform_vvvvvzzvzv_required = false;
-jform_vvvvwaavzw_required = false;
-jform_vvvvwabvzx_required = false;
+jform_vvvvvzsvzr_required = false;
+jform_vvvvvztvzs_required = false;
+jform_vvvvvzuvzt_required = false;
+jform_vvvvvzvvzu_required = false;
+jform_vvvvvzyvzv_required = false;
+jform_vvvvvzzvzw_required = false;
+jform_vvvvwaavzx_required = false;
+jform_vvvvwabvzy_required = false;
// Initial Script
jQuery(document).ready(function()
@@ -84,26 +84,26 @@ function vvvvvzs(datalenght_vvvvvzs)
if (datalenght)
{
jQuery('#jform_datalenght_other').closest('.control-group').show();
- if (jform_vvvvvzsvzq_required)
+ if (jform_vvvvvzsvzr_required)
{
updateFieldRequired('datalenght_other',0);
jQuery('#jform_datalenght_other').prop('required','required');
jQuery('#jform_datalenght_other').attr('aria-required',true);
jQuery('#jform_datalenght_other').addClass('required');
- jform_vvvvvzsvzq_required = false;
+ jform_vvvvvzsvzr_required = false;
}
}
else
{
jQuery('#jform_datalenght_other').closest('.control-group').hide();
- if (!jform_vvvvvzsvzq_required)
+ if (!jform_vvvvvzsvzr_required)
{
updateFieldRequired('datalenght_other',1);
jQuery('#jform_datalenght_other').removeAttr('required');
jQuery('#jform_datalenght_other').removeAttr('aria-required');
jQuery('#jform_datalenght_other').removeClass('required');
- jform_vvvvvzsvzq_required = true;
+ jform_vvvvvzsvzr_required = true;
}
}
}
@@ -139,26 +139,26 @@ function vvvvvzt(datadefault_vvvvvzt)
if (datadefault)
{
jQuery('#jform_datadefault_other').closest('.control-group').show();
- if (jform_vvvvvztvzr_required)
+ if (jform_vvvvvztvzs_required)
{
updateFieldRequired('datadefault_other',0);
jQuery('#jform_datadefault_other').prop('required','required');
jQuery('#jform_datadefault_other').attr('aria-required',true);
jQuery('#jform_datadefault_other').addClass('required');
- jform_vvvvvztvzr_required = false;
+ jform_vvvvvztvzs_required = false;
}
}
else
{
jQuery('#jform_datadefault_other').closest('.control-group').hide();
- if (!jform_vvvvvztvzr_required)
+ if (!jform_vvvvvztvzs_required)
{
updateFieldRequired('datadefault_other',1);
jQuery('#jform_datadefault_other').removeAttr('required');
jQuery('#jform_datadefault_other').removeAttr('aria-required');
jQuery('#jform_datadefault_other').removeClass('required');
- jform_vvvvvztvzr_required = true;
+ jform_vvvvvztvzs_required = true;
}
}
}
@@ -196,13 +196,13 @@ function vvvvvzu(datatype_vvvvvzu)
jQuery('#jform_datadefault').closest('.control-group').show();
jQuery('#jform_datalenght').closest('.control-group').show();
jQuery('#jform_indexes').closest('.control-group').show();
- if (jform_vvvvvzuvzs_required)
+ if (jform_vvvvvzuvzt_required)
{
updateFieldRequired('indexes',0);
jQuery('#jform_indexes').prop('required','required');
jQuery('#jform_indexes').attr('aria-required',true);
jQuery('#jform_indexes').addClass('required');
- jform_vvvvvzuvzs_required = false;
+ jform_vvvvvzuvzt_required = false;
}
}
@@ -211,13 +211,13 @@ function vvvvvzu(datatype_vvvvvzu)
jQuery('#jform_datadefault').closest('.control-group').hide();
jQuery('#jform_datalenght').closest('.control-group').hide();
jQuery('#jform_indexes').closest('.control-group').hide();
- if (!jform_vvvvvzuvzs_required)
+ if (!jform_vvvvvzuvzt_required)
{
updateFieldRequired('indexes',1);
jQuery('#jform_indexes').removeAttr('required');
jQuery('#jform_indexes').removeAttr('aria-required');
jQuery('#jform_indexes').removeClass('required');
- jform_vvvvvzuvzs_required = true;
+ jform_vvvvvzuvzt_required = true;
}
}
}
@@ -253,26 +253,26 @@ function vvvvvzv(datatype_vvvvvzv)
if (datatype)
{
jQuery('#jform_store').closest('.control-group').show();
- if (jform_vvvvvzvvzt_required)
+ if (jform_vvvvvzvvzu_required)
{
updateFieldRequired('store',0);
jQuery('#jform_store').prop('required','required');
jQuery('#jform_store').attr('aria-required',true);
jQuery('#jform_store').addClass('required');
- jform_vvvvvzvvzt_required = false;
+ jform_vvvvvzvvzu_required = false;
}
}
else
{
jQuery('#jform_store').closest('.control-group').hide();
- if (!jform_vvvvvzvvzt_required)
+ if (!jform_vvvvvzvvzu_required)
{
updateFieldRequired('store',1);
jQuery('#jform_store').removeAttr('required');
jQuery('#jform_store').removeAttr('aria-required');
jQuery('#jform_store').removeClass('required');
- jform_vvvvvzvvzt_required = true;
+ jform_vvvvvzvvzu_required = true;
}
}
}
@@ -356,26 +356,26 @@ function vvvvvzy(add_css_view_vvvvvzy)
if (add_css_view_vvvvvzy == 1)
{
jQuery('#jform_css_view').closest('.control-group').show();
- if (jform_vvvvvzyvzu_required)
+ if (jform_vvvvvzyvzv_required)
{
updateFieldRequired('css_view',0);
jQuery('#jform_css_view').prop('required','required');
jQuery('#jform_css_view').attr('aria-required',true);
jQuery('#jform_css_view').addClass('required');
- jform_vvvvvzyvzu_required = false;
+ jform_vvvvvzyvzv_required = false;
}
}
else
{
jQuery('#jform_css_view').closest('.control-group').hide();
- if (!jform_vvvvvzyvzu_required)
+ if (!jform_vvvvvzyvzv_required)
{
updateFieldRequired('css_view',1);
jQuery('#jform_css_view').removeAttr('required');
jQuery('#jform_css_view').removeAttr('aria-required');
jQuery('#jform_css_view').removeClass('required');
- jform_vvvvvzyvzu_required = true;
+ jform_vvvvvzyvzv_required = true;
}
}
}
@@ -387,26 +387,26 @@ function vvvvvzz(add_css_views_vvvvvzz)
if (add_css_views_vvvvvzz == 1)
{
jQuery('#jform_css_views').closest('.control-group').show();
- if (jform_vvvvvzzvzv_required)
+ if (jform_vvvvvzzvzw_required)
{
updateFieldRequired('css_views',0);
jQuery('#jform_css_views').prop('required','required');
jQuery('#jform_css_views').attr('aria-required',true);
jQuery('#jform_css_views').addClass('required');
- jform_vvvvvzzvzv_required = false;
+ jform_vvvvvzzvzw_required = false;
}
}
else
{
jQuery('#jform_css_views').closest('.control-group').hide();
- if (!jform_vvvvvzzvzv_required)
+ if (!jform_vvvvvzzvzw_required)
{
updateFieldRequired('css_views',1);
jQuery('#jform_css_views').removeAttr('required');
jQuery('#jform_css_views').removeAttr('aria-required');
jQuery('#jform_css_views').removeClass('required');
- jform_vvvvvzzvzv_required = true;
+ jform_vvvvvzzvzw_required = true;
}
}
}
@@ -418,26 +418,26 @@ function vvvvwaa(add_javascript_view_footer_vvvvwaa)
if (add_javascript_view_footer_vvvvwaa == 1)
{
jQuery('#jform_javascript_view_footer').closest('.control-group').show();
- if (jform_vvvvwaavzw_required)
+ if (jform_vvvvwaavzx_required)
{
updateFieldRequired('javascript_view_footer',0);
jQuery('#jform_javascript_view_footer').prop('required','required');
jQuery('#jform_javascript_view_footer').attr('aria-required',true);
jQuery('#jform_javascript_view_footer').addClass('required');
- jform_vvvvwaavzw_required = false;
+ jform_vvvvwaavzx_required = false;
}
}
else
{
jQuery('#jform_javascript_view_footer').closest('.control-group').hide();
- if (!jform_vvvvwaavzw_required)
+ if (!jform_vvvvwaavzx_required)
{
updateFieldRequired('javascript_view_footer',1);
jQuery('#jform_javascript_view_footer').removeAttr('required');
jQuery('#jform_javascript_view_footer').removeAttr('aria-required');
jQuery('#jform_javascript_view_footer').removeClass('required');
- jform_vvvvwaavzw_required = true;
+ jform_vvvvwaavzx_required = true;
}
}
}
@@ -449,26 +449,26 @@ function vvvvwab(add_javascript_views_footer_vvvvwab)
if (add_javascript_views_footer_vvvvwab == 1)
{
jQuery('#jform_javascript_views_footer').closest('.control-group').show();
- if (jform_vvvvwabvzx_required)
+ if (jform_vvvvwabvzy_required)
{
updateFieldRequired('javascript_views_footer',0);
jQuery('#jform_javascript_views_footer').prop('required','required');
jQuery('#jform_javascript_views_footer').attr('aria-required',true);
jQuery('#jform_javascript_views_footer').addClass('required');
- jform_vvvvwabvzx_required = false;
+ jform_vvvvwabvzy_required = false;
}
}
else
{
jQuery('#jform_javascript_views_footer').closest('.control-group').hide();
- if (!jform_vvvvwabvzx_required)
+ if (!jform_vvvvwabvzy_required)
{
updateFieldRequired('javascript_views_footer',1);
jQuery('#jform_javascript_views_footer').removeAttr('required');
jQuery('#jform_javascript_views_footer').removeAttr('aria-required');
jQuery('#jform_javascript_views_footer').removeClass('required');
- jform_vvvvwabvzx_required = true;
+ jform_vvvvwabvzy_required = true;
}
}
}
diff --git a/admin/models/forms/help_document.js b/admin/models/forms/help_document.js
index 8d914335c..5d413bae9 100644
--- a/admin/models/forms/help_document.js
+++ b/admin/models/forms/help_document.js
@@ -23,12 +23,12 @@
/-----------------------------------------------------------------------------------------------------------------------------*/
// Some Global Values
-jform_vvvvwacwaa_required = false;
-jform_vvvvwadwab_required = false;
-jform_vvvvwaewac_required = false;
-jform_vvvvwafwad_required = false;
-jform_vvvvwagwae_required = false;
-jform_vvvvwahwaf_required = false;
+jform_vvvvwacwab_required = false;
+jform_vvvvwadwac_required = false;
+jform_vvvvwaewad_required = false;
+jform_vvvvwafwae_required = false;
+jform_vvvvwagwaf_required = false;
+jform_vvvvwahwag_required = false;
// Initial Script
jQuery(document).ready(function()
@@ -59,26 +59,26 @@ function vvvvwac(location_vvvvwac)
if (location_vvvvwac == 1)
{
jQuery('#jform_admin_view').closest('.control-group').show();
- if (jform_vvvvwacwaa_required)
+ if (jform_vvvvwacwab_required)
{
updateFieldRequired('admin_view',0);
jQuery('#jform_admin_view').prop('required','required');
jQuery('#jform_admin_view').attr('aria-required',true);
jQuery('#jform_admin_view').addClass('required');
- jform_vvvvwacwaa_required = false;
+ jform_vvvvwacwab_required = false;
}
}
else
{
jQuery('#jform_admin_view').closest('.control-group').hide();
- if (!jform_vvvvwacwaa_required)
+ if (!jform_vvvvwacwab_required)
{
updateFieldRequired('admin_view',1);
jQuery('#jform_admin_view').removeAttr('required');
jQuery('#jform_admin_view').removeAttr('aria-required');
jQuery('#jform_admin_view').removeClass('required');
- jform_vvvvwacwaa_required = true;
+ jform_vvvvwacwab_required = true;
}
}
}
@@ -90,26 +90,26 @@ function vvvvwad(location_vvvvwad)
if (location_vvvvwad == 2)
{
jQuery('#jform_site_view').closest('.control-group').show();
- if (jform_vvvvwadwab_required)
+ if (jform_vvvvwadwac_required)
{
updateFieldRequired('site_view',0);
jQuery('#jform_site_view').prop('required','required');
jQuery('#jform_site_view').attr('aria-required',true);
jQuery('#jform_site_view').addClass('required');
- jform_vvvvwadwab_required = false;
+ jform_vvvvwadwac_required = false;
}
}
else
{
jQuery('#jform_site_view').closest('.control-group').hide();
- if (!jform_vvvvwadwab_required)
+ if (!jform_vvvvwadwac_required)
{
updateFieldRequired('site_view',1);
jQuery('#jform_site_view').removeAttr('required');
jQuery('#jform_site_view').removeAttr('aria-required');
jQuery('#jform_site_view').removeClass('required');
- jform_vvvvwadwab_required = true;
+ jform_vvvvwadwac_required = true;
}
}
}
@@ -134,26 +134,26 @@ function vvvvwae(type_vvvvwae)
if (type)
{
jQuery('#jform_url').closest('.control-group').show();
- if (jform_vvvvwaewac_required)
+ if (jform_vvvvwaewad_required)
{
updateFieldRequired('url',0);
jQuery('#jform_url').prop('required','required');
jQuery('#jform_url').attr('aria-required',true);
jQuery('#jform_url').addClass('required');
- jform_vvvvwaewac_required = false;
+ jform_vvvvwaewad_required = false;
}
}
else
{
jQuery('#jform_url').closest('.control-group').hide();
- if (!jform_vvvvwaewac_required)
+ if (!jform_vvvvwaewad_required)
{
updateFieldRequired('url',1);
jQuery('#jform_url').removeAttr('required');
jQuery('#jform_url').removeAttr('aria-required');
jQuery('#jform_url').removeClass('required');
- jform_vvvvwaewac_required = true;
+ jform_vvvvwaewad_required = true;
}
}
}
@@ -189,26 +189,26 @@ function vvvvwaf(type_vvvvwaf)
if (type)
{
jQuery('#jform_article').closest('.control-group').show();
- if (jform_vvvvwafwad_required)
+ if (jform_vvvvwafwae_required)
{
updateFieldRequired('article',0);
jQuery('#jform_article').prop('required','required');
jQuery('#jform_article').attr('aria-required',true);
jQuery('#jform_article').addClass('required');
- jform_vvvvwafwad_required = false;
+ jform_vvvvwafwae_required = false;
}
}
else
{
jQuery('#jform_article').closest('.control-group').hide();
- if (!jform_vvvvwafwad_required)
+ if (!jform_vvvvwafwae_required)
{
updateFieldRequired('article',1);
jQuery('#jform_article').removeAttr('required');
jQuery('#jform_article').removeAttr('aria-required');
jQuery('#jform_article').removeClass('required');
- jform_vvvvwafwad_required = true;
+ jform_vvvvwafwae_required = true;
}
}
}
@@ -244,26 +244,26 @@ function vvvvwag(type_vvvvwag)
if (type)
{
jQuery('#jform_content-lbl').closest('.control-group').show();
- if (jform_vvvvwagwae_required)
+ if (jform_vvvvwagwaf_required)
{
updateFieldRequired('content',0);
jQuery('#jform_content').prop('required','required');
jQuery('#jform_content').attr('aria-required',true);
jQuery('#jform_content').addClass('required');
- jform_vvvvwagwae_required = false;
+ jform_vvvvwagwaf_required = false;
}
}
else
{
jQuery('#jform_content-lbl').closest('.control-group').hide();
- if (!jform_vvvvwagwae_required)
+ if (!jform_vvvvwagwaf_required)
{
updateFieldRequired('content',1);
jQuery('#jform_content').removeAttr('required');
jQuery('#jform_content').removeAttr('aria-required');
jQuery('#jform_content').removeClass('required');
- jform_vvvvwagwae_required = true;
+ jform_vvvvwagwaf_required = true;
}
}
}
@@ -286,26 +286,26 @@ function vvvvwah(target_vvvvwah)
if (target_vvvvwah == 1)
{
jQuery('#jform_groups').closest('.control-group').show();
- if (jform_vvvvwahwaf_required)
+ if (jform_vvvvwahwag_required)
{
updateFieldRequired('groups',0);
jQuery('#jform_groups').prop('required','required');
jQuery('#jform_groups').attr('aria-required',true);
jQuery('#jform_groups').addClass('required');
- jform_vvvvwahwaf_required = false;
+ jform_vvvvwahwag_required = false;
}
}
else
{
jQuery('#jform_groups').closest('.control-group').hide();
- if (!jform_vvvvwahwaf_required)
+ if (!jform_vvvvwahwag_required)
{
updateFieldRequired('groups',1);
jQuery('#jform_groups').removeAttr('required');
jQuery('#jform_groups').removeAttr('aria-required');
jQuery('#jform_groups').removeClass('required');
- jform_vvvvwahwaf_required = true;
+ jform_vvvvwahwag_required = true;
}
}
}
diff --git a/admin/models/forms/joomla_component.js b/admin/models/forms/joomla_component.js
index 473af54b7..03d5500fb 100644
--- a/admin/models/forms/joomla_component.js
+++ b/admin/models/forms/joomla_component.js
@@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 132 of this MVC
- @build 20th March, 2017
+ @version @update number 182 of this MVC
+ @build 27th March, 2017
@created 6th May, 2015
@package Component Builder
@subpackage joomla_component.js
diff --git a/admin/models/forms/layout.js b/admin/models/forms/layout.js
index 262b5ceca..5339fa165 100644
--- a/admin/models/forms/layout.js
+++ b/admin/models/forms/layout.js
@@ -23,7 +23,7 @@
/-----------------------------------------------------------------------------------------------------------------------------*/
// Some Global Values
-jform_vvvvvyrvyt_required = false;
+jform_vvvvvyrvyu_required = false;
// Initial Script
jQuery(document).ready(function()
@@ -39,26 +39,26 @@ function vvvvvyr(add_php_view_vvvvvyr)
if (add_php_view_vvvvvyr == 1)
{
jQuery('#jform_php_view').closest('.control-group').show();
- if (jform_vvvvvyrvyt_required)
+ if (jform_vvvvvyrvyu_required)
{
updateFieldRequired('php_view',0);
jQuery('#jform_php_view').prop('required','required');
jQuery('#jform_php_view').attr('aria-required',true);
jQuery('#jform_php_view').addClass('required');
- jform_vvvvvyrvyt_required = false;
+ jform_vvvvvyrvyu_required = false;
}
}
else
{
jQuery('#jform_php_view').closest('.control-group').hide();
- if (!jform_vvvvvyrvyt_required)
+ if (!jform_vvvvvyrvyu_required)
{
updateFieldRequired('php_view',1);
jQuery('#jform_php_view').removeAttr('required');
jQuery('#jform_php_view').removeAttr('aria-required');
jQuery('#jform_php_view').removeClass('required');
- jform_vvvvvyrvyt_required = true;
+ jform_vvvvvyrvyu_required = true;
}
}
}
diff --git a/admin/models/forms/site_view.js b/admin/models/forms/site_view.js
index da0626f5a..e4f72d3a9 100644
--- a/admin/models/forms/site_view.js
+++ b/admin/models/forms/site_view.js
@@ -23,16 +23,16 @@
/-----------------------------------------------------------------------------------------------------------------------------*/
// Some Global Values
-jform_vvvvvyhvyh_required = false;
-jform_vvvvvyivyi_required = false;
-jform_vvvvvyjvyj_required = false;
-jform_vvvvvykvyk_required = false;
-jform_vvvvvylvyl_required = false;
-jform_vvvvvymvym_required = false;
-jform_vvvvvynvyn_required = false;
-jform_vvvvvyovyo_required = false;
-jform_vvvvvypvyp_required = false;
+jform_vvvvvyhvyi_required = false;
+jform_vvvvvyivyj_required = false;
+jform_vvvvvyjvyk_required = false;
+jform_vvvvvykvyl_required = false;
+jform_vvvvvylvym_required = false;
+jform_vvvvvymvyn_required = false;
+jform_vvvvvynvyo_required = false;
+jform_vvvvvyovyp_required = false;
jform_vvvvvypvyq_required = false;
+jform_vvvvvypvyr_required = false;
// Initial Script
jQuery(document).ready(function()
@@ -72,26 +72,26 @@ function vvvvvyh(add_php_view_vvvvvyh)
if (add_php_view_vvvvvyh == 1)
{
jQuery('#jform_php_view').closest('.control-group').show();
- if (jform_vvvvvyhvyh_required)
+ if (jform_vvvvvyhvyi_required)
{
updateFieldRequired('php_view',0);
jQuery('#jform_php_view').prop('required','required');
jQuery('#jform_php_view').attr('aria-required',true);
jQuery('#jform_php_view').addClass('required');
- jform_vvvvvyhvyh_required = false;
+ jform_vvvvvyhvyi_required = false;
}
}
else
{
jQuery('#jform_php_view').closest('.control-group').hide();
- if (!jform_vvvvvyhvyh_required)
+ if (!jform_vvvvvyhvyi_required)
{
updateFieldRequired('php_view',1);
jQuery('#jform_php_view').removeAttr('required');
jQuery('#jform_php_view').removeAttr('aria-required');
jQuery('#jform_php_view').removeClass('required');
- jform_vvvvvyhvyh_required = true;
+ jform_vvvvvyhvyi_required = true;
}
}
}
@@ -103,26 +103,26 @@ function vvvvvyi(add_php_jview_display_vvvvvyi)
if (add_php_jview_display_vvvvvyi == 1)
{
jQuery('#jform_php_jview_display').closest('.control-group').show();
- if (jform_vvvvvyivyi_required)
+ if (jform_vvvvvyivyj_required)
{
updateFieldRequired('php_jview_display',0);
jQuery('#jform_php_jview_display').prop('required','required');
jQuery('#jform_php_jview_display').attr('aria-required',true);
jQuery('#jform_php_jview_display').addClass('required');
- jform_vvvvvyivyi_required = false;
+ jform_vvvvvyivyj_required = false;
}
}
else
{
jQuery('#jform_php_jview_display').closest('.control-group').hide();
- if (!jform_vvvvvyivyi_required)
+ if (!jform_vvvvvyivyj_required)
{
updateFieldRequired('php_jview_display',1);
jQuery('#jform_php_jview_display').removeAttr('required');
jQuery('#jform_php_jview_display').removeAttr('aria-required');
jQuery('#jform_php_jview_display').removeClass('required');
- jform_vvvvvyivyi_required = true;
+ jform_vvvvvyivyj_required = true;
}
}
}
@@ -134,26 +134,26 @@ function vvvvvyj(add_php_jview_vvvvvyj)
if (add_php_jview_vvvvvyj == 1)
{
jQuery('#jform_php_jview').closest('.control-group').show();
- if (jform_vvvvvyjvyj_required)
+ if (jform_vvvvvyjvyk_required)
{
updateFieldRequired('php_jview',0);
jQuery('#jform_php_jview').prop('required','required');
jQuery('#jform_php_jview').attr('aria-required',true);
jQuery('#jform_php_jview').addClass('required');
- jform_vvvvvyjvyj_required = false;
+ jform_vvvvvyjvyk_required = false;
}
}
else
{
jQuery('#jform_php_jview').closest('.control-group').hide();
- if (!jform_vvvvvyjvyj_required)
+ if (!jform_vvvvvyjvyk_required)
{
updateFieldRequired('php_jview',1);
jQuery('#jform_php_jview').removeAttr('required');
jQuery('#jform_php_jview').removeAttr('aria-required');
jQuery('#jform_php_jview').removeClass('required');
- jform_vvvvvyjvyj_required = true;
+ jform_vvvvvyjvyk_required = true;
}
}
}
@@ -165,26 +165,26 @@ function vvvvvyk(add_php_document_vvvvvyk)
if (add_php_document_vvvvvyk == 1)
{
jQuery('#jform_php_document').closest('.control-group').show();
- if (jform_vvvvvykvyk_required)
+ if (jform_vvvvvykvyl_required)
{
updateFieldRequired('php_document',0);
jQuery('#jform_php_document').prop('required','required');
jQuery('#jform_php_document').attr('aria-required',true);
jQuery('#jform_php_document').addClass('required');
- jform_vvvvvykvyk_required = false;
+ jform_vvvvvykvyl_required = false;
}
}
else
{
jQuery('#jform_php_document').closest('.control-group').hide();
- if (!jform_vvvvvykvyk_required)
+ if (!jform_vvvvvykvyl_required)
{
updateFieldRequired('php_document',1);
jQuery('#jform_php_document').removeAttr('required');
jQuery('#jform_php_document').removeAttr('aria-required');
jQuery('#jform_php_document').removeClass('required');
- jform_vvvvvykvyk_required = true;
+ jform_vvvvvykvyl_required = true;
}
}
}
@@ -196,26 +196,26 @@ function vvvvvyl(add_css_document_vvvvvyl)
if (add_css_document_vvvvvyl == 1)
{
jQuery('#jform_css_document').closest('.control-group').show();
- if (jform_vvvvvylvyl_required)
+ if (jform_vvvvvylvym_required)
{
updateFieldRequired('css_document',0);
jQuery('#jform_css_document').prop('required','required');
jQuery('#jform_css_document').attr('aria-required',true);
jQuery('#jform_css_document').addClass('required');
- jform_vvvvvylvyl_required = false;
+ jform_vvvvvylvym_required = false;
}
}
else
{
jQuery('#jform_css_document').closest('.control-group').hide();
- if (!jform_vvvvvylvyl_required)
+ if (!jform_vvvvvylvym_required)
{
updateFieldRequired('css_document',1);
jQuery('#jform_css_document').removeAttr('required');
jQuery('#jform_css_document').removeAttr('aria-required');
jQuery('#jform_css_document').removeClass('required');
- jform_vvvvvylvyl_required = true;
+ jform_vvvvvylvym_required = true;
}
}
}
@@ -227,26 +227,26 @@ function vvvvvym(add_js_document_vvvvvym)
if (add_js_document_vvvvvym == 1)
{
jQuery('#jform_js_document').closest('.control-group').show();
- if (jform_vvvvvymvym_required)
+ if (jform_vvvvvymvyn_required)
{
updateFieldRequired('js_document',0);
jQuery('#jform_js_document').prop('required','required');
jQuery('#jform_js_document').attr('aria-required',true);
jQuery('#jform_js_document').addClass('required');
- jform_vvvvvymvym_required = false;
+ jform_vvvvvymvyn_required = false;
}
}
else
{
jQuery('#jform_js_document').closest('.control-group').hide();
- if (!jform_vvvvvymvym_required)
+ if (!jform_vvvvvymvyn_required)
{
updateFieldRequired('js_document',1);
jQuery('#jform_js_document').removeAttr('required');
jQuery('#jform_js_document').removeAttr('aria-required');
jQuery('#jform_js_document').removeClass('required');
- jform_vvvvvymvym_required = true;
+ jform_vvvvvymvyn_required = true;
}
}
}
@@ -258,26 +258,26 @@ function vvvvvyn(add_css_vvvvvyn)
if (add_css_vvvvvyn == 1)
{
jQuery('#jform_css').closest('.control-group').show();
- if (jform_vvvvvynvyn_required)
+ if (jform_vvvvvynvyo_required)
{
updateFieldRequired('css',0);
jQuery('#jform_css').prop('required','required');
jQuery('#jform_css').attr('aria-required',true);
jQuery('#jform_css').addClass('required');
- jform_vvvvvynvyn_required = false;
+ jform_vvvvvynvyo_required = false;
}
}
else
{
jQuery('#jform_css').closest('.control-group').hide();
- if (!jform_vvvvvynvyn_required)
+ if (!jform_vvvvvynvyo_required)
{
updateFieldRequired('css',1);
jQuery('#jform_css').removeAttr('required');
jQuery('#jform_css').removeAttr('aria-required');
jQuery('#jform_css').removeClass('required');
- jform_vvvvvynvyn_required = true;
+ jform_vvvvvynvyo_required = true;
}
}
}
@@ -290,13 +290,13 @@ function vvvvvyo(add_php_ajax_vvvvvyo)
{
jQuery('#jform_ajax_input').closest('.control-group').show();
jQuery('#jform_php_ajaxmethod').closest('.control-group').show();
- if (jform_vvvvvyovyo_required)
+ if (jform_vvvvvyovyp_required)
{
updateFieldRequired('php_ajaxmethod',0);
jQuery('#jform_php_ajaxmethod').prop('required','required');
jQuery('#jform_php_ajaxmethod').attr('aria-required',true);
jQuery('#jform_php_ajaxmethod').addClass('required');
- jform_vvvvvyovyo_required = false;
+ jform_vvvvvyovyp_required = false;
}
}
@@ -304,13 +304,13 @@ function vvvvvyo(add_php_ajax_vvvvvyo)
{
jQuery('#jform_ajax_input').closest('.control-group').hide();
jQuery('#jform_php_ajaxmethod').closest('.control-group').hide();
- if (!jform_vvvvvyovyo_required)
+ if (!jform_vvvvvyovyp_required)
{
updateFieldRequired('php_ajaxmethod',1);
jQuery('#jform_php_ajaxmethod').removeAttr('required');
jQuery('#jform_php_ajaxmethod').removeAttr('aria-required');
jQuery('#jform_php_ajaxmethod').removeClass('required');
- jform_vvvvvyovyo_required = true;
+ jform_vvvvvyovyp_required = true;
}
}
}
@@ -323,23 +323,23 @@ function vvvvvyp(add_custom_button_vvvvvyp)
{
jQuery('#jform_custom_button').closest('.control-group').show();
jQuery('#jform_php_controller').closest('.control-group').show();
- if (jform_vvvvvypvyp_required)
+ if (jform_vvvvvypvyq_required)
{
updateFieldRequired('php_controller',0);
jQuery('#jform_php_controller').prop('required','required');
jQuery('#jform_php_controller').attr('aria-required',true);
jQuery('#jform_php_controller').addClass('required');
- jform_vvvvvypvyp_required = false;
+ jform_vvvvvypvyq_required = false;
}
jQuery('#jform_php_model').closest('.control-group').show();
- if (jform_vvvvvypvyq_required)
+ if (jform_vvvvvypvyr_required)
{
updateFieldRequired('php_model',0);
jQuery('#jform_php_model').prop('required','required');
jQuery('#jform_php_model').attr('aria-required',true);
jQuery('#jform_php_model').addClass('required');
- jform_vvvvvypvyq_required = false;
+ jform_vvvvvypvyr_required = false;
}
}
@@ -347,22 +347,22 @@ function vvvvvyp(add_custom_button_vvvvvyp)
{
jQuery('#jform_custom_button').closest('.control-group').hide();
jQuery('#jform_php_controller').closest('.control-group').hide();
- if (!jform_vvvvvypvyp_required)
+ if (!jform_vvvvvypvyq_required)
{
updateFieldRequired('php_controller',1);
jQuery('#jform_php_controller').removeAttr('required');
jQuery('#jform_php_controller').removeAttr('aria-required');
jQuery('#jform_php_controller').removeClass('required');
- jform_vvvvvypvyp_required = true;
+ jform_vvvvvypvyq_required = true;
}
jQuery('#jform_php_model').closest('.control-group').hide();
- if (!jform_vvvvvypvyq_required)
+ if (!jform_vvvvvypvyr_required)
{
updateFieldRequired('php_model',1);
jQuery('#jform_php_model').removeAttr('required');
jQuery('#jform_php_model').removeAttr('aria-required');
jQuery('#jform_php_model').removeClass('required');
- jform_vvvvvypvyq_required = true;
+ jform_vvvvvypvyr_required = true;
}
}
}
diff --git a/admin/models/forms/template.js b/admin/models/forms/template.js
index b8e495702..7844183e4 100644
--- a/admin/models/forms/template.js
+++ b/admin/models/forms/template.js
@@ -23,7 +23,7 @@
/-----------------------------------------------------------------------------------------------------------------------------*/
// Some Global Values
-jform_vvvvvyqvys_required = false;
+jform_vvvvvyqvyt_required = false;
// Initial Script
jQuery(document).ready(function()
@@ -39,26 +39,26 @@ function vvvvvyq(add_php_view_vvvvvyq)
if (add_php_view_vvvvvyq == 1)
{
jQuery('#jform_php_view').closest('.control-group').show();
- if (jform_vvvvvyqvys_required)
+ if (jform_vvvvvyqvyt_required)
{
updateFieldRequired('php_view',0);
jQuery('#jform_php_view').prop('required','required');
jQuery('#jform_php_view').attr('aria-required',true);
jQuery('#jform_php_view').addClass('required');
- jform_vvvvvyqvys_required = false;
+ jform_vvvvvyqvyt_required = false;
}
}
else
{
jQuery('#jform_php_view').closest('.control-group').hide();
- if (!jform_vvvvvyqvys_required)
+ if (!jform_vvvvvyqvyt_required)
{
updateFieldRequired('php_view',1);
jQuery('#jform_php_view').removeAttr('required');
jQuery('#jform_php_view').removeAttr('aria-required');
jQuery('#jform_php_view').removeClass('required');
- jform_vvvvvyqvys_required = true;
+ jform_vvvvvyqvyt_required = true;
}
}
}
diff --git a/admin/models/import.php b/admin/models/import.php
index a1394ea32..d5d4f4552 100644
--- a/admin/models/import.php
+++ b/admin/models/import.php
@@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version 2.3.7
- @build 20th March, 2017
+ @version 2.3.8
+ @build 27th March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage import.php
@@ -31,6 +31,11 @@ defined('_JEXEC') or die('Restricted access');
*/
class ComponentbuilderModelImport extends JModelLegacy
{
+ // set uploading values
+ protected $use_streams = false;
+ protected $allow_unsafe = false;
+ protected $safeFileOptions = array();
+
/**
* @var object JTable object
*/
@@ -72,10 +77,6 @@ class ComponentbuilderModelImport extends JModelLegacy
// Recall the 'Import from Directory' path.
$path = $app->getUserStateFromRequest($this->_context . '.import_directory', 'import_directory', $app->get('tmp_path'));
$this->setState('import.directory', $path);
- // set uploading values
- $this->use_streams = false;
- $this->allow_unsafe = false;
- $this->safeFileOptions = array();
parent::populateState();
}
@@ -282,21 +283,16 @@ class ComponentbuilderModelImport extends JModelLegacy
}
// check the extention
- switch(strtolower(pathinfo($p_dir, PATHINFO_EXTENSION))){
- case 'xls':
- case 'ods':
- case 'csv':
- break;
-
- default:
+ if(!$this->checkExtension($p_dir))
+ {
+ // set error message
$app->enqueueMessage(JText::_('COM_COMPONENTBUILDER_IMPORT_MSG_DOES_NOT_HAVE_A_VALID_FILE_TYPE'), 'warning');
return false;
- break;
}
$package['packagename'] = null;
- $package['dir'] = $p_dir;
- $package['type'] = $type;
+ $package['dir'] = $p_dir;
+ $package['type'] = $type;
return $package;
}
@@ -354,21 +350,15 @@ class ComponentbuilderModelImport extends JModelLegacy
$archivename = JPath::clean($archivename);
// check the extention
- switch(strtolower(pathinfo($archivename, PATHINFO_EXTENSION))){
- case 'xls':
- case 'ods':
- case 'csv':
- break;
-
- default:
+ if(!$this->checkExtension($archivename))
+ {
// Cleanup the import files
$this->remove($archivename);
$app->enqueueMessage(JText::_('COM_COMPONENTBUILDER_IMPORT_MSG_DOES_NOT_HAVE_A_VALID_FILE_TYPE'), 'warning');
return false;
- break;
- }
+ }
- $config = JFactory::getConfig();
+ $config = JFactory::getConfig();
// set Package Name
$check['packagename'] = $archivename;
@@ -381,6 +371,28 @@ class ComponentbuilderModelImport extends JModelLegacy
return $check;
}
+ /**
+ * Check the extension
+ *
+ * @param string $file Name of the uploaded file
+ *
+ * @return boolean True on success
+ *
+ */
+ protected function checkExtension($file)
+ {
+ // check the extention
+ switch(strtolower(pathinfo($file, PATHINFO_EXTENSION)))
+ {
+ case 'xls':
+ case 'ods':
+ case 'csv':
+ return true;
+ break;
+ }
+ return false;
+ }
+
/**
* Clean up temporary uploaded spreadsheet
*
diff --git a/admin/models/import_joomla_components.php b/admin/models/import_joomla_components.php
new file mode 100644
index 000000000..b573ee460
--- /dev/null
+++ b/admin/models/import_joomla_components.php
@@ -0,0 +1,1576 @@
+
+ @copyright Copyright (C) 2015. All Rights Reserved
+ @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
+
+ Builds Complex Joomla Components
+
+/-----------------------------------------------------------------------------------------------------------------------------*/
+
+// No direct access to this file
+defined('_JEXEC') or die('Restricted access');
+
+/**
+ * Componentbuilder Import_joomla_components Model
+ */
+class ComponentbuilderModelImport_joomla_components extends JModelLegacy
+{
+ // set uploading values
+ protected $use_streams = false;
+ protected $allow_unsafe = false;
+ protected $safeFileOptions = array();
+
+ /**
+ * @var object JTable object
+ */
+ protected $_table = null;
+
+ /**
+ * @var object JTable object
+ */
+ protected $_url = null;
+
+ /**
+ * Model context string.
+ *
+ * @var string
+ */
+ protected $_context = 'com_componentbuilder.import_joomla_components';
+
+ /**
+ * Import Settings
+ */
+ protected $getType = NULL;
+ protected $dataType = NULL;
+
+ /**
+ * Method to auto-populate the model state.
+ *
+ * Note. Calling getState in this method will result in recursion.
+ *
+ * @return void
+ *
+ */
+ protected function populateState()
+ {
+ $app = JFactory::getApplication('administrator');
+
+ $this->setState('message', $app->getUserState('com_componentbuilder.message'));
+ $app->setUserState('com_componentbuilder.message', '');
+
+ // Recall the 'Import from Directory' path.
+ $path = $app->getUserStateFromRequest($this->_context . '.import_directory', 'import_directory', $app->get('tmp_path'));
+ $this->setState('import.directory', $path);
+ parent::populateState();
+ }
+
+ protected $target = false;
+ protected $newID = array();
+
+ /**
+ * Import an spreadsheet from either folder, url or upload.
+ *
+ * @return boolean result of import
+ *
+ */
+ public function import()
+ {
+ $this->setState('action', 'import');
+ $app = JFactory::getApplication();
+ $session = JFactory::getSession();
+ $package = null;
+ $continue = false;
+ // get import type
+ $this->getType = $app->input->getString('gettype', NULL);
+ // get import type
+ $this->dataType = $session->get('dataType_VDM_IMPORTINTO', NULL);
+
+ if ($package === null)
+ {
+ if ($this->dataType === 'smart_package')
+ {
+ $this->allow_unsafe = true;
+ }
+ switch ($this->getType)
+ {
+ case 'folder':
+ // Remember the 'Import from Directory' path.
+ $app->getUserStateFromRequest($this->_context . '.import_directory', 'import_directory');
+ $package = $this->_getPackageFromFolder();
+ break;
+
+ case 'upload':
+ $package = $this->_getPackageFromUpload();
+ break;
+
+ case 'url':
+ $package = $this->_getPackageFromUrl();
+ break;
+
+ case 'continue-basic':
+ case 'continue-ext':
+ $continue = true;
+ $package = $session->get('package', null);
+ $package = json_decode($package, true);
+ // clear session
+ $session->clear('package');
+ $session->clear('dataType');
+ $session->clear('hasPackage');
+ break;
+
+ default:
+ $app->setUserState('com_componentbuilder.message', JText::_('COM_COMPONENTBUILDER_IMPORT_NO_IMPORT_TYPE_FOUND'));
+ return false;
+ break;
+ }
+ }
+ // Was the package valid?
+ if (!$package || !$package['type'])
+ {
+ if (in_array($this->getType, array('upload', 'url')))
+ {
+ $this->remove($package['packagename']);
+ }
+
+ $app->setUserState('com_componentbuilder.message', JText::_('COM_COMPONENTBUILDER_IMPORT_UNABLE_TO_FIND_IMPORT_PACKAGE'));
+ return false;
+ }
+
+ // first link data to table headers
+ if(!$continue){
+ $package = json_encode($package);
+ $session->set('package', $package);
+ $session->set('dataType', $this->dataType);
+ $session->set('hasPackage', true);
+ return true;
+ }
+ // set the data
+ if ('continue-basic' == $this->getType)
+ {
+ $headerList = json_decode($session->get($this->dataType.'_VDM_IMPORTHEADERS', false), true);
+ }
+ else
+ {
+ $headerList = null;
+ }
+ if (!$this->setData($package, $headerList))
+ {
+ // There was an error importing the package
+ $msg = JText::_('COM_COMPONENTBUILDER_IMPORT_ERROR');
+ $back = $session->get('backto_VDM_IMPORT', NULL);
+ if ($back)
+ {
+ $app->setUserState('com_componentbuilder.redirect_url', 'index.php?option=com_componentbuilder&view='.$back);
+ $session->clear('backto_VDM_IMPORT');
+ }
+ $result = false;
+ }
+ else
+ {
+ // Package imported sucessfully
+ $msg = JText::sprintf('COM_COMPONENTBUILDER_IMPORT_SUCCESS', $package['packagename']);
+ $back = $session->get('backto_VDM_IMPORT', NULL);
+ if ($back)
+ {
+ $app->setUserState('com_componentbuilder.redirect_url', 'index.php?option=com_componentbuilder&view='.$back);
+ $session->clear('backto_VDM_IMPORT');
+ }
+ $result = true;
+ }
+
+ // Set some model state values
+ $app->enqueueMessage($msg);
+
+ // remove file after import
+ $this->remove($package['packagename']);
+ $session->clear($this->getType.'_VDM_IMPORTHEADERS');
+ return $result;
+ }
+
+ /**
+ * Works out an importation spreadsheet from a HTTP upload
+ *
+ * @return spreadsheet definition or false on failure
+ */
+ protected function _getPackageFromUpload()
+ {
+ // Get the uploaded file information
+ $app = JFactory::getApplication();
+ $input = $app->input;
+
+ // Do not change the filter type 'raw'. We need this to let files containing PHP code to upload. See JInputFiles::get.
+ $userfile = $input->files->get('import_package', null, 'raw');
+
+ // Make sure that file uploads are enabled in php
+ if (!(bool) ini_get('file_uploads'))
+ {
+ $app->enqueueMessage(JText::_('COM_COMPONENTBUILDER_IMPORT_MSG_WARNIMPORTFILE'), 'warning');
+ return false;
+ }
+
+ // If there is no uploaded file, we have a problem...
+ if (!is_array($userfile))
+ {
+ $app->enqueueMessage(JText::_('COM_COMPONENTBUILDER_IMPORT_MSG_NO_FILE_SELECTED'), 'warning');
+ return false;
+ }
+
+ // Check if there was a problem uploading the file.
+ if ($userfile['error'] || $userfile['size'] < 1)
+ {
+ $app->enqueueMessage(JText::_('COM_COMPONENTBUILDER_IMPORT_MSG_WARNIMPORTUPLOADERROR'), 'warning');
+ return false;
+ }
+
+ // Build the appropriate paths
+ $config = JFactory::getConfig();
+ $tmp_dest = $config->get('tmp_path') . '/' . $userfile['name'];
+ $tmp_src = $userfile['tmp_name'];
+
+ // Move uploaded file
+ jimport('joomla.filesystem.file');
+ $p_file = JFile::upload($tmp_src, $tmp_dest, $this->use_streams, $this->allow_unsafe, $this->safeFileOptions);
+
+ // Was the package downloaded?
+ if (!$p_file)
+ {
+ $session = JFactory::getSession();
+ $session->clear('package');
+ $session->clear('dataType');
+ $session->clear('hasPackage');
+ // was not uploaded
+ return false;
+ }
+
+ // check that this is a valid spreadsheet
+ $package = $this->check($userfile['name']);
+
+ return $package;
+ }
+
+ /**
+ * Import an spreadsheet from a directory
+ *
+ * @return array Spreadsheet details or false on failure
+ *
+ */
+ protected function _getPackageFromFolder()
+ {
+ $app = JFactory::getApplication();
+ $input = $app->input;
+
+ // Get the path to the package to import
+ $p_dir = $input->getString('import_directory');
+ $p_dir = JPath::clean($p_dir);
+ // Did you give us a valid path?
+ if (!file_exists($p_dir))
+ {
+ $app->enqueueMessage(JText::_('COM_COMPONENTBUILDER_IMPORT_MSG_PLEASE_ENTER_A_PACKAGE_DIRECTORY'), 'warning');
+ return false;
+ }
+
+ // Detect the package type
+ $type = $this->getType;
+
+ // Did you give us a valid package?
+ if (!$type)
+ {
+ $app->enqueueMessage(JText::_('COM_COMPONENTBUILDER_IMPORT_MSG_PATH_DOES_NOT_HAVE_A_VALID_PACKAGE'), 'warning');
+ }
+
+ // check the extention
+ if(!$this->checkExtension($p_dir))
+ {
+ // set error message
+ $app->enqueueMessage(JText::_('COM_COMPONENTBUILDER_IMPORT_MSG_DOES_NOT_HAVE_A_VALID_FILE_TYPE'), 'warning');
+ return false;
+ }
+
+ $package['packagename'] = null;
+ $package['dir'] = $p_dir;
+ $package['type'] = $type;
+
+ return $package;
+ }
+
+ /**
+ * Import an spreadsheet from a URL
+ *
+ * @return Package details or false on failure
+ *
+ */
+ protected function _getPackageFromUrl()
+ {
+ $app = JFactory::getApplication();
+ $input = $app->input;
+
+ // Get the URL of the package to import
+ $url = $input->getString('import_url');
+
+ // Did you give us a URL?
+ if (!$url)
+ {
+ $app->enqueueMessage(JText::_('COM_COMPONENTBUILDER_IMPORT_MSG_ENTER_A_URL'), 'warning');
+ return false;
+ }
+
+ // Download the package at the URL given
+ $p_file = JInstallerHelper::downloadPackage($url);
+
+ // Was the package downloaded?
+ if (!$p_file)
+ {
+ $app->enqueueMessage(JText::_('COM_COMPONENTBUILDER_IMPORT_MSG_INVALID_URL'), 'warning');
+ return false;
+ }
+
+ // check that this is a valid spreadsheet
+ $package = $this->check($p_file);
+
+ return $package;
+ }
+
+ /**
+ * Check a file and verifies it as a spreadsheet file
+ * Supports .csv .xlsx .xls and .ods
+ *
+ * @param string $p_filename The uploaded package filename or import directory
+ *
+ * @return array of elements
+ *
+ */
+ protected function check($archivename)
+ {
+ $app = JFactory::getApplication();
+ // Clean the name
+ $archivename = JPath::clean($archivename);
+
+ // check the extention
+ if(!$this->checkExtension($archivename))
+ {
+ // Cleanup the import files
+ $this->remove($archivename);
+ $app->enqueueMessage(JText::_('COM_COMPONENTBUILDER_IMPORT_MSG_DOES_NOT_HAVE_A_VALID_FILE_TYPE'), 'warning');
+ return false;
+ }
+
+ $config = JFactory::getConfig();
+ // set Package Name
+ $check['packagename'] = $archivename;
+
+ // set directory
+ $check['dir'] = $config->get('tmp_path'). '/' .$archivename;
+
+ // set type
+ $check['type'] = $this->getType;
+
+ return $check;
+ }
+
+ /**
+ * Check the extension
+ *
+ * @param string $file Name of the uploaded file
+ *
+ * @return boolean True on success
+ *
+ */
+ protected function checkExtension($file)
+ {
+ // check the extension
+ switch(strtolower(pathinfo($file, PATHINFO_EXTENSION)))
+ {
+ case 'xls':
+ case 'ods':
+ case 'csv':
+ return true;
+ break;
+ case 'zip':
+ if ($this->dataType === 'smart_package')
+ {
+ return true;
+ }
+ break;
+ }
+ return false;
+ }
+
+ /**
+ * Clean up temporary uploaded spreadsheet
+ *
+ * @param string $package Name of the uploaded spreadsheet file
+ *
+ * @return boolean True on success
+ *
+ */
+ protected function remove($package)
+ {
+ jimport('joomla.filesystem.file');
+
+ $config = JFactory::getConfig();
+ $package = $config->get('tmp_path'). '/' .$package;
+
+ // Is the package file a valid file?
+ if (is_file($package))
+ {
+ JFile::delete($package);
+ }
+ elseif (is_file(JPath::clean($package)))
+ {
+ // It might also be just a base filename
+ JFile::delete(JPath::clean($package));
+ }
+ }
+
+ /**
+ * Set the data from the spreadsheet to the database
+ *
+ * @param string $package Paths to the uploaded package file
+ *
+ * @return boolean false on failure
+ *
+ **/
+ protected function setData($package, $target_headers)
+ {
+ $jinput = JFactory::getApplication()->input;
+ // set the data based on the type of import being done
+ if ('continue-basic' === $this->getType && ComponentbuilderHelper::checkArray($target_headers))
+ {
+ foreach($target_headers as $header)
+ {
+ $data['target_headers'][$header] = $jinput->getString($header, null);
+ }
+ // make sure the file is loaded
+ JLoader::import('PHPExcel', JPATH_COMPONENT_ADMINISTRATOR . '/helpers');
+ // set the data
+ if(isset($package['dir']))
+ {
+ $inputFileType = PHPExcel_IOFactory::identify($package['dir']);
+ $excelReader = PHPExcel_IOFactory::createReader($inputFileType);
+ $excelReader->setReadDataOnly(true);
+ $excelObj = $excelReader->load($package['dir']);
+ $data['array'] = $excelObj->getActiveSheet()->toArray(null, true,true,true);
+ $excelObj->disconnectWorksheets();
+ unset($excelObj);
+ return $this->saveBasic($data);
+ }
+ }
+ elseif ('continue-ext' === $this->getType)
+ {
+ // set the data
+ if(isset($package['dir']))
+ {
+ // set auto loader
+ ComponentbuilderHelper::autoLoader('smart');
+ // extract the package
+ if (JFile::exists($package['dir']))
+ {
+ // get the zip adapter
+ $zip = JArchive::getAdapter('zip');
+ // set the directory name
+ $dir = JFile::stripExt($package['dir']);
+ // unzip the package
+ $zip->extract($package['dir'], $dir);
+ // check for database file
+ $dbFile = $dir . '/db.vdm';
+ if (JFile::exists($dbFile))
+ {
+ // load the data
+ if ($data = @file_get_contents($dbFile))
+ {
+ // prep the data
+ $data = unserialize($data);
+ if (isset($data['joomla_component']) && ComponentbuilderHelper::checkArray($data['joomla_component']))
+ {
+ // save the smart data
+ if ($this->saveSmartComponents($data, $dir))
+ {
+ ComponentbuilderHelper::removeFolder($dir);
+ return true;
+ }
+ }
+ }
+ }
+ ComponentbuilderHelper::removeFolder($dir);
+ }
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Save the smart components
+ *
+ * @param array $data The values to save
+ *
+ * @return boolean false on failure
+ *
+ **/
+ protected function saveSmartComponents($data, $dir)
+ {
+ // get user object
+ $user = JFactory::getUser();
+ // Get a db connection.
+ $db = JFactory::getDbo();
+ // set some defaults
+ $today = JFactory::getDate()->toSql();
+ // we first store the fieldtype
+ if (!$this->saveSmartItems($data, 'fieldtype', $db, $user, $today))
+ {
+ return false;
+ }
+ // we then store the field
+ if (!$this->saveSmartItems($data, 'field', $db, $user, $today))
+ {
+ return false;
+ }
+ // we then store the admin_view
+ if (!$this->saveSmartItems($data, 'admin_view', $db, $user, $today))
+ {
+ return false;
+ }
+ // we then store the dynamic_get
+ if (!$this->saveSmartItems($data, 'dynamic_get', $db, $user, $today))
+ {
+ return false;
+ }
+ // we then store the custom_admin_view
+ if (!$this->saveSmartItems($data, 'custom_admin_view', $db, $user, $today))
+ {
+ return false;
+ }
+ // we then store the site_view
+ if (!$this->saveSmartItems($data, 'site_view', $db, $user, $today))
+ {
+ return false;
+ }
+ // we then store the template
+ if (!$this->saveSmartItems($data, 'template', $db, $user, $today))
+ {
+ return false;
+ }
+ // we then store the layout
+ if (!$this->saveSmartItems($data, 'layout', $db, $user, $today))
+ {
+ return false;
+ }
+ // we then store the components
+ if (!$this->saveSmartItems($data, 'joomla_component', $db, $user, $today))
+ {
+ return false;
+ }
+ // we then store the custom_code
+ if (!$this->saveSmartItems($data, 'custom_code', $db, $user, $today))
+ {
+ return false;
+ }
+ // lets move all the files to its correct location
+ if (!$this->moveSmartStuff($dir))
+ {
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * Move the smart content (files & folders) into place
+ *
+ * @param string $dir The path to the folders
+ *
+ * @return boolean false on failure
+ *
+ **/
+ protected function moveSmartStuff($dir)
+ {
+ // set params
+ $params = JComponentHelper::getParams('com_componentbuilder');
+ // set custom folder path
+ $customPath = $params->get('custom_folder_path', JPATH_COMPONENT_ADMINISTRATOR.'/custom');
+ $imagesPath = JPATH_SITE . '/images';
+ // check if we have custom files
+ if (JFolder::exists($dir . '/custom'))
+ {
+ // great we have some custom stuff lets move it
+ JFolder::copy($dir . '/custom', $customPath,'',true);
+ }
+ // check if we have images
+ if (JFolder::exists($dir . '/images'))
+ {
+ // great we have some images lets move them
+ JFolder::copy($dir . '/images', $imagesPath,'',true);
+ }
+ return true;
+ }
+
+ /**
+ * Save the smart items
+ *
+ * @param array $items The values to save
+ * @param string $type The type of values
+ * @param object $db The database object
+ * @param object $user The user object
+ * @param string $today The date today
+ *
+ * @return boolean false on failure
+ *
+ **/
+ protected function saveSmartItems(&$items, $type, &$db, &$user, &$today)
+ {
+ if (isset($items[$type]) && ComponentbuilderHelper::checkArray($items[$type]))
+ {
+ // get global action permissions
+ $canDo = ComponentbuilderHelper::getActions($type);
+ $canEdit = $canDo->get('core.edit');
+ $canState = $canDo->get('core.edit.state');
+ $canCreate = $canDo->get('core.create');
+ foreach ($items[$type] as $item)
+ {
+ $oldID = $item->id;
+ // first check if exist
+ if ($canEdit && $local = $this->getLocalItem($item, $type, $db, true))
+ {
+ $dbDate = strtotime($item->modified);
+ $localDate = strtotime($local->modified);
+ // okay we have it local (check if the version is newer)
+ if ($dbDate > $localDate) /// hmmm not sure about this... may cause issues <-- lets see (some may even want to override the local version even if it is newer) TODO (add switch)
+ {
+ // make sure we have the correct ID set
+ $item->id = $local->id;
+ // yes it is newer, lets update
+ if ($id = $this->updateLocalItem($item, $type, $db, $user, $today, $canState))
+ {
+ $this->newID[$type][$oldID] = $id;
+ }
+ // we must add some error handler here
+ }
+ else
+ {
+ $this->newID[$type][$oldID] = $local->id;
+ }
+ // we must add some notice handler here
+ }
+ elseif ($canCreate && $id = $this->addLocalItem($item, $type, $db, $user, $today))
+ {
+ // not found in local db so add
+ $this->newID[$type][$oldID] = $id;
+ }
+ // we must add some error handler here
+ }
+ }
+ return true;
+ }
+
+ /**
+ * Prep the item
+ *
+ * @param object $item The item to prep
+ * @param string $type The type of values
+ * @param object $user The user object
+ * @param string $today The date today
+ *
+ * @return mixed false on failure
+ * object on success
+ *
+ **/
+ protected function prepItem($item, &$type, $action, &$user, &$today)
+ {
+ $this->updateAfter = false;
+ // actions to effect both
+ if (isset($item->asset_id))
+ {
+ unset($item->asset_id);
+ }
+ if (isset($item->checked_out))
+ {
+ $item->checked_out = 0;
+ }
+ if (isset($item->checked_out_time))
+ {
+ $item->checked_out_time = '0000-00-00 00:00:00';
+ }
+ // do the id fix for the new ids
+ switch($type)
+ {
+ case 'field':
+ // update the fieldtype
+ if (isset($item->fieldtype) && isset($this->newID['fieldtype'][$item->fieldtype]))
+ {
+ $item->fieldtype = $this->newID['fieldtype'][$item->fieldtype];
+ }
+ else
+ {
+ // we must add some error handler here
+ return false;
+ }
+ break;
+ case 'dynamic_get':
+ // update the view_table_main ID
+ if (isset($item->main_source) && $item->main_source == 1 && isset($item->view_table_main) && is_numeric($item->view_table_main))
+ {
+ if (isset($this->newID['admin_view'][$item->view_table_main]))
+ {
+ $item->view_table_main = $this->newID['admin_view'][$item->view_table_main];
+ }
+ else
+ {
+ // we must add some error handler here
+ return false;
+ }
+ }
+ // update the join_view_table
+ if (isset($item->join_view_table) && ComponentbuilderHelper::checkJson($item->join_view_table))
+ {
+ $join_view_table = json_decode($item->join_view_table, true);
+ foreach ($join_view_table['view_table'] as $nr => $id)
+ {
+ // update the join_view_table
+ if (isset($this->newID['admin_view'][$id]))
+ {
+ $join_view_table['view_table'][$nr] = $this->newID['admin_view'][$id];
+ }
+ else
+ {
+ // we must add some error handler here
+ $join_view_table['view_table'][$nr] = '';
+ }
+ }
+ // load it back
+ $item->join_view_table = json_encode($join_view_table);
+ }
+ else
+ {
+ unset($item->join_view_table);
+ }
+ break;
+ case 'layout':
+ case 'template':
+ // update the dynamic_get
+ if (isset($item->dynamic_get) && isset($this->newID['dynamic_get'][$item->dynamic_get]))
+ {
+ $item->dynamic_get = $this->newID['dynamic_get'][$item->dynamic_get];
+ }
+ else
+ {
+ unset($item->dynamic_get);
+ }
+ break;
+ case 'custom_admin_view':
+ case 'site_view':
+ // update the main_get
+ if (isset($item->main_get) && isset($this->newID['dynamic_get'][$item->main_get]))
+ {
+ $item->main_get = $this->newID['dynamic_get'][$item->main_get];
+ }
+ else
+ {
+ // we must add some error handler here
+ return false;
+ }
+ // update the dynamic_get
+ if (isset($item->dynamic_get) && isset($this->newID['dynamic_get'][$item->dynamic_get]))
+ {
+ $item->dynamic_get = $this->newID['dynamic_get'][$item->dynamic_get];
+ }
+ else
+ {
+ unset($item->dynamic_get);
+ }
+ // update the custom_get
+ if (isset($item->custom_get) && ComponentbuilderHelper::checkJson($item->custom_get))
+ {
+ $custom_get = json_decode($item->custom_get, true);
+ foreach ($custom_get as $nr => $get)
+ {
+ // update the custom_get
+ if (isset($this->newID['dynamic_get'][$get]))
+ {
+ $custom_get[$nr] = $this->newID['dynamic_get'][$get];
+ }
+ else
+ {
+ // we must add some error handler here
+ unset($custom_get[$nr]);
+ }
+ }
+ // load it back if there is any remaining
+ if (ComponentbuilderHelper::checkArray($custom_get))
+ {
+ $item->custom_get = json_encode($custom_get);
+ }
+ else
+ {
+ unset($item->custom_get);
+ }
+ }
+ else
+ {
+ unset($item->custom_get);
+ }
+ break;
+ case 'admin_view':
+ // we must clear the demo content (since it was not moved as far as we know) TODO
+ unset($item->add_sql);
+ unset($item->source);
+ unset($item->addtables);
+ // update the addfields
+ if (isset($item->addfields) && ComponentbuilderHelper::checkJson($item->addfields))
+ {
+ $addfields = json_decode($item->addfields, true);
+ foreach ($addfields['field'] as $nr => $id)
+ {
+ // update the addfields
+ if (isset($this->newID['field'][$id]))
+ {
+ $addfields['field'][$nr] = $this->newID['field'][$id];
+ }
+ else
+ {
+ // we must add some error handler here
+ $addfields['field'][$nr] = '';
+ }
+ }
+ // load it back
+ $item->addfields = json_encode($addfields);
+ }
+ else
+ {
+ unset($item->addfields);
+ }
+ // update the addlinked_views
+ if (isset($item->addlinked_views) && ComponentbuilderHelper::checkJson($item->addlinked_views))
+ {
+ $addlinked_views = json_decode($item->addlinked_views, true);
+ foreach ($addlinked_views['adminview'] as $nr => $id)
+ {
+ // update the addlinked_views
+ if (isset($this->newID['admin_view'][$id]))
+ {
+ $addlinked_views['adminview'][$nr] = $this->newID['admin_view'][$id];
+ }
+ else
+ {
+ // this is painful but true...
+ $this->updateAfter = true;
+ }
+ }
+ // load it back
+ $item->addlinked_views = json_encode($addlinked_views);
+ }
+ else
+ {
+ unset($item->addlinked_views);
+ }
+ // update the addconditions
+ if (isset($item->addconditions) && ComponentbuilderHelper::checkJson($item->addconditions))
+ {
+ $addconditions = json_decode($item->addconditions, true);
+ $targets = array('target_field', 'match_field');
+ foreach ($targets as $target)
+ {
+ foreach ($addconditions[$target] as $nr => $id)
+ {
+ // update the addconditions
+ if (isset($this->newID['field'][$id]))
+ {
+ $addconditions[$target][$nr] = $this->newID['field'][$id];
+ }
+ else
+ {
+ // we must add some error handler here
+ $addconditions[$target][$nr] = '';
+ }
+ }
+ }
+ // load it back
+ $item->addconditions = json_encode($addconditions);
+ }
+ else
+ {
+ unset($item->addconditions);
+ }
+ break;
+ case 'joomla_component':
+ // update the addconfig
+ if (isset($item->addconfig) && ComponentbuilderHelper::checkJson($item->addconfig))
+ {
+ $addconfig = json_decode($item->addconfig, true);
+ foreach ($addconfig['field'] as $nr => $id)
+ {
+ // update the addconfig
+ if (isset($this->newID['field'][$id]))
+ {
+ $addconfig['field'][$nr] = $this->newID['field'][$id];
+ }
+ else
+ {
+ // we must add some error handler here
+ $addconfig['field'][$nr] = '';
+ }
+ }
+ // load it back
+ $item->addconfig = json_encode($addconfig);
+ }
+ // update the addadmin_views
+ if (isset($item->addadmin_views) && ComponentbuilderHelper::checkJson($item->addadmin_views))
+ {
+ $addadmin_views = json_decode($item->addadmin_views, true);
+ foreach ($addadmin_views['adminview'] as $nr => $id)
+ {
+ // update the addadmin_views
+ if (isset($this->newID['admin_view'][$id]))
+ {
+ $addadmin_views['adminview'][$nr] = $this->newID['admin_view'][$id];
+ }
+ else
+ {
+ // we must add some error handler here
+ $addadmin_views['adminview'][$nr] = '';
+ }
+ }
+ // load it back
+ $item->addadmin_views = json_encode($addadmin_views);
+ }
+ else
+ {
+ unset($item->addadmin_views);
+ }
+ // update the addcustom_admin_views
+ if (isset($item->addcustom_admin_views) && ComponentbuilderHelper::checkJson($item->addcustom_admin_views))
+ {
+ $addcustom_admin_views = json_decode($item->addcustom_admin_views, true);
+ foreach ($addcustom_admin_views['customadminview'] as $nr => $id)
+ {
+ // update the addcustom_admin_views
+ if (isset($this->newID['custom_admin_view'][$id]))
+ {
+ $addcustom_admin_views['customadminview'][$nr] = $this->newID['custom_admin_view'][$id];
+ }
+ else
+ {
+ // we must add some error handler here
+ $addcustom_admin_views['customadminview'][$nr] = '';
+ }
+ }
+ // load it back
+ $item->addcustom_admin_views = json_encode($addcustom_admin_views);
+ }
+ // update the addsite_views
+ if (isset($item->addsite_views) && ComponentbuilderHelper::checkJson($item->addsite_views))
+ {
+ $addsite_views = json_decode($item->addsite_views, true);
+ foreach ($addsite_views['siteview'] as $nr => $id)
+ {
+ // update the addsite_views
+ if (isset($this->newID['site_view'][$id]))
+ {
+ $addsite_views['siteview'][$nr] = $this->newID['site_view'][$id];
+ }
+ else
+ {
+ // we must add some error handler here
+ $addsite_views['siteview'][$nr] = '';
+ }
+ }
+ // load it back
+ $item->addsite_views = json_encode($addsite_views);
+ }
+ break;
+ case 'custom_code':
+ // update the component ID where needed
+ if (isset($item->component) && $item->component > 0)
+ {
+ if (isset($this->newID['joomla_component'][$item->component]))
+ {
+ $item->component = $this->newID['joomla_component'][$item->component];
+ }
+ else
+ {
+ unset($item->component);
+ }
+ }
+ break;
+ }
+ // final action prep
+ switch($action)
+ {
+ case 'update':
+ // set values to follow the update conventions
+ if (isset($item->created_by))
+ {
+ unset($item->created_by);
+ }
+ $item->modified_by = $user->id;
+ $item->modified = $today;
+ // return the item
+ return $item;
+ break;
+ case 'add':
+ // remove the ID
+ unset($item->id);
+ // set values to follow the adding conventions
+ $item->created_by = $user->id;
+ $item->modified_by = $user->id;
+ $item->modified = $today;
+ // return the item
+ return $item;
+ break;
+ }
+ return false;
+ }
+
+ /**
+ * Update the local item
+ *
+ * @param object $item The item to update
+ * @param string $type The type of values
+ * @param object $db The database object
+ * @param object $user The user object
+ * @param string $today The date today
+ * @param bool $canState The switch to set state
+ *
+ * @return mixed false on failure
+ * ID int on success
+ *
+ **/
+ protected function updateLocalItem(&$item, &$type, &$db, &$user, &$today, &$canState)
+ {
+ // prep the item
+ if ($update = $this->prepItem($item, $type, 'update', $user, $today))
+ {
+ // remove the published state if not allowed to edit it
+ if (!$canState && isset($update->published))
+ {
+ unset($update->published);
+ }
+ // update the item
+ if ($result = $db->updateObject('#__componentbuilder_' . $type, $update, 'id'))
+ {
+ // return current ID
+ return $update->id;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * add the local item
+ *
+ * @param object $item The item to update
+ * @param string $type The type of values
+ * @param object $db The database object
+ * @param object $user The user object
+ * @param string $today The date today
+ *
+ * @return mixed false on failure
+ * ID int on success
+ *
+ **/
+ protected function addLocalItem(&$item, &$type, &$db, &$user, &$today)
+ {
+ // prep the item
+ if ($add = $this->prepItem($item, $type, 'add', $user, $today))
+ {
+ // insert/add the item
+ if ($result = $db->insertObject('#__componentbuilder_' . $type, $add))
+ {
+ $aId = $db->insertid();
+ // make sure the access of asset is set
+ ComponentbuilderHelper::setAsset($aId, $type);
+ // set new ID
+ return $aId;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Get the local item
+ *
+ * @param object $item The item to get
+ * @param string $type The type of values
+ * @param object $db The database object
+ * @param bool $retry The retry switch
+ * @param bool $get The query get switch
+ *
+ * @return mixed false on failure
+ * ID int on success
+ *
+ **/
+ protected function getLocalItem(&$item, &$type, &$db, $retry = false, $get = 1)
+ {
+ $query = $db->getQuery(true);
+ $query->select($db->quoteName('a.*'));
+ $query->from($db->quoteName('#__componentbuilder_' . $type, 'a'));
+ if ($get == 1)
+ {
+ $query->where($db->quoteName('a.created') . ' = '. $db->quote($item->created));
+ $query->where($db->quoteName('a.id') .' = '. (int) $item->id);
+ }
+ elseif (componentbuilderHelper::checkArray($get))
+ {
+ foreach ($get as $field)
+ {
+ if (isset($item->$field))
+ {
+ if (is_numeric($item->$field) && is_int($item->$field))
+ {
+ $query->where($db->quoteName('a.' . $field) . ' = '. (int) $item->$field);
+ }
+ elseif (is_numeric($item->$field) && is_float($item->$field))
+ {
+ $query->where($db->quoteName('a.' . $field) . ' = '. (float) $item->$field);
+ }
+ elseif(componentbuilderHelper::checkString($item->$field)) // do not allow empty strings (since it could be major mis match)
+ {
+ $query->where($db->quoteName('a.' . $field) . ' = '. $db->quote($item->$field));
+ }
+ else
+ {
+ return false;
+ }
+ }
+ else
+ {
+ return false;
+ }
+ }
+ }
+ elseif (isset($item->$get) && is_numeric($item->$get))
+ {
+ if (is_int($item->$get))
+ {
+ $query->where($db->quoteName('a.' . $get) . ' = '. (int) $item->$get);
+ }
+ elseif (is_float($item->$get))
+ {
+ $query->where($db->quoteName('a.' . $get) . ' = '. (float) $item->$get);
+ }
+ else
+ {
+ return false; // really not needed but who knows for sure...
+ }
+ }
+ elseif (isset($item->$get) && componentbuilderHelper::checkString($item->$get)) // do not allow empty strings (since it could be major mis match)
+ {
+ $query->where($db->quoteName('a.' . $get) . ' = '. $db->quote($item->$get));
+ }
+ else
+ {
+ return false;
+ }
+ // see if we get an item
+ $db->setQuery($query);
+ $db->execute();
+ if ($db->getNumRows())
+ {
+ return $db->loadObject();
+ }
+ elseif ($retry)
+ {
+ $retryAgain = false;
+ // set the getter
+ switch ($type)
+ {
+ case 'fieldtype':
+ // get by name (since there should only be one of each name)
+ $getter = 'name';
+ break;
+ case 'field':
+ // get by name and xml to target correct field
+ $getter = array('name', 'xml'); // risky will look at this again (to add fieldtype)
+ break;
+ case 'site_view':
+ case 'custom_admin_view':
+ // get by name, system_name and codename
+ $getter = array('name', 'system_name', 'codename'); // risky will look at this again (to add main_get)
+ break;
+ case 'template':
+ case 'layout':
+ // get by code name (since there should only be one)
+ $getter = 'alias';
+ break;
+ case 'custom_code':
+ // get by code to insure its correctly matched
+ $getter = array('code', 'comment_type', 'target');
+ // add some more advanced search
+ if (isset($item->path) && ComponentbuilderHelper::checkString($item->path))
+ {
+ $getter[] = 'path';
+ }
+ elseif (isset($item->function_name) && ComponentbuilderHelper::checkString($item->function_name))
+ {
+ $getter[] = 'function_name';
+ }
+ elseif (isset($item->hashtarget) && ComponentbuilderHelper::checkString($item->hashtarget))
+ {
+ $getter[] = 'hashtarget';
+ }
+ break;
+ case 'dynamic_get':
+ if ($retry == 2)
+ {
+ // get by name ...
+ $getter = array('name', 'gettype', 'main_source'); // risky will look at this again
+ // add some more advanced search
+ if (isset($item->main_source) && $item->main_source == 1 && isset($item->view_selection) && ComponentbuilderHelper::checkString($item->view_selection))
+ {
+ $getter[] = 'view_selection';
+ }
+ elseif (isset($item->main_source) && $item->main_source == 2 && isset($item->db_selection) && ComponentbuilderHelper::checkString($item->db_selection))
+ {
+ $getter[] = 'db_selection';
+ }
+ elseif (isset($item->main_source) && $item->main_source == 3 && isset($item->php_custom_get) && ComponentbuilderHelper::checkString($item->php_custom_get))
+ {
+ $getter[] = 'php_custom_get';
+ }
+ // add some extra
+ if (isset($item->getcustom) && ComponentbuilderHelper::checkString($item->getcustom))
+ {
+ $getter[] = 'getcustom';
+ }
+ }
+ else
+ {
+ // get by id name gettype and main_source
+ $getter = array('id', 'name', 'gettype', 'main_source'); // risky will look at this again
+ $retryAgain = 2;
+ }
+ break;
+ case 'admin_view':
+ if ($retry == 2)
+ {
+ // get by name ...
+ $getter = array('name_list', 'name_single', 'short_description', 'system_name'); // risky will look at this again
+ }
+ else
+ {
+ // get by id name ...
+ $getter = array('id', 'name_list', 'name_single', 'short_description', 'system_name'); // risky will look at this again
+ $retryAgain = 2;
+ }
+ break;
+ case 'joomla_component':
+ if ($retry == 2)
+ {
+ // get by name ...
+ $getter = array('name', 'name_code', 'short_description', 'author', 'email', 'component_version', 'companyname', 'system_name', 'website', 'bom', 'copyright', 'license'); // risky will look at this again
+ }
+ else
+ {
+ // get by id name ...
+ $getter = array('id', 'name', 'name_code', 'short_description', 'author', 'component_version', 'companyname', 'system_name'); // risky will look at this again
+ $retryAgain = 2;
+ }
+ break;
+ default:
+ // can't be found so return false
+ return false;
+ break;
+ }
+ // we try again
+ return $this->getLocalItem($item, $type, $db, $retryAgain, $getter);
+ }
+ return false;
+ }
+
+ /**
+ * Save the data from the file to the database
+ *
+ * @param array $data The values to save
+ *
+ * @return boolean false on failure
+ *
+ **/
+ protected function saveBasic($data)
+ {
+ // import the data if there is any
+ if(ComponentbuilderHelper::checkArray($data['array']))
+ {
+ // get user object
+ $user = JFactory::getUser();
+ // remove header if it has headers
+ $id_key = $data['target_headers']['id'];
+ $published_key = $data['target_headers']['published'];
+ $ordering_key = $data['target_headers']['ordering'];
+ // get the first array set
+ $firstSet = reset($data['array']);
+
+ // check if first array is a header array and remove if true
+ if($firstSet[$id_key] == 'id' || $firstSet[$published_key] == 'published' || $firstSet[$ordering_key] == 'ordering')
+ {
+ array_shift($data['array']);
+ }
+
+ // make sure there is still values in array and that it was not only headers
+ if(ComponentbuilderHelper::checkArray($data['array']) && $user->authorise($this->dataType.'.import', 'com_componentbuilder') && $user->authorise('core.import', 'com_componentbuilder'))
+ {
+ // set target.
+ $target = array_flip($data['target_headers']);
+ // Get a db connection.
+ $db = JFactory::getDbo();
+ // set some defaults
+ $todayDate = JFactory::getDate()->toSql();
+ // get global action permissions
+ $canDo = ComponentbuilderHelper::getActions($this->dataType);
+ $canEdit = $canDo->get('core.edit');
+ $canState = $canDo->get('core.edit.state');
+ $canCreate = $canDo->get('core.create');
+ $hasAlias = $this->getAliasesUsed($this->dataType);
+ // prosses the data
+ foreach($data['array'] as $row)
+ {
+ $found = false;
+ if (isset($row[$id_key]) && is_numeric($row[$id_key]) && $row[$id_key] > 0)
+ {
+ // raw items import & update!
+ $query = $db->getQuery(true);
+ $query
+ ->select('version')
+ ->from($db->quoteName('#__componentbuilder_'.$this->dataType))
+ ->where($db->quoteName('id') . ' = '. $db->quote($row[$id_key]));
+ // Reset the query using our newly populated query object.
+ $db->setQuery($query);
+ $db->execute();
+ $found = $db->getNumRows();
+ }
+
+ if($found && $canEdit)
+ {
+ // update item
+ $id = $row[$id_key];
+ $version = $db->loadResult();
+ // reset all buckets
+ $query = $db->getQuery(true);
+ $fields = array();
+ // Fields to update.
+ foreach($row as $key => $cell)
+ {
+ // ignore column
+ if ('IGNORE' == $target[$key])
+ {
+ continue;
+ }
+ // update modified
+ if ('modified_by' == $target[$key])
+ {
+ continue;
+ }
+ // update modified
+ if ('modified' == $target[$key])
+ {
+ continue;
+ }
+ // update version
+ if ('version' == $target[$key])
+ {
+ $cell = (int) $version + 1;
+ }
+ // verify publish authority
+ if ('published' == $target[$key] && !$canState)
+ {
+ continue;
+ }
+ // set to update array
+ if(in_array($key, $data['target_headers']) && is_numeric($cell))
+ {
+ $fields[] = $db->quoteName($target[$key]) . ' = ' . $cell;
+ }
+ elseif(in_array($key, $data['target_headers']) && is_string($cell))
+ {
+ $fields[] = $db->quoteName($target[$key]) . ' = ' . $db->quote($cell);
+ }
+ elseif(in_array($key, $data['target_headers']) && is_null($cell))
+ {
+ // if import data is null then set empty
+ $fields[] = $db->quoteName($target[$key]) . " = ''";
+ }
+ }
+ // load the defaults
+ $fields[] = $db->quoteName('modified_by') . ' = ' . $db->quote($user->id);
+ $fields[] = $db->quoteName('modified') . ' = ' . $db->quote($todayDate);
+ // Conditions for which records should be updated.
+ $conditions = array(
+ $db->quoteName('id') . ' = ' . $id
+ );
+ $query->update($db->quoteName('#__componentbuilder_' . $this->dataType))->set($fields)->where($conditions);
+ $db->setQuery($query);
+ $db->execute();
+ }
+ elseif ($canCreate)
+ {
+ // insert item
+ $query = $db->getQuery(true);
+ // reset all buckets
+ $columns = array();
+ $values = array();
+ $version = false;
+ // Insert columns. Insert values.
+ foreach($row as $key => $cell)
+ {
+ // ignore column
+ if ('IGNORE' == $target[$key])
+ {
+ continue;
+ }
+ // remove id
+ if ('id' == $target[$key])
+ {
+ continue;
+ }
+ // update created
+ if ('created_by' == $target[$key])
+ {
+ continue;
+ }
+ // update created
+ if ('created' == $target[$key])
+ {
+ continue;
+ }
+ // Make sure the alias is incremented
+ if ('alias' == $target[$key])
+ {
+ $cell = $this->getAlias($cell,$this->dataType);
+ }
+ // update version
+ if ('version' == $target[$key])
+ {
+ $cell = 1;
+ $version = true;
+ }
+ // set to insert array
+ if(in_array($key, $data['target_headers']) && is_numeric($cell))
+ {
+ $columns[] = $target[$key];
+ $values[] = $cell;
+ }
+ elseif(in_array($key, $data['target_headers']) && is_string($cell))
+ {
+ $columns[] = $target[$key];
+ $values[] = $db->quote($cell);
+ }
+ elseif(in_array($key, $data['target_headers']) && is_null($cell))
+ {
+ // if import data is null then set empty
+ $columns[] = $target[$key];
+ $values[] = "''";
+ }
+ }
+ // load the defaults
+ $columns[] = 'created_by';
+ $values[] = $db->quote($user->id);
+ $columns[] = 'created';
+ $values[] = $db->quote($todayDate);
+ if (!$version)
+ {
+ $columns[] = 'version';
+ $values[] = 1;
+ }
+ // Prepare the insert query.
+ $query
+ ->insert($db->quoteName('#__componentbuilder_'.$this->dataType))
+ ->columns($db->quoteName($columns))
+ ->values(implode(',', $values));
+ // Set the query using our newly populated query object and execute it.
+ $db->setQuery($query);
+ $done = $db->execute();
+ if ($done)
+ {
+ $aId = $db->insertid();
+ // make sure the access of asset is set
+ ComponentbuilderHelper::setAsset($aId,$this->dataType);
+ }
+ }
+ else
+ {
+ return false;
+ }
+ }
+ return true;
+ }
+ }
+ return false;
+ }
+
+ protected function getAlias($name,$type = false)
+ {
+ // sanitize the name to an alias
+ if (JFactory::getConfig()->get('unicodeslugs') == 1)
+ {
+ $alias = JFilterOutput::stringURLUnicodeSlug($name);
+ }
+ else
+ {
+ $alias = JFilterOutput::stringURLSafe($name);
+ }
+ // must be a uniqe alias
+ if ($type)
+ {
+ return $this->getUniqe($alias,'alias',$type);
+ }
+ return $alias;
+ }
+
+ /**
+ * Method to generate a uniqe value.
+ *
+ * @param string $field name.
+ * @param string $value data.
+ * @param string $type table.
+ *
+ * @return string New value.
+ */
+ protected function getUniqe($value,$field,$type)
+ {
+ // insure the filed is always uniqe
+ while (isset($this->uniqeValueArray[$type][$field][$value]))
+ {
+ $value = JString::increment($value, 'dash');
+ }
+ $this->uniqeValueArray[$type][$field][$value] = $value;
+ return $value;
+ }
+
+ protected function getAliasesUsed($table)
+ {
+ // Get a db connection.
+ $db = JFactory::getDbo();
+ // first we check if there is a alias column
+ $columns = $db->getTableColumns('#__componentbuilder_'.$table);
+ if(isset($columns['alias'])){
+ // Create a new query object.
+ $query = $db->getQuery(true);
+ $query->select($db->quoteName(array('alias')));
+ $query->from($db->quoteName('#__componentbuilder_'.$table));
+ $db->setQuery($query);
+ $db->execute();
+ if ($db->getNumRows())
+ {
+ $aliases = $db->loadColumn();
+ foreach($aliases as $alias)
+ {
+ $this->uniqeValueArray[$table]['alias'][$alias] = $alias;
+ }
+ }
+ return true;
+ }
+ return false;
+ }
+}
diff --git a/admin/models/joomla_component.php b/admin/models/joomla_component.php
index 57ba2d7b3..862ba1a95 100644
--- a/admin/models/joomla_component.php
+++ b/admin/models/joomla_component.php
@@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 132 of this MVC
- @build 20th March, 2017
+ @version @update number 182 of this MVC
+ @build 27th March, 2017
@created 6th May, 2015
@package Component Builder
@subpackage joomla_component.php
diff --git a/admin/models/joomla_components.php b/admin/models/joomla_components.php
index ab7235810..7770e860d 100644
--- a/admin/models/joomla_components.php
+++ b/admin/models/joomla_components.php
@@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 132 of this MVC
- @build 20th March, 2017
+ @version @update number 182 of this MVC
+ @build 27th March, 2017
@created 6th May, 2015
@package Component Builder
@subpackage joomla_components.php
@@ -130,7 +130,7 @@ class ComponentbuilderModelJoomla_components extends JModelList
// add custom code
$this->setData($user, $db, 'custom_code', $pks, 'component');
// start loading the components
- $this->smartExport['components'] = array();
+ $this->smartExport['joomla_component'] = array();
foreach ($items as $nr => &$item)
{
$access = ($user->authorise('joomla_component.access', 'com_componentbuilder.joomla_component.' . (int) $item->id) && $user->authorise('joomla_component.access', 'com_componentbuilder'));
@@ -143,6 +143,8 @@ class ComponentbuilderModelJoomla_components extends JModelList
$this->moveIt($item->addfiles, 'file');
// build folders
$this->moveIt($item->addfolders, 'folder');
+ // component image
+ $this->moveIt(array('image' => array($item->image)), 'image');
// add config fields
$this->setData($user, $db, 'field', $item->addconfig, 'field');
// add admin views
@@ -154,7 +156,7 @@ class ComponentbuilderModelJoomla_components extends JModelList
// set the custom code ID's
$this->setCustomCodeIds($item, 'joomla_component');
// load to global object
- $this->smartExport['components'][$item->id] = $item;
+ $this->smartExport['joomla_component'][$item->id] = $item;
}
// add templates
if (ComponentbuilderHelper::checkArray($this->templateIds))
@@ -172,7 +174,7 @@ class ComponentbuilderModelJoomla_components extends JModelList
$this->setData($user, $db, 'custom_code', array('custom_code' => $this->customCodeIds), 'custom_code');
}
// has any data been set
- if (ComponentbuilderHelper::checkArray($this->smartExport['components']))
+ if (ComponentbuilderHelper::checkArray($this->smartExport['joomla_component']))
{
// set the folder and move the files of each component to the folder
return $this->smartExportBuilder();
@@ -257,20 +259,31 @@ class ComponentbuilderModelJoomla_components extends JModelList
// now move it
foreach ($data[$type] as $item)
{
- if ('file' === $type || 'image' === $type)
+ if (ComponentbuilderHelper::checkString($item))
{
- if (!JFile::exists($tmpPath.'/'.$item) && JFile::exists($this->customPath.'/'.$item))
+ if ('file' === $type)
{
- // move the file to its place
- JFile::copy($this->customPath.'/'.$item, $tmpPath.'/'.$item,'',true);
+ if (!JFile::exists($tmpPath.'/'.$item) && JFile::exists($this->customPath.'/'.$item))
+ {
+ // move the file to its place
+ JFile::copy($this->customPath.'/'.$item, $tmpPath.'/'.$item,'',true);
+ }
}
- }
- if ('folder' === $type)
- {
- if (!JFolder::exists($tmpPath.'/'.$item) && JFolder::exists($this->customPath.'/'.$item))
+ if ('image' === $type)
{
- // move the folder to its place
- JFolder::copy($this->customPath.'/'.$item, $tmpPath.'/'.$item,'',true);
+ if (!JFile::exists($this->packagePath.'/'.$item) && JFile::exists(JPATH_ROOT.'/'.$item))
+ {
+ // move the file to its place
+ JFile::copy(JPATH_ROOT.'/'.$item, $this->packagePath.'/'.$item,'',true);
+ }
+ }
+ if ('folder' === $type)
+ {
+ if (!JFolder::exists($tmpPath.'/'.$item) && JFolder::exists($this->customPath.'/'.$item))
+ {
+ // move the folder to its place
+ JFolder::copy($this->customPath.'/'.$item, $tmpPath.'/'.$item,'',true);
+ }
}
}
}
@@ -354,6 +367,17 @@ class ComponentbuilderModelJoomla_components extends JModelList
{
// add fields
$this->setData($user, $db, 'field', $item->addfields, 'field');
+ // add admin views
+ if (isset($item->addlinked_views))
+ {
+ $this->setData($user, $db, 'admin_view', $item->addlinked_views, 'adminview');
+ }
+ // admin icon
+ $this->moveIt(array('image' => array($item->icon)), 'image');
+ // admin icon_add
+ $this->moveIt(array('image' => array($item->icon_add)), 'image');
+ // admin icon_category
+ $this->moveIt(array('image' => array($item->icon_category)), 'image');
}
// actions to take if table is field
if ('field' === $table)
@@ -377,6 +401,11 @@ class ComponentbuilderModelJoomla_components extends JModelList
// add dynamic gets
$this->setData($user, $db, 'dynamic_get', array('dynamic_get' => array($item->main_get)), 'dynamic_get');
$this->setData($user, $db, 'dynamic_get', array('dynamic_get' => $item->custom_get), 'dynamic_get');
+ if ('custom_admin_view' === $table && isset($item->icon))
+ {
+ // view icon
+ $this->moveIt(array('image' => array($item->icon)), 'image');
+ }
}
// set the custom code ID's
$this->setCustomCodeIds($item, $table);
diff --git a/admin/models/site_view.php b/admin/models/site_view.php
index df704c045..9350faed0 100644
--- a/admin/models/site_view.php
+++ b/admin/models/site_view.php
@@ -185,7 +185,7 @@ class ComponentbuilderModelSite_view extends JModelAdmin
*
* @return mixed An array of data items on success, false on failure.
*/
- public function getVyrlinked_components()
+ public function getVyslinked_components()
{
// Get the user object.
$user = JFactory::getUser();
diff --git a/admin/sql/install.mysql.utf8.sql b/admin/sql/install.mysql.utf8.sql
index a1d7c7b9a..174767ef2 100644
--- a/admin/sql/install.mysql.utf8.sql
+++ b/admin/sql/install.mysql.utf8.sql
@@ -192,6 +192,7 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_admin_view` (
`php_getlistquery` MEDIUMTEXT NOT NULL,
`php_import` MEDIUMTEXT NOT NULL,
`php_import_display` MEDIUMTEXT NOT NULL,
+ `php_import_ext` MEDIUMTEXT NOT NULL,
`php_import_save` MEDIUMTEXT NOT NULL,
`php_import_setdata` MEDIUMTEXT NOT NULL,
`php_model` MEDIUMTEXT NOT NULL,
@@ -223,32 +224,32 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_admin_view` (
KEY `idx_state` (`published`),
KEY `idx_name_single` (`name_single`),
KEY `idx_name_list` (`name_list`),
- KEY `idx_add_php_getitems_after_all` (`add_php_getitems_after_all`),
- KEY `idx_add_php_after_publish` (`add_php_after_publish`),
KEY `idx_add_fadein` (`add_fadein`),
- KEY `idx_add_php_allowedit` (`add_php_allowedit`),
- KEY `idx_add_sql` (`add_sql`),
- KEY `idx_add_php_save` (`add_php_save`),
- KEY `idx_add_php_batchmove` (`add_php_batchmove`),
- KEY `idx_add_php_after_delete` (`add_php_after_delete`),
- KEY `idx_add_php_getitems` (`add_php_getitems`),
- KEY `idx_add_php_getlistquery` (`add_php_getlistquery`),
- KEY `idx_add_php_postsavehook` (`add_php_postsavehook`),
- KEY `idx_add_php_batchcopy` (`add_php_batchcopy`),
- KEY `idx_add_php_before_publish` (`add_php_before_publish`),
- KEY `idx_add_php_before_delete` (`add_php_before_delete`),
- KEY `idx_add_php_document` (`add_php_document`),
- KEY `idx_type` (`type`),
- KEY `idx_add_php_getitem` (`add_php_getitem`),
- KEY `idx_add_custom_import` (`add_custom_import`),
- KEY `idx_add_css_view` (`add_css_view`),
- KEY `idx_add_css_views` (`add_css_views`),
- KEY `idx_add_javascript_view_file` (`add_javascript_view_file`),
- KEY `idx_add_javascript_view_footer` (`add_javascript_view_footer`),
- KEY `idx_add_javascript_views_file` (`add_javascript_views_file`),
- KEY `idx_add_javascript_views_footer` (`add_javascript_views_footer`),
- KEY `idx_add_custom_button` (`add_custom_button`),
KEY `idx_source` (`source`),
+ KEY `idx_type` (`type`),
+ KEY `idx_add_css_view` (`add_css_view`),
+ KEY `idx_add_php_getitem` (`add_php_getitem`),
+ KEY `idx_add_php_getitems` (`add_php_getitems`),
+ KEY `idx_add_css_views` (`add_css_views`),
+ KEY `idx_add_php_getitems_after_all` (`add_php_getitems_after_all`),
+ KEY `idx_add_php_getlistquery` (`add_php_getlistquery`),
+ KEY `idx_add_javascript_view_file` (`add_javascript_view_file`),
+ KEY `idx_add_php_save` (`add_php_save`),
+ KEY `idx_add_php_postsavehook` (`add_php_postsavehook`),
+ KEY `idx_add_javascript_view_footer` (`add_javascript_view_footer`),
+ KEY `idx_add_php_allowedit` (`add_php_allowedit`),
+ KEY `idx_add_php_batchcopy` (`add_php_batchcopy`),
+ KEY `idx_add_javascript_views_file` (`add_javascript_views_file`),
+ KEY `idx_add_php_batchmove` (`add_php_batchmove`),
+ KEY `idx_add_php_before_publish` (`add_php_before_publish`),
+ KEY `idx_add_javascript_views_footer` (`add_javascript_views_footer`),
+ KEY `idx_add_php_after_publish` (`add_php_after_publish`),
+ KEY `idx_add_php_before_delete` (`add_php_before_delete`),
+ KEY `idx_add_custom_button` (`add_custom_button`),
+ KEY `idx_add_php_after_delete` (`add_php_after_delete`),
+ KEY `idx_add_php_document` (`add_php_document`),
+ KEY `idx_add_sql` (`add_sql`),
+ KEY `idx_add_custom_import` (`add_custom_import`),
KEY `idx_add_php_ajax` (`add_php_ajax`)
) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8;
diff --git a/admin/sql/updates/mysql/2.3.7.sql b/admin/sql/updates/mysql/2.3.7.sql
new file mode 100644
index 000000000..2b6b7f911
--- /dev/null
+++ b/admin/sql/updates/mysql/2.3.7.sql
@@ -0,0 +1 @@
+ALTER TABLE `#__componentbuilder_admin_view` ADD `php_import_ext` MEDIUMTEXT NOT NULL AFTER `php_import_display`;
diff --git a/admin/tables/admin_view.php b/admin/tables/admin_view.php
index ddeb783c8..4c26cc467 100644
--- a/admin/tables/admin_view.php
+++ b/admin/tables/admin_view.php
@@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 104 of this MVC
- @build 6th March, 2017
+ @version @update number 108 of this MVC
+ @build 24th March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage admin_view.php
diff --git a/admin/tables/joomla_component.php b/admin/tables/joomla_component.php
index ae7b25d22..c338be73b 100644
--- a/admin/tables/joomla_component.php
+++ b/admin/tables/joomla_component.php
@@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 132 of this MVC
- @build 20th March, 2017
+ @version @update number 182 of this MVC
+ @build 27th March, 2017
@created 6th May, 2015
@package Component Builder
@subpackage joomla_component.php
diff --git a/admin/views/admin_view/submitbutton.js b/admin/views/admin_view/submitbutton.js
index d14ddba38..1320c082a 100644
--- a/admin/views/admin_view/submitbutton.js
+++ b/admin/views/admin_view/submitbutton.js
@@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 104 of this MVC
- @build 6th March, 2017
+ @version @update number 108 of this MVC
+ @build 24th March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage submitbutton.js
diff --git a/admin/views/admin_view/tmpl/edit.php b/admin/views/admin_view/tmpl/edit.php
index 807de803d..f46c98d14 100644
--- a/admin/views/admin_view/tmpl/edit.php
+++ b/admin/views/admin_view/tmpl/edit.php
@@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 104 of this MVC
- @build 6th March, 2017
+ @version @update number 108 of this MVC
+ @build 24th March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage edit.php
diff --git a/admin/views/admin_view/view.html.php b/admin/views/admin_view/view.html.php
index be228a9b1..51cdace95 100644
--- a/admin/views/admin_view/view.html.php
+++ b/admin/views/admin_view/view.html.php
@@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 104 of this MVC
- @build 6th March, 2017
+ @version @update number 108 of this MVC
+ @build 24th March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage view.html.php
@@ -71,10 +71,10 @@ class ComponentbuilderViewAdmin_view extends JViewLegacy
}
// Get Linked view data
- $this->vxvfields = $this->get('Vxvfields');
+ $this->vxwfields = $this->get('Vxwfields');
// Get Linked view data
- $this->vxwlinked_components = $this->get('Vxwlinked_components');
+ $this->vxxlinked_components = $this->get('Vxxlinked_components');
// Set the toolbar
$this->addToolBar();
diff --git a/admin/views/admin_views/tmpl/default.php b/admin/views/admin_views/tmpl/default.php
index 0d8e4b739..aac226abb 100644
--- a/admin/views/admin_views/tmpl/default.php
+++ b/admin/views/admin_views/tmpl/default.php
@@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 104 of this MVC
- @build 6th March, 2017
+ @version @update number 108 of this MVC
+ @build 24th March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage default.php
diff --git a/admin/views/admin_views/tmpl/default_batch_body.php b/admin/views/admin_views/tmpl/default_batch_body.php
index 126169a0c..396a8a65d 100644
--- a/admin/views/admin_views/tmpl/default_batch_body.php
+++ b/admin/views/admin_views/tmpl/default_batch_body.php
@@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 104 of this MVC
- @build 6th March, 2017
+ @version @update number 108 of this MVC
+ @build 24th March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage default_batch_body.php
diff --git a/admin/views/admin_views/tmpl/default_batch_footer.php b/admin/views/admin_views/tmpl/default_batch_footer.php
index 1ec7f22b3..1060dfe74 100644
--- a/admin/views/admin_views/tmpl/default_batch_footer.php
+++ b/admin/views/admin_views/tmpl/default_batch_footer.php
@@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 104 of this MVC
- @build 6th March, 2017
+ @version @update number 108 of this MVC
+ @build 24th March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage default_batch_footer.php
diff --git a/admin/views/admin_views/tmpl/default_body.php b/admin/views/admin_views/tmpl/default_body.php
index 9cc4e9fb4..a6ee9650a 100644
--- a/admin/views/admin_views/tmpl/default_body.php
+++ b/admin/views/admin_views/tmpl/default_body.php
@@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 104 of this MVC
- @build 6th March, 2017
+ @version @update number 108 of this MVC
+ @build 24th March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage default_body.php
diff --git a/admin/views/admin_views/tmpl/default_foot.php b/admin/views/admin_views/tmpl/default_foot.php
index c6e36cb7f..d8909bd88 100644
--- a/admin/views/admin_views/tmpl/default_foot.php
+++ b/admin/views/admin_views/tmpl/default_foot.php
@@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 104 of this MVC
- @build 6th March, 2017
+ @version @update number 108 of this MVC
+ @build 24th March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage default_foot.php
diff --git a/admin/views/admin_views/tmpl/default_head.php b/admin/views/admin_views/tmpl/default_head.php
index 0c219669a..cd3132037 100644
--- a/admin/views/admin_views/tmpl/default_head.php
+++ b/admin/views/admin_views/tmpl/default_head.php
@@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 104 of this MVC
- @build 6th March, 2017
+ @version @update number 108 of this MVC
+ @build 24th March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage default_head.php
diff --git a/admin/views/admin_views/tmpl/default_toolbar.php b/admin/views/admin_views/tmpl/default_toolbar.php
index 4eda046f6..1d800771d 100644
--- a/admin/views/admin_views/tmpl/default_toolbar.php
+++ b/admin/views/admin_views/tmpl/default_toolbar.php
@@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 104 of this MVC
- @build 6th March, 2017
+ @version @update number 108 of this MVC
+ @build 24th March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage default_toolbar.php
diff --git a/admin/views/admin_views/view.html.php b/admin/views/admin_views/view.html.php
index 20bed4dcb..5a4d7ffe7 100644
--- a/admin/views/admin_views/view.html.php
+++ b/admin/views/admin_views/view.html.php
@@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 104 of this MVC
- @build 6th March, 2017
+ @version @update number 108 of this MVC
+ @build 24th March, 2017
@created 30th April, 2015
@package Component Builder
@subpackage view.html.php
diff --git a/admin/views/compiler/tmpl/default.php b/admin/views/compiler/tmpl/default.php
index ade8227ec..542fcf08d 100644
--- a/admin/views/compiler/tmpl/default.php
+++ b/admin/views/compiler/tmpl/default.php
@@ -10,8 +10,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
- @version @update number 46 of this MVC
- @build 3rd March, 2017
+ @version @update number 47 of this MVC
+ @build 21st March, 2017
@created 1st February, 2017
@package Component Builder
@subpackage default.php
@@ -144,6 +144,7 @@ jQuery(document).ready(function($) {
+
+dataType === 'smart_package') ? '.zip' : '.csv .xls .ods'; ?>
+
+