Improved the internal session handel of JCB. Fixed gh-487 that removed the data size when creating a new field.
This commit is contained in:
parent
010a134e1a
commit
6539862534
15
README.md
15
README.md
@ -1,8 +1,7 @@
|
||||
# Joomla Component Builder ([JCB](http://joomlacomponentbuilder.com))
|
||||
[![GitHub release](https://img.shields.io/github/release/vdm-io/Joomla-Component-Builder.svg)](https://github.com/vdm-io/Joomla-Component-Builder/releases)
|
||||
[![Total Downloads](https://img.shields.io/github/downloads/vdm-io/Joomla-Component-Builder/total.svg)](https://github.com/vdm-io/Joomla-Component-Builder/releases)
|
||||
[![Backers on Open Collective](https://opencollective.com/Joomla-Component-Builder/backers/badge.svg)](#backers)
|
||||
[![Sponsors on Open Collective](https://opencollective.com/Joomla-Component-Builder/sponsors/badge.svg)](#sponsors)
|
||||
[![JCB Pro Members](https://opencollective.com/joomla-component-builder/tiers/jcb-pro/badge.svg?label=JCB Pro&color=brightgreen)](#sponsors)
|
||||
|
||||
This is a [Joomla 3.x](https://extensions.joomla.org/extension/component-builder/) component. [__See In Action__](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45)
|
||||
|
||||
@ -110,8 +109,6 @@ Where can you get support and help?
|
||||
+ [Report a Security Issue](http://joomlacomponentbuilder.com/report-security-issues)
|
||||
+ [Community Complaint](http://joomlacomponentbuilder.com/community-complaint)
|
||||
+ [Open Issue On Github](https://github.com/vdm-io/Joomla-Component-Builder/issues) ^^
|
||||
+ [Telegram Group](https://t.me/jcb_group)
|
||||
+ [JCB IRC Channel](https://vdm.bz/jcb-irc)
|
||||
|
||||
Since [JCB](http://joomlacomponentbuilder.com) has [become a community](https://github.com/vdm-io/Joomla-Component-Builder/blob/staging/.github/SUPPORT.md) project [VDM.io](https://www.vdm.io/) is **no longer solely responsible** for support.
|
||||
|
||||
@ -146,14 +143,14 @@ TODO
|
||||
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
|
||||
+ *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder)
|
||||
+ *First Build*: 30th April, 2015
|
||||
+ *Last Build*: 16th October, 2019
|
||||
+ *Last Build*: 8th November, 2019
|
||||
+ *Version*: 2.10.4
|
||||
+ *Copyright*: Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved.
|
||||
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
|
||||
+ *Line count*: **255312**
|
||||
+ *Field count*: **1353**
|
||||
+ *File count*: **1620**
|
||||
+ *Folder count*: **261**
|
||||
+ *Line count*: **255756**
|
||||
+ *Field count*: **1350**
|
||||
+ *File count*: **1614**
|
||||
+ *Folder count*: **256**
|
||||
|
||||
> This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](http://joomlacomponentbuilder.com).
|
||||
> Developed by [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
|
||||
|
@ -1,8 +1,7 @@
|
||||
# Joomla Component Builder ([JCB](http://joomlacomponentbuilder.com))
|
||||
[![GitHub release](https://img.shields.io/github/release/vdm-io/Joomla-Component-Builder.svg)](https://github.com/vdm-io/Joomla-Component-Builder/releases)
|
||||
[![Total Downloads](https://img.shields.io/github/downloads/vdm-io/Joomla-Component-Builder/total.svg)](https://github.com/vdm-io/Joomla-Component-Builder/releases)
|
||||
[![Backers on Open Collective](https://opencollective.com/Joomla-Component-Builder/backers/badge.svg)](#backers)
|
||||
[![Sponsors on Open Collective](https://opencollective.com/Joomla-Component-Builder/sponsors/badge.svg)](#sponsors)
|
||||
[![JCB Pro Members](https://opencollective.com/joomla-component-builder/tiers/jcb-pro/badge.svg?label=JCB Pro&color=brightgreen)](#sponsors)
|
||||
|
||||
This is a [Joomla 3.x](https://extensions.joomla.org/extension/component-builder/) component. [__See In Action__](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45)
|
||||
|
||||
@ -110,8 +109,6 @@ Where can you get support and help?
|
||||
+ [Report a Security Issue](http://joomlacomponentbuilder.com/report-security-issues)
|
||||
+ [Community Complaint](http://joomlacomponentbuilder.com/community-complaint)
|
||||
+ [Open Issue On Github](https://github.com/vdm-io/Joomla-Component-Builder/issues) ^^
|
||||
+ [Telegram Group](https://t.me/jcb_group)
|
||||
+ [JCB IRC Channel](https://vdm.bz/jcb-irc)
|
||||
|
||||
Since [JCB](http://joomlacomponentbuilder.com) has [become a community](https://github.com/vdm-io/Joomla-Component-Builder/blob/staging/.github/SUPPORT.md) project [VDM.io](https://www.vdm.io/) is **no longer solely responsible** for support.
|
||||
|
||||
@ -146,14 +143,14 @@ TODO
|
||||
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
|
||||
+ *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder)
|
||||
+ *First Build*: 30th April, 2015
|
||||
+ *Last Build*: 16th October, 2019
|
||||
+ *Last Build*: 8th November, 2019
|
||||
+ *Version*: 2.10.4
|
||||
+ *Copyright*: Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved.
|
||||
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
|
||||
+ *Line count*: **255312**
|
||||
+ *Field count*: **1353**
|
||||
+ *File count*: **1620**
|
||||
+ *Folder count*: **261**
|
||||
+ *Line count*: **255756**
|
||||
+ *Field count*: **1350**
|
||||
+ *File count*: **1614**
|
||||
+ *Folder count*: **256**
|
||||
|
||||
> This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](http://joomlacomponentbuilder.com).
|
||||
> Developed by [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
|
||||
|
@ -209,7 +209,15 @@ abstract class ###Component###Helper
|
||||
{
|
||||
$query->from($db->quoteName('#_'.$main.'_'.$table));
|
||||
}
|
||||
$query->where($db->quoteName($whereString) . ' '.$operator.' (' . implode(',',$where) . ')');
|
||||
// add strings to array search
|
||||
if ('IN_STRINGS' === $operator || 'NOT IN_STRINGS' === $operator)
|
||||
{
|
||||
$query->where($db->quoteName($whereString) . ' ' . str_replace('_STRINGS', '', $operator) . ' ("' . implode('","',$where) . '")');
|
||||
}
|
||||
else
|
||||
{
|
||||
$query->where($db->quoteName($whereString) . ' ' . $operator . ' (' . implode(',',$where) . ')');
|
||||
}
|
||||
$db->setQuery($query);
|
||||
$db->execute();
|
||||
if ($db->getNumRows())
|
||||
|
@ -602,7 +602,15 @@ abstract class ###Component###Helper
|
||||
{
|
||||
$query->from($db->quoteName('#_'.$main.'_'.$table));
|
||||
}
|
||||
$query->where($db->quoteName($whereString) . ' '.$operator.' (' . implode(',',$where) . ')');
|
||||
// add strings to array search
|
||||
if ('IN_STRINGS' === $operator || 'NOT IN_STRINGS' === $operator)
|
||||
{
|
||||
$query->where($db->quoteName($whereString) . ' ' . str_replace('_STRINGS', '', $operator) . ' ("' . implode('","',$where) . '")');
|
||||
}
|
||||
else
|
||||
{
|
||||
$query->where($db->quoteName($whereString) . ' ' . $operator . ' (' . implode(',',$where) . ')');
|
||||
}
|
||||
$db->setQuery($query);
|
||||
$db->execute();
|
||||
if ($db->getNumRows())
|
||||
|
@ -212,6 +212,12 @@
|
||||
"path": "c0mp0n3nt/site/helpers",
|
||||
"rename": false,
|
||||
"type": "file"
|
||||
},
|
||||
"import.gif": {
|
||||
"naam": "import.gif",
|
||||
"path": "c0mp0n3nt/admin/assets/images",
|
||||
"rename": false,
|
||||
"type": "file"
|
||||
}
|
||||
},
|
||||
"dynamic": {
|
||||
@ -461,11 +467,6 @@
|
||||
"newName": "default.php",
|
||||
"type": "import"
|
||||
},
|
||||
"import.gif": {
|
||||
"path": "c0mp0n3nt/admin/assets/images",
|
||||
"rename": false,
|
||||
"type": "import"
|
||||
},
|
||||
"JControllerLegacy_import_custom.php": {
|
||||
"path": "c0mp0n3nt/admin/controllers",
|
||||
"rename": "JControllerLegacy_import_custom",
|
||||
|
@ -7001,7 +7001,7 @@ class Get
|
||||
(trim($lineContent) === $endHTML || strpos($lineContent, $endHTML) !== false)))
|
||||
{
|
||||
// trim the placeholder and if there is still data then load it
|
||||
if ($_line = $this->addLineChecker($endReplace, 2, $lineContent))
|
||||
if (isset($endReplace) && ($_line = $this->addLineChecker($endReplace, 2, $lineContent)) !== false)
|
||||
{
|
||||
$codeBucket[$pointer[$targetKey]][] = $_line;
|
||||
}
|
||||
@ -7360,9 +7360,9 @@ class Get
|
||||
/**
|
||||
* Check if this line should be added
|
||||
*
|
||||
* @param strin $replaceKey The key to remove from line
|
||||
* @param int $type The line type
|
||||
* @param string $lineContent The line to check
|
||||
* @param string $replaceKey The key to remove from line
|
||||
* @param int $type The line type
|
||||
* @param string $lineContent The line to check
|
||||
*
|
||||
* @return bool true on success
|
||||
*
|
||||
|
@ -1829,7 +1829,7 @@ class Fields extends Structure
|
||||
// add to lang array
|
||||
$this->setLangContent($this->lang, $langValue, $option);
|
||||
// now add to option set
|
||||
$grouped_['option'][$option] = array('value' => $valueKeyArray[0], 'text' => $langValue);
|
||||
$grouped_['option'][$option] = array('value' => $option, 'text' => $langValue);
|
||||
$optionArray[$option] = $langValue;
|
||||
// set order
|
||||
$order_['option' . $option] = $option;
|
||||
@ -2357,7 +2357,7 @@ class Fields extends Structure
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->siteFieldData['decode'][$array['site']][$code][$array['as']][$array['key']] = array('decode' => array($set), 'type' => $type);
|
||||
$this->siteFieldData['decode'][$array['site']][$code][$array['as']][$array['key']] = array('decode' => array($set), 'type' => $type, 'admin_view' => $view);
|
||||
}
|
||||
}
|
||||
// set the uikit checker
|
||||
@ -3052,8 +3052,8 @@ class Fields extends Structure
|
||||
$this->buildSiteFieldData($view_name_single, $name, 'json', $typeName);
|
||||
}
|
||||
|
||||
// load the json list display fix
|
||||
if (($listSwitch || $listJoin) && $typeName != 'repeatable' && $typeName != 'subform')
|
||||
// load the model list display fix
|
||||
if (($listSwitch || $listJoin) && (($typeName != 'repeatable' && $typeName != 'subform') || $field['settings']->store == 6))
|
||||
{
|
||||
if (ComponentbuilderHelper::checkArray($options))
|
||||
{
|
||||
|
@ -1835,11 +1835,11 @@ class Interpretation extends Fields
|
||||
// base64_decode
|
||||
$decoder = $string . "->" . $field . " = base64_decode(" . $string . "->" . $field . ");";
|
||||
}
|
||||
elseif (strpos($decode, '_encryption') !== false)
|
||||
elseif (strpos($decode, '_encryption') !== false || 'expert_mode' === $decode)
|
||||
{
|
||||
foreach ($this->cryptionTypes as $cryptionType)
|
||||
{
|
||||
if ($cryptionType . '_encryption' === $decode)
|
||||
if ($cryptionType . '_encryption' === $decode || $cryptionType . '_mode' === $decode)
|
||||
{
|
||||
if ('expert' !== $cryptionType)
|
||||
{
|
||||
@ -1847,10 +1847,10 @@ class Interpretation extends Fields
|
||||
// set decryption
|
||||
$decoder = $string . "->" . $field . " = rtrim(\$" . $cryptionType . "->decryptString(" . $string . "->" . $field . "), " . '"\0"' . ");";
|
||||
}
|
||||
elseif (isset($this->{$cryptionType . 'FieldModeling'}[$code][$field]))
|
||||
elseif (isset($this->{$cryptionType . 'FieldModeling'}[$array['admin_view']][$field]))
|
||||
{
|
||||
$_placeholder_for_field = array('[[[field]]]' => $string . "->" . $field);
|
||||
$fieldDecode .= $this->setPlaceholders(PHP_EOL . $this->_t(1) . $tab . $this->_t(1) . implode(PHP_EOL . $this->_t(1) . $tab . $this->_t(1), $this->{$cryptionType . 'FieldModeling'}[$code][$field]['get']), $_placeholder_for_field);
|
||||
$fieldDecode .= $this->setPlaceholders(PHP_EOL . $this->_t(1) . $tab . $this->_t(1) . implode(PHP_EOL . $this->_t(1) . $tab . $this->_t(1), $this->{$cryptionType . 'FieldModeling'}[$array['admin_view']][$field]['get']), $_placeholder_for_field);
|
||||
}
|
||||
// activate site decryption
|
||||
$this->siteDecrypt[$cryptionType][$code] = true;
|
||||
@ -12955,9 +12955,7 @@ class Interpretation extends Fields
|
||||
break;
|
||||
case 6:
|
||||
// EXPERT_ENCRYPTION
|
||||
$decode = '///////////////////////////////////////////';
|
||||
$expertCrypt = true;
|
||||
$suffix_decode = '';
|
||||
break;
|
||||
default:
|
||||
// JSON_ARRAY_ENCODE
|
||||
@ -12968,7 +12966,7 @@ class Interpretation extends Fields
|
||||
break;
|
||||
}
|
||||
|
||||
if ($item['type'] === 'usergroup' && !$export)
|
||||
if ($item['type'] === 'usergroup' && !$export && $item['method'] != 6)
|
||||
{
|
||||
$fix .= PHP_EOL . $this->_t(1) . $tab . $this->_t(3) . "//" . $this->setLine(__LINE__) . " decode " . $item['name'];
|
||||
$fix .= PHP_EOL . $this->_t(1) . $tab . $this->_t(3) . "\$" . $item['name'] . "Array = " . $decode . "(\$item->" . $item['name'] . $suffix_decode . ");";
|
||||
@ -12991,7 +12989,7 @@ class Interpretation extends Fields
|
||||
$fix .= PHP_EOL.$this->_t(1).$tab.$this->_t(4) . "\$item->".$item['name']." = implode('|',\$".$item['name']."Array);";
|
||||
$fix .= PHP_EOL.$this->_t(1).$tab.$this->_t(3) . "}";
|
||||
} */
|
||||
elseif ($item['translation'] && !$export)
|
||||
elseif ($item['translation'] && !$export && $item['method'] != 6)
|
||||
{
|
||||
$fix .= PHP_EOL . $this->_t(1) . $tab . $this->_t(3) . "//" . $this->setLine(__LINE__) . " decode " . $item['name'];
|
||||
$fix .= PHP_EOL . $this->_t(1) . $tab . $this->_t(3) . "\$" . $item['name'] . "Array = " . $decode . "(\$item->" . $item['name'] . $suffix_decode . ");";
|
||||
@ -13007,40 +13005,49 @@ class Interpretation extends Fields
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($item['method'] == 2 || $item['method'] == 3 || $item['method'] == 4 || $item['method'] == 5)
|
||||
if ($item['method'] == 2 || $item['method'] == 3 || $item['method'] == 4 || $item['method'] == 5 || $item['method'] == 6)
|
||||
{
|
||||
$taber = '';
|
||||
if ($item['method'] == 3)
|
||||
// expert mode (dev must do it all)
|
||||
if ($item['method'] == 6)
|
||||
{
|
||||
$taber = $this->_t(1);
|
||||
$fix .= PHP_EOL . $this->_t(1) . $tab . $this->_t(3) . "if (\$basickey && !is_numeric(\$item->" . $item['name'] . ") && \$item->" . $item['name'] . " === base64_encode(base64_decode(\$item->" . $item['name'] . ", true)))";
|
||||
$fix .= PHP_EOL . $this->_t(1) . $tab . $this->_t(3) . "{";
|
||||
}
|
||||
elseif ($item['method'] == 5)
|
||||
{
|
||||
$taber = $this->_t(1);
|
||||
$fix .= PHP_EOL . $this->_t(1) . $tab . $this->_t(3) . "if (\$mediumkey && !is_numeric(\$item->" . $item['name'] . ") && \$item->" . $item['name'] . " === base64_encode(base64_decode(\$item->" . $item['name'] . ", true)))";
|
||||
$fix .= PHP_EOL . $this->_t(1) . $tab . $this->_t(3) . "{";
|
||||
}
|
||||
elseif ($item['method'] == 4)
|
||||
{
|
||||
$taber = $this->_t(1);
|
||||
$fix .= PHP_EOL . $this->_t(1) . $tab . $this->_t(3) . "if (\$whmcskey && !is_numeric(\$item->" . $item['name'] . ") && \$item->" . $item['name'] . " === base64_encode(base64_decode(\$item->" . $item['name'] . ", true)))";
|
||||
$fix .= PHP_EOL . $this->_t(1) . $tab . $this->_t(3) . "{";
|
||||
}
|
||||
if ($item['method'] == 3 || $item['method'] == 4 || $item['method'] == 5)
|
||||
{
|
||||
$fix .= PHP_EOL . $this->_t(1) . $tab . $this->_t(4) . "//" . $this->setLine(__LINE__) . " decrypt " . $item['name'];
|
||||
$_placeholder_for_field = array('[[[field]]]' => "\$item->" . $item['name']);
|
||||
$fix .= $this->setPlaceholders(PHP_EOL . $this->_t(1) . $tab . $this->_t(3) . implode(PHP_EOL . $this->_t(1) . $tab . $this->_t(3), $this->expertFieldModeling[$viewName_single][$item['name']]['get']), $_placeholder_for_field);
|
||||
}
|
||||
else
|
||||
{
|
||||
$fix .= PHP_EOL . $this->_t(1) . $tab . $taber . $this->_t(3) . "//" . $this->setLine(__LINE__) . " decode " . $item['name'];
|
||||
}
|
||||
$fix .= PHP_EOL . $this->_t(1) . $tab . $taber . $this->_t(3) . "\$item->" . $item['name'] . " = " . $decode . "(\$item->" . $item['name'] . ");";
|
||||
$taber = '';
|
||||
if ($item['method'] == 3)
|
||||
{
|
||||
$taber = $this->_t(1);
|
||||
$fix .= PHP_EOL . $this->_t(1) . $tab . $this->_t(3) . "if (\$basickey && !is_numeric(\$item->" . $item['name'] . ") && \$item->" . $item['name'] . " === base64_encode(base64_decode(\$item->" . $item['name'] . ", true)))";
|
||||
$fix .= PHP_EOL . $this->_t(1) . $tab . $this->_t(3) . "{";
|
||||
}
|
||||
elseif ($item['method'] == 5)
|
||||
{
|
||||
$taber = $this->_t(1);
|
||||
$fix .= PHP_EOL . $this->_t(1) . $tab . $this->_t(3) . "if (\$mediumkey && !is_numeric(\$item->" . $item['name'] . ") && \$item->" . $item['name'] . " === base64_encode(base64_decode(\$item->" . $item['name'] . ", true)))";
|
||||
$fix .= PHP_EOL . $this->_t(1) . $tab . $this->_t(3) . "{";
|
||||
}
|
||||
elseif ($item['method'] == 4)
|
||||
{
|
||||
$taber = $this->_t(1);
|
||||
$fix .= PHP_EOL . $this->_t(1) . $tab . $this->_t(3) . "if (\$whmcskey && !is_numeric(\$item->" . $item['name'] . ") && \$item->" . $item['name'] . " === base64_encode(base64_decode(\$item->" . $item['name'] . ", true)))";
|
||||
$fix .= PHP_EOL . $this->_t(1) . $tab . $this->_t(3) . "{";
|
||||
}
|
||||
if ($item['method'] == 3 || $item['method'] == 4 || $item['method'] == 5)
|
||||
{
|
||||
$fix .= PHP_EOL . $this->_t(1) . $tab . $this->_t(4) . "//" . $this->setLine(__LINE__) . " decrypt " . $item['name'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$fix .= PHP_EOL . $this->_t(1) . $tab . $taber . $this->_t(3) . "//" . $this->setLine(__LINE__) . " decode " . $item['name'];
|
||||
}
|
||||
$fix .= PHP_EOL . $this->_t(1) . $tab . $taber . $this->_t(3) . "\$item->" . $item['name'] . " = " . $decode . "(\$item->" . $item['name'] . ");";
|
||||
|
||||
if ($item['method'] == 3 || $item['method'] == 4 || $item['method'] == 5)
|
||||
{
|
||||
$fix .= PHP_EOL . $this->_t(1) . $tab . $this->_t(3) . "}";
|
||||
if ($item['method'] == 3 || $item['method'] == 4 || $item['method'] == 5)
|
||||
{
|
||||
$fix .= PHP_EOL . $this->_t(1) . $tab . $this->_t(3) . "}";
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -834,13 +834,13 @@ abstract class ComponentbuilderHelper
|
||||
*/
|
||||
public static function getContributorDetails($filename, $type = 'snippet')
|
||||
{
|
||||
// start loading he contributor details
|
||||
// start loading the contributor details
|
||||
$contributor = array();
|
||||
// get the path & content
|
||||
switch ($type)
|
||||
{
|
||||
case 'snippet':
|
||||
$path = $snippetPath.$filename;
|
||||
$path = self::$snippetPath.$filename;
|
||||
// get the file if available
|
||||
$content = self::getFileContents($path);
|
||||
if (self::checkJson($content))
|
||||
@ -2043,17 +2043,17 @@ abstract class ComponentbuilderHelper
|
||||
|
||||
|
||||
/**
|
||||
* the Butler
|
||||
* the Butler
|
||||
**/
|
||||
public static $session = array();
|
||||
|
||||
/**
|
||||
* the Butler Assistant
|
||||
* the Butler Assistant
|
||||
**/
|
||||
protected static $localSession = array();
|
||||
|
||||
/**
|
||||
* start a session if not already set, and load with data
|
||||
* start a session if not already set, and load with data
|
||||
**/
|
||||
public static function loadSession()
|
||||
{
|
||||
@ -2066,7 +2066,7 @@ abstract class ComponentbuilderHelper
|
||||
}
|
||||
|
||||
/**
|
||||
* give Session more to keep
|
||||
* give Session more to keep
|
||||
**/
|
||||
public static function set($key, $value)
|
||||
{
|
||||
@ -2081,7 +2081,7 @@ abstract class ComponentbuilderHelper
|
||||
}
|
||||
|
||||
/**
|
||||
* get info from Session
|
||||
* get info from Session
|
||||
**/
|
||||
public static function get($key, $default = null)
|
||||
{
|
||||
@ -4304,12 +4304,12 @@ abstract class ComponentbuilderHelper
|
||||
}
|
||||
|
||||
/**
|
||||
* Composer Switch
|
||||
* Composer Switch
|
||||
**/
|
||||
protected static $composer = array();
|
||||
|
||||
/**
|
||||
* Load the Composer Vendors
|
||||
* Load the Composer Vendors
|
||||
**/
|
||||
public static function composerAutoload($target)
|
||||
{
|
||||
@ -4330,7 +4330,7 @@ abstract class ComponentbuilderHelper
|
||||
|
||||
|
||||
/**
|
||||
* Load the Composer Vendor phpseclib
|
||||
* Load the Composer Vendor phpseclib
|
||||
**/
|
||||
protected static function composephpseclib()
|
||||
{
|
||||
@ -4338,6 +4338,8 @@ abstract class ComponentbuilderHelper
|
||||
require_once JPATH_SITE . '/libraries/phpseclib/vendor/autoload.php';
|
||||
// do not load again
|
||||
self::$composer['phpseclib'] = true;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@ -6101,7 +6103,15 @@ abstract class ComponentbuilderHelper
|
||||
{
|
||||
$query->from($db->quoteName('#_'.$main.'_'.$table));
|
||||
}
|
||||
$query->where($db->quoteName($whereString) . ' '.$operator.' (' . implode(',',$where) . ')');
|
||||
// add strings to array search
|
||||
if ('IN_STRINGS' === $operator || 'NOT IN_STRINGS' === $operator)
|
||||
{
|
||||
$query->where($db->quoteName($whereString) . ' ' . str_replace('_STRINGS', '', $operator) . ' ("' . implode('","',$where) . '")');
|
||||
}
|
||||
else
|
||||
{
|
||||
$query->where($db->quoteName($whereString) . ' ' . $operator . ' (' . implode(',',$where) . ')');
|
||||
}
|
||||
$db->setQuery($query);
|
||||
$db->execute();
|
||||
if ($db->getNumRows())
|
||||
|
@ -4953,14 +4953,14 @@ COM_COMPONENTBUILDER_FIELD_INDEXES_LABEL="Indexes Type"
|
||||
COM_COMPONENTBUILDER_FIELD_INITIATOR_ON_GET_MODEL="Initiator On Get Model"
|
||||
COM_COMPONENTBUILDER_FIELD_INITIATOR_ON_GET_MODEL_DESCRIPTION="The initiator to on get model this field. If JCB finds that there is more then one field with the same initiator code in one view it will only load it once. You could also leave this blank if you already have the on get model initiator set in another field of the same admin_view."
|
||||
COM_COMPONENTBUILDER_FIELD_INITIATOR_ON_GET_MODEL_HINT="// Get the medium decryption.
|
||||
$mediumkey = [[[Component]]]Helper::getCryptKey('medium');
|
||||
$mediumkey = ComponentbuilderHelper::getCryptKey('medium');
|
||||
// Get the encryption object.
|
||||
$medium = new FOFEncryptAes($mediumkey);"
|
||||
COM_COMPONENTBUILDER_FIELD_INITIATOR_ON_GET_MODEL_LABEL="Initiator<br /><small>on get model</small>"
|
||||
COM_COMPONENTBUILDER_FIELD_INITIATOR_ON_SAVE_MODEL="Initiator On Save Model"
|
||||
COM_COMPONENTBUILDER_FIELD_INITIATOR_ON_SAVE_MODEL_DESCRIPTION="The initiator to on save model this field. If JCB finds that there is more then one field with the same initiator code in one view it will only load it once. You could also leave this blank if you already have the on save model initiator set in another field of the same admin_view."
|
||||
COM_COMPONENTBUILDER_FIELD_INITIATOR_ON_SAVE_MODEL_HINT="// Get the medium encryption.
|
||||
$mediumkey = [[[Component]]]Helper::getCryptKey('medium');
|
||||
$mediumkey = ComponentbuilderHelper::getCryptKey('medium');
|
||||
// Get the encryption object.
|
||||
$medium = new FOFEncryptAes($mediumkey);"
|
||||
COM_COMPONENTBUILDER_FIELD_INITIATOR_ON_SAVE_MODEL_LABEL="Initiator<br /><small>on save model</small>"
|
||||
|
@ -84,6 +84,11 @@ else
|
||||
- <?php echo $this->escape($item->component_version); ?>
|
||||
</div>
|
||||
<?php
|
||||
// always make sure the $this->return_here is set
|
||||
if (!isset($this->return_here))
|
||||
{
|
||||
$this->return_here = urlencode(base64_encode((string) JUri::getInstance()));
|
||||
}
|
||||
// setup the buttons
|
||||
if (!isset($_buttons) || !ComponentbuilderHelper::checkArray($_buttons))
|
||||
{
|
||||
|
@ -69,10 +69,54 @@ class ComponentbuilderModelAdmin_fields_relations extends JModelAdmin
|
||||
return JTable::getInstance($type, $prefix, $config);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* get VDM internal session key
|
||||
*
|
||||
* @return string the session key
|
||||
*
|
||||
*/
|
||||
public function getVDM()
|
||||
{
|
||||
if (!isset($this->vastDevMod))
|
||||
{
|
||||
$_id = 0; // new item probably (since it was not set in the getItem method)
|
||||
|
||||
if (empty($_id))
|
||||
{
|
||||
$id = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
$id = $_id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('admin_fields_relations__'.$id))
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
else
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = ComponentbuilderHelper::randomkey(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'admin_fields_relations__'.$id);
|
||||
ComponentbuilderHelper::set('admin_fields_relations__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ComponentbuilderHelper::checkObject($item) && isset($item->guid)
|
||||
&& method_exists('ComponentbuilderHelper', 'validGUID')
|
||||
&& ComponentbuilderHelper::validGUID($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
return $this->vastDevMod;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Method to get a single record.
|
||||
@ -135,6 +179,13 @@ class ComponentbuilderModelAdmin_fields_relations extends JModelAdmin
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ComponentbuilderHelper::checkObject($item) && isset($item->guid)
|
||||
&& method_exists('ComponentbuilderHelper', 'validGUID')
|
||||
&& ComponentbuilderHelper::validGUID($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($item->id))
|
||||
|
@ -215,14 +215,51 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
|
||||
return JTable::getInstance($type, $prefix, $config);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* get VDM session key
|
||||
* get VDM internal session key
|
||||
*
|
||||
* @return string the session key
|
||||
*
|
||||
*/
|
||||
public function getVDM()
|
||||
{
|
||||
if (!isset($this->vastDevMod))
|
||||
{
|
||||
$_id = 0; // new item probably (since it was not set in the getItem method)
|
||||
|
||||
if (empty($_id))
|
||||
{
|
||||
$id = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
$id = $_id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('admin_view__'.$id))
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
else
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = ComponentbuilderHelper::randomkey(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'admin_view__'.$id);
|
||||
ComponentbuilderHelper::set('admin_view__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ComponentbuilderHelper::checkObject($item) && isset($item->guid)
|
||||
&& method_exists('ComponentbuilderHelper', 'validGUID')
|
||||
&& ComponentbuilderHelper::validGUID($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
return $this->vastDevMod;
|
||||
}
|
||||
|
||||
@ -540,6 +577,7 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
|
||||
$item->ajax_input = $ajax_input->toArray();
|
||||
}
|
||||
|
||||
|
||||
if (empty($item->id))
|
||||
{
|
||||
$id = 0;
|
||||
@ -563,8 +601,14 @@ class ComponentbuilderModelAdmin_view extends JModelAdmin
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ComponentbuilderHelper::checkObject($item) && isset($item->guid)
|
||||
&& method_exists('ComponentbuilderHelper', 'validGUID')
|
||||
&& ComponentbuilderHelper::validGUID($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
|
||||
// update the fields
|
||||
$objectUpdate = new stdClass();
|
||||
$objectUpdate->id = (int) $item->id;
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -72,14 +72,51 @@ class ComponentbuilderModelClass_extends extends JModelAdmin
|
||||
return JTable::getInstance($type, $prefix, $config);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* get VDM session key
|
||||
* get VDM internal session key
|
||||
*
|
||||
* @return string the session key
|
||||
*
|
||||
*/
|
||||
public function getVDM()
|
||||
{
|
||||
if (!isset($this->vastDevMod))
|
||||
{
|
||||
$_id = 0; // new item probably (since it was not set in the getItem method)
|
||||
|
||||
if (empty($_id))
|
||||
{
|
||||
$id = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
$id = $_id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('class_extends__'.$id))
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
else
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = ComponentbuilderHelper::randomkey(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'class_extends__'.$id);
|
||||
ComponentbuilderHelper::set('class_extends__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ComponentbuilderHelper::checkObject($item) && isset($item->guid)
|
||||
&& method_exists('ComponentbuilderHelper', 'validGUID')
|
||||
&& ComponentbuilderHelper::validGUID($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
return $this->vastDevMod;
|
||||
}
|
||||
|
||||
@ -149,6 +186,13 @@ class ComponentbuilderModelClass_extends extends JModelAdmin
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ComponentbuilderHelper::checkObject($item) && isset($item->guid)
|
||||
&& method_exists('ComponentbuilderHelper', 'validGUID')
|
||||
&& ComponentbuilderHelper::validGUID($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($item->id))
|
||||
|
@ -75,14 +75,51 @@ class ComponentbuilderModelClass_method extends JModelAdmin
|
||||
return JTable::getInstance($type, $prefix, $config);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* get VDM session key
|
||||
* get VDM internal session key
|
||||
*
|
||||
* @return string the session key
|
||||
*
|
||||
*/
|
||||
public function getVDM()
|
||||
{
|
||||
if (!isset($this->vastDevMod))
|
||||
{
|
||||
$_id = 0; // new item probably (since it was not set in the getItem method)
|
||||
|
||||
if (empty($_id))
|
||||
{
|
||||
$id = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
$id = $_id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('class_method__'.$id))
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
else
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = ComponentbuilderHelper::randomkey(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'class_method__'.$id);
|
||||
ComponentbuilderHelper::set('class_method__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ComponentbuilderHelper::checkObject($item) && isset($item->guid)
|
||||
&& method_exists('ComponentbuilderHelper', 'validGUID')
|
||||
&& ComponentbuilderHelper::validGUID($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
return $this->vastDevMod;
|
||||
}
|
||||
|
||||
@ -158,6 +195,13 @@ class ComponentbuilderModelClass_method extends JModelAdmin
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ComponentbuilderHelper::checkObject($item) && isset($item->guid)
|
||||
&& method_exists('ComponentbuilderHelper', 'validGUID')
|
||||
&& ComponentbuilderHelper::validGUID($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($item->id))
|
||||
|
@ -72,14 +72,51 @@ class ComponentbuilderModelClass_property extends JModelAdmin
|
||||
return JTable::getInstance($type, $prefix, $config);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* get VDM session key
|
||||
* get VDM internal session key
|
||||
*
|
||||
* @return string the session key
|
||||
*
|
||||
*/
|
||||
public function getVDM()
|
||||
{
|
||||
if (!isset($this->vastDevMod))
|
||||
{
|
||||
$_id = 0; // new item probably (since it was not set in the getItem method)
|
||||
|
||||
if (empty($_id))
|
||||
{
|
||||
$id = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
$id = $_id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('class_property__'.$id))
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
else
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = ComponentbuilderHelper::randomkey(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'class_property__'.$id);
|
||||
ComponentbuilderHelper::set('class_property__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ComponentbuilderHelper::checkObject($item) && isset($item->guid)
|
||||
&& method_exists('ComponentbuilderHelper', 'validGUID')
|
||||
&& ComponentbuilderHelper::validGUID($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
return $this->vastDevMod;
|
||||
}
|
||||
|
||||
@ -149,6 +186,13 @@ class ComponentbuilderModelClass_property extends JModelAdmin
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ComponentbuilderHelper::checkObject($item) && isset($item->guid)
|
||||
&& method_exists('ComponentbuilderHelper', 'validGUID')
|
||||
&& ComponentbuilderHelper::validGUID($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($item->id))
|
||||
|
@ -70,10 +70,54 @@ class ComponentbuilderModelComponent_dashboard extends JModelAdmin
|
||||
return JTable::getInstance($type, $prefix, $config);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* get VDM internal session key
|
||||
*
|
||||
* @return string the session key
|
||||
*
|
||||
*/
|
||||
public function getVDM()
|
||||
{
|
||||
if (!isset($this->vastDevMod))
|
||||
{
|
||||
$_id = 0; // new item probably (since it was not set in the getItem method)
|
||||
|
||||
if (empty($_id))
|
||||
{
|
||||
$id = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
$id = $_id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('component_dashboard__'.$id))
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
else
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = ComponentbuilderHelper::randomkey(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'component_dashboard__'.$id);
|
||||
ComponentbuilderHelper::set('component_dashboard__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ComponentbuilderHelper::checkObject($item) && isset($item->guid)
|
||||
&& method_exists('ComponentbuilderHelper', 'validGUID')
|
||||
&& ComponentbuilderHelper::validGUID($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
return $this->vastDevMod;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Method to get a single record.
|
||||
@ -142,6 +186,13 @@ class ComponentbuilderModelComponent_dashboard extends JModelAdmin
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ComponentbuilderHelper::checkObject($item) && isset($item->guid)
|
||||
&& method_exists('ComponentbuilderHelper', 'validGUID')
|
||||
&& ComponentbuilderHelper::validGUID($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
// update the fields
|
||||
$objectUpdate = new stdClass();
|
||||
|
@ -134,14 +134,51 @@ class ComponentbuilderModelCustom_admin_view extends JModelAdmin
|
||||
return JTable::getInstance($type, $prefix, $config);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* get VDM session key
|
||||
* get VDM internal session key
|
||||
*
|
||||
* @return string the session key
|
||||
*
|
||||
*/
|
||||
public function getVDM()
|
||||
{
|
||||
if (!isset($this->vastDevMod))
|
||||
{
|
||||
$_id = 0; // new item probably (since it was not set in the getItem method)
|
||||
|
||||
if (empty($_id))
|
||||
{
|
||||
$id = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
$id = $_id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('custom_admin_view__'.$id))
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
else
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = ComponentbuilderHelper::randomkey(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'custom_admin_view__'.$id);
|
||||
ComponentbuilderHelper::set('custom_admin_view__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ComponentbuilderHelper::checkObject($item) && isset($item->guid)
|
||||
&& method_exists('ComponentbuilderHelper', 'validGUID')
|
||||
&& ComponentbuilderHelper::validGUID($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
return $this->vastDevMod;
|
||||
}
|
||||
|
||||
@ -303,6 +340,13 @@ class ComponentbuilderModelCustom_admin_view extends JModelAdmin
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ComponentbuilderHelper::checkObject($item) && isset($item->guid)
|
||||
&& method_exists('ComponentbuilderHelper', 'validGUID')
|
||||
&& ComponentbuilderHelper::validGUID($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
|
||||
// check what type of custom_button array we have here (should be subform... but just incase)
|
||||
|
@ -87,14 +87,51 @@ class ComponentbuilderModelCustom_code extends JModelAdmin
|
||||
return JTable::getInstance($type, $prefix, $config);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* get VDM session key
|
||||
* get VDM internal session key
|
||||
*
|
||||
* @return string the session key
|
||||
*
|
||||
*/
|
||||
public function getVDM()
|
||||
{
|
||||
if (!isset($this->vastDevMod))
|
||||
{
|
||||
$_id = 0; // new item probably (since it was not set in the getItem method)
|
||||
|
||||
if (empty($_id))
|
||||
{
|
||||
$id = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
$id = $_id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('custom_code__'.$id))
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
else
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = ComponentbuilderHelper::randomkey(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'custom_code__'.$id);
|
||||
ComponentbuilderHelper::set('custom_code__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ComponentbuilderHelper::checkObject($item) && isset($item->guid)
|
||||
&& method_exists('ComponentbuilderHelper', 'validGUID')
|
||||
&& ComponentbuilderHelper::validGUID($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
return $this->vastDevMod;
|
||||
}
|
||||
|
||||
@ -158,6 +195,13 @@ class ComponentbuilderModelCustom_code extends JModelAdmin
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ComponentbuilderHelper::checkObject($item) && isset($item->guid)
|
||||
&& method_exists('ComponentbuilderHelper', 'validGUID')
|
||||
&& ComponentbuilderHelper::validGUID($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($item->id))
|
||||
|
@ -127,14 +127,51 @@ class ComponentbuilderModelDynamic_get extends JModelAdmin
|
||||
return JTable::getInstance($type, $prefix, $config);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* get VDM session key
|
||||
* get VDM internal session key
|
||||
*
|
||||
* @return string the session key
|
||||
*
|
||||
*/
|
||||
public function getVDM()
|
||||
{
|
||||
if (!isset($this->vastDevMod))
|
||||
{
|
||||
$_id = 0; // new item probably (since it was not set in the getItem method)
|
||||
|
||||
if (empty($_id))
|
||||
{
|
||||
$id = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
$id = $_id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('dynamic_get__'.$id))
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
else
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = ComponentbuilderHelper::randomkey(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'dynamic_get__'.$id);
|
||||
ComponentbuilderHelper::set('dynamic_get__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ComponentbuilderHelper::checkObject($item) && isset($item->guid)
|
||||
&& method_exists('ComponentbuilderHelper', 'validGUID')
|
||||
&& ComponentbuilderHelper::validGUID($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
return $this->vastDevMod;
|
||||
}
|
||||
|
||||
@ -302,6 +339,13 @@ class ComponentbuilderModelDynamic_get extends JModelAdmin
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ComponentbuilderHelper::checkObject($item) && isset($item->guid)
|
||||
&& method_exists('ComponentbuilderHelper', 'validGUID')
|
||||
&& ComponentbuilderHelper::validGUID($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
|
||||
// update the fields
|
||||
|
@ -118,14 +118,51 @@ class ComponentbuilderModelField extends JModelAdmin
|
||||
return JTable::getInstance($type, $prefix, $config);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* get VDM session key
|
||||
* get VDM internal session key
|
||||
*
|
||||
* @return string the session key
|
||||
*
|
||||
*/
|
||||
public function getVDM()
|
||||
{
|
||||
if (!isset($this->vastDevMod))
|
||||
{
|
||||
$_id = 0; // new item probably (since it was not set in the getItem method)
|
||||
|
||||
if (empty($_id))
|
||||
{
|
||||
$id = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
$id = $_id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('field__'.$id))
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
else
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = ComponentbuilderHelper::randomkey(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'field__'.$id);
|
||||
ComponentbuilderHelper::set('field__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ComponentbuilderHelper::checkObject($item) && isset($item->guid)
|
||||
&& method_exists('ComponentbuilderHelper', 'validGUID')
|
||||
&& ComponentbuilderHelper::validGUID($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
return $this->vastDevMod;
|
||||
}
|
||||
|
||||
@ -237,6 +274,13 @@ class ComponentbuilderModelField extends JModelAdmin
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ComponentbuilderHelper::checkObject($item) && isset($item->guid)
|
||||
&& method_exists('ComponentbuilderHelper', 'validGUID')
|
||||
&& ComponentbuilderHelper::validGUID($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($item->id))
|
||||
|
@ -93,14 +93,51 @@ class ComponentbuilderModelFieldtype extends JModelAdmin
|
||||
return JTable::getInstance($type, $prefix, $config);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* get VDM session key
|
||||
* get VDM internal session key
|
||||
*
|
||||
* @return string the session key
|
||||
*
|
||||
*/
|
||||
public function getVDM()
|
||||
{
|
||||
if (!isset($this->vastDevMod))
|
||||
{
|
||||
$_id = 0; // new item probably (since it was not set in the getItem method)
|
||||
|
||||
if (empty($_id))
|
||||
{
|
||||
$id = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
$id = $_id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('fieldtype__'.$id))
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
else
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = ComponentbuilderHelper::randomkey(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'fieldtype__'.$id);
|
||||
ComponentbuilderHelper::set('fieldtype__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ComponentbuilderHelper::checkObject($item) && isset($item->guid)
|
||||
&& method_exists('ComponentbuilderHelper', 'validGUID')
|
||||
&& ComponentbuilderHelper::validGUID($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
return $this->vastDevMod;
|
||||
}
|
||||
|
||||
@ -166,6 +203,13 @@ class ComponentbuilderModelFieldtype extends JModelAdmin
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ComponentbuilderHelper::checkObject($item) && isset($item->guid)
|
||||
&& method_exists('ComponentbuilderHelper', 'validGUID')
|
||||
&& ComponentbuilderHelper::validGUID($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
// check what type of properties array we have here (should be subform... but just incase)
|
||||
// This could happen due to huge data sets
|
||||
|
@ -345,7 +345,7 @@ function usedin(functioName, ide) {
|
||||
function usedin_server(functioName, ide, target){
|
||||
var getUrl = "index.php?option=com_componentbuilder&task=ajax.usedin&format=json";
|
||||
if(token.length > 0){
|
||||
var request = 'token='+token+'&functioName='+functioName+'&id='+ide+'&target='+target+'&raw=true&return_here='+return_here;
|
||||
var request = token+'=1&functioName='+functioName+'&id='+ide+'&target='+target+'&raw=true&return_here='+return_here;
|
||||
}
|
||||
return jQuery.ajax({
|
||||
type: 'GET',
|
||||
|
@ -855,33 +855,42 @@ function getFieldOptions(fieldtype, db){
|
||||
jQuery('#jform_datatype').val(result.database.datatype);
|
||||
jQuery('#jform_datatype').trigger("liszt:updated");
|
||||
jQuery('#jform_datatype').trigger("change");
|
||||
// be sure to remove from no required
|
||||
updateFieldRequired('datatype', 0);
|
||||
// update datalenght
|
||||
jQuery('#jform_datalenght').val(result.database.datalenght);
|
||||
jQuery('#jform_datalenght').trigger("liszt:updated");
|
||||
jQuery('#jform_datalenght').trigger("change");
|
||||
// be sure to remove from no required
|
||||
updateFieldRequired('datalenght', 0);
|
||||
// load the datalenght_other if needed
|
||||
if ('Other' == result.database.datalenght){
|
||||
if ('Other' === result.database.datalenght){
|
||||
jQuery('#jform_datalenght_other').val(result.database.datalenght_other);
|
||||
// be sure to remove from no required
|
||||
updateFieldRequired('datalenght_other', 0);
|
||||
}
|
||||
// update datadefault
|
||||
jQuery('#jform_datadefault').val(result.database.datadefault);
|
||||
jQuery('#jform_datadefault').trigger("liszt:updated");
|
||||
jQuery('#jform_datadefault').trigger("change");
|
||||
// load the datadefault_other if needed
|
||||
if ('Other' == result.database.datadefault){
|
||||
if ('Other' === result.database.datadefault){
|
||||
jQuery('#jform_datadefault_other').val(result.database.datadefault_other);
|
||||
// be sure to remove from no required
|
||||
updateFieldRequired('datadefault_other', 0);
|
||||
}
|
||||
// update indexes
|
||||
jQuery('#jform_indexes').val(result.database.indexes);
|
||||
jQuery('#jform_indexes').trigger("liszt:updated");
|
||||
jQuery('#jform_indexes').trigger("change");
|
||||
// be sure to remove from no required
|
||||
updateFieldRequired('indexes', 0);
|
||||
// update store
|
||||
jQuery('#jform_store').val(result.database.store);
|
||||
jQuery('#jform_store').trigger("liszt:updated");
|
||||
jQuery('#jform_store').trigger("change");
|
||||
// update null_switch (hmmm)
|
||||
// jQuery('#jform_null_switch').val(result.database.null_switch);
|
||||
// jQuery('#jform_null_switch').trigger("change");
|
||||
// be sure to remove from no required
|
||||
updateFieldRequired('store', 0);
|
||||
}
|
||||
}
|
||||
})
|
||||
|
@ -110,7 +110,7 @@ function placedin(placeholder, ide) {
|
||||
function placedin_server(placeholder, ide, target){
|
||||
var getUrl = "index.php?option=com_componentbuilder&task=ajax.placedin&format=json";
|
||||
if(token.length > 0){
|
||||
var request = 'token='+token+'&placeholder='+placeholder+'&id='+ide+'&target='+target+'&raw=true&return_here='+return_here;
|
||||
var request = token+'=1&placeholder='+placeholder+'&id='+ide+'&target='+target+'&raw=true&return_here='+return_here;
|
||||
}
|
||||
return jQuery.ajax({
|
||||
type: 'GET',
|
||||
|
@ -238,14 +238,51 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin
|
||||
return JTable::getInstance($type, $prefix, $config);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* get VDM session key
|
||||
* get VDM internal session key
|
||||
*
|
||||
* @return string the session key
|
||||
*
|
||||
*/
|
||||
public function getVDM()
|
||||
{
|
||||
if (!isset($this->vastDevMod))
|
||||
{
|
||||
$_id = 0; // new item probably (since it was not set in the getItem method)
|
||||
|
||||
if (empty($_id))
|
||||
{
|
||||
$id = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
$id = $_id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('joomla_component__'.$id))
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
else
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = ComponentbuilderHelper::randomkey(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'joomla_component__'.$id);
|
||||
ComponentbuilderHelper::set('joomla_component__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ComponentbuilderHelper::checkObject($item) && isset($item->guid)
|
||||
&& method_exists('ComponentbuilderHelper', 'validGUID')
|
||||
&& ComponentbuilderHelper::validGUID($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
return $this->vastDevMod;
|
||||
}
|
||||
|
||||
@ -448,6 +485,13 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ComponentbuilderHelper::checkObject($item) && isset($item->guid)
|
||||
&& method_exists('ComponentbuilderHelper', 'validGUID')
|
||||
&& ComponentbuilderHelper::validGUID($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
|
||||
// update the fields
|
||||
|
@ -134,14 +134,51 @@ class ComponentbuilderModelJoomla_plugin extends JModelAdmin
|
||||
return JTable::getInstance($type, $prefix, $config);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* get VDM session key
|
||||
* get VDM internal session key
|
||||
*
|
||||
* @return string the session key
|
||||
*
|
||||
*/
|
||||
public function getVDM()
|
||||
{
|
||||
if (!isset($this->vastDevMod))
|
||||
{
|
||||
$_id = 0; // new item probably (since it was not set in the getItem method)
|
||||
|
||||
if (empty($_id))
|
||||
{
|
||||
$id = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
$id = $_id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('joomla_plugin__'.$id))
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
else
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = ComponentbuilderHelper::randomkey(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'joomla_plugin__'.$id);
|
||||
ComponentbuilderHelper::set('joomla_plugin__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ComponentbuilderHelper::checkObject($item) && isset($item->guid)
|
||||
&& method_exists('ComponentbuilderHelper', 'validGUID')
|
||||
&& ComponentbuilderHelper::validGUID($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
return $this->vastDevMod;
|
||||
}
|
||||
|
||||
@ -295,6 +332,13 @@ class ComponentbuilderModelJoomla_plugin extends JModelAdmin
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ComponentbuilderHelper::checkObject($item) && isset($item->guid)
|
||||
&& method_exists('ComponentbuilderHelper', 'validGUID')
|
||||
&& ComponentbuilderHelper::validGUID($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($item->id))
|
||||
|
@ -67,10 +67,54 @@ class ComponentbuilderModelLanguage_translation extends JModelAdmin
|
||||
return JTable::getInstance($type, $prefix, $config);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* get VDM internal session key
|
||||
*
|
||||
* @return string the session key
|
||||
*
|
||||
*/
|
||||
public function getVDM()
|
||||
{
|
||||
if (!isset($this->vastDevMod))
|
||||
{
|
||||
$_id = 0; // new item probably (since it was not set in the getItem method)
|
||||
|
||||
if (empty($_id))
|
||||
{
|
||||
$id = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
$id = $_id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('language_translation__'.$id))
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
else
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = ComponentbuilderHelper::randomkey(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'language_translation__'.$id);
|
||||
ComponentbuilderHelper::set('language_translation__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ComponentbuilderHelper::checkObject($item) && isset($item->guid)
|
||||
&& method_exists('ComponentbuilderHelper', 'validGUID')
|
||||
&& ComponentbuilderHelper::validGUID($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
return $this->vastDevMod;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Method to get a single record.
|
||||
@ -139,6 +183,13 @@ class ComponentbuilderModelLanguage_translation extends JModelAdmin
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ComponentbuilderHelper::checkObject($item) && isset($item->guid)
|
||||
&& method_exists('ComponentbuilderHelper', 'validGUID')
|
||||
&& ComponentbuilderHelper::validGUID($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($item->id))
|
||||
|
@ -91,14 +91,51 @@ class ComponentbuilderModelLayout extends JModelAdmin
|
||||
return JTable::getInstance($type, $prefix, $config);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* get VDM session key
|
||||
* get VDM internal session key
|
||||
*
|
||||
* @return string the session key
|
||||
*
|
||||
*/
|
||||
public function getVDM()
|
||||
{
|
||||
if (!isset($this->vastDevMod))
|
||||
{
|
||||
$_id = 0; // new item probably (since it was not set in the getItem method)
|
||||
|
||||
if (empty($_id))
|
||||
{
|
||||
$id = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
$id = $_id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('layout__'.$id))
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
else
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = ComponentbuilderHelper::randomkey(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'layout__'.$id);
|
||||
ComponentbuilderHelper::set('layout__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ComponentbuilderHelper::checkObject($item) && isset($item->guid)
|
||||
&& method_exists('ComponentbuilderHelper', 'validGUID')
|
||||
&& ComponentbuilderHelper::validGUID($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
return $this->vastDevMod;
|
||||
}
|
||||
|
||||
@ -176,6 +213,13 @@ class ComponentbuilderModelLayout extends JModelAdmin
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ComponentbuilderHelper::checkObject($item) && isset($item->guid)
|
||||
&& method_exists('ComponentbuilderHelper', 'validGUID')
|
||||
&& ComponentbuilderHelper::validGUID($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($item->id))
|
||||
|
@ -105,14 +105,51 @@ class ComponentbuilderModelLibrary extends JModelAdmin
|
||||
return JTable::getInstance($type, $prefix, $config);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* get VDM session key
|
||||
* get VDM internal session key
|
||||
*
|
||||
* @return string the session key
|
||||
*
|
||||
*/
|
||||
public function getVDM()
|
||||
{
|
||||
if (!isset($this->vastDevMod))
|
||||
{
|
||||
$_id = 0; // new item probably (since it was not set in the getItem method)
|
||||
|
||||
if (empty($_id))
|
||||
{
|
||||
$id = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
$id = $_id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('library__'.$id))
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
else
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = ComponentbuilderHelper::randomkey(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'library__'.$id);
|
||||
ComponentbuilderHelper::set('library__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ComponentbuilderHelper::checkObject($item) && isset($item->guid)
|
||||
&& method_exists('ComponentbuilderHelper', 'validGUID')
|
||||
&& ComponentbuilderHelper::validGUID($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
return $this->vastDevMod;
|
||||
}
|
||||
|
||||
@ -192,6 +229,13 @@ class ComponentbuilderModelLibrary extends JModelAdmin
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ComponentbuilderHelper::checkObject($item) && isset($item->guid)
|
||||
&& method_exists('ComponentbuilderHelper', 'validGUID')
|
||||
&& ComponentbuilderHelper::validGUID($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($item->id))
|
||||
|
@ -71,14 +71,51 @@ class ComponentbuilderModelPlaceholder extends JModelAdmin
|
||||
return JTable::getInstance($type, $prefix, $config);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* get VDM session key
|
||||
* get VDM internal session key
|
||||
*
|
||||
* @return string the session key
|
||||
*
|
||||
*/
|
||||
public function getVDM()
|
||||
{
|
||||
if (!isset($this->vastDevMod))
|
||||
{
|
||||
$_id = 0; // new item probably (since it was not set in the getItem method)
|
||||
|
||||
if (empty($_id))
|
||||
{
|
||||
$id = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
$id = $_id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('placeholder__'.$id))
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
else
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = ComponentbuilderHelper::randomkey(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'placeholder__'.$id);
|
||||
ComponentbuilderHelper::set('placeholder__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ComponentbuilderHelper::checkObject($item) && isset($item->guid)
|
||||
&& method_exists('ComponentbuilderHelper', 'validGUID')
|
||||
&& ComponentbuilderHelper::validGUID($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
return $this->vastDevMod;
|
||||
}
|
||||
|
||||
@ -142,6 +179,13 @@ class ComponentbuilderModelPlaceholder extends JModelAdmin
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ComponentbuilderHelper::checkObject($item) && isset($item->guid)
|
||||
&& method_exists('ComponentbuilderHelper', 'validGUID')
|
||||
&& ComponentbuilderHelper::validGUID($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($item->id))
|
||||
|
@ -137,14 +137,51 @@ class ComponentbuilderModelSite_view extends JModelAdmin
|
||||
return JTable::getInstance($type, $prefix, $config);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* get VDM session key
|
||||
* get VDM internal session key
|
||||
*
|
||||
* @return string the session key
|
||||
*
|
||||
*/
|
||||
public function getVDM()
|
||||
{
|
||||
if (!isset($this->vastDevMod))
|
||||
{
|
||||
$_id = 0; // new item probably (since it was not set in the getItem method)
|
||||
|
||||
if (empty($_id))
|
||||
{
|
||||
$id = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
$id = $_id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('site_view__'.$id))
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
else
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = ComponentbuilderHelper::randomkey(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'site_view__'.$id);
|
||||
ComponentbuilderHelper::set('site_view__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ComponentbuilderHelper::checkObject($item) && isset($item->guid)
|
||||
&& method_exists('ComponentbuilderHelper', 'validGUID')
|
||||
&& ComponentbuilderHelper::validGUID($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
return $this->vastDevMod;
|
||||
}
|
||||
|
||||
@ -306,6 +343,13 @@ class ComponentbuilderModelSite_view extends JModelAdmin
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ComponentbuilderHelper::checkObject($item) && isset($item->guid)
|
||||
&& method_exists('ComponentbuilderHelper', 'validGUID')
|
||||
&& ComponentbuilderHelper::validGUID($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
|
||||
// update the fields
|
||||
|
@ -91,14 +91,51 @@ class ComponentbuilderModelTemplate extends JModelAdmin
|
||||
return JTable::getInstance($type, $prefix, $config);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* get VDM session key
|
||||
* get VDM internal session key
|
||||
*
|
||||
* @return string the session key
|
||||
*
|
||||
*/
|
||||
public function getVDM()
|
||||
{
|
||||
if (!isset($this->vastDevMod))
|
||||
{
|
||||
$_id = 0; // new item probably (since it was not set in the getItem method)
|
||||
|
||||
if (empty($_id))
|
||||
{
|
||||
$id = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
$id = $_id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('template__'.$id))
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
else
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = ComponentbuilderHelper::randomkey(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'template__'.$id);
|
||||
ComponentbuilderHelper::set('template__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ComponentbuilderHelper::checkObject($item) && isset($item->guid)
|
||||
&& method_exists('ComponentbuilderHelper', 'validGUID')
|
||||
&& ComponentbuilderHelper::validGUID($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
return $this->vastDevMod;
|
||||
}
|
||||
|
||||
@ -176,6 +213,13 @@ class ComponentbuilderModelTemplate extends JModelAdmin
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ComponentbuilderHelper::checkObject($item) && isset($item->guid)
|
||||
&& method_exists('ComponentbuilderHelper', 'validGUID')
|
||||
&& ComponentbuilderHelper::validGUID($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($item->id))
|
||||
|
@ -74,14 +74,51 @@ class ComponentbuilderModelValidation_rule extends JModelAdmin
|
||||
return JTable::getInstance($type, $prefix, $config);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* get VDM session key
|
||||
* get VDM internal session key
|
||||
*
|
||||
* @return string the session key
|
||||
*
|
||||
*/
|
||||
public function getVDM()
|
||||
{
|
||||
if (!isset($this->vastDevMod))
|
||||
{
|
||||
$_id = 0; // new item probably (since it was not set in the getItem method)
|
||||
|
||||
if (empty($_id))
|
||||
{
|
||||
$id = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
$id = $_id;
|
||||
}
|
||||
// set the id and view name to session
|
||||
if ($vdm = ComponentbuilderHelper::get('validation_rule__'.$id))
|
||||
{
|
||||
$this->vastDevMod = $vdm;
|
||||
}
|
||||
else
|
||||
{
|
||||
// set the vast development method key
|
||||
$this->vastDevMod = ComponentbuilderHelper::randomkey(50);
|
||||
ComponentbuilderHelper::set($this->vastDevMod, 'validation_rule__'.$id);
|
||||
ComponentbuilderHelper::set('validation_rule__'.$id, $this->vastDevMod);
|
||||
// set a return value if found
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ComponentbuilderHelper::checkObject($item) && isset($item->guid)
|
||||
&& method_exists('ComponentbuilderHelper', 'validGUID')
|
||||
&& ComponentbuilderHelper::validGUID($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
return $this->vastDevMod;
|
||||
}
|
||||
|
||||
@ -145,6 +182,13 @@ class ComponentbuilderModelValidation_rule extends JModelAdmin
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
|
||||
// set a GUID value if found
|
||||
if (isset($item) && ComponentbuilderHelper::checkObject($item) && isset($item->guid)
|
||||
&& method_exists('ComponentbuilderHelper', 'validGUID')
|
||||
&& ComponentbuilderHelper::validGUID($item->guid))
|
||||
{
|
||||
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($item->id))
|
||||
|
@ -73,6 +73,11 @@ $edit = "index.php?option=com_componentbuilder&view=joomla_components&task=jooml
|
||||
- <?php echo $this->escape($item->component_version); ?>
|
||||
</div>
|
||||
<?php
|
||||
// always make sure the $this->return_here is set
|
||||
if (!isset($this->return_here))
|
||||
{
|
||||
$this->return_here = urlencode(base64_encode((string) JUri::getInstance()));
|
||||
}
|
||||
// setup the buttons
|
||||
if (!isset($_buttons) || !ComponentbuilderHelper::checkArray($_buttons))
|
||||
{
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<extension type="component" version="3.2" method="upgrade">
|
||||
<name>COM_COMPONENTBUILDER</name>
|
||||
<creationDate>16th October, 2019</creationDate>
|
||||
<creationDate>8th November, 2019</creationDate>
|
||||
<author>Llewellyn van der Merwe</author>
|
||||
<authorEmail>llewellyn@joomlacomponentbuilder.com</authorEmail>
|
||||
<authorUrl>http://www.joomlacomponentbuilder.com</authorUrl>
|
||||
|
@ -834,13 +834,13 @@ abstract class ComponentbuilderHelper
|
||||
*/
|
||||
public static function getContributorDetails($filename, $type = 'snippet')
|
||||
{
|
||||
// start loading he contributor details
|
||||
// start loading the contributor details
|
||||
$contributor = array();
|
||||
// get the path & content
|
||||
switch ($type)
|
||||
{
|
||||
case 'snippet':
|
||||
$path = $snippetPath.$filename;
|
||||
$path = self::$snippetPath.$filename;
|
||||
// get the file if available
|
||||
$content = self::getFileContents($path);
|
||||
if (self::checkJson($content))
|
||||
@ -2043,17 +2043,17 @@ abstract class ComponentbuilderHelper
|
||||
|
||||
|
||||
/**
|
||||
* the Butler
|
||||
* the Butler
|
||||
**/
|
||||
public static $session = array();
|
||||
|
||||
/**
|
||||
* the Butler Assistant
|
||||
* the Butler Assistant
|
||||
**/
|
||||
protected static $localSession = array();
|
||||
|
||||
/**
|
||||
* start a session if not already set, and load with data
|
||||
* start a session if not already set, and load with data
|
||||
**/
|
||||
public static function loadSession()
|
||||
{
|
||||
@ -2066,7 +2066,7 @@ abstract class ComponentbuilderHelper
|
||||
}
|
||||
|
||||
/**
|
||||
* give Session more to keep
|
||||
* give Session more to keep
|
||||
**/
|
||||
public static function set($key, $value)
|
||||
{
|
||||
@ -2081,7 +2081,7 @@ abstract class ComponentbuilderHelper
|
||||
}
|
||||
|
||||
/**
|
||||
* get info from Session
|
||||
* get info from Session
|
||||
**/
|
||||
public static function get($key, $default = null)
|
||||
{
|
||||
@ -4304,12 +4304,12 @@ abstract class ComponentbuilderHelper
|
||||
}
|
||||
|
||||
/**
|
||||
* Composer Switch
|
||||
* Composer Switch
|
||||
**/
|
||||
protected static $composer = array();
|
||||
|
||||
/**
|
||||
* Load the Composer Vendors
|
||||
* Load the Composer Vendors
|
||||
**/
|
||||
public static function composerAutoload($target)
|
||||
{
|
||||
@ -4330,7 +4330,7 @@ abstract class ComponentbuilderHelper
|
||||
|
||||
|
||||
/**
|
||||
* Load the Composer Vendor phpseclib
|
||||
* Load the Composer Vendor phpseclib
|
||||
**/
|
||||
protected static function composephpseclib()
|
||||
{
|
||||
@ -4338,6 +4338,8 @@ abstract class ComponentbuilderHelper
|
||||
require_once JPATH_SITE . '/libraries/phpseclib/vendor/autoload.php';
|
||||
// do not load again
|
||||
self::$composer['phpseclib'] = true;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@ -6228,7 +6230,15 @@ abstract class ComponentbuilderHelper
|
||||
{
|
||||
$query->from($db->quoteName('#_'.$main.'_'.$table));
|
||||
}
|
||||
$query->where($db->quoteName($whereString) . ' '.$operator.' (' . implode(',',$where) . ')');
|
||||
// add strings to array search
|
||||
if ('IN_STRINGS' === $operator || 'NOT IN_STRINGS' === $operator)
|
||||
{
|
||||
$query->where($db->quoteName($whereString) . ' ' . str_replace('_STRINGS', '', $operator) . ' ("' . implode('","',$where) . '")');
|
||||
}
|
||||
else
|
||||
{
|
||||
$query->where($db->quoteName($whereString) . ' ' . $operator . ' (' . implode(',',$where) . ')');
|
||||
}
|
||||
$db->setQuery($query);
|
||||
$db->execute();
|
||||
if ($db->getNumRows())
|
||||
|
Loading…
Reference in New Issue
Block a user