';
}
-
-
+
+
public function getNoticeboard()
{
// get the document to load the scripts
@@ -521,8 +521,8 @@ class ComponentbuilderModelComponentbuilder extends JModelList
});');
return '
';
- }
+ }
}
diff --git a/admin/models/custom_admin_view.php b/admin/models/custom_admin_view.php
index ee5abd489..f955f7eb6 100644
--- a/admin/models/custom_admin_view.php
+++ b/admin/models/custom_admin_view.php
@@ -204,7 +204,7 @@ class ComponentbuilderModelCustom_admin_view extends JModelAdmin
$item->php_model = base64_decode($item->php_model);
}
-
+
if (empty($item->id))
{
$id = 0;
@@ -223,7 +223,7 @@ class ComponentbuilderModelCustom_admin_view extends JModelAdmin
$this->vastDevMod = ComponentbuilderHelper::randomkey(50);
ComponentbuilderHelper::set($this->vastDevMod, 'custom_admin_view__'.$id);
ComponentbuilderHelper::set('custom_admin_view__'.$id, $this->vastDevMod);
- }
+ }
// check what type of custom_button array we have here (should be subform... but just incase)
// This could happen due to huge data sets
@@ -703,8 +703,6 @@ class ComponentbuilderModelCustom_admin_view extends JModelAdmin
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
- $this->contentType = new JUcmType;
- $this->type = $this->contentType->getTypeByTable($this->tableClassName);
$this->canDo = ComponentbuilderHelper::getActions('custom_admin_view');
}
@@ -729,7 +727,6 @@ class ComponentbuilderModelCustom_admin_view extends JModelAdmin
}
$newIds = array();
-
// Parent exists so let's proceed
while (!empty($pks))
{
@@ -739,17 +736,11 @@ class ComponentbuilderModelCustom_admin_view extends JModelAdmin
$this->table->reset();
// only allow copy if user may edit this item.
-
if (!$this->user->authorise('core.edit', $contexts[$pk]))
-
{
-
// Not fatal error
-
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
-
continue;
-
}
// Check that the row actually exists
@@ -759,7 +750,6 @@ class ComponentbuilderModelCustom_admin_view extends JModelAdmin
{
// Fatal error
$this->setError($error);
-
return false;
}
else
@@ -770,7 +760,11 @@ class ComponentbuilderModelCustom_admin_view extends JModelAdmin
}
}
- $this->table->name = $this->generateUniqe('name',$this->table->name);
+ // Only for strings
+ if (ComponentbuilderHelper::checkString($this->table->name) && !is_numeric($this->table->name))
+ {
+ $this->table->name = $this->generateUniqe('name',$this->table->name);
+ }
// insert all set values
if (ComponentbuilderHelper::checkArray($values))
@@ -852,8 +846,6 @@ class ComponentbuilderModelCustom_admin_view extends JModelAdmin
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
- $this->contentType = new JUcmType;
- $this->type = $this->contentType->getTypeByTable($this->tableClassName);
$this->canDo = ComponentbuilderHelper::getActions('custom_admin_view');
}
@@ -877,7 +869,6 @@ class ComponentbuilderModelCustom_admin_view extends JModelAdmin
if (!$this->user->authorise('core.edit', $contexts[$pk]))
{
$this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT'));
-
return false;
}
@@ -888,7 +879,6 @@ class ComponentbuilderModelCustom_admin_view extends JModelAdmin
{
// Fatal error
$this->setError($error);
-
return false;
}
else
diff --git a/admin/models/custom_code.php b/admin/models/custom_code.php
index be0a2da74..e8b329707 100644
--- a/admin/models/custom_code.php
+++ b/admin/models/custom_code.php
@@ -560,8 +560,6 @@ class ComponentbuilderModelCustom_code extends JModelAdmin
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
- $this->contentType = new JUcmType;
- $this->type = $this->contentType->getTypeByTable($this->tableClassName);
$this->canDo = ComponentbuilderHelper::getActions('custom_code');
}
@@ -586,7 +584,6 @@ class ComponentbuilderModelCustom_code extends JModelAdmin
}
$newIds = array();
-
// Parent exists so let's proceed
while (!empty($pks))
{
@@ -596,17 +593,11 @@ class ComponentbuilderModelCustom_code extends JModelAdmin
$this->table->reset();
// only allow copy if user may edit this item.
-
if (!$this->user->authorise('custom_code.edit', $contexts[$pk]))
-
{
-
// Not fatal error
-
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
-
continue;
-
}
// Check that the row actually exists
@@ -616,7 +607,6 @@ class ComponentbuilderModelCustom_code extends JModelAdmin
{
// Fatal error
$this->setError($error);
-
return false;
}
else
@@ -627,7 +617,11 @@ class ComponentbuilderModelCustom_code extends JModelAdmin
}
}
- $this->table->component = $this->generateUniqe('component',$this->table->component);
+ // Only for strings
+ if (ComponentbuilderHelper::checkString($this->table->component) && !is_numeric($this->table->component))
+ {
+ $this->table->component = $this->generateUniqe('component',$this->table->component);
+ }
// insert all set values
if (ComponentbuilderHelper::checkArray($values))
@@ -709,8 +703,6 @@ class ComponentbuilderModelCustom_code extends JModelAdmin
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
- $this->contentType = new JUcmType;
- $this->type = $this->contentType->getTypeByTable($this->tableClassName);
$this->canDo = ComponentbuilderHelper::getActions('custom_code');
}
@@ -734,7 +726,6 @@ class ComponentbuilderModelCustom_code extends JModelAdmin
if (!$this->user->authorise('custom_code.edit', $contexts[$pk]))
{
$this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT'));
-
return false;
}
@@ -745,7 +736,6 @@ class ComponentbuilderModelCustom_code extends JModelAdmin
{
// Fatal error
$this->setError($error);
-
return false;
}
else
diff --git a/admin/models/dynamic_get.php b/admin/models/dynamic_get.php
index 8f12844c7..5adcf74ec 100644
--- a/admin/models/dynamic_get.php
+++ b/admin/models/dynamic_get.php
@@ -196,7 +196,7 @@ class ComponentbuilderModelDynamic_get extends JModelAdmin
$item->php_calculation = base64_decode($item->php_calculation);
}
-
+
if (empty($item->id))
{
$id = 0;
@@ -215,7 +215,7 @@ class ComponentbuilderModelDynamic_get extends JModelAdmin
$this->vastDevMod = ComponentbuilderHelper::randomkey(50);
ComponentbuilderHelper::set($this->vastDevMod, 'dynamic_get__'.$id);
ComponentbuilderHelper::set('dynamic_get__'.$id, $this->vastDevMod);
- }
+ }
// update the fields
$objectUpdate = new stdClass();
@@ -710,8 +710,6 @@ class ComponentbuilderModelDynamic_get extends JModelAdmin
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
- $this->contentType = new JUcmType;
- $this->type = $this->contentType->getTypeByTable($this->tableClassName);
$this->canDo = ComponentbuilderHelper::getActions('dynamic_get');
}
@@ -736,7 +734,6 @@ class ComponentbuilderModelDynamic_get extends JModelAdmin
}
$newIds = array();
-
// Parent exists so let's proceed
while (!empty($pks))
{
@@ -746,17 +743,11 @@ class ComponentbuilderModelDynamic_get extends JModelAdmin
$this->table->reset();
// only allow copy if user may edit this item.
-
if (!$this->user->authorise('dynamic_get.edit', $contexts[$pk]))
-
{
-
// Not fatal error
-
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
-
continue;
-
}
// Check that the row actually exists
@@ -766,7 +757,6 @@ class ComponentbuilderModelDynamic_get extends JModelAdmin
{
// Fatal error
$this->setError($error);
-
return false;
}
else
@@ -777,7 +767,11 @@ class ComponentbuilderModelDynamic_get extends JModelAdmin
}
}
- $this->table->name = $this->generateUniqe('name',$this->table->name);
+ // Only for strings
+ if (ComponentbuilderHelper::checkString($this->table->name) && !is_numeric($this->table->name))
+ {
+ $this->table->name = $this->generateUniqe('name',$this->table->name);
+ }
// insert all set values
if (ComponentbuilderHelper::checkArray($values))
@@ -859,8 +853,6 @@ class ComponentbuilderModelDynamic_get extends JModelAdmin
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
- $this->contentType = new JUcmType;
- $this->type = $this->contentType->getTypeByTable($this->tableClassName);
$this->canDo = ComponentbuilderHelper::getActions('dynamic_get');
}
@@ -884,7 +876,6 @@ class ComponentbuilderModelDynamic_get extends JModelAdmin
if (!$this->user->authorise('dynamic_get.edit', $contexts[$pk]))
{
$this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT'));
-
return false;
}
@@ -895,7 +886,6 @@ class ComponentbuilderModelDynamic_get extends JModelAdmin
{
// Fatal error
$this->setError($error);
-
return false;
}
else
diff --git a/admin/models/field.php b/admin/models/field.php
index ea38efb14..1c7a1153e 100644
--- a/admin/models/field.php
+++ b/admin/models/field.php
@@ -130,7 +130,7 @@ class ComponentbuilderModelField extends JModelAdmin
$item->javascript_views_footer = base64_decode($item->javascript_views_footer);
}
-
+
if (empty($item->id))
{
$id = 0;
@@ -149,7 +149,7 @@ class ComponentbuilderModelField extends JModelAdmin
$this->vastDevMod = ComponentbuilderHelper::randomkey(50);
ComponentbuilderHelper::set($this->vastDevMod, 'field__'.$id);
ComponentbuilderHelper::set('field__'.$id, $this->vastDevMod);
- }
+ }
if (!empty($item->id))
{
@@ -608,8 +608,6 @@ class ComponentbuilderModelField extends JModelAdmin
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
- $this->contentType = new JUcmType;
- $this->type = $this->contentType->getTypeByTable($this->tableClassName);
$this->canDo = ComponentbuilderHelper::getActions('field');
}
@@ -649,7 +647,6 @@ class ComponentbuilderModelField extends JModelAdmin
}
$newIds = array();
-
// Parent exists so let's proceed
while (!empty($pks))
{
@@ -659,17 +656,11 @@ class ComponentbuilderModelField extends JModelAdmin
$this->table->reset();
// only allow copy if user may edit this item.
-
if (!$this->user->authorise('field.edit', $contexts[$pk]))
-
{
-
// Not fatal error
-
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
-
continue;
-
}
// Check that the row actually exists
@@ -679,7 +670,6 @@ class ComponentbuilderModelField extends JModelAdmin
{
// Fatal error
$this->setError($error);
-
return false;
}
else
@@ -770,8 +760,6 @@ class ComponentbuilderModelField extends JModelAdmin
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
- $this->contentType = new JUcmType;
- $this->type = $this->contentType->getTypeByTable($this->tableClassName);
$this->canDo = ComponentbuilderHelper::getActions('field');
}
@@ -811,7 +799,6 @@ class ComponentbuilderModelField extends JModelAdmin
if (!$this->user->authorise('field.edit', $contexts[$pk]))
{
$this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT'));
-
return false;
}
@@ -822,7 +809,6 @@ class ComponentbuilderModelField extends JModelAdmin
{
// Fatal error
$this->setError($error);
-
return false;
}
else
diff --git a/admin/models/fieldtype.php b/admin/models/fieldtype.php
index 7b380ef57..9835abd82 100644
--- a/admin/models/fieldtype.php
+++ b/admin/models/fieldtype.php
@@ -791,8 +791,6 @@ class ComponentbuilderModelFieldtype extends JModelAdmin
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
- $this->contentType = new JUcmType;
- $this->type = $this->contentType->getTypeByTable($this->tableClassName);
$this->canDo = ComponentbuilderHelper::getActions('fieldtype');
}
@@ -832,7 +830,6 @@ class ComponentbuilderModelFieldtype extends JModelAdmin
}
$newIds = array();
-
// Parent exists so let's proceed
while (!empty($pks))
{
@@ -842,17 +839,11 @@ class ComponentbuilderModelFieldtype extends JModelAdmin
$this->table->reset();
// only allow copy if user may edit this item.
-
if (!$this->user->authorise('fieldtype.edit', $contexts[$pk]))
-
{
-
// Not fatal error
-
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
-
continue;
-
}
// Check that the row actually exists
@@ -862,7 +853,6 @@ class ComponentbuilderModelFieldtype extends JModelAdmin
{
// Fatal error
$this->setError($error);
-
return false;
}
else
@@ -953,8 +943,6 @@ class ComponentbuilderModelFieldtype extends JModelAdmin
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
- $this->contentType = new JUcmType;
- $this->type = $this->contentType->getTypeByTable($this->tableClassName);
$this->canDo = ComponentbuilderHelper::getActions('fieldtype');
}
@@ -994,7 +982,6 @@ class ComponentbuilderModelFieldtype extends JModelAdmin
if (!$this->user->authorise('fieldtype.edit', $contexts[$pk]))
{
$this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT'));
-
return false;
}
@@ -1005,7 +992,6 @@ class ComponentbuilderModelFieldtype extends JModelAdmin
{
// Fatal error
$this->setError($error);
-
return false;
}
else
diff --git a/admin/models/forms/admin_view.js b/admin/models/forms/admin_view.js
index 990e7eb70..db75962cd 100644
--- a/admin/models/forms/admin_view.js
+++ b/admin/models/forms/admin_view.js
@@ -1240,7 +1240,7 @@ function getAjaxDisplay_server(type){
function addData(result,where){
jQuery(result).insertAfter(jQuery(where).closest('.control-group'));
}
-
+
function addButtonID_server(type, size){
var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getButtonID&format=json&vdm="+vastDevMod);
if(token.length > 0 && type.length > 0 && size > 0){
@@ -1264,8 +1264,8 @@ function addButtonID(type, where, size){
}
}
});
-}
-
+}
+
function addButton_server(type){
var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getButton&format=json&vdm="+vastDevMod);
if(token.length > 0 && type.length > 0){
@@ -1285,8 +1285,8 @@ function addButton(type,where){
addData(result,'#jform_'+where);
}
})
-}
-
+}
+
function getLinked_server(type){
var getUrl = "index.php?option=com_componentbuilder&task=ajax.getLinked&format=json&vdm="+vastDevMod;
if(token.length > 0 && type > 0){
@@ -1307,7 +1307,7 @@ function getLinked(){
jQuery('#display_linked_to').html(result);
}
});
-}
+}
function getTableColumns_server(tableName){
var getUrl = "index.php?option=com_componentbuilder&task=ajax.tableColumns&format=json&vdm="+vastDevMod;
diff --git a/admin/models/forms/custom_admin_view.js b/admin/models/forms/custom_admin_view.js
index 280c1c83a..251e6f816 100644
--- a/admin/models/forms/custom_admin_view.js
+++ b/admin/models/forms/custom_admin_view.js
@@ -443,7 +443,7 @@ jQuery(document).ready(function()
// get the linked details
getLinked();
});
-
+
function getLinked_server(type){
var getUrl = "index.php?option=com_componentbuilder&task=ajax.getLinked&format=json&vdm="+vastDevMod;
if(token.length > 0 && type > 0){
@@ -464,8 +464,8 @@ function getLinked(){
jQuery('#display_linked_to').html(result);
}
});
-}
-
+}
+
function getSnippetDetails_server(snippetId){
var getUrl = "index.php?option=com_componentbuilder&task=ajax.snippetDetails&format=json";
if(token.length > 0 && snippetId > 0){
@@ -513,8 +513,8 @@ function getSnippetDetails(id){
jQuery('.snippet-usage').append(usage);
}
})
-}
-
+}
+
function getDynamicValues_server(dynamicId){
var getUrl = "index.php?option=com_componentbuilder&task=ajax.getDynamicValues&format=json";
if(token.length > 0 && dynamicId > 0){
@@ -540,8 +540,8 @@ function getDynamicValues(id){
});
}
})
-}
-
+}
+
function getLayoutDetails_server(id){
var getUrl = "index.php?option=com_componentbuilder&task=ajax.getLayoutDetails&format=json";
if(token.length > 0 && id > 0){
@@ -566,8 +566,8 @@ function getLayoutDetails(id){
});
}
})
-}
-
+}
+
function getTemplateDetails_server(id){
var getUrl = "index.php?option=com_componentbuilder&task=ajax.templateDetails&format=json";
if(token.length > 0 && id > 0){
@@ -592,8 +592,8 @@ function getTemplateDetails(id){
});
}
})
-}
-
+}
+
// set snippets that are on the page
var snippetIds = [];
var snippets = {};
@@ -664,4 +664,4 @@ function setSnippets(array){
jQuery('#jform_snippet').append('');
}
jQuery('#jform_snippet').trigger('liszt:updated');
-}
+}
diff --git a/admin/models/forms/dynamic_get.js b/admin/models/forms/dynamic_get.js
index 2307b8232..e505bd47e 100644
--- a/admin/models/forms/dynamic_get.js
+++ b/admin/models/forms/dynamic_get.js
@@ -1435,7 +1435,7 @@ jQuery(document).ready(function()
var valueSwitch = jQuery("#jform_add_php_router_parse input[type='radio']:checked").val();
getDynamicScripts(valueSwitch);
});
-
+
function getLinked_server(type){
var getUrl = "index.php?option=com_componentbuilder&task=ajax.getLinked&format=json&vdm="+vastDevMod;
if(token.length > 0 && type > 0){
@@ -1456,7 +1456,7 @@ function getLinked(){
jQuery('#display_linked_to').html(result);
}
});
-}
+}
function getViewTableColumns_server(viewId,asKey,rowType)
{
diff --git a/admin/models/forms/field.js b/admin/models/forms/field.js
index 35d173058..840bb9ad1 100644
--- a/admin/models/forms/field.js
+++ b/admin/models/forms/field.js
@@ -514,7 +514,7 @@ jQuery(document).ready(function()
// get the linked details
getLinked();
});
-
+
function getLinked_server(type){
var getUrl = "index.php?option=com_componentbuilder&task=ajax.getLinked&format=json&vdm="+vastDevMod;
if(token.length > 0 && type > 0){
@@ -535,7 +535,7 @@ function getLinked(){
jQuery('#display_linked_to').html(result);
}
});
-}
+}
function getFieldOptions_server(fieldId){
var getUrl = "index.php?option=com_componentbuilder&task=ajax.fieldOptions&format=json";
diff --git a/admin/models/forms/help_document.js b/admin/models/forms/help_document.js
index 6d7bb2a20..ae549f30f 100644
--- a/admin/models/forms/help_document.js
+++ b/admin/models/forms/help_document.js
@@ -23,289 +23,289 @@
/-----------------------------------------------------------------------------------------------------------------------------*/
// Some Global Values
-jform_vvvvwazwao_required = false;
-jform_vvvvwbawap_required = false;
-jform_vvvvwbbwaq_required = false;
-jform_vvvvwbcwar_required = false;
-jform_vvvvwbdwas_required = false;
-jform_vvvvwbewat_required = false;
+jform_vvvvwbdwan_required = false;
+jform_vvvvwbewao_required = false;
+jform_vvvvwbfwap_required = false;
+jform_vvvvwbgwaq_required = false;
+jform_vvvvwbhwar_required = false;
+jform_vvvvwbiwas_required = false;
// Initial Script
jQuery(document).ready(function()
{
- var location_vvvvwaz = jQuery("#jform_location input[type='radio']:checked").val();
- vvvvwaz(location_vvvvwaz);
+ var location_vvvvwbd = jQuery("#jform_location input[type='radio']:checked").val();
+ vvvvwbd(location_vvvvwbd);
- var location_vvvvwba = jQuery("#jform_location input[type='radio']:checked").val();
- vvvvwba(location_vvvvwba);
+ var location_vvvvwbe = jQuery("#jform_location input[type='radio']:checked").val();
+ vvvvwbe(location_vvvvwbe);
- var type_vvvvwbb = jQuery("#jform_type").val();
- vvvvwbb(type_vvvvwbb);
+ var type_vvvvwbf = jQuery("#jform_type").val();
+ vvvvwbf(type_vvvvwbf);
- var type_vvvvwbc = jQuery("#jform_type").val();
- vvvvwbc(type_vvvvwbc);
+ var type_vvvvwbg = jQuery("#jform_type").val();
+ vvvvwbg(type_vvvvwbg);
- var type_vvvvwbd = jQuery("#jform_type").val();
- vvvvwbd(type_vvvvwbd);
+ var type_vvvvwbh = jQuery("#jform_type").val();
+ vvvvwbh(type_vvvvwbh);
- var target_vvvvwbe = jQuery("#jform_target input[type='radio']:checked").val();
- vvvvwbe(target_vvvvwbe);
+ var target_vvvvwbi = jQuery("#jform_target input[type='radio']:checked").val();
+ vvvvwbi(target_vvvvwbi);
});
-// the vvvvwaz function
-function vvvvwaz(location_vvvvwaz)
+// the vvvvwbd function
+function vvvvwbd(location_vvvvwbd)
{
// set the function logic
- if (location_vvvvwaz == 1)
+ if (location_vvvvwbd == 1)
{
jQuery('#jform_admin_view').closest('.control-group').show();
- if (jform_vvvvwazwao_required)
+ if (jform_vvvvwbdwan_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_vvvvwazwao_required = false;
+ jform_vvvvwbdwan_required = false;
}
}
else
{
jQuery('#jform_admin_view').closest('.control-group').hide();
- if (!jform_vvvvwazwao_required)
+ if (!jform_vvvvwbdwan_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_vvvvwazwao_required = true;
+ jform_vvvvwbdwan_required = true;
}
}
}
-// the vvvvwba function
-function vvvvwba(location_vvvvwba)
+// the vvvvwbe function
+function vvvvwbe(location_vvvvwbe)
{
// set the function logic
- if (location_vvvvwba == 2)
+ if (location_vvvvwbe == 2)
{
jQuery('#jform_site_view').closest('.control-group').show();
- if (jform_vvvvwbawap_required)
+ if (jform_vvvvwbewao_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_vvvvwbawap_required = false;
+ jform_vvvvwbewao_required = false;
}
}
else
{
jQuery('#jform_site_view').closest('.control-group').hide();
- if (!jform_vvvvwbawap_required)
+ if (!jform_vvvvwbewao_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_vvvvwbawap_required = true;
+ jform_vvvvwbewao_required = true;
}
}
}
-// the vvvvwbb function
-function vvvvwbb(type_vvvvwbb)
+// the vvvvwbf function
+function vvvvwbf(type_vvvvwbf)
{
- if (isSet(type_vvvvwbb) && type_vvvvwbb.constructor !== Array)
+ if (isSet(type_vvvvwbf) && type_vvvvwbf.constructor !== Array)
{
- var temp_vvvvwbb = type_vvvvwbb;
- var type_vvvvwbb = [];
- type_vvvvwbb.push(temp_vvvvwbb);
+ var temp_vvvvwbf = type_vvvvwbf;
+ var type_vvvvwbf = [];
+ type_vvvvwbf.push(temp_vvvvwbf);
}
- else if (!isSet(type_vvvvwbb))
+ else if (!isSet(type_vvvvwbf))
{
- var type_vvvvwbb = [];
+ var type_vvvvwbf = [];
}
- var type = type_vvvvwbb.some(type_vvvvwbb_SomeFunc);
+ var type = type_vvvvwbf.some(type_vvvvwbf_SomeFunc);
// set this function logic
if (type)
{
jQuery('#jform_url').closest('.control-group').show();
- if (jform_vvvvwbbwaq_required)
+ if (jform_vvvvwbfwap_required)
{
updateFieldRequired('url',0);
jQuery('#jform_url').prop('required','required');
jQuery('#jform_url').attr('aria-required',true);
jQuery('#jform_url').addClass('required');
- jform_vvvvwbbwaq_required = false;
+ jform_vvvvwbfwap_required = false;
}
}
else
{
jQuery('#jform_url').closest('.control-group').hide();
- if (!jform_vvvvwbbwaq_required)
+ if (!jform_vvvvwbfwap_required)
{
updateFieldRequired('url',1);
jQuery('#jform_url').removeAttr('required');
jQuery('#jform_url').removeAttr('aria-required');
jQuery('#jform_url').removeClass('required');
- jform_vvvvwbbwaq_required = true;
+ jform_vvvvwbfwap_required = true;
}
}
}
-// the vvvvwbb Some function
-function type_vvvvwbb_SomeFunc(type_vvvvwbb)
+// the vvvvwbf Some function
+function type_vvvvwbf_SomeFunc(type_vvvvwbf)
{
// set the function logic
- if (type_vvvvwbb == 3)
+ if (type_vvvvwbf == 3)
{
return true;
}
return false;
}
-// the vvvvwbc function
-function vvvvwbc(type_vvvvwbc)
+// the vvvvwbg function
+function vvvvwbg(type_vvvvwbg)
{
- if (isSet(type_vvvvwbc) && type_vvvvwbc.constructor !== Array)
+ if (isSet(type_vvvvwbg) && type_vvvvwbg.constructor !== Array)
{
- var temp_vvvvwbc = type_vvvvwbc;
- var type_vvvvwbc = [];
- type_vvvvwbc.push(temp_vvvvwbc);
+ var temp_vvvvwbg = type_vvvvwbg;
+ var type_vvvvwbg = [];
+ type_vvvvwbg.push(temp_vvvvwbg);
}
- else if (!isSet(type_vvvvwbc))
+ else if (!isSet(type_vvvvwbg))
{
- var type_vvvvwbc = [];
+ var type_vvvvwbg = [];
}
- var type = type_vvvvwbc.some(type_vvvvwbc_SomeFunc);
+ var type = type_vvvvwbg.some(type_vvvvwbg_SomeFunc);
// set this function logic
if (type)
{
jQuery('#jform_article').closest('.control-group').show();
- if (jform_vvvvwbcwar_required)
+ if (jform_vvvvwbgwaq_required)
{
updateFieldRequired('article',0);
jQuery('#jform_article').prop('required','required');
jQuery('#jform_article').attr('aria-required',true);
jQuery('#jform_article').addClass('required');
- jform_vvvvwbcwar_required = false;
+ jform_vvvvwbgwaq_required = false;
}
}
else
{
jQuery('#jform_article').closest('.control-group').hide();
- if (!jform_vvvvwbcwar_required)
+ if (!jform_vvvvwbgwaq_required)
{
updateFieldRequired('article',1);
jQuery('#jform_article').removeAttr('required');
jQuery('#jform_article').removeAttr('aria-required');
jQuery('#jform_article').removeClass('required');
- jform_vvvvwbcwar_required = true;
+ jform_vvvvwbgwaq_required = true;
}
}
}
-// the vvvvwbc Some function
-function type_vvvvwbc_SomeFunc(type_vvvvwbc)
+// the vvvvwbg Some function
+function type_vvvvwbg_SomeFunc(type_vvvvwbg)
{
// set the function logic
- if (type_vvvvwbc == 1)
+ if (type_vvvvwbg == 1)
{
return true;
}
return false;
}
-// the vvvvwbd function
-function vvvvwbd(type_vvvvwbd)
+// the vvvvwbh function
+function vvvvwbh(type_vvvvwbh)
{
- if (isSet(type_vvvvwbd) && type_vvvvwbd.constructor !== Array)
+ if (isSet(type_vvvvwbh) && type_vvvvwbh.constructor !== Array)
{
- var temp_vvvvwbd = type_vvvvwbd;
- var type_vvvvwbd = [];
- type_vvvvwbd.push(temp_vvvvwbd);
+ var temp_vvvvwbh = type_vvvvwbh;
+ var type_vvvvwbh = [];
+ type_vvvvwbh.push(temp_vvvvwbh);
}
- else if (!isSet(type_vvvvwbd))
+ else if (!isSet(type_vvvvwbh))
{
- var type_vvvvwbd = [];
+ var type_vvvvwbh = [];
}
- var type = type_vvvvwbd.some(type_vvvvwbd_SomeFunc);
+ var type = type_vvvvwbh.some(type_vvvvwbh_SomeFunc);
// set this function logic
if (type)
{
jQuery('#jform_content-lbl').closest('.control-group').show();
- if (jform_vvvvwbdwas_required)
+ if (jform_vvvvwbhwar_required)
{
updateFieldRequired('content',0);
jQuery('#jform_content').prop('required','required');
jQuery('#jform_content').attr('aria-required',true);
jQuery('#jform_content').addClass('required');
- jform_vvvvwbdwas_required = false;
+ jform_vvvvwbhwar_required = false;
}
}
else
{
jQuery('#jform_content-lbl').closest('.control-group').hide();
- if (!jform_vvvvwbdwas_required)
+ if (!jform_vvvvwbhwar_required)
{
updateFieldRequired('content',1);
jQuery('#jform_content').removeAttr('required');
jQuery('#jform_content').removeAttr('aria-required');
jQuery('#jform_content').removeClass('required');
- jform_vvvvwbdwas_required = true;
+ jform_vvvvwbhwar_required = true;
}
}
}
-// the vvvvwbd Some function
-function type_vvvvwbd_SomeFunc(type_vvvvwbd)
+// the vvvvwbh Some function
+function type_vvvvwbh_SomeFunc(type_vvvvwbh)
{
// set the function logic
- if (type_vvvvwbd == 2)
+ if (type_vvvvwbh == 2)
{
return true;
}
return false;
}
-// the vvvvwbe function
-function vvvvwbe(target_vvvvwbe)
+// the vvvvwbi function
+function vvvvwbi(target_vvvvwbi)
{
// set the function logic
- if (target_vvvvwbe == 1)
+ if (target_vvvvwbi == 1)
{
jQuery('#jform_groups').closest('.control-group').show();
- if (jform_vvvvwbewat_required)
+ if (jform_vvvvwbiwas_required)
{
updateFieldRequired('groups',0);
jQuery('#jform_groups').prop('required','required');
jQuery('#jform_groups').attr('aria-required',true);
jQuery('#jform_groups').addClass('required');
- jform_vvvvwbewat_required = false;
+ jform_vvvvwbiwas_required = false;
}
}
else
{
jQuery('#jform_groups').closest('.control-group').hide();
- if (!jform_vvvvwbewat_required)
+ if (!jform_vvvvwbiwas_required)
{
updateFieldRequired('groups',1);
jQuery('#jform_groups').removeAttr('required');
jQuery('#jform_groups').removeAttr('aria-required');
jQuery('#jform_groups').removeClass('required');
- jform_vvvvwbewat_required = true;
+ jform_vvvvwbiwas_required = true;
}
}
}
diff --git a/admin/models/forms/joomla_component.js b/admin/models/forms/joomla_component.js
index a46843aa4..99ff42011 100644
--- a/admin/models/forms/joomla_component.js
+++ b/admin/models/forms/joomla_component.js
@@ -915,7 +915,7 @@ function addData(result, where){
jQuery(result).insertAfter(jQuery(where).closest('.control-group'));
}
-
+
function addButtonID_server(type, size){
var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getButtonID&format=json&vdm="+vastDevMod);
if(token.length > 0 && type.length > 0 && size > 0){
@@ -939,8 +939,8 @@ function addButtonID(type, where, size){
}
}
});
-}
-
+}
+
function addButton_server(type){
var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getButton&format=json&vdm="+vastDevMod);
if(token.length > 0 && type.length > 0){
@@ -960,5 +960,5 @@ function addButton(type,where){
addData(result,'#jform_'+where);
}
})
-}
+}
diff --git a/admin/models/forms/language_translation.js b/admin/models/forms/language_translation.js
index 138e777f9..0170f7c31 100644
--- a/admin/models/forms/language_translation.js
+++ b/admin/models/forms/language_translation.js
@@ -32,7 +32,7 @@ jQuery(document).ready(function($)
function addData(result,where){
jQuery(result).insertAfter(jQuery(where).closest('.control-group'));
}
-
+
function addButton_server(type){
var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getButton&format=json&vdm="+vastDevMod);
if(token.length > 0 && type.length > 0){
@@ -52,4 +52,4 @@ function addButton(type,where){
addData(result,'#jform_'+where);
}
})
-}
+}
diff --git a/admin/models/forms/layout.js b/admin/models/forms/layout.js
index 2a6459f0a..397bae8bd 100644
--- a/admin/models/forms/layout.js
+++ b/admin/models/forms/layout.js
@@ -99,7 +99,7 @@ function isSet(val)
return false;
}
-
+
function getSnippetDetails_server(snippetId){
var getUrl = "index.php?option=com_componentbuilder&task=ajax.snippetDetails&format=json";
if(token.length > 0 && snippetId > 0){
@@ -147,8 +147,8 @@ function getSnippetDetails(id){
jQuery('.snippet-usage').append(usage);
}
})
-}
-
+}
+
function getDynamicValues_server(dynamicId){
var getUrl = "index.php?option=com_componentbuilder&task=ajax.getDynamicValues&format=json";
if(token.length > 0 && dynamicId > 0){
@@ -174,8 +174,8 @@ function getDynamicValues(id){
});
}
})
-}
-
+}
+
function getLayoutDetails_server(id){
var getUrl = "index.php?option=com_componentbuilder&task=ajax.getLayoutDetails&format=json";
if(token.length > 0 && id > 0){
@@ -200,8 +200,8 @@ function getLayoutDetails(id){
});
}
})
-}
-
+}
+
// set snippets that are on the page
var snippetIds = [];
var snippets = {};
@@ -272,4 +272,4 @@ function setSnippets(array){
jQuery('#jform_snippet').append('');
}
jQuery('#jform_snippet').trigger('liszt:updated');
-}
+}
diff --git a/admin/models/forms/library.js b/admin/models/forms/library.js
index bb8763f88..64464dc1a 100644
--- a/admin/models/forms/library.js
+++ b/admin/models/forms/library.js
@@ -426,7 +426,7 @@ jQuery(document).ready(function()
function addData(result,where){
jQuery(result).insertAfter(jQuery(where).closest('.control-group'));
}
-
+
function addButtonID_server(type, size){
var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getButtonID&format=json&vdm="+vastDevMod);
if(token.length > 0 && type.length > 0 && size > 0){
@@ -450,8 +450,8 @@ function addButtonID(type, where, size){
}
}
});
-}
-
+}
+
function addButton_server(type){
var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.getButton&format=json&vdm="+vastDevMod);
if(token.length > 0 && type.length > 0){
@@ -471,8 +471,8 @@ function addButton(type,where){
addData(result,'#jform_'+where);
}
})
-}
-
+}
+
function getLinked_server(type){
var getUrl = "index.php?option=com_componentbuilder&task=ajax.getLinked&format=json&vdm="+vastDevMod;
if(token.length > 0 && type > 0){
@@ -493,7 +493,7 @@ function getLinked(){
jQuery('#display_linked_to').html(result);
}
});
-}
+}
function getAjaxDisplay(type){
getAjaxDisplay_server(type).done(function(result) {
diff --git a/admin/models/forms/server.js b/admin/models/forms/server.js
index 149a7b199..055a7ebfe 100644
--- a/admin/models/forms/server.js
+++ b/admin/models/forms/server.js
@@ -31,7 +31,6 @@ jform_vvvvwatwai_required = false;
jform_vvvvwauwaj_required = false;
jform_vvvvwavwak_required = false;
jform_vvvvwaxwal_required = false;
-jform_vvvvwaywam_required = false;
// Initial Script
jQuery(document).ready(function()
@@ -50,9 +49,13 @@ jQuery(document).ready(function()
var authentication_vvvvwax = jQuery("#jform_authentication").val();
vvvvwax(protocol_vvvvwax,authentication_vvvvwax);
- var authentication_vvvvway = jQuery("#jform_authentication").val();
- var protocol_vvvvway = jQuery("#jform_protocol").val();
- vvvvway(authentication_vvvvway,protocol_vvvvway);
+ var protocol_vvvvwaz = jQuery("#jform_protocol").val();
+ var authentication_vvvvwaz = jQuery("#jform_authentication").val();
+ vvvvwaz(protocol_vvvvwaz,authentication_vvvvwaz);
+
+ var protocol_vvvvwbb = jQuery("#jform_protocol").val();
+ var authentication_vvvvwbb = jQuery("#jform_authentication").val();
+ vvvvwbb(protocol_vvvvwbb,authentication_vvvvwbb);
});
// the vvvvwat function
@@ -316,7 +319,7 @@ function protocol_vvvvwav_SomeFunc(protocol_vvvvwav)
function authentication_vvvvwav_SomeFunc(authentication_vvvvwav)
{
// set the function logic
- if (authentication_vvvvwav == 1 || authentication_vvvvwav == 3)
+ if (authentication_vvvvwav == 1 || authentication_vvvvwav == 3 || authentication_vvvvwav == 5)
{
return true;
}
@@ -364,7 +367,6 @@ function vvvvwax(protocol_vvvvwax,authentication_vvvvwax)
jform_vvvvwaxwal_required = false;
}
- jQuery('#jform_secret').closest('.control-group').show();
}
else
{
@@ -377,7 +379,6 @@ function vvvvwax(protocol_vvvvwax,authentication_vvvvwax)
jQuery('#jform_private').removeClass('required');
jform_vvvvwaxwal_required = true;
}
- jQuery('#jform_secret').closest('.control-group').hide();
}
}
@@ -403,80 +404,122 @@ function authentication_vvvvwax_SomeFunc(authentication_vvvvwax)
return false;
}
-// the vvvvway function
-function vvvvway(authentication_vvvvway,protocol_vvvvway)
+// the vvvvwaz function
+function vvvvwaz(protocol_vvvvwaz,authentication_vvvvwaz)
{
- if (isSet(authentication_vvvvway) && authentication_vvvvway.constructor !== Array)
+ if (isSet(protocol_vvvvwaz) && protocol_vvvvwaz.constructor !== Array)
{
- var temp_vvvvway = authentication_vvvvway;
- var authentication_vvvvway = [];
- authentication_vvvvway.push(temp_vvvvway);
+ var temp_vvvvwaz = protocol_vvvvwaz;
+ var protocol_vvvvwaz = [];
+ protocol_vvvvwaz.push(temp_vvvvwaz);
}
- else if (!isSet(authentication_vvvvway))
+ else if (!isSet(protocol_vvvvwaz))
{
- var authentication_vvvvway = [];
+ var protocol_vvvvwaz = [];
}
- var authentication = authentication_vvvvway.some(authentication_vvvvway_SomeFunc);
+ var protocol = protocol_vvvvwaz.some(protocol_vvvvwaz_SomeFunc);
- if (isSet(protocol_vvvvway) && protocol_vvvvway.constructor !== Array)
+ if (isSet(authentication_vvvvwaz) && authentication_vvvvwaz.constructor !== Array)
{
- var temp_vvvvway = protocol_vvvvway;
- var protocol_vvvvway = [];
- protocol_vvvvway.push(temp_vvvvway);
+ var temp_vvvvwaz = authentication_vvvvwaz;
+ var authentication_vvvvwaz = [];
+ authentication_vvvvwaz.push(temp_vvvvwaz);
}
- else if (!isSet(protocol_vvvvway))
+ else if (!isSet(authentication_vvvvwaz))
{
- var protocol_vvvvway = [];
+ var authentication_vvvvwaz = [];
}
- var protocol = protocol_vvvvway.some(protocol_vvvvway_SomeFunc);
+ var authentication = authentication_vvvvwaz.some(authentication_vvvvwaz_SomeFunc);
// set this function logic
- if (authentication && protocol)
+ if (protocol && authentication)
{
- jQuery('#jform_private').closest('.control-group').show();
- if (jform_vvvvwaywam_required)
- {
- updateFieldRequired('private',0);
- jQuery('#jform_private').prop('required','required');
- jQuery('#jform_private').attr('aria-required',true);
- jQuery('#jform_private').addClass('required');
- jform_vvvvwaywam_required = false;
- }
-
- jQuery('#jform_secret').closest('.control-group').show();
+ jQuery('#jform_private_key').closest('.control-group').show();
}
else
{
- jQuery('#jform_private').closest('.control-group').hide();
- if (!jform_vvvvwaywam_required)
- {
- updateFieldRequired('private',1);
- jQuery('#jform_private').removeAttr('required');
- jQuery('#jform_private').removeAttr('aria-required');
- jQuery('#jform_private').removeClass('required');
- jform_vvvvwaywam_required = true;
- }
- jQuery('#jform_secret').closest('.control-group').hide();
+ jQuery('#jform_private_key').closest('.control-group').hide();
}
}
-// the vvvvway Some function
-function authentication_vvvvway_SomeFunc(authentication_vvvvway)
+// the vvvvwaz Some function
+function protocol_vvvvwaz_SomeFunc(protocol_vvvvwaz)
{
// set the function logic
- if (authentication_vvvvway == 2 || authentication_vvvvway == 3)
+ if (protocol_vvvvwaz == 2)
{
return true;
}
return false;
}
-// the vvvvway Some function
-function protocol_vvvvway_SomeFunc(protocol_vvvvway)
+// the vvvvwaz Some function
+function authentication_vvvvwaz_SomeFunc(authentication_vvvvwaz)
{
// set the function logic
- if (protocol_vvvvway == 2)
+ if (authentication_vvvvwaz == 4 || authentication_vvvvwaz == 5)
+ {
+ return true;
+ }
+ return false;
+}
+
+// the vvvvwbb function
+function vvvvwbb(protocol_vvvvwbb,authentication_vvvvwbb)
+{
+ if (isSet(protocol_vvvvwbb) && protocol_vvvvwbb.constructor !== Array)
+ {
+ var temp_vvvvwbb = protocol_vvvvwbb;
+ var protocol_vvvvwbb = [];
+ protocol_vvvvwbb.push(temp_vvvvwbb);
+ }
+ else if (!isSet(protocol_vvvvwbb))
+ {
+ var protocol_vvvvwbb = [];
+ }
+ var protocol = protocol_vvvvwbb.some(protocol_vvvvwbb_SomeFunc);
+
+ if (isSet(authentication_vvvvwbb) && authentication_vvvvwbb.constructor !== Array)
+ {
+ var temp_vvvvwbb = authentication_vvvvwbb;
+ var authentication_vvvvwbb = [];
+ authentication_vvvvwbb.push(temp_vvvvwbb);
+ }
+ else if (!isSet(authentication_vvvvwbb))
+ {
+ var authentication_vvvvwbb = [];
+ }
+ var authentication = authentication_vvvvwbb.some(authentication_vvvvwbb_SomeFunc);
+
+
+ // set this function logic
+ if (protocol && authentication)
+ {
+ jQuery('#jform_secret').closest('.control-group').show();
+ }
+ else
+ {
+ jQuery('#jform_secret').closest('.control-group').hide();
+ }
+}
+
+// the vvvvwbb Some function
+function protocol_vvvvwbb_SomeFunc(protocol_vvvvwbb)
+{
+ // set the function logic
+ if (protocol_vvvvwbb == 2)
+ {
+ return true;
+ }
+ return false;
+}
+
+// the vvvvwbb Some function
+function authentication_vvvvwbb_SomeFunc(authentication_vvvvwbb)
+{
+ // set the function logic
+ if (authentication_vvvvwbb == 2 || authentication_vvvvwbb == 3 || authentication_vvvvwbb == 4 || authentication_vvvvwbb == 5)
{
return true;
}
diff --git a/admin/models/forms/server.xml b/admin/models/forms/server.xml
index e9383e043..41db29e02 100644
--- a/admin/models/forms/server.xml
+++ b/admin/models/forms/server.xml
@@ -107,18 +107,6 @@
-
-
-
-
-
-
-
-
+
+ required="true"
+ filter="INT"
+ message="COM_COMPONENTBUILDER_SERVER_PORT_MESSAGE"
+ hint="COM_COMPONENTBUILDER_SERVER_PORT_HINT"
+ onchange="if(!jQuery(this).val().match(/^\d+$/)){jQuery(this).val('')};" />
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
+
+
diff --git a/admin/models/forms/site_view.js b/admin/models/forms/site_view.js
index d9c8a80e8..4c627099f 100644
--- a/admin/models/forms/site_view.js
+++ b/admin/models/forms/site_view.js
@@ -484,7 +484,7 @@ jQuery(document).ready(function()
// get the linked details
getLinked();
});
-
+
function getLinked_server(type){
var getUrl = "index.php?option=com_componentbuilder&task=ajax.getLinked&format=json&vdm="+vastDevMod;
if(token.length > 0 && type > 0){
@@ -505,8 +505,8 @@ function getLinked(){
jQuery('#display_linked_to').html(result);
}
});
-}
-
+}
+
function getSnippetDetails_server(snippetId){
var getUrl = "index.php?option=com_componentbuilder&task=ajax.snippetDetails&format=json";
if(token.length > 0 && snippetId > 0){
@@ -554,8 +554,8 @@ function getSnippetDetails(id){
jQuery('.snippet-usage').append(usage);
}
})
-}
-
+}
+
function getDynamicValues_server(dynamicId){
var getUrl = "index.php?option=com_componentbuilder&task=ajax.getDynamicValues&format=json";
if(token.length > 0 && dynamicId > 0){
@@ -581,8 +581,8 @@ function getDynamicValues(id){
});
}
})
-}
-
+}
+
function getLayoutDetails_server(id){
var getUrl = "index.php?option=com_componentbuilder&task=ajax.getLayoutDetails&format=json";
if(token.length > 0 && id > 0){
@@ -607,8 +607,8 @@ function getLayoutDetails(id){
});
}
})
-}
-
+}
+
function getTemplateDetails_server(id){
var getUrl = "index.php?option=com_componentbuilder&task=ajax.templateDetails&format=json";
if(token.length > 0 && id > 0){
@@ -633,8 +633,8 @@ function getTemplateDetails(id){
});
}
})
-}
-
+}
+
// set snippets that are on the page
var snippetIds = [];
var snippets = {};
@@ -705,4 +705,4 @@ function setSnippets(array){
jQuery('#jform_snippet').append('');
}
jQuery('#jform_snippet').trigger('liszt:updated');
-}
+}
diff --git a/admin/models/forms/template.js b/admin/models/forms/template.js
index 6061198f6..e9e58f498 100644
--- a/admin/models/forms/template.js
+++ b/admin/models/forms/template.js
@@ -99,7 +99,7 @@ function isSet(val)
return false;
}
-
+
function getSnippetDetails_server(snippetId){
var getUrl = "index.php?option=com_componentbuilder&task=ajax.snippetDetails&format=json";
if(token.length > 0 && snippetId > 0){
@@ -147,8 +147,8 @@ function getSnippetDetails(id){
jQuery('.snippet-usage').append(usage);
}
})
-}
-
+}
+
function getDynamicValues_server(dynamicId){
var getUrl = "index.php?option=com_componentbuilder&task=ajax.getDynamicValues&format=json";
if(token.length > 0 && dynamicId > 0){
@@ -174,8 +174,8 @@ function getDynamicValues(id){
});
}
})
-}
-
+}
+
function getLayoutDetails_server(id){
var getUrl = "index.php?option=com_componentbuilder&task=ajax.getLayoutDetails&format=json";
if(token.length > 0 && id > 0){
@@ -200,8 +200,8 @@ function getLayoutDetails(id){
});
}
})
-}
-
+}
+
function getTemplateDetails_server(id){
var getUrl = "index.php?option=com_componentbuilder&task=ajax.templateDetails&format=json";
if(token.length > 0 && id > 0){
@@ -226,8 +226,8 @@ function getTemplateDetails(id){
});
}
})
-}
-
+}
+
// set snippets that are on the page
var snippetIds = [];
var snippets = {};
@@ -298,4 +298,4 @@ function setSnippets(array){
jQuery('#jform_snippet').append('');
}
jQuery('#jform_snippet').trigger('liszt:updated');
-}
+}
diff --git a/admin/models/help_document.php b/admin/models/help_document.php
index fb1c087ba..9dcabbc4c 100644
--- a/admin/models/help_document.php
+++ b/admin/models/help_document.php
@@ -558,8 +558,6 @@ class ComponentbuilderModelHelp_document extends JModelAdmin
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
- $this->contentType = new JUcmType;
- $this->type = $this->contentType->getTypeByTable($this->tableClassName);
$this->canDo = ComponentbuilderHelper::getActions('help_document');
}
@@ -584,7 +582,6 @@ class ComponentbuilderModelHelp_document extends JModelAdmin
}
$newIds = array();
-
// Parent exists so let's proceed
while (!empty($pks))
{
@@ -594,17 +591,11 @@ class ComponentbuilderModelHelp_document extends JModelAdmin
$this->table->reset();
// only allow copy if user may edit this item.
-
if (!$this->user->authorise('help_document.edit', $contexts[$pk]))
-
{
-
// Not fatal error
-
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
-
continue;
-
}
// Check that the row actually exists
@@ -614,7 +605,6 @@ class ComponentbuilderModelHelp_document extends JModelAdmin
{
// Fatal error
$this->setError($error);
-
return false;
}
else
@@ -624,7 +614,6 @@ class ComponentbuilderModelHelp_document extends JModelAdmin
continue;
}
}
-
list($this->table->title, $this->table->alias) = $this->_generateNewTitle($this->table->alias, $this->table->title);
// insert all set values
@@ -707,8 +696,6 @@ class ComponentbuilderModelHelp_document extends JModelAdmin
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
- $this->contentType = new JUcmType;
- $this->type = $this->contentType->getTypeByTable($this->tableClassName);
$this->canDo = ComponentbuilderHelper::getActions('help_document');
}
@@ -732,7 +719,6 @@ class ComponentbuilderModelHelp_document extends JModelAdmin
if (!$this->user->authorise('help_document.edit', $contexts[$pk]))
{
$this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT'));
-
return false;
}
@@ -743,7 +729,6 @@ class ComponentbuilderModelHelp_document extends JModelAdmin
{
// Fatal error
$this->setError($error);
-
return false;
}
else
diff --git a/admin/models/import_joomla_components.php b/admin/models/import_joomla_components.php
index 475acea98..f8da89216 100644
--- a/admin/models/import_joomla_components.php
+++ b/admin/models/import_joomla_components.php
@@ -1507,6 +1507,18 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
}
// remove from this dataset
unset($item->css);
+ // rename sales_server_ftp field
+ if (isset($item->sales_server_ftp))
+ {
+ $item->sales_server = $item->sales_server_ftp;
+ unset($item->sales_server_ftp);
+ }
+ // rename update_server_ftp field
+ if (isset($item->update_server_ftp))
+ {
+ $item->update_server = $item->update_server_ftp;
+ unset($item->update_server_ftp);
+ }
// repeatable fields to update
$updaterR = array(
// repeatablefield => checker
@@ -2267,19 +2279,19 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
case 'joomla_component':
if ($retry == 3)
{
- // get by name only
- $getter = array('name', 'name_code'); // risky will look at this again
+ // get by names only
+ $getter = array('name', 'name_code', 'system_name');
}
elseif ($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
+ $getter = array('name', 'name_code', 'short_description', 'author', 'email', 'component_version', 'companyname', 'system_name', 'website', 'bom', 'copyright', 'license');
$retryAgain = 3;
}
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
+ $getter = array('id', 'name', 'name_code', 'short_description', 'author', 'component_version', 'companyname', 'system_name');
$retryAgain = 2;
}
break;
diff --git a/admin/models/joomla_component.php b/admin/models/joomla_component.php
index 5e7ac68c9..87567bb34 100644
--- a/admin/models/joomla_component.php
+++ b/admin/models/joomla_component.php
@@ -221,7 +221,7 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin
$item->export_key = rtrim($basic->decryptString($item->export_key), "\0");
}
-
+
if (empty($item->id))
{
$id = 0;
@@ -240,7 +240,7 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin
$this->vastDevMod = ComponentbuilderHelper::randomkey(50);
ComponentbuilderHelper::set($this->vastDevMod, 'joomla_component__'.$id);
ComponentbuilderHelper::set('joomla_component__'.$id, $this->vastDevMod);
- }
+ }
// update the fields
$objectUpdate = new stdClass();
@@ -782,20 +782,21 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin
if (ComponentbuilderHelper::checkArray($pks))
{
$_tablesArray = array(
- 'component_admin_views',
- 'component_site_views',
- 'component_custom_admin_views',
- 'component_updates',
- 'component_mysql_tweaks',
- 'component_custom_admin_menus',
- 'component_config',
- 'component_dashboard',
- 'component_files_folders'
+ 'component_admin_views' => 'joomla_component',
+ 'component_site_views' => 'joomla_component',
+ 'component_custom_admin_views' => 'joomla_component',
+ 'component_updates' => 'joomla_component',
+ 'component_mysql_tweaks' => 'joomla_component',
+ 'component_custom_admin_menus' => 'joomla_component',
+ 'component_config' => 'joomla_component',
+ 'component_dashboard' => 'joomla_component',
+ 'component_files_folders' => 'joomla_component',
+ 'custom_code' => 'component'
);
- foreach($_tablesArray as $_updateTable)
+ foreach($_tablesArray as $_updateTable => $_key)
{
// get the linked IDs
- if ($_pks = ComponentbuilderHelper::getVars($_updateTable, $pks, 'joomla_component', 'id'))
+ if ($_pks = ComponentbuilderHelper::getVars($_updateTable, $pks, $_key, 'id'))
{
// load the model
$_Model = ComponentbuilderHelper::getModel($_updateTable);
@@ -829,20 +830,21 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin
if (ComponentbuilderHelper::checkArray($pks))
{
$_tablesArray = array(
- 'component_admin_views',
- 'component_site_views',
- 'component_custom_admin_views',
- 'component_updates',
- 'component_mysql_tweaks',
- 'component_custom_admin_menus',
- 'component_config',
- 'component_dashboard',
- 'component_files_folders'
+ 'component_admin_views' => 'joomla_component',
+ 'component_site_views' => 'joomla_component',
+ 'component_custom_admin_views' => 'joomla_component',
+ 'component_updates' => 'joomla_component',
+ 'component_mysql_tweaks' => 'joomla_component',
+ 'component_custom_admin_menus' => 'joomla_component',
+ 'component_config' => 'joomla_component',
+ 'component_dashboard' => 'joomla_component',
+ 'component_files_folders' => 'joomla_component',
+ 'custom_code' => 'component'
);
- foreach($_tablesArray as $_updateTable)
+ foreach($_tablesArray as $_updateTable => $_key)
{
// get the linked IDs
- if ($_pks = ComponentbuilderHelper::getVars($_updateTable, $pks, 'joomla_component', 'id'))
+ if ($_pks = ComponentbuilderHelper::getVars($_updateTable, $pks, $_key, 'id'))
{
// load the model
$_Model = ComponentbuilderHelper::getModel($_updateTable);
@@ -970,8 +972,6 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
- $this->contentType = new JUcmType;
- $this->type = $this->contentType->getTypeByTable($this->tableClassName);
$this->canDo = ComponentbuilderHelper::getActions('joomla_component');
}
@@ -996,7 +996,6 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin
}
$newIds = array();
-
// Parent exists so let's proceed
while (!empty($pks))
{
@@ -1006,17 +1005,11 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin
$this->table->reset();
// only allow copy if user may edit this item.
-
if (!$this->user->authorise('joomla_component.edit', $contexts[$pk]))
-
{
-
// Not fatal error
-
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
-
continue;
-
}
// Check that the row actually exists
@@ -1026,7 +1019,6 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin
{
// Fatal error
$this->setError($error);
-
return false;
}
else
@@ -1037,7 +1029,11 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin
}
}
- $this->table->system_name = $this->generateUniqe('system_name',$this->table->system_name);
+ // Only for strings
+ if (ComponentbuilderHelper::checkString($this->table->system_name) && !is_numeric($this->table->system_name))
+ {
+ $this->table->system_name = $this->generateUniqe('system_name',$this->table->system_name);
+ }
// insert all set values
if (ComponentbuilderHelper::checkArray($values))
@@ -1119,8 +1115,6 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
- $this->contentType = new JUcmType;
- $this->type = $this->contentType->getTypeByTable($this->tableClassName);
$this->canDo = ComponentbuilderHelper::getActions('joomla_component');
}
@@ -1144,7 +1138,6 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin
if (!$this->user->authorise('joomla_component.edit', $contexts[$pk]))
{
$this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT'));
-
return false;
}
@@ -1155,7 +1148,6 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin
{
// Fatal error
$this->setError($error);
-
return false;
}
else
@@ -1236,6 +1228,12 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin
$data['metadata'] = (string) $metadata;
}
+ // if system name is empty create from name
+ if (empty($data['system_name']) || !ComponentbuilderHelper::checkString($data['system_name']))
+ {
+ $data['system_name'] = $data['name'];
+ }
+
// Set the addcontributors items to data.
if (isset($data['addcontributors']) && is_array($data['addcontributors']))
{
diff --git a/admin/models/joomla_components.php b/admin/models/joomla_components.php
index 00960eb90..2322b7896 100644
--- a/admin/models/joomla_components.php
+++ b/admin/models/joomla_components.php
@@ -1252,7 +1252,7 @@ class ComponentbuilderModelJoomla_components extends JModelList
}
}
}
-
+
/**
* Get the keys of the values to search custom code in
*
@@ -1389,7 +1389,7 @@ class ComponentbuilderModelJoomla_components extends JModelList
return $targets[$target];
}
return false;
- }
+ }
/**
* Method to auto-populate the model state.
diff --git a/admin/models/language.php b/admin/models/language.php
index 6b38eedbd..2b9c98cb6 100644
--- a/admin/models/language.php
+++ b/admin/models/language.php
@@ -516,8 +516,6 @@ class ComponentbuilderModelLanguage extends JModelAdmin
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
- $this->contentType = new JUcmType;
- $this->type = $this->contentType->getTypeByTable($this->tableClassName);
$this->canDo = ComponentbuilderHelper::getActions('language');
}
@@ -542,7 +540,6 @@ class ComponentbuilderModelLanguage extends JModelAdmin
}
$newIds = array();
-
// Parent exists so let's proceed
while (!empty($pks))
{
@@ -552,17 +549,11 @@ class ComponentbuilderModelLanguage extends JModelAdmin
$this->table->reset();
// only allow copy if user may edit this item.
-
if (!$this->user->authorise('language.edit', $contexts[$pk]))
-
{
-
// Not fatal error
-
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
-
continue;
-
}
// Check that the row actually exists
@@ -572,7 +563,6 @@ class ComponentbuilderModelLanguage extends JModelAdmin
{
// Fatal error
$this->setError($error);
-
return false;
}
else
@@ -583,7 +573,11 @@ class ComponentbuilderModelLanguage extends JModelAdmin
}
}
- $this->table->name = $this->generateUniqe('name',$this->table->name);
+ // Only for strings
+ if (ComponentbuilderHelper::checkString($this->table->name) && !is_numeric($this->table->name))
+ {
+ $this->table->name = $this->generateUniqe('name',$this->table->name);
+ }
// insert all set values
if (ComponentbuilderHelper::checkArray($values))
@@ -665,8 +659,6 @@ class ComponentbuilderModelLanguage extends JModelAdmin
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
- $this->contentType = new JUcmType;
- $this->type = $this->contentType->getTypeByTable($this->tableClassName);
$this->canDo = ComponentbuilderHelper::getActions('language');
}
@@ -690,7 +682,6 @@ class ComponentbuilderModelLanguage extends JModelAdmin
if (!$this->user->authorise('language.edit', $contexts[$pk]))
{
$this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT'));
-
return false;
}
@@ -701,7 +692,6 @@ class ComponentbuilderModelLanguage extends JModelAdmin
{
// Fatal error
$this->setError($error);
-
return false;
}
else
diff --git a/admin/models/language_translation.php b/admin/models/language_translation.php
index 40ced8708..99acb372d 100644
--- a/admin/models/language_translation.php
+++ b/admin/models/language_translation.php
@@ -107,14 +107,14 @@ class ComponentbuilderModelLanguage_translation extends JModelAdmin
$translation->loadString($item->translation);
$item->translation = $translation->toArray();
}
-
+
if (!empty($item->components))
{
// JSON Decode components.
$item->components = json_decode($item->components, true);
}
-
-
+
+
if (empty($item->id))
{
$id = 0;
@@ -133,7 +133,7 @@ class ComponentbuilderModelLanguage_translation extends JModelAdmin
$this->vastDevMod = ComponentbuilderHelper::randomkey(50);
ComponentbuilderHelper::set($this->vastDevMod, 'language_translation__'.$id);
ComponentbuilderHelper::set('language_translation__'.$id, $this->vastDevMod);
- }
+ }
if (!empty($item->id))
{
@@ -556,8 +556,6 @@ class ComponentbuilderModelLanguage_translation extends JModelAdmin
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
- $this->contentType = new JUcmType;
- $this->type = $this->contentType->getTypeByTable($this->tableClassName);
$this->canDo = ComponentbuilderHelper::getActions('language_translation');
}
@@ -582,7 +580,6 @@ class ComponentbuilderModelLanguage_translation extends JModelAdmin
}
$newIds = array();
-
// Parent exists so let's proceed
while (!empty($pks))
{
@@ -592,17 +589,11 @@ class ComponentbuilderModelLanguage_translation extends JModelAdmin
$this->table->reset();
// only allow copy if user may edit this item.
-
if (!$this->user->authorise('language_translation.edit', $contexts[$pk]))
-
{
-
// Not fatal error
-
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
-
continue;
-
}
// Check that the row actually exists
@@ -612,7 +603,6 @@ class ComponentbuilderModelLanguage_translation extends JModelAdmin
{
// Fatal error
$this->setError($error);
-
return false;
}
else
@@ -623,7 +613,11 @@ class ComponentbuilderModelLanguage_translation extends JModelAdmin
}
}
- $this->table->entranslation = $this->generateUniqe('entranslation',$this->table->entranslation);
+ // Only for strings
+ if (ComponentbuilderHelper::checkString($this->table->entranslation) && !is_numeric($this->table->entranslation))
+ {
+ $this->table->entranslation = $this->generateUniqe('entranslation',$this->table->entranslation);
+ }
// insert all set values
if (ComponentbuilderHelper::checkArray($values))
@@ -705,8 +699,6 @@ class ComponentbuilderModelLanguage_translation extends JModelAdmin
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
- $this->contentType = new JUcmType;
- $this->type = $this->contentType->getTypeByTable($this->tableClassName);
$this->canDo = ComponentbuilderHelper::getActions('language_translation');
}
@@ -730,7 +722,6 @@ class ComponentbuilderModelLanguage_translation extends JModelAdmin
if (!$this->user->authorise('language_translation.edit', $contexts[$pk]))
{
$this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT'));
-
return false;
}
@@ -741,7 +732,6 @@ class ComponentbuilderModelLanguage_translation extends JModelAdmin
{
// Fatal error
$this->setError($error);
-
return false;
}
else
diff --git a/admin/models/layout.php b/admin/models/layout.php
index 2fe6cd356..a2c60305d 100644
--- a/admin/models/layout.php
+++ b/admin/models/layout.php
@@ -572,8 +572,6 @@ class ComponentbuilderModelLayout extends JModelAdmin
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
- $this->contentType = new JUcmType;
- $this->type = $this->contentType->getTypeByTable($this->tableClassName);
$this->canDo = ComponentbuilderHelper::getActions('layout');
}
@@ -598,7 +596,6 @@ class ComponentbuilderModelLayout extends JModelAdmin
}
$newIds = array();
-
// Parent exists so let's proceed
while (!empty($pks))
{
@@ -608,17 +605,11 @@ class ComponentbuilderModelLayout extends JModelAdmin
$this->table->reset();
// only allow copy if user may edit this item.
-
if (!$this->user->authorise('core.edit', $contexts[$pk]))
-
{
-
// Not fatal error
-
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
-
continue;
-
}
// Check that the row actually exists
@@ -628,7 +619,6 @@ class ComponentbuilderModelLayout extends JModelAdmin
{
// Fatal error
$this->setError($error);
-
return false;
}
else
@@ -638,7 +628,6 @@ class ComponentbuilderModelLayout extends JModelAdmin
continue;
}
}
-
list($this->table->name, $this->table->alias) = $this->_generateNewTitle($this->table->alias, $this->table->name);
// insert all set values
@@ -721,8 +710,6 @@ class ComponentbuilderModelLayout extends JModelAdmin
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
- $this->contentType = new JUcmType;
- $this->type = $this->contentType->getTypeByTable($this->tableClassName);
$this->canDo = ComponentbuilderHelper::getActions('layout');
}
@@ -746,7 +733,6 @@ class ComponentbuilderModelLayout extends JModelAdmin
if (!$this->user->authorise('core.edit', $contexts[$pk]))
{
$this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT'));
-
return false;
}
@@ -757,7 +743,6 @@ class ComponentbuilderModelLayout extends JModelAdmin
{
// Fatal error
$this->setError($error);
-
return false;
}
else
diff --git a/admin/models/libraries.php b/admin/models/libraries.php
index fcd2ad2b1..08d458f57 100644
--- a/admin/models/libraries.php
+++ b/admin/models/libraries.php
@@ -139,10 +139,10 @@ class ComponentbuilderModelLibraries extends JModelList
{
// convert type
$item->type = $this->selectionTranslation($item->type, 'type');
-
+
// convert how
$item->how = $this->selectionTranslation($item->how, 'how');
-
+
}
}
@@ -171,7 +171,7 @@ class ComponentbuilderModelLibraries extends JModelList
return $typeArray[$value];
}
}
-
+
// Array of how language strings
if ($name === 'how')
{
@@ -188,7 +188,7 @@ class ComponentbuilderModelLibraries extends JModelList
return JText::_($howArray[$value]);
}
}
-
+
return $value;
}
diff --git a/admin/models/library.php b/admin/models/library.php
index 169f1a950..b581c9283 100644
--- a/admin/models/library.php
+++ b/admin/models/library.php
@@ -122,7 +122,7 @@ class ComponentbuilderModelLibrary extends JModelAdmin
$item->php_setdocument = base64_decode($item->php_setdocument);
}
-
+
if (empty($item->id))
{
$id = 0;
@@ -141,7 +141,7 @@ class ComponentbuilderModelLibrary extends JModelAdmin
$this->vastDevMod = ComponentbuilderHelper::randomkey(50);
ComponentbuilderHelper::set($this->vastDevMod, 'library__'.$id);
ComponentbuilderHelper::set('library__'.$id, $this->vastDevMod);
- }
+ }
if (!empty($item->id))
{
@@ -443,9 +443,9 @@ class ComponentbuilderModelLibrary extends JModelAdmin
*/
protected function getUniqeFields()
{
-
+
return array('name');
-
+
}
/**
@@ -662,8 +662,6 @@ class ComponentbuilderModelLibrary extends JModelAdmin
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
- $this->contentType = new JUcmType;
- $this->type = $this->contentType->getTypeByTable($this->tableClassName);
$this->canDo = ComponentbuilderHelper::getActions('library');
}
@@ -688,7 +686,6 @@ class ComponentbuilderModelLibrary extends JModelAdmin
}
$newIds = array();
-
// Parent exists so let's proceed
while (!empty($pks))
{
@@ -698,17 +695,11 @@ class ComponentbuilderModelLibrary extends JModelAdmin
$this->table->reset();
// only allow copy if user may edit this item.
-
if (!$this->user->authorise('library.edit', $contexts[$pk]))
-
{
-
// Not fatal error
-
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
-
continue;
-
}
// Check that the row actually exists
@@ -718,7 +709,6 @@ class ComponentbuilderModelLibrary extends JModelAdmin
{
// Fatal error
$this->setError($error);
-
return false;
}
else
@@ -729,7 +719,11 @@ class ComponentbuilderModelLibrary extends JModelAdmin
}
}
- $this->table->name = $this->generateUniqe('name',$this->table->name);
+ // Only for strings
+ if (ComponentbuilderHelper::checkString($this->table->name) && !is_numeric($this->table->name))
+ {
+ $this->table->name = $this->generateUniqe('name',$this->table->name);
+ }
// insert all set values
if (ComponentbuilderHelper::checkArray($values))
@@ -811,8 +805,6 @@ class ComponentbuilderModelLibrary extends JModelAdmin
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
- $this->contentType = new JUcmType;
- $this->type = $this->contentType->getTypeByTable($this->tableClassName);
$this->canDo = ComponentbuilderHelper::getActions('library');
}
@@ -836,7 +828,6 @@ class ComponentbuilderModelLibrary extends JModelAdmin
if (!$this->user->authorise('library.edit', $contexts[$pk]))
{
$this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT'));
-
return false;
}
@@ -847,7 +838,6 @@ class ComponentbuilderModelLibrary extends JModelAdmin
{
// Fatal error
$this->setError($error);
-
return false;
}
else
diff --git a/admin/models/library_config.php b/admin/models/library_config.php
index d87387b5e..3a19e3a2a 100644
--- a/admin/models/library_config.php
+++ b/admin/models/library_config.php
@@ -526,8 +526,6 @@ class ComponentbuilderModelLibrary_config extends JModelAdmin
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
- $this->contentType = new JUcmType;
- $this->type = $this->contentType->getTypeByTable($this->tableClassName);
$this->canDo = ComponentbuilderHelper::getActions('library_config');
}
@@ -552,7 +550,6 @@ class ComponentbuilderModelLibrary_config extends JModelAdmin
}
$newIds = array();
-
// Parent exists so let's proceed
while (!empty($pks))
{
@@ -562,17 +559,11 @@ class ComponentbuilderModelLibrary_config extends JModelAdmin
$this->table->reset();
// only allow copy if user may edit this item.
-
if (!$this->user->authorise('library_config.edit', $contexts[$pk]))
-
{
-
// Not fatal error
-
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
-
continue;
-
}
// Check that the row actually exists
@@ -582,7 +573,6 @@ class ComponentbuilderModelLibrary_config extends JModelAdmin
{
// Fatal error
$this->setError($error);
-
return false;
}
else
@@ -593,7 +583,11 @@ class ComponentbuilderModelLibrary_config extends JModelAdmin
}
}
- $this->table->library = $this->generateUniqe('library',$this->table->library);
+ // Only for strings
+ if (ComponentbuilderHelper::checkString($this->table->library) && !is_numeric($this->table->library))
+ {
+ $this->table->library = $this->generateUniqe('library',$this->table->library);
+ }
// insert all set values
if (ComponentbuilderHelper::checkArray($values))
@@ -675,8 +669,6 @@ class ComponentbuilderModelLibrary_config extends JModelAdmin
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
- $this->contentType = new JUcmType;
- $this->type = $this->contentType->getTypeByTable($this->tableClassName);
$this->canDo = ComponentbuilderHelper::getActions('library_config');
}
@@ -700,7 +692,6 @@ class ComponentbuilderModelLibrary_config extends JModelAdmin
if (!$this->user->authorise('library_config.edit', $contexts[$pk]))
{
$this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT'));
-
return false;
}
@@ -711,7 +702,6 @@ class ComponentbuilderModelLibrary_config extends JModelAdmin
{
// Fatal error
$this->setError($error);
-
return false;
}
else
diff --git a/admin/models/library_files_folders_urls.php b/admin/models/library_files_folders_urls.php
index 9a16d3da8..eac52191a 100644
--- a/admin/models/library_files_folders_urls.php
+++ b/admin/models/library_files_folders_urls.php
@@ -558,8 +558,6 @@ class ComponentbuilderModelLibrary_files_folders_urls extends JModelAdmin
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
- $this->contentType = new JUcmType;
- $this->type = $this->contentType->getTypeByTable($this->tableClassName);
$this->canDo = ComponentbuilderHelper::getActions('library_files_folders_urls');
}
@@ -584,7 +582,6 @@ class ComponentbuilderModelLibrary_files_folders_urls extends JModelAdmin
}
$newIds = array();
-
// Parent exists so let's proceed
while (!empty($pks))
{
@@ -594,17 +591,11 @@ class ComponentbuilderModelLibrary_files_folders_urls extends JModelAdmin
$this->table->reset();
// only allow copy if user may edit this item.
-
if (!$this->user->authorise('library_files_folders_urls.edit', $contexts[$pk]))
-
{
-
// Not fatal error
-
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
-
continue;
-
}
// Check that the row actually exists
@@ -614,7 +605,6 @@ class ComponentbuilderModelLibrary_files_folders_urls extends JModelAdmin
{
// Fatal error
$this->setError($error);
-
return false;
}
else
@@ -625,7 +615,11 @@ class ComponentbuilderModelLibrary_files_folders_urls extends JModelAdmin
}
}
- $this->table->library = $this->generateUniqe('library',$this->table->library);
+ // Only for strings
+ if (ComponentbuilderHelper::checkString($this->table->library) && !is_numeric($this->table->library))
+ {
+ $this->table->library = $this->generateUniqe('library',$this->table->library);
+ }
// insert all set values
if (ComponentbuilderHelper::checkArray($values))
@@ -707,8 +701,6 @@ class ComponentbuilderModelLibrary_files_folders_urls extends JModelAdmin
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
- $this->contentType = new JUcmType;
- $this->type = $this->contentType->getTypeByTable($this->tableClassName);
$this->canDo = ComponentbuilderHelper::getActions('library_files_folders_urls');
}
@@ -732,7 +724,6 @@ class ComponentbuilderModelLibrary_files_folders_urls extends JModelAdmin
if (!$this->user->authorise('library_files_folders_urls.edit', $contexts[$pk]))
{
$this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT'));
-
return false;
}
@@ -743,7 +734,6 @@ class ComponentbuilderModelLibrary_files_folders_urls extends JModelAdmin
{
// Fatal error
$this->setError($error);
-
return false;
}
else
diff --git a/admin/models/server.php b/admin/models/server.php
index 83c89048e..4625aae10 100644
--- a/admin/models/server.php
+++ b/admin/models/server.php
@@ -100,10 +100,10 @@ class ComponentbuilderModelServer extends JModelAdmin
// Get the encryption object.
$basic = new FOFEncryptAes($basickey, 128);
- if (!empty($item->host) && $basickey && !is_numeric($item->host) && $item->host === base64_encode(base64_decode($item->host, true)))
+ if (!empty($item->path) && $basickey && !is_numeric($item->path) && $item->path === base64_encode(base64_decode($item->path, true)))
{
- // basic decrypt data host.
- $item->host = rtrim($basic->decryptString($item->host), "\0");
+ // basic decrypt data path.
+ $item->path = rtrim($basic->decryptString($item->path), "\0");
}
if (!empty($item->port) && $basickey && !is_numeric($item->port) && $item->port === base64_encode(base64_decode($item->port, true)))
@@ -112,10 +112,10 @@ class ComponentbuilderModelServer extends JModelAdmin
$item->port = rtrim($basic->decryptString($item->port), "\0");
}
- if (!empty($item->path) && $basickey && !is_numeric($item->path) && $item->path === base64_encode(base64_decode($item->path, true)))
+ if (!empty($item->password) && $basickey && !is_numeric($item->password) && $item->password === base64_encode(base64_decode($item->password, true)))
{
- // basic decrypt data path.
- $item->path = rtrim($basic->decryptString($item->path), "\0");
+ // basic decrypt data password.
+ $item->password = rtrim($basic->decryptString($item->password), "\0");
}
if (!empty($item->secret) && $basickey && !is_numeric($item->secret) && $item->secret === base64_encode(base64_decode($item->secret, true)))
@@ -124,18 +124,18 @@ class ComponentbuilderModelServer extends JModelAdmin
$item->secret = rtrim($basic->decryptString($item->secret), "\0");
}
+ if (!empty($item->host) && $basickey && !is_numeric($item->host) && $item->host === base64_encode(base64_decode($item->host, true)))
+ {
+ // basic decrypt data host.
+ $item->host = rtrim($basic->decryptString($item->host), "\0");
+ }
+
if (!empty($item->signature) && $basickey && !is_numeric($item->signature) && $item->signature === base64_encode(base64_decode($item->signature, true)))
{
// basic decrypt data signature.
$item->signature = rtrim($basic->decryptString($item->signature), "\0");
}
- if (!empty($item->password) && $basickey && !is_numeric($item->password) && $item->password === base64_encode(base64_decode($item->password, true)))
- {
- // basic decrypt data password.
- $item->password = rtrim($basic->decryptString($item->password), "\0");
- }
-
if (!empty($item->username) && $basickey && !is_numeric($item->username) && $item->username === base64_encode(base64_decode($item->username, true)))
{
// basic decrypt data username.
@@ -146,6 +146,12 @@ class ComponentbuilderModelServer extends JModelAdmin
{
// basic decrypt data private.
$item->private = rtrim($basic->decryptString($item->private), "\0");
+ }
+
+ if (!empty($item->private_key) && $basickey && !is_numeric($item->private_key) && $item->private_key === base64_encode(base64_decode($item->private_key, true)))
+ {
+ // basic decrypt data private_key.
+ $item->private_key = rtrim($basic->decryptString($item->private_key), "\0");
}
if (!empty($item->id))
@@ -164,7 +170,7 @@ class ComponentbuilderModelServer extends JModelAdmin
*
* @return mixed An array of data items on success, false on failure.
*/
- public function getWanlinked_components()
+ public function getWamlinked_components()
{
// Get the user object.
$user = JFactory::getUser();
@@ -689,8 +695,6 @@ class ComponentbuilderModelServer extends JModelAdmin
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
- $this->contentType = new JUcmType;
- $this->type = $this->contentType->getTypeByTable($this->tableClassName);
$this->canDo = ComponentbuilderHelper::getActions('server');
}
@@ -715,7 +719,6 @@ class ComponentbuilderModelServer extends JModelAdmin
}
$newIds = array();
-
// Parent exists so let's proceed
while (!empty($pks))
{
@@ -725,17 +728,11 @@ class ComponentbuilderModelServer extends JModelAdmin
$this->table->reset();
// only allow copy if user may edit this item.
-
if (!$this->user->authorise('server.edit', $contexts[$pk]))
-
{
-
// Not fatal error
-
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
-
continue;
-
}
// Check that the row actually exists
@@ -745,7 +742,6 @@ class ComponentbuilderModelServer extends JModelAdmin
{
// Fatal error
$this->setError($error);
-
return false;
}
else
@@ -756,7 +752,11 @@ class ComponentbuilderModelServer extends JModelAdmin
}
}
- $this->table->name = $this->generateUniqe('name',$this->table->name);
+ // Only for strings
+ if (ComponentbuilderHelper::checkString($this->table->name) && !is_numeric($this->table->name))
+ {
+ $this->table->name = $this->generateUniqe('name',$this->table->name);
+ }
// insert all set values
if (ComponentbuilderHelper::checkArray($values))
@@ -838,8 +838,6 @@ class ComponentbuilderModelServer extends JModelAdmin
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
- $this->contentType = new JUcmType;
- $this->type = $this->contentType->getTypeByTable($this->tableClassName);
$this->canDo = ComponentbuilderHelper::getActions('server');
}
@@ -863,7 +861,6 @@ class ComponentbuilderModelServer extends JModelAdmin
if (!$this->user->authorise('server.edit', $contexts[$pk]))
{
$this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT'));
-
return false;
}
@@ -874,7 +871,6 @@ class ComponentbuilderModelServer extends JModelAdmin
{
// Fatal error
$this->setError($error);
-
return false;
}
else
@@ -960,10 +956,10 @@ class ComponentbuilderModelServer extends JModelAdmin
// Get the encryption object
$basic = new FOFEncryptAes($basickey, 128);
- // Encrypt data host.
- if (isset($data['host']) && $basickey)
+ // Encrypt data path.
+ if (isset($data['path']) && $basickey)
{
- $data['host'] = $basic->encryptString($data['host']);
+ $data['path'] = $basic->encryptString($data['path']);
}
// Encrypt data port.
@@ -972,10 +968,10 @@ class ComponentbuilderModelServer extends JModelAdmin
$data['port'] = $basic->encryptString($data['port']);
}
- // Encrypt data path.
- if (isset($data['path']) && $basickey)
+ // Encrypt data password.
+ if (isset($data['password']) && $basickey)
{
- $data['path'] = $basic->encryptString($data['path']);
+ $data['password'] = $basic->encryptString($data['password']);
}
// Encrypt data secret.
@@ -984,18 +980,18 @@ class ComponentbuilderModelServer extends JModelAdmin
$data['secret'] = $basic->encryptString($data['secret']);
}
+ // Encrypt data host.
+ if (isset($data['host']) && $basickey)
+ {
+ $data['host'] = $basic->encryptString($data['host']);
+ }
+
// Encrypt data signature.
if (isset($data['signature']) && $basickey)
{
$data['signature'] = $basic->encryptString($data['signature']);
}
- // Encrypt data password.
- if (isset($data['password']) && $basickey)
- {
- $data['password'] = $basic->encryptString($data['password']);
- }
-
// Encrypt data username.
if (isset($data['username']) && $basickey)
{
@@ -1006,6 +1002,12 @@ class ComponentbuilderModelServer extends JModelAdmin
if (isset($data['private']) && $basickey)
{
$data['private'] = $basic->encryptString($data['private']);
+ }
+
+ // Encrypt data private_key.
+ if (isset($data['private_key']) && $basickey)
+ {
+ $data['private_key'] = $basic->encryptString($data['private_key']);
}
// Set the Params Items to data
diff --git a/admin/models/servers.php b/admin/models/servers.php
index ba0d834d4..7397bf528 100644
--- a/admin/models/servers.php
+++ b/admin/models/servers.php
@@ -304,36 +304,36 @@ class ComponentbuilderModelServers extends JModelList
continue;
}
- if ($basickey && !is_numeric($item->host) && $item->host === base64_encode(base64_decode($item->host, true)))
+ if ($basickey && !is_numeric($item->path) && $item->path === base64_encode(base64_decode($item->path, true)))
{
- // decrypt host
- $item->host = $basic->decryptString($item->host);
+ // decrypt path
+ $item->path = $basic->decryptString($item->path);
}
if ($basickey && !is_numeric($item->port) && $item->port === base64_encode(base64_decode($item->port, true)))
{
// decrypt port
$item->port = $basic->decryptString($item->port);
}
- if ($basickey && !is_numeric($item->path) && $item->path === base64_encode(base64_decode($item->path, true)))
+ if ($basickey && !is_numeric($item->password) && $item->password === base64_encode(base64_decode($item->password, true)))
{
- // decrypt path
- $item->path = $basic->decryptString($item->path);
+ // decrypt password
+ $item->password = $basic->decryptString($item->password);
}
if ($basickey && !is_numeric($item->secret) && $item->secret === base64_encode(base64_decode($item->secret, true)))
{
// decrypt secret
$item->secret = $basic->decryptString($item->secret);
}
+ if ($basickey && !is_numeric($item->host) && $item->host === base64_encode(base64_decode($item->host, true)))
+ {
+ // decrypt host
+ $item->host = $basic->decryptString($item->host);
+ }
if ($basickey && !is_numeric($item->signature) && $item->signature === base64_encode(base64_decode($item->signature, true)))
{
// decrypt signature
$item->signature = $basic->decryptString($item->signature);
}
- if ($basickey && !is_numeric($item->password) && $item->password === base64_encode(base64_decode($item->password, true)))
- {
- // decrypt password
- $item->password = $basic->decryptString($item->password);
- }
if ($basickey && !is_numeric($item->username) && $item->username === base64_encode(base64_decode($item->username, true)))
{
// decrypt username
@@ -344,6 +344,11 @@ class ComponentbuilderModelServers extends JModelList
// decrypt private
$item->private = $basic->decryptString($item->private);
}
+ if ($basickey && !is_numeric($item->private_key) && $item->private_key === base64_encode(base64_decode($item->private_key, true)))
+ {
+ // decrypt private_key
+ $item->private_key = $basic->decryptString($item->private_key);
+ }
// unset the values we don't want exported.
unset($item->asset_id);
unset($item->checked_out);
diff --git a/admin/models/site_view.php b/admin/models/site_view.php
index 286e13a9f..0b56555e3 100644
--- a/admin/models/site_view.php
+++ b/admin/models/site_view.php
@@ -204,7 +204,7 @@ class ComponentbuilderModelSite_view extends JModelAdmin
$item->php_controller = base64_decode($item->php_controller);
}
-
+
if (empty($item->id))
{
$id = 0;
@@ -223,7 +223,7 @@ class ComponentbuilderModelSite_view extends JModelAdmin
$this->vastDevMod = ComponentbuilderHelper::randomkey(50);
ComponentbuilderHelper::set($this->vastDevMod, 'site_view__'.$id);
ComponentbuilderHelper::set('site_view__'.$id, $this->vastDevMod);
- }
+ }
// update the fields
$objectUpdate = new stdClass();
@@ -721,8 +721,6 @@ class ComponentbuilderModelSite_view extends JModelAdmin
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
- $this->contentType = new JUcmType;
- $this->type = $this->contentType->getTypeByTable($this->tableClassName);
$this->canDo = ComponentbuilderHelper::getActions('site_view');
}
@@ -747,7 +745,6 @@ class ComponentbuilderModelSite_view extends JModelAdmin
}
$newIds = array();
-
// Parent exists so let's proceed
while (!empty($pks))
{
@@ -757,17 +754,11 @@ class ComponentbuilderModelSite_view extends JModelAdmin
$this->table->reset();
// only allow copy if user may edit this item.
-
if (!$this->user->authorise('core.edit', $contexts[$pk]))
-
{
-
// Not fatal error
-
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
-
continue;
-
}
// Check that the row actually exists
@@ -777,7 +768,6 @@ class ComponentbuilderModelSite_view extends JModelAdmin
{
// Fatal error
$this->setError($error);
-
return false;
}
else
@@ -788,7 +778,11 @@ class ComponentbuilderModelSite_view extends JModelAdmin
}
}
- $this->table->name = $this->generateUniqe('name',$this->table->name);
+ // Only for strings
+ if (ComponentbuilderHelper::checkString($this->table->name) && !is_numeric($this->table->name))
+ {
+ $this->table->name = $this->generateUniqe('name',$this->table->name);
+ }
// insert all set values
if (ComponentbuilderHelper::checkArray($values))
@@ -870,8 +864,6 @@ class ComponentbuilderModelSite_view extends JModelAdmin
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
- $this->contentType = new JUcmType;
- $this->type = $this->contentType->getTypeByTable($this->tableClassName);
$this->canDo = ComponentbuilderHelper::getActions('site_view');
}
@@ -895,7 +887,6 @@ class ComponentbuilderModelSite_view extends JModelAdmin
if (!$this->user->authorise('core.edit', $contexts[$pk]))
{
$this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT'));
-
return false;
}
@@ -906,7 +897,6 @@ class ComponentbuilderModelSite_view extends JModelAdmin
{
// Fatal error
$this->setError($error);
-
return false;
}
else
@@ -988,7 +978,12 @@ class ComponentbuilderModelSite_view extends JModelAdmin
}
// always reset the snippets
- $data['snippet'] = 0;
+ $data['snippet'] = 0;
+ // if system name is empty create from name
+ if (empty($data['system_name']) || !ComponentbuilderHelper::checkString($data['system_name']))
+ {
+ $data['system_name'] = $data['name'];
+ }
// Set the libraries items to data.
if (isset($data['libraries']) && is_array($data['libraries']))
diff --git a/admin/models/snippet.php b/admin/models/snippet.php
index 135438e20..8b6908533 100644
--- a/admin/models/snippet.php
+++ b/admin/models/snippet.php
@@ -522,8 +522,6 @@ class ComponentbuilderModelSnippet extends JModelAdmin
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
- $this->contentType = new JUcmType;
- $this->type = $this->contentType->getTypeByTable($this->tableClassName);
$this->canDo = ComponentbuilderHelper::getActions('snippet');
}
@@ -548,7 +546,6 @@ class ComponentbuilderModelSnippet extends JModelAdmin
}
$newIds = array();
-
// Parent exists so let's proceed
while (!empty($pks))
{
@@ -558,17 +555,11 @@ class ComponentbuilderModelSnippet extends JModelAdmin
$this->table->reset();
// only allow copy if user may edit this item.
-
if (!$this->user->authorise('core.edit', $contexts[$pk]))
-
{
-
// Not fatal error
-
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
-
continue;
-
}
// Check that the row actually exists
@@ -578,7 +569,6 @@ class ComponentbuilderModelSnippet extends JModelAdmin
{
// Fatal error
$this->setError($error);
-
return false;
}
else
@@ -589,7 +579,11 @@ class ComponentbuilderModelSnippet extends JModelAdmin
}
}
- $this->table->name = $this->generateUniqe('name',$this->table->name);
+ // Only for strings
+ if (ComponentbuilderHelper::checkString($this->table->name) && !is_numeric($this->table->name))
+ {
+ $this->table->name = $this->generateUniqe('name',$this->table->name);
+ }
// insert all set values
if (ComponentbuilderHelper::checkArray($values))
@@ -671,8 +665,6 @@ class ComponentbuilderModelSnippet extends JModelAdmin
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
- $this->contentType = new JUcmType;
- $this->type = $this->contentType->getTypeByTable($this->tableClassName);
$this->canDo = ComponentbuilderHelper::getActions('snippet');
}
@@ -696,7 +688,6 @@ class ComponentbuilderModelSnippet extends JModelAdmin
if (!$this->user->authorise('core.edit', $contexts[$pk]))
{
$this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT'));
-
return false;
}
@@ -707,7 +698,6 @@ class ComponentbuilderModelSnippet extends JModelAdmin
{
// Fatal error
$this->setError($error);
-
return false;
}
else
diff --git a/admin/models/snippet_type.php b/admin/models/snippet_type.php
index 5c766b193..ac55032c3 100644
--- a/admin/models/snippet_type.php
+++ b/admin/models/snippet_type.php
@@ -516,8 +516,6 @@ class ComponentbuilderModelSnippet_type extends JModelAdmin
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
- $this->contentType = new JUcmType;
- $this->type = $this->contentType->getTypeByTable($this->tableClassName);
$this->canDo = ComponentbuilderHelper::getActions('snippet_type');
}
@@ -542,7 +540,6 @@ class ComponentbuilderModelSnippet_type extends JModelAdmin
}
$newIds = array();
-
// Parent exists so let's proceed
while (!empty($pks))
{
@@ -552,17 +549,11 @@ class ComponentbuilderModelSnippet_type extends JModelAdmin
$this->table->reset();
// only allow copy if user may edit this item.
-
if (!$this->user->authorise('snippet_type.edit', $contexts[$pk]))
-
{
-
// Not fatal error
-
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
-
continue;
-
}
// Check that the row actually exists
@@ -572,7 +563,6 @@ class ComponentbuilderModelSnippet_type extends JModelAdmin
{
// Fatal error
$this->setError($error);
-
return false;
}
else
@@ -583,7 +573,11 @@ class ComponentbuilderModelSnippet_type extends JModelAdmin
}
}
- $this->table->name = $this->generateUniqe('name',$this->table->name);
+ // Only for strings
+ if (ComponentbuilderHelper::checkString($this->table->name) && !is_numeric($this->table->name))
+ {
+ $this->table->name = $this->generateUniqe('name',$this->table->name);
+ }
// insert all set values
if (ComponentbuilderHelper::checkArray($values))
@@ -665,8 +659,6 @@ class ComponentbuilderModelSnippet_type extends JModelAdmin
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
- $this->contentType = new JUcmType;
- $this->type = $this->contentType->getTypeByTable($this->tableClassName);
$this->canDo = ComponentbuilderHelper::getActions('snippet_type');
}
@@ -690,7 +682,6 @@ class ComponentbuilderModelSnippet_type extends JModelAdmin
if (!$this->user->authorise('snippet_type.edit', $contexts[$pk]))
{
$this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT'));
-
return false;
}
@@ -701,7 +692,6 @@ class ComponentbuilderModelSnippet_type extends JModelAdmin
{
// Fatal error
$this->setError($error);
-
return false;
}
else
diff --git a/admin/models/template.php b/admin/models/template.php
index ddcaa1dd3..d1f58c3ce 100644
--- a/admin/models/template.php
+++ b/admin/models/template.php
@@ -572,8 +572,6 @@ class ComponentbuilderModelTemplate extends JModelAdmin
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
- $this->contentType = new JUcmType;
- $this->type = $this->contentType->getTypeByTable($this->tableClassName);
$this->canDo = ComponentbuilderHelper::getActions('template');
}
@@ -598,7 +596,6 @@ class ComponentbuilderModelTemplate extends JModelAdmin
}
$newIds = array();
-
// Parent exists so let's proceed
while (!empty($pks))
{
@@ -608,17 +605,11 @@ class ComponentbuilderModelTemplate extends JModelAdmin
$this->table->reset();
// only allow copy if user may edit this item.
-
if (!$this->user->authorise('core.edit', $contexts[$pk]))
-
{
-
// Not fatal error
-
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk));
-
continue;
-
}
// Check that the row actually exists
@@ -628,7 +619,6 @@ class ComponentbuilderModelTemplate extends JModelAdmin
{
// Fatal error
$this->setError($error);
-
return false;
}
else
@@ -638,7 +628,6 @@ class ComponentbuilderModelTemplate extends JModelAdmin
continue;
}
}
-
list($this->table->name, $this->table->alias) = $this->_generateNewTitle($this->table->alias, $this->table->name);
// insert all set values
@@ -721,8 +710,6 @@ class ComponentbuilderModelTemplate extends JModelAdmin
$this->user = JFactory::getUser();
$this->table = $this->getTable();
$this->tableClassName = get_class($this->table);
- $this->contentType = new JUcmType;
- $this->type = $this->contentType->getTypeByTable($this->tableClassName);
$this->canDo = ComponentbuilderHelper::getActions('template');
}
@@ -746,7 +733,6 @@ class ComponentbuilderModelTemplate extends JModelAdmin
if (!$this->user->authorise('core.edit', $contexts[$pk]))
{
$this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_EDIT'));
-
return false;
}
@@ -757,7 +743,6 @@ class ComponentbuilderModelTemplate extends JModelAdmin
{
// Fatal error
$this->setError($error);
-
return false;
}
else
diff --git a/admin/sql/install.mysql.utf8.sql b/admin/sql/install.mysql.utf8.sql
index 932497305..ad32a28d1 100644
--- a/admin/sql/install.mysql.utf8.sql
+++ b/admin/sql/install.mysql.utf8.sql
@@ -803,6 +803,7 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_server` (
`path` TEXT NOT NULL,
`port` TEXT NOT NULL,
`private` TEXT NOT NULL,
+ `private_key` TEXT NOT NULL,
`protocol` TINYINT(1) NOT NULL DEFAULT 0,
`secret` TEXT NOT NULL,
`signature` TEXT NOT NULL,
@@ -1476,7 +1477,7 @@ INSERT INTO `#__componentbuilder_fieldtype` (`id`, `catid`, `description`, `name
(14, '', 'This form field makes it possible to create titles, texts, descriptions and even alert boxes. It also allows you to bring order in the settings for extensions, by separating them with useful titles. Or adding descriptions for certain settings (without hav', 'Note', '{\"properties0\":{\"name\":\"type\",\"example\":\"note\",\"adjustable\":\"0\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) must be note\"},\"properties1\":{\"name\":\"name\",\"example\":\"note_one\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"The notice\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"1\",\"description\":\"(mandatory or optional if using description) (translatable) is the descriptive title of the note \"},\"properties3\":{\"name\":\"description\",\"example\":\"The notice description\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"1\",\"description\":\"(optional if using label)(translatable) the description\\/text of the note \"},\"properties4\":{\"name\":\"heading\",\"example\":\"h4\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) the type of heading element to use for the label (default: h4)\"},\"properties5\":{\"name\":\"class\",\"example\":\"alert\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) a class name (or class names), like these examples ( alert, alert alert-info, alert alert-success, alert alert-error )\"},\"properties6\":{\"name\":\"close\",\"example\":\"true\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) a value of \'true\' (for alerts) or the value for the data-dismiss of the bootstrap close icon\"},\"properties7\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) Allows you to hide the field based on the value(s) of another field; for Joomla 3.2.4+\"}}', 'supports a one line text field.', '', 1, 3, '', ''),
(15, '', 'Provides a one line text box with up-down handles to set a number in the field.', 'Number', '{\"properties0\":{\"name\":\"type\",\"example\":\"number\",\"adjustable\":\"0\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) must be number.\"},\"properties1\":{\"name\":\"name\",\"example\":\"number\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Number\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"default\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) is the default value.\"},\"properties4\":{\"name\":\"description\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.\"},\"properties5\":{\"name\":\"class\",\"example\":\"text_area\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) is a CSS class name for the HTML form field. If omitted this will default to \'text_area\'.\"},\"properties6\":{\"name\":\"required\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties7\":{\"name\":\"min\",\"example\":\"1\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) this value is the lowest on the list.\"},\"properties8\":{\"name\":\"max\",\"example\":\"40\",\"adjustable\":\"0\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) this value is the highest on the list.\"},\"properties9\":{\"name\":\"step\",\"example\":\"5\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) each option will be the previous option incremented by this integer, starting with the first value until the last value is reached.\"},\"properties10\":{\"name\":\"onchange\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) Javascript that should run on changing of the value.\"},\"properties11\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) show this field on the bases of the value in another field.\"}}', 'Provides a one line text box with up-down handles to set a number in the field.', '', 1, 2, '', ''),
(16, '', 'The password form field type provides a text box for entry of a password. The password characters will be obscured as they are entered. If the field has a saved value this is entered (in obscured form) into the text box. If not, the default value (if any)', 'Password', '{\"properties0\":{\"name\":\"type\",\"example\":\"password\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be password.\"},\"properties1\":{\"name\":\"name\",\"example\":\"mypassword\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Enter A Password\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"size\",\"example\":\"10\",\"adjustable\":\"1\",\"description\":\"(optional) is the width of the text box in characters. If omitted the width is determined by the browser. The value of size does not limit the number of characters that may be entered.\"},\"properties4\":{\"name\":\"default\",\"example\":\"secret\",\"adjustable\":\"1\",\"description\":\"(optional) is the default password.\"},\"properties5\":{\"name\":\"description\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.\"},\"properties11\":{\"name\":\"message\",\"example\":\"Error! Please add password here.\",\"adjustable\":\"1\",\"description\":\"(optional) The error message that will be displayed instead of the default message.\"},\"properties6\":{\"name\":\"class\",\"example\":\"text_area\",\"adjustable\":\"1\",\"description\":\"(optional) is a CSS class name for the HTML form field. If omitted this will default to \'text_area\'.\"},\"properties7\":{\"name\":\"readonly\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) The field cannot be changed and will automatically inherit the default value\"},\"properties8\":{\"name\":\"disabled\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) The field cannot be changed and will automatically inherit the default value - it will also not submit\"},\"properties9\":{\"name\":\"required\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties17\":{\"name\":\"validate\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The validation method for the form field. This value will determine which method is used to validate the value for a field.\"},\"properties10\":{\"name\":\"filter\",\"example\":\"raw\",\"adjustable\":\"1\",\"description\":\"(optional) allow the system to save certain html tags or raw data.\"},\"properties12\":{\"name\":\"hint\",\"example\":\"Your Password Here\",\"adjustable\":\"1\",\"description\":\"(optional) The placeholder to display inside the text box.\"},\"properties13\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) show this field on the bases of the value in another field.\"},\"properties14\":{\"name\":\"onchange\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) HTML equivalent attribute (javascript use)\"}}', 'provides a text box for entry of a password. The password characters will be obscured as they are entered.', '', 1, 5, '', ''),
-(17, '', 'The radio form field type provides radio buttons to select different options. If the field has a saved value this is selected when the page is first loaded. If not, the default value (if any) is selected.', 'Radio', '{\"properties0\":{\"name\":\"type\",\"example\":\"radio\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be radio.\"},\"properties1\":{\"name\":\"name\",\"example\":\"myradiovalue\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Select an option\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"description\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.\"},\"properties4\":{\"name\":\"class\",\"example\":\"btn-group btn-group-yesno\",\"adjustable\":\"1\",\"description\":\"(optional) New in Joomla 3, if set to class=\\\"btn-group btn-group-yesno\\\" will show the nice coloured buttons\"},\"properties5\":{\"name\":\"option\",\"example\":\"1|Yes,0|No\",\"adjustable\":\"1\",\"description\":\"(mandatory) set the options of this radio. Separate options with commas and use the pipe symbol to separate value from text.\"},\"properties6\":{\"name\":\"default\",\"example\":\"0\",\"adjustable\":\"1\",\"description\":\"(optional) is the default radio button item value.\"},\"properties12\":{\"name\":\"message\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as error on validation.\"},\"properties7\":{\"name\":\"required\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties11\":{\"name\":\"validate\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The validation method for the form field. This value will determine which method is used to validate the value for a field.\"},\"properties8\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) Allows you to hide the field based on the value(s) of another field; for Joomla 3.2.4+\"},\"properties9\":{\"name\":\"onchange\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) HTML equivalent attribute (javascript use)\"}}', 'provides radio buttons to select different options.', '', 1, 5, '', ''),
+(17, '', 'The radio form field type provides radio buttons to select different options. If the field has a saved value this is selected when the page is first loaded. If not, the default value (if any) is selected.', 'Radio', '{\"properties0\":{\"name\":\"type\",\"example\":\"radio\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be radio.\"},\"properties1\":{\"name\":\"name\",\"example\":\"myradiovalue\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Select an option\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"description\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.\"},\"properties4\":{\"name\":\"class\",\"example\":\"btn-group btn-group-yesno\",\"adjustable\":\"1\",\"description\":\"(optional) New in Joomla 3, if set to class=\\\"btn-group btn-group-yesno\\\" will show the nice coloured buttons\"},\"properties5\":{\"name\":\"option\",\"example\":\"1|Yes,0|No\",\"adjustable\":\"1\",\"description\":\"(mandatory) set the options of this radio. Separate options with commas and use the pipe symbol to separate value from text.\"},\"properties6\":{\"name\":\"default\",\"example\":\"0\",\"adjustable\":\"1\",\"description\":\"(optional) is the default radio button item value.\"},\"properties7\":{\"name\":\"message\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as error on validation.\"},\"properties8\":{\"name\":\"required\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties9\":{\"name\":\"validate\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The validation method for the form field. This value will determine which method is used to validate the value for a field.\"},\"properties14\":{\"name\":\"readonly\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) The field cannot be changed and will automatically inherit the default value\"},\"properties10\":{\"name\":\"disabled\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) The field cannot be changed and will automatically inherit the default value - it will also not submit\"},\"properties11\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) Allows you to hide the field based on the value(s) of another field; for Joomla 3.2.4+\"},\"properties12\":{\"name\":\"onchange\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) HTML equivalent attribute (javascript use)\"}}', 'provides radio buttons to select different options.', '', 1, 7, '', ''),
(18, '', 'Provides a horizontal scroll bar to specify a value in a range.', 'Range', '{\"properties0\":{\"name\":\"type\",\"example\":\"range\",\"mandatory\":\"1\",\"description\":\"(mandatory) must be range.\"},\"properties1\":{\"name\":\"name\",\"example\":\"range\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"Range\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"default\",\"example\":\"9\",\"adjustable\":\"1\",\"description\":\"(optional) (not translatable) is the default value.\"},\"properties4\":{\"name\":\"description\",\"example\":\"Enter some description\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.\"},\"properties14\":{\"name\":\"message\",\"example\":\"\",\"adjustable\":\"1\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as error on validation.\"},\"properties5\":{\"name\":\"class\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) is a CSS class name for the HTML form field. If omitted this will default to \'text_area\'.\"},\"properties6\":{\"name\":\"min\",\"example\":\"1\",\"adjustable\":\"1\",\"description\":\"(mandatory) this value is the min on the meter.\"},\"properties7\":{\"name\":\"max\",\"example\":\"20\",\"adjustable\":\"1\",\"description\":\"(mandatory) this value is the max on meter.\"},\"properties8\":{\"name\":\"step\",\"example\":\"1\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"description\":\"(mandatory) each option will be the previous option incremented by this integer, starting with the first value until the last value is reached.\"},\"properties12\":{\"name\":\"required\",\"example\":\"false\",\"adjustable\":\"1\",\"description\":\"(optional) The field must be filled before submitting the form.\"},\"properties13\":{\"name\":\"validate\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) The validation method for the form field. This value will determine which method is used to validate the value for a field.\"},\"properties9\":{\"name\":\"onchange\",\"example\":\"jQuery(\'#jform_range\').closest(\'.controls\').find(\'span\').remove(); var value = jQuery(\'#jform_range\').val();jQuery(\'#jform_range\').closest(\'.controls\').append(\' \'+value+\'\');\",\"adjustable\":\"1\",\"description\":\"(optional) javascript to run when the range is changed\"},\"properties10\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"description\":\"(optional) show this field on the bases of the value in another field.\"}}', 'Provides a horizontal scroll bar to specify a value in a range.', '', 1, 3, '', ''),
(19, '', 'Provides a modal with rows of formfields that you specify. As many options can be added as desired. Note this form field has a jQuery based javascript file as a dependency.', 'Repeatable', '{\"properties0\":{\"name\":\"type\",\"example\":\"repeatable\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(mandatory) must be repeatable.\"},\"properties1\":{\"name\":\"name\",\"example\":\"repeatable_list\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(mandatory) is the unique name of the parameter\"},\"properties2\":{\"name\":\"label\",\"example\":\"The Repeatable List\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"1\",\"description\":\"(mandatory) (translatable) is the descriptive title of the field.\"},\"properties3\":{\"name\":\"description\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) description text for the form field. Displays at the top of the modal with the name as well as in the usual position in the form\"},\"properties4\":{\"name\":\"default\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) The default value for the form field if the field is left empty. Note this has to be a json string compatible with the contents of the form field.\"},\"properties5\":{\"name\":\"id\",\"example\":\"aid\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) id of the hidden from field. (the modal will have this id with an added suffix of \\\"_modal\\\" and the table within the modal will have this id with a suffix of _modal_table\\\")\"},\"properties6\":{\"name\":\"class\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) class of the table.\"},\"properties7\":{\"name\":\"select\",\"example\":\"Click here\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) The text to show on the modal button.\"},\"properties8\":{\"name\":\"icon\",\"example\":\"list\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) The icon to show on the select button (is prefixed with \\\"icon-\\\").\"},\"properties9\":{\"name\":\"maximum\",\"example\":\"50\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) The maximum number of rows of fields allowed (by default 999 to be effectively infinite)\"},\"properties10\":{\"name\":\"fields\",\"example\":\"1,2,3\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) The fields to add to the modal. All fields must first be created in component builder as a field before you can add them here, since you must use the id of the field. Separate the field ids with commas. Do not add custom fields that are not also used in this component.\"},\"properties11\":{\"name\":\"filter\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) Use only if you would like to save raw data, since the default is best.\"},\"properties12\":{\"name\":\"showon\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) show this field on the bases of the value in another field.\"}}', 'Allows form fields which can have as many options as the user desires.', '', 1, 4, '', ''),
(20, '', 'The spacer form field type provides a visual separator between parameter field elements. It is purely a visual aid and no field value is stored.', 'Spacer', '{\"properties0\":{\"name\":\"type\",\"example\":\"spacer\",\"adjustable\":\"0\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) must be spacer.\"},\"properties1\":{\"name\":\"name\",\"example\":\"myspacer\",\"adjustable\":\"1\",\"mandatory\":\"1\",\"translatable\":\"0\",\"description\":\"(mandatory) is the unique name of the field.\"},\"properties2\":{\"name\":\"label\",\"example\":\"The notice\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is the text to use as a spacer.\"},\"properties3\":{\"name\":\"description\",\"example\":\"The notice description\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"1\",\"description\":\"(optional) (translatable) is text that will be shown as a tooltip when the user moves the mouse over the drop-down box.\"},\"properties4\":{\"name\":\"hr\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) is whether to display a horizontal rule (\'true\' or \'false\'). If this attribute is \'true\', the label attribute will be ignored.\"},\"properties5\":{\"name\":\"class\",\"example\":\"\",\"adjustable\":\"1\",\"mandatory\":\"0\",\"translatable\":\"0\",\"description\":\"(optional) is a CSS class name for the HTML form field.\"}}', 'provides a visual separator between form fields. It is purely a visual aid and no value is stored.', '', 1, 1, '', ''),
diff --git a/admin/sql/updates/mysql/2.6.16.sql b/admin/sql/updates/mysql/2.6.16.sql
new file mode 100644
index 000000000..48d420d62
--- /dev/null
+++ b/admin/sql/updates/mysql/2.6.16.sql
@@ -0,0 +1 @@
+ALTER TABLE `#__componentbuilder_server` ADD `private_key` TEXT NOT NULL AFTER `private`;
diff --git a/admin/views/admin_view/tmpl/edit.php b/admin/views/admin_view/tmpl/edit.php
index ea61571c2..347952ce9 100644
--- a/admin/views/admin_view/tmpl/edit.php
+++ b/admin/views/admin_view/tmpl/edit.php
@@ -731,7 +731,7 @@ jQuery('#jform_add_custom_import').on('change',function() {
var valueSwitch = jQuery("#jform_add_custom_import input[type='radio']:checked").val();
getDynamicScripts(valueSwitch);
});
-
+
@@ -747,8 +747,8 @@ function JRouter(link) {
}
?>
return url+link;
-}
-
+}
+
// nice little dot trick :)
jQuery(document).ready( function($) {
var x=0;
@@ -760,5 +760,5 @@ jQuery(document).ready( function($) {
}
$(".loading-dots").text(dots);
} , 500);
-});
+});
diff --git a/admin/views/admin_view/view.html.php b/admin/views/admin_view/view.html.php
index c3e445aa9..1836e0d79 100644
--- a/admin/views/admin_view/view.html.php
+++ b/admin/views/admin_view/view.html.php
@@ -199,7 +199,7 @@ class ComponentbuilderViewAdmin_view extends JViewLegacy
$this->document->addScriptDeclaration("var token = '".JSession::getFormToken()."';");
$this->document->addScript(JURI::root() . $this->script, (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript');
$this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/views/admin_view/submitbutton.js", (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript');
-
+
// add the Uikit v2 style sheets
$this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/uikit.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css');
$this->document->addStyleSheet( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/css/components/notify.gradient.min.css' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css');
@@ -207,7 +207,7 @@ class ComponentbuilderViewAdmin_view extends JViewLegacy
// add Uikit v2 JavaScripts
$this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit.min.js' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript');
$this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/lightbox.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true);
- $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/notify.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true);
+ $this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/notify.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true);
// add var key
$this->document->addScriptDeclaration("var vastDevMod = '".$this->get('VDM')."';");
JText::script('view not acceptable. Error');
diff --git a/admin/views/admin_views/tmpl/default_body.php b/admin/views/admin_views/tmpl/default_body.php
index 0f7b97fc9..65c030987 100644
--- a/admin/views/admin_views/tmpl/default_body.php
+++ b/admin/views/admin_views/tmpl/default_body.php
@@ -85,7 +85,7 @@ $edit = "index.php?option=com_componentbuilder&view=admin_views&task=admin_view.