forked from joomla/Component-Builder
Update some comments. Fixed some conditional implementation of the show hide fields area in the admin views.
This commit is contained in:
parent
1d5a99878a
commit
5b1813db7c
@ -125,11 +125,11 @@ Watch the [proposed development workflow](https://vdm.bz/proposed-development-wo
|
||||
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
|
||||
+ *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder)
|
||||
+ *First Build*: 30th April, 2015
|
||||
+ *Last Build*: 1st September, 2018
|
||||
+ *Last Build*: 8th September, 2018
|
||||
+ *Version*: 2.9.0
|
||||
+ *Copyright*: Copyright (C) 2015 - 2018 Vast Development Method. All rights reserved.
|
||||
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
|
||||
+ *Line count*: **192959**
|
||||
+ *Line count*: **192999**
|
||||
+ *Field count*: **1081**
|
||||
+ *File count*: **1273**
|
||||
+ *Folder count*: **201**
|
||||
|
@ -125,11 +125,11 @@ Watch the [proposed development workflow](https://vdm.bz/proposed-development-wo
|
||||
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
|
||||
+ *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder)
|
||||
+ *First Build*: 30th April, 2015
|
||||
+ *Last Build*: 1st September, 2018
|
||||
+ *Last Build*: 8th September, 2018
|
||||
+ *Version*: 2.9.0
|
||||
+ *Copyright*: Copyright (C) 2015 - 2018 Vast Development Method. All rights reserved.
|
||||
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
|
||||
+ *Line count*: **192959**
|
||||
+ *Line count*: **192999**
|
||||
+ *Field count*: **1081**
|
||||
+ *File count*: **1273**
|
||||
+ *Folder count*: **201**
|
||||
|
@ -9195,19 +9195,18 @@ class Interpretation extends Fields
|
||||
$ifValue = array();
|
||||
$targetControls = array();
|
||||
$functions = array();
|
||||
|
||||
foreach ($viewArray['settings']->conditions as $condition)
|
||||
{
|
||||
if (isset($condition['match_name']) && ComponentbuilderHelper::checkString($condition['match_name']))
|
||||
{
|
||||
$uniqueVar = $this->uniquekey(7);
|
||||
$matchName = $condition['match_name'] . '_' . $uniqueVar;
|
||||
$targetBehavior = ($condition['target_behavior'] == 1) ? 'show' : 'hide';
|
||||
$targetDefault = ($condition['target_behavior'] == 1) ? 'hide' : 'show';
|
||||
$targetBehavior = ($condition['target_behavior'] == 1 || $condition['target_behavior'] == 3) ? 'show' : 'hide';
|
||||
$targetDefault = ($condition['target_behavior'] == 1 || $condition['target_behavior'] == 3) ? 'hide' : 'show';
|
||||
|
||||
// make sure only one relation is set
|
||||
$firstTime = true;
|
||||
// set the realtation if any
|
||||
if ($condition['target_relation'] && $firstTime)
|
||||
if ($condition['target_relation'])
|
||||
{
|
||||
// chain to other items of the same target
|
||||
$relations = $this->getTargetRelationScript($viewArray['settings']->conditions, $condition, $viewName);
|
||||
@ -9216,6 +9215,7 @@ class Interpretation extends Fields
|
||||
// set behavior and default array
|
||||
$behaviors[$matchName] = $targetBehavior;
|
||||
$defaults[$matchName] = $targetDefault;
|
||||
$toggleSwitch[$matchName] = ($condition['target_behavior'] == 1 || $condition['target_behavior'] == 2) ? true : false;
|
||||
// set the type buket
|
||||
$typeBuket[$matchName] = $condition['match_type'];
|
||||
// set function array
|
||||
@ -9230,7 +9230,6 @@ class Interpretation extends Fields
|
||||
// set the target controls
|
||||
$targetControls[$matchName] = $this->setTargetControlsScript($condition['target_field'], $targetBehavior, $targetDefault, $uniqueVar, $viewName);
|
||||
|
||||
$firstTime = false;
|
||||
foreach ($relations as $relation)
|
||||
{
|
||||
if (ComponentbuilderHelper::checkString($relation['match_name']))
|
||||
@ -9254,6 +9253,7 @@ class Interpretation extends Fields
|
||||
// set behavior and default array
|
||||
$behaviors[$matchName] = $targetBehavior;
|
||||
$defaults[$matchName] = $targetDefault;
|
||||
$toggleSwitch[$matchName] = ($condition['target_behavior'] == 1 || $condition['target_behavior'] == 2) ? true : false;
|
||||
// set the type buket
|
||||
$typeBuket[$matchName] = $condition['match_type'];
|
||||
// set function array
|
||||
@ -9279,7 +9279,7 @@ class Interpretation extends Fields
|
||||
if (ComponentbuilderHelper::checkArray($functions))
|
||||
{
|
||||
// now build the initial script
|
||||
$initial .= "// Initial Script" . PHP_EOL . "jQuery(document).ready(function()";
|
||||
$initial .= "//" . $this->setLine(__LINE__) . " Initial Script" . PHP_EOL . "jQuery(document).ready(function()";
|
||||
$initial .= PHP_EOL . "{";
|
||||
foreach ($functions as $function => $matchKeys)
|
||||
{
|
||||
@ -9310,7 +9310,7 @@ class Interpretation extends Fields
|
||||
$name = $name . '_id';
|
||||
}
|
||||
|
||||
$listener .= PHP_EOL . "// #jform_" . $name . " listeners for " . $l_matchKey . " function";
|
||||
$listener .= PHP_EOL . "//" . $this->setLine(__LINE__) . " #jform_" . $name . " listeners for " . $l_matchKey . " function";
|
||||
$listener .= PHP_EOL . "jQuery('#jform_" . $name . "').on('keyup',function()";
|
||||
$listener .= PHP_EOL . "{";
|
||||
$listener .= $funcCall['code'];
|
||||
@ -9346,7 +9346,7 @@ class Interpretation extends Fields
|
||||
{
|
||||
$addArray = true;
|
||||
}
|
||||
$func .= PHP_EOL . "// the " . $f_function . " function";
|
||||
$func .= PHP_EOL . "//" . $this->setLine(__LINE__) . " the " . $f_function . " function";
|
||||
$func .= PHP_EOL . "function " . $f_function . "(";
|
||||
$fucounter = 0;
|
||||
foreach ($f_matchKeys as $fu_matchKey)
|
||||
@ -9378,7 +9378,7 @@ class Interpretation extends Fields
|
||||
$func .= PHP_EOL . $this->_t(1) . "var " . $name . " = " . $a_matchKey . ".some(" . $a_matchKey . "_SomeFunc);" . PHP_EOL;
|
||||
|
||||
// setup the map function
|
||||
$map .= PHP_EOL . "// the " . $f_function . " Some function";
|
||||
$map .= PHP_EOL . "//" . $this->setLine(__LINE__) . " the " . $f_function . " Some function";
|
||||
$map .= PHP_EOL . "function " . $a_matchKey . "_SomeFunc(" . $a_matchKey . ")";
|
||||
$map .= PHP_EOL . "{";
|
||||
$map .= PHP_EOL . $this->_t(1) . "//" . $this->setLine(__LINE__) . " set the function logic";
|
||||
@ -9434,6 +9434,11 @@ class Interpretation extends Fields
|
||||
}
|
||||
$ifcounter++;
|
||||
}
|
||||
else
|
||||
{
|
||||
var_dump($functions);
|
||||
var_dump($ifValue);exit;
|
||||
}
|
||||
}
|
||||
$func .= ")" . PHP_EOL . $this->_t(1) . "{";
|
||||
}
|
||||
@ -9452,6 +9457,8 @@ class Interpretation extends Fields
|
||||
$head .= $action['requiredVar'];
|
||||
}
|
||||
}
|
||||
if ($toggleSwitch[$f_matchKeys[0]])
|
||||
{
|
||||
$func .= PHP_EOL . $this->_t(1) . "}" . PHP_EOL . $this->_t(1) . "else" . PHP_EOL . $this->_t(1) . "{";
|
||||
foreach ($controls as $target => $action)
|
||||
{
|
||||
@ -9461,6 +9468,7 @@ class Interpretation extends Fields
|
||||
$func .= $action[$targetDefault];
|
||||
}
|
||||
}
|
||||
}
|
||||
$func .= PHP_EOL . $this->_t(1) . "}" . PHP_EOL . "}" . PHP_EOL . $map;
|
||||
}
|
||||
// add the needed validation to file
|
||||
@ -9612,7 +9620,7 @@ class Interpretation extends Fields
|
||||
// convert to name array
|
||||
foreach ($condition['target_field'] as $targetField)
|
||||
{
|
||||
if (ComponentbuilderHelper::checkArray($targetField))
|
||||
if (ComponentbuilderHelper::checkArray($targetField) && isset($targetField['name']))
|
||||
{
|
||||
$currentTargets[] = $targetField['name'];
|
||||
}
|
||||
@ -9622,7 +9630,8 @@ class Interpretation extends Fields
|
||||
{
|
||||
// reset found
|
||||
$found = false;
|
||||
if ($relation['match_field'] != $condition['match_field'])
|
||||
// chain only none matching fields
|
||||
if ($relation['match_field'] !== $condition['match_field'] && $relation['target_relation']) // Made this change to see if it improves the expected result (TODO)
|
||||
{
|
||||
if (ComponentbuilderHelper::checkArray($relation['target_field']))
|
||||
{
|
||||
|
@ -2625,6 +2625,9 @@ abstract class ComponentbuilderHelper
|
||||
* @param int $salt The switch to add salt and type of salt
|
||||
* @param int $dynamic The dynamic replacement array of salt build string
|
||||
* @param int $urlencode The switch to control url encoding
|
||||
*
|
||||
* @return string Encrypted String
|
||||
*
|
||||
**/
|
||||
public static function lock($string, $key = null, $salt = 2, $dynamic = null, $urlencode = true)
|
||||
{
|
||||
@ -2638,13 +2641,13 @@ abstract class ComponentbuilderHelper
|
||||
{
|
||||
$timer = $salt;
|
||||
}
|
||||
// set the default key
|
||||
$key = self::salt($timer, $dynamic);
|
||||
// try getting the system key
|
||||
if (method_exists(get_called_class(), "getCryptKey"))
|
||||
{
|
||||
$key = self::getCryptKey('basic', self::salt($timer, $dynamic));
|
||||
}
|
||||
else
|
||||
{
|
||||
$key = self::salt($timer, $dynamic);
|
||||
// try getting the medium key first the fall back to basic, and then default
|
||||
$key = self::getCryptKey('medium', self::getCryptKey('basic', $key));
|
||||
}
|
||||
}
|
||||
// check if we have a salt timer
|
||||
@ -2663,7 +2666,7 @@ abstract class ComponentbuilderHelper
|
||||
$string = serialize($string);
|
||||
}
|
||||
// prep for url
|
||||
if ($urlencode)
|
||||
if ($urlencode && method_exists(get_called_class(), "base64_urlencode"))
|
||||
{
|
||||
return self::base64_urlencode(self::$locker[$key]->encryptString($string));
|
||||
}
|
||||
@ -2678,6 +2681,9 @@ abstract class ComponentbuilderHelper
|
||||
* @param int $salt The switch to add salt and type of salt
|
||||
* @param int $dynamic The dynamic replacement array of salt build string
|
||||
* @param int $urlencode The switch to control url decoding
|
||||
*
|
||||
* @return string Decrypted String
|
||||
*
|
||||
**/
|
||||
public static function unlock($string, $key = null, $salt = 2, $dynamic = null, $urlencode = true)
|
||||
{
|
||||
@ -2691,14 +2697,13 @@ abstract class ComponentbuilderHelper
|
||||
{
|
||||
$timer = $salt;
|
||||
}
|
||||
// get secure key
|
||||
// set the default key
|
||||
$key = self::salt($timer, $dynamic);
|
||||
// try getting the system key
|
||||
if (method_exists(get_called_class(), "getCryptKey"))
|
||||
{
|
||||
$key = self::getCryptKey('basic', self::salt($timer, $dynamic));
|
||||
}
|
||||
else
|
||||
{
|
||||
$key = self::salt($timer, $dynamic);
|
||||
// try getting the medium key first the fall back to basic, and then default
|
||||
$key = self::getCryptKey('medium', self::getCryptKey('basic', $key));
|
||||
}
|
||||
}
|
||||
// check if we have a salt timer
|
||||
@ -2712,7 +2717,7 @@ abstract class ComponentbuilderHelper
|
||||
self::$locker[$key] = new FOFEncryptAes($key, 128);
|
||||
}
|
||||
// make sure we have real base64
|
||||
if ($urlencode)
|
||||
if ($urlencode && method_exists(get_called_class(), "base64_urldecode"))
|
||||
{
|
||||
$string = self::base64_urldecode($string);
|
||||
}
|
||||
@ -2734,6 +2739,9 @@ abstract class ComponentbuilderHelper
|
||||
*
|
||||
* @param int $type The type of length the salt should be valid
|
||||
* @param int $dynamic The dynamic replacement array of salt build string
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
**/
|
||||
public static function salt($type = 1, $dynamic = null)
|
||||
{
|
||||
@ -2789,7 +2797,11 @@ abstract class ComponentbuilderHelper
|
||||
|
||||
/**
|
||||
* Check if a string is serialized
|
||||
*
|
||||
* @param string $string
|
||||
*
|
||||
* @return Boolean
|
||||
*
|
||||
*/
|
||||
public static function is_serial($string)
|
||||
{
|
||||
|
@ -249,7 +249,8 @@ COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_CREATED_DATE_LABEL="Created Date"
|
||||
COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_EDIT="Editing the Admin Fields Conditions"
|
||||
COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_ERROR_UNIQUE_ALIAS="Another Admin Fields Conditions has the same alias."
|
||||
COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_EXACT_LENGTH_ONLY_FOUR_TEXT_FIELD="Exact Length (only 4 text_field)"
|
||||
COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_HIDE="Hide"
|
||||
COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_HIDE_ONLY="Hide Only"
|
||||
COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_HIDE_TOGGLE="Hide Toggle"
|
||||
COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_ID="Id"
|
||||
COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_ISOLATE="Isolate"
|
||||
COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_IS_NOT_ONLY_FOUR_LISTRADIOCHECKBOXES="Is Not (only 4 list/radio/checkboxes)"
|
||||
@ -278,7 +279,8 @@ COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_ORDERING_LABEL="Ordering"
|
||||
COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_PERMISSION="Permissions"
|
||||
COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_PUBLISHING="Publishing"
|
||||
COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Admin Fields Conditions to customise the alias."
|
||||
COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_SHOW="Show"
|
||||
COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_SHOW_ONLY="Show Only"
|
||||
COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_SHOW_TOGGLE="Show Toggle"
|
||||
COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_STATUS="Status"
|
||||
COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_TARGET_BEHAVIOR_DESCRIPTION="Select the target field/s behavior."
|
||||
COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_TARGET_BEHAVIOR_LABEL="Target Behavior"
|
||||
@ -4378,7 +4380,8 @@ COM_COMPONENTBUILDER_HELP_MANAGER="Help"
|
||||
COM_COMPONENTBUILDER_HFOUR_CLASSNAVHEADERCOPYRIGHTHFOURPSP="<h4 class="nav-header">Copyright</h4><p>%s</p>"
|
||||
COM_COMPONENTBUILDER_HFOUR_CLASSNAVHEADERLICENSEHFOURPSP="<h4 class="nav-header">License</h4><p>%s</p>"
|
||||
COM_COMPONENTBUILDER_HI="Hi"
|
||||
COM_COMPONENTBUILDER_HIDE="Hide"
|
||||
COM_COMPONENTBUILDER_HIDE_ONLY="Hide Only"
|
||||
COM_COMPONENTBUILDER_HIDE_TOGGLE="Hide Toggle"
|
||||
COM_COMPONENTBUILDER_HOW_TO_GET_A_S_FREE_KEYSA_FROM_VDM="How to get <a %s >free keys</a> from VDM."
|
||||
COM_COMPONENTBUILDER_HTWOCURL_NOT_FOUNDHTWOPPLEASE_SETUP_CURL_ON_YOUR_SYSTEM_OR_BCOMPONENTBUILDERB_WILL_NOT_FUNCTION_CORRECTLYP="<h2>Curl Not Found!</h2><p>Please setup curl on your system, or <b>componentbuilder</b> will not function correctly!</p>"
|
||||
COM_COMPONENTBUILDER_HTWODATA_IS_CORRUPTHTWOTHIS_COULD_BE_DUE_TO_BKEY_ERRORB_OR_BROKEN_PACKAGE="<h2>Data is corrupt!</h2>This could be due to <b>key error</b>, or broken package!"
|
||||
@ -5860,8 +5863,9 @@ COM_COMPONENTBUILDER_SHOULD_THIS_FIELD_BE_ESCAPED_IN_THE_LIST_VIEW="Should this
|
||||
COM_COMPONENTBUILDER_SHOULD_WE_BE_SHOWING_MORE_ELABORATE_INFORMATION_DURING_IMPORT="Should we be showing more elaborate information during import."
|
||||
COM_COMPONENTBUILDER_SHOULD_WE_FORCE_THE_UPDATE_OF_ALL_LOCAL_DATA_EVEN_IF_IT_IS_NEWER_THEN_THE_DATA_BEING_IMPORTED="Should we force the update of all local data, even if it is newer then the data being imported."
|
||||
COM_COMPONENTBUILDER_SHOULD_WE_MERGE_THE_COMPONENTS_WITH_SIMILAR_LOCAL_COMPONENTS_MERGING_THE_COMPONENTS_USE_TO_BE_THE_DEFAULT_BEHAVIOUR_BUT_NOW_YOU_CAN_IMPORT_THE_COMPONENTS_AND_FORCE_IT_NOT_TO_MERGE_THE_FOLLOWING_AREAS_VALIDATION_RULE_FIELDTYPE_SNIPPET_LANGUAGE_LANGUAGE_TRANSLATION_BMUST_AND_WILL_STILLB_MERGE_EVEN_OF_YOUR_SELECTION_IS_BNOB_BECAUSE_OF_THE_SINGULAR_NATURE_OF_THOSE_AREAS="Should we merge the component/s with similar local component/s. Merging the component/s use to be the default behaviour, but now you can import the component/s and force it not to merge. The following areas (validation_rule, fieldtype, snippet, language, language_translation) <b>must and will still</b> merge even of your selection is <b>No</b>, because of the singular nature of those areas."
|
||||
COM_COMPONENTBUILDER_SHOW="Show"
|
||||
COM_COMPONENTBUILDER_SHOW_IN_LIST_VIEW="Show in list view"
|
||||
COM_COMPONENTBUILDER_SHOW_ONLY="Show Only"
|
||||
COM_COMPONENTBUILDER_SHOW_TOGGLE="Show Toggle"
|
||||
COM_COMPONENTBUILDER_SINCE_THE_OWNER_DETAILS_ARE_DISPLAYED_DURING_BIMPORT_PROCESSB_BEFORE_ADDING_THE_KEY_THIS_WAY_IF_THE_USERDEV_BDOES_NOTB_HAVE_THE_KEY_THEY_CAN_SEE_BWHERE_TO_GET_ITB="Since the owner details are displayed during <b>import process</b> before adding the key, this way if the user/dev <b>does not</b> have the key they can see <b>where to get it</b>."
|
||||
COM_COMPONENTBUILDER_SINCE_THE_OWNER_DETAILS_ARE_DISPLAYED_DURING_IMPORT_PROCESS_BEFORE_ADDING_THE_KEY_THIS_WAY_IF_THE_USERDEV_DOES_NOT_HAVE_THE_KEY_THEY_CAN_SEE_WHERE_TO_GET_IT="Since the owner details are displayed during import process before adding the key, this way if the user/dev does not have the key they can see where to get it."
|
||||
COM_COMPONENTBUILDER_SITE_VIEW="Site View"
|
||||
|
@ -1049,9 +1049,17 @@ class ComponentbuilderModelAjax extends JModelList
|
||||
{
|
||||
if (1 == $value)
|
||||
{
|
||||
return JText::_('COM_COMPONENTBUILDER_SHOW');
|
||||
return JText::_('COM_COMPONENTBUILDER_SHOW_TOGGLE');
|
||||
}
|
||||
return JText::_('COM_COMPONENTBUILDER_HIDE');
|
||||
elseif (3 == $value)
|
||||
{
|
||||
return JText::_('COM_COMPONENTBUILDER_SHOW_ONLY');
|
||||
}
|
||||
elseif (4 == $value)
|
||||
{
|
||||
return JText::_('COM_COMPONENTBUILDER_HIDE_ONLY');
|
||||
}
|
||||
return JText::_('COM_COMPONENTBUILDER_HIDE_TOGGLE');
|
||||
}
|
||||
|
||||
protected function setTargetRelation($header, $value)
|
||||
|
@ -131,9 +131,13 @@
|
||||
default="1">
|
||||
<!-- Option Set. -->
|
||||
<option value="1">
|
||||
COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_SHOW</option>
|
||||
COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_SHOW_TOGGLE</option>
|
||||
<option value="2">
|
||||
COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_HIDE</option>
|
||||
COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_HIDE_TOGGLE</option>
|
||||
<option value="3">
|
||||
COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_SHOW_ONLY</option>
|
||||
<option value="4">
|
||||
COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_HIDE_ONLY</option>
|
||||
</field>
|
||||
<!-- Target_relation Field. Type: List. (joomla) -->
|
||||
<field
|
||||
|
@ -1696,7 +1696,7 @@ INSERT INTO `#__componentbuilder_help_document` (`id`, `admin_view`, `alias`, `a
|
||||
--
|
||||
|
||||
INSERT INTO `#__componentbuilder_admin_fields` (`id`, `addfields`, `admin_view`, `published`, `created`, `modified`, `version`, `hits`, `ordering`) VALUES
|
||||
(111, '{\"0\":{\"field\":\"84\",\"list\":\"1\",\"order_list\":\"2\",\"sort\":\"1\",\"search\":\"1\",\"tab\":\"1\",\"alignment\":\"3\",\"order_edit\":\"1\",\"permission\":\"0\"},\"1\":{\"field\":\"199\",\"list\":\"1\",\"order_list\":\"1\",\"title\":\"1\",\"sort\":\"1\",\"search\":\"1\",\"link\":\"1\",\"tab\":\"1\",\"alignment\":\"4\",\"order_edit\":\"1\",\"permission\":\"0\"},\"2\":{\"field\":\"23\",\"order_list\":\"0\",\"alias\":\"1\",\"search\":\"1\",\"tab\":\"1\",\"alignment\":\"4\",\"order_edit\":\"2\",\"permission\":\"0\"},\"3\":{\"field\":\"203\",\"order_list\":\"0\",\"tab\":\"1\",\"alignment\":\"5\",\"order_edit\":\"1\",\"permission\":\"0\"},\"4\":{\"field\":\"682\",\"order_list\":\"0\",\"sort\":\"1\",\"search\":\"1\",\"filter\":\"1\",\"tab\":\"2\",\"alignment\":\"1\",\"order_edit\":\"1\",\"permission\":\"0\"},\"5\":{\"field\":\"100\",\"order_list\":\"0\",\"tab\":\"2\",\"alignment\":\"2\",\"order_edit\":\"1\",\"permission\":\"0\"},\"6\":{\"field\":\"196\",\"order_list\":\"0\",\"tab\":\"2\",\"alignment\":\"2\",\"order_edit\":\"2\",\"permission\":\"0\"},\"7\":{\"field\":\"1011\",\"order_list\":\"0\",\"tab\":\"2\",\"alignment\":\"2\",\"order_edit\":\"3\",\"permission\":\"0\"},\"8\":{\"field\":\"158\",\"order_list\":\"0\",\"tab\":\"2\",\"alignment\":\"2\",\"order_edit\":\"4\",\"permission\":\"0\"},\"9\":{\"field\":\"280\",\"order_list\":\"0\",\"tab\":\"2\",\"alignment\":\"2\",\"order_edit\":\"5\",\"permission\":\"0\"}}', 109, 1, '2017-10-12 19:52:03', '2018-03-10 23:04:11', 4, '', '');
|
||||
(111, '{\"0\":{\"field\":\"84\",\"list\":\"1\",\"order_list\":\"2\",\"sort\":\"1\",\"search\":\"1\",\"tab\":\"1\",\"alignment\":\"3\",\"order_edit\":\"1\"},\"1\":{\"field\":\"199\",\"list\":\"1\",\"order_list\":\"1\",\"title\":\"1\",\"sort\":\"1\",\"search\":\"1\",\"link\":\"1\",\"tab\":\"1\",\"alignment\":\"4\",\"order_edit\":\"1\"},\"2\":{\"field\":\"23\",\"list\":\"\",\"order_list\":\"0\",\"alias\":\"1\",\"search\":\"1\",\"tab\":\"1\",\"alignment\":\"4\",\"order_edit\":\"2\"},\"3\":{\"field\":\"203\",\"list\":\"\",\"order_list\":\"0\",\"tab\":\"1\",\"alignment\":\"5\",\"order_edit\":\"1\"},\"4\":{\"field\":\"682\",\"list\":\"\",\"order_list\":\"0\",\"sort\":\"1\",\"search\":\"1\",\"filter\":\"1\",\"tab\":\"2\",\"alignment\":\"1\",\"order_edit\":\"1\"},\"5\":{\"field\":\"100\",\"list\":\"\",\"order_list\":\"0\",\"tab\":\"2\",\"alignment\":\"2\",\"order_edit\":\"1\"},\"6\":{\"field\":\"196\",\"list\":\"\",\"order_list\":\"0\",\"tab\":\"2\",\"alignment\":\"2\",\"order_edit\":\"2\"},\"7\":{\"field\":\"1011\",\"list\":\"\",\"order_list\":\"0\",\"tab\":\"2\",\"alignment\":\"2\",\"order_edit\":\"3\"},\"8\":{\"field\":\"158\",\"list\":\"\",\"order_list\":\"0\",\"tab\":\"2\",\"alignment\":\"2\",\"order_edit\":\"4\"},\"9\":{\"field\":\"280\",\"list\":\"\",\"order_list\":\"0\",\"tab\":\"2\",\"alignment\":\"2\",\"order_edit\":\"5\"}}', 109, 1, '2017-10-12 19:52:03', '2018-09-03 17:02:46', 6, '', '');
|
||||
|
||||
--
|
||||
-- Dumping data for table `#__componentbuilder_admin_fields_conditions`
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<extension type="component" version="3.2" method="upgrade">
|
||||
<name>COM_COMPONENTBUILDER</name>
|
||||
<creationDate>1st September, 2018</creationDate>
|
||||
<creationDate>8th September, 2018</creationDate>
|
||||
<author>Llewellyn van der Merwe</author>
|
||||
<authorEmail>llewellyn@joomlacomponentbuilder.com</authorEmail>
|
||||
<authorUrl>http://www.joomlacomponentbuilder.com</authorUrl>
|
||||
|
@ -2625,6 +2625,9 @@ abstract class ComponentbuilderHelper
|
||||
* @param int $salt The switch to add salt and type of salt
|
||||
* @param int $dynamic The dynamic replacement array of salt build string
|
||||
* @param int $urlencode The switch to control url encoding
|
||||
*
|
||||
* @return string Encrypted String
|
||||
*
|
||||
**/
|
||||
public static function lock($string, $key = null, $salt = 2, $dynamic = null, $urlencode = true)
|
||||
{
|
||||
@ -2638,13 +2641,13 @@ abstract class ComponentbuilderHelper
|
||||
{
|
||||
$timer = $salt;
|
||||
}
|
||||
// set the default key
|
||||
$key = self::salt($timer, $dynamic);
|
||||
// try getting the system key
|
||||
if (method_exists(get_called_class(), "getCryptKey"))
|
||||
{
|
||||
$key = self::getCryptKey('basic', self::salt($timer, $dynamic));
|
||||
}
|
||||
else
|
||||
{
|
||||
$key = self::salt($timer, $dynamic);
|
||||
// try getting the medium key first the fall back to basic, and then default
|
||||
$key = self::getCryptKey('medium', self::getCryptKey('basic', $key));
|
||||
}
|
||||
}
|
||||
// check if we have a salt timer
|
||||
@ -2663,7 +2666,7 @@ abstract class ComponentbuilderHelper
|
||||
$string = serialize($string);
|
||||
}
|
||||
// prep for url
|
||||
if ($urlencode)
|
||||
if ($urlencode && method_exists(get_called_class(), "base64_urlencode"))
|
||||
{
|
||||
return self::base64_urlencode(self::$locker[$key]->encryptString($string));
|
||||
}
|
||||
@ -2678,6 +2681,9 @@ abstract class ComponentbuilderHelper
|
||||
* @param int $salt The switch to add salt and type of salt
|
||||
* @param int $dynamic The dynamic replacement array of salt build string
|
||||
* @param int $urlencode The switch to control url decoding
|
||||
*
|
||||
* @return string Decrypted String
|
||||
*
|
||||
**/
|
||||
public static function unlock($string, $key = null, $salt = 2, $dynamic = null, $urlencode = true)
|
||||
{
|
||||
@ -2691,14 +2697,13 @@ abstract class ComponentbuilderHelper
|
||||
{
|
||||
$timer = $salt;
|
||||
}
|
||||
// get secure key
|
||||
// set the default key
|
||||
$key = self::salt($timer, $dynamic);
|
||||
// try getting the system key
|
||||
if (method_exists(get_called_class(), "getCryptKey"))
|
||||
{
|
||||
$key = self::getCryptKey('basic', self::salt($timer, $dynamic));
|
||||
}
|
||||
else
|
||||
{
|
||||
$key = self::salt($timer, $dynamic);
|
||||
// try getting the medium key first the fall back to basic, and then default
|
||||
$key = self::getCryptKey('medium', self::getCryptKey('basic', $key));
|
||||
}
|
||||
}
|
||||
// check if we have a salt timer
|
||||
@ -2712,7 +2717,7 @@ abstract class ComponentbuilderHelper
|
||||
self::$locker[$key] = new FOFEncryptAes($key, 128);
|
||||
}
|
||||
// make sure we have real base64
|
||||
if ($urlencode)
|
||||
if ($urlencode && method_exists(get_called_class(), "base64_urldecode"))
|
||||
{
|
||||
$string = self::base64_urldecode($string);
|
||||
}
|
||||
@ -2734,6 +2739,9 @@ abstract class ComponentbuilderHelper
|
||||
*
|
||||
* @param int $type The type of length the salt should be valid
|
||||
* @param int $dynamic The dynamic replacement array of salt build string
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
**/
|
||||
public static function salt($type = 1, $dynamic = null)
|
||||
{
|
||||
@ -2789,7 +2797,11 @@ abstract class ComponentbuilderHelper
|
||||
|
||||
/**
|
||||
* Check if a string is serialized
|
||||
*
|
||||
* @param string $string
|
||||
*
|
||||
* @return Boolean
|
||||
*
|
||||
*/
|
||||
public static function is_serial($string)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user