Release of v3.2.5-alpha3

Fix Save failed issue in dynamicGet. #1148. Move all [TEXT, EDITOR, TEXTAREA] fields from [NOT NULL] to [NULL]. Add the DateHelper class and improve the date methods. Add simple SessionHelper class.
This commit is contained in:
Robot 2024-10-13 22:48:21 +02:00
parent ce55b353ec
commit a745bb39cd
Signed by: Robot
GPG Key ID: 14DECD44E7E1BB95
58 changed files with 1631 additions and 1135 deletions

View File

@ -1,16 +1,20 @@
# v3.2.5-alpha2
# v3.2.5-alpha3
- Fix Save failed issue in dynamicGet. #1148
- Move all [TEXT, EDITOR, TEXTAREA] fields from [NOT NULL] to [NULL]
- Add the DateHelper class and improve the date methods.
- Add simple SessionHelper class.
# v3.2.5-alpha
- Add [AllowDynamicProperties] in the base view class for J5
- Move the _prepareDocument above the display call in the base view class
- Remove all backward compatibility issues, so JCB will not need the [Backward Compatibility] plugin to run.
- Added new import powers for custom import of spreadsheets.
- Move the setDocument and _prepareDocument above the display in the site view and custom admin view.
- Update the trashhelper layout to work in Joomla 5.
- Add AllowDynamicProperties (Joomla 4+5) to view class to allow Custom Dynamic Get methods to work without issues.
# v3.2.5-alpha
- Add [AllowDynamicProperties] in the base view class for J5
- Move the _prepareDocument above the display call in the base view class
# v3.2.4
- Add [push] option to Powers area.

View File

@ -9,7 +9,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo
Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will save you lots of time and money. A real must have!
You can install it quite easily and with no limitations. On [gitea](https://git.vdm.dev/joomla/Component-Builder/tags) is the latest release (3.2.5-alpha2) with **ALL** its features and **ALL** concepts totally open-source and free!
You can install it quite easily and with no limitations. On [gitea](https://git.vdm.dev/joomla/Component-Builder/tags) is the latest release (3.2.5-alpha3) with **ALL** its features and **ALL** concepts totally open-source and free!
> Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45)
@ -144,13 +144,13 @@ TODO
+ *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io)
+ *Name*: [Component Builder](https://git.vdm.dev/joomla/Component-Builder)
+ *First Build*: 30th April, 2015
+ *Last Build*: 7th October, 2024
+ *Version*: 3.2.5-alpha2
+ *Last Build*: 13th October, 2024
+ *Version*: 3.2.5-alpha3
+ *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
+ *Line count*: **857064**
+ *Line count*: **859606**
+ *Field count*: **2098**
+ *File count*: **5808**
+ *File count*: **5826**
+ *Folder count*: **505**
> This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](https://www.joomlacomponentbuilder.com).

View File

@ -9,7 +9,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo
Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will save you lots of time and money. A real must have!
You can install it quite easily and with no limitations. On [gitea](https://git.vdm.dev/joomla/Component-Builder/tags) is the latest release (3.2.5-alpha2) with **ALL** its features and **ALL** concepts totally open-source and free!
You can install it quite easily and with no limitations. On [gitea](https://git.vdm.dev/joomla/Component-Builder/tags) is the latest release (3.2.5-alpha3) with **ALL** its features and **ALL** concepts totally open-source and free!
> Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45)
@ -144,13 +144,13 @@ TODO
+ *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io)
+ *Name*: [Component Builder](https://git.vdm.dev/joomla/Component-Builder)
+ *First Build*: 30th April, 2015
+ *Last Build*: 7th October, 2024
+ *Version*: 3.2.5-alpha2
+ *Last Build*: 13th October, 2024
+ *Version*: 3.2.5-alpha3
+ *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
+ *Line count*: **857064**
+ *Line count*: **859606**
+ *Field count*: **2098**
+ *File count*: **5808**
+ *File count*: **5826**
+ *Folder count*: **505**
> This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](https://www.joomlacomponentbuilder.com).

View File

@ -52,6 +52,7 @@ use VDM\Joomla\Componentbuilder\Compiler\Utilities\FieldHelper;
use VDM\Joomla\Componentbuilder\Compiler\Factory as CompilerFactory;
use VDM\Joomla\Utilities\Base64Helper;
use VDM\Joomla\FOF\Encrypt\AES;
use VDM\Joomla\Utilities\DateHelper;
use VDM\Joomla\Utilities\String\ClassfunctionHelper;
use VDM\Joomla\Utilities\String\FieldHelper as StringFieldHelper;
use VDM\Joomla\Utilities\String\TypeHelper;
@ -2164,7 +2165,7 @@ abstract class ComponentbuilderHelper
{
if (!isset(self::$session) || !ObjectHelper::check(self::$session))
{
self::$session = Factory::getSession();
self::$session = Factory::getApplication()->getSession();
}
// set the defaults
self::setSessionDefaults();
@ -2177,7 +2178,7 @@ abstract class ComponentbuilderHelper
{
if (!isset(self::$session) || !ObjectHelper::check(self::$session))
{
self::$session = Factory::getSession();
self::$session = Factory::getApplication()->getSession();
}
// set to local memory to speed up program
self::$localSession[$key] = $value;
@ -2192,7 +2193,7 @@ abstract class ComponentbuilderHelper
{
if (!isset(self::$session) || !ObjectHelper::check(self::$session))
{
self::$session = Factory::getSession();
self::$session = Factory::getApplication()->getSession();
}
// check if in local memory
if (!isset(self::$localSession[$key]))
@ -5228,193 +5229,245 @@ abstract class ComponentbuilderHelper
/**
* Change to nice fancy date
* Convert a date to a human-readable fancy format (e.g., "1st of January 2024").
*
* @param string|int $date The date as a string or timestamp.
* @param bool $checkStamp Whether to check if the input is a timestamp.
*
* @return string Formatted date.
* @since 3.0.0
* @deprecated 4.0.0 Use DateHelper::fancyDate($date, $checkStamp);
*/
public static function fancyDate($date, $check_stamp = true)
public static function fancyDate($date, bool $checkStamp = true): string
{
if ($check_stamp && !self::isValidTimeStamp($date))
{
$date = strtotime($date);
}
return date('jS \o\f F Y',$date);
return DateHelper::fancyDate($date, $checkStamp);
}
/**
* get date based in period past
* Get a formatted date based on the time period (dynamic format based on age of the date).
*
* @param string|int $date The date as a string or timestamp.
* @param bool $checkStamp Whether to check if the input is a timestamp.
*
* @return string Formatted date.
* @since 3.0.0
* @deprecated 4.0.0 Use DateHelper::fancyDynamicDate($date, $checkStamp);
*/
public static function fancyDynamicDate($date, $check_stamp = true)
public static function fancyDynamicDate($date, bool $checkStamp = true): string
{
if ($check_stamp && !self::isValidTimeStamp($date))
{
$date = strtotime($date);
}
// older then year
$lastyear = date("Y", strtotime("-1 year"));
$tragetyear = date("Y", $date);
if ($tragetyear <= $lastyear)
{
return date('m/d/y', $date);
}
// same day
$yesterday = strtotime("-1 day");
if ($date > $yesterday)
{
return date('g:i A', $date);
}
// just month day
return date('M j', $date);
return DateHelper::fancyDynamicDate($date, $checkStamp);
}
/**
* Change to nice fancy day time and date
* Convert a date to a human-readable day, time, and date format (e.g., "Mon 12am 1st of January 2024").
*
* @param string|int $date The date as a string or timestamp.
* @param bool $checkStamp Whether to check if the input is a timestamp.
*
* @return string Formatted day, time, and date.
* @since 3.0.0
* @deprecated 4.0.0 Use DateHelper::fancyDayTimeDate($date, $checkStamp);
*/
public static function fancyDayTimeDate($time, $check_stamp = true)
public static function fancyDayTimeDate($date, bool $checkStamp = true): string
{
if ($check_stamp && !self::isValidTimeStamp($time))
{
$time = strtotime($time);
}
return date('D ga jS \o\f F Y',$time);
return DateHelper::fancyDayTimeDate($date, $checkStamp);
}
/**
* Change to nice fancy time and date
* Convert a date to a human-readable time and date format (e.g., "(12:00) 1st of January 2024").
*
* @param string|int $date The date as a string or timestamp.
* @param bool $checkStamp Whether to check if the input is a timestamp.
*
* @return string Formatted time and date.
* @since 3.0.0
* @deprecated 4.0.0 Use DateHelper::fancyDateTime($date, $checkStamp);
*/
public static function fancyDateTime($time, $check_stamp = true)
public static function fancyDateTime($date, bool $checkStamp = true): string
{
if ($check_stamp && !self::isValidTimeStamp($time))
{
$time = strtotime($time);
}
return date('(G:i) jS \o\f F Y',$time);
return DateHelper::fancyDateTime($date, $checkStamp);
}
/**
* Change to nice hour:minutes time
* Convert a time to a human-readable format (e.g., "12:00").
*
* @param string|int $date The date as a string or timestamp.
* @param bool $checkStamp Whether to check if the input is a timestamp.
*
* @return string Formatted time.
* @since 3.0.0
* @deprecated 4.0.0 Use DateHelper::fancyTime($date, $checkStamp);
*/
public static function fancyTime($time, $check_stamp = true)
public static function fancyTime($date, bool $checkStamp = true): string
{
if ($check_stamp && !self::isValidTimeStamp($time))
{
$time = strtotime($time);
}
return date('G:i',$time);
return DateHelper::fancyTime($date, $checkStamp);
}
/**
* set the date day as Sunday through Saturday
* Convert a date to the day name (e.g., "Sunday").
*
* @param string|int $date The date as a string or timestamp.
* @param bool $checkStamp Whether to check if the input is a timestamp.
*
* @return string Day name.
* @since 3.0.0
* @deprecated 4.0.0 Use DateHelper::setDayName($date, $checkStamp);
*/
public static function setDayName($date, $check_stamp = true)
public static function setDayName($date, bool $checkStamp = true): string
{
if ($check_stamp && !self::isValidTimeStamp($date))
{
$date = strtotime($date);
}
return date('l', $date);
return DateHelper::setDayName($date, $checkStamp);
}
/**
* set the date month as January through December
* Convert a date to the month name (e.g., "January").
*
* @param string|int $date The date as a string or timestamp.
* @param bool $checkStamp Whether to check if the input is a timestamp.
*
* @return string Month name.
* @since 3.0.0
* @deprecated 4.0.0 Use DateHelper::setMonthName($date, $checkStamp);
*/
public static function setMonthName($date, $check_stamp = true)
public static function setMonthName($date, bool $checkStamp = true): string
{
if ($check_stamp && !self::isValidTimeStamp($date))
{
$date = strtotime($date);
}
return date('F', $date);
return DateHelper::setMonthName($date, $checkStamp);
}
/**
* set the date day as 1st
* Convert a date to the day with suffix (e.g., "1st").
*
* @param string|int $date The date as a string or timestamp.
* @param bool $checkStamp Whether to check if the input is a timestamp.
*
* @return string Day with suffix.
* @since 3.0.0
* @deprecated 4.0.0 Use DateHelper::setDay($date, $checkStamp);
*/
public static function setDay($date, $check_stamp = true)
public static function setDay($date, bool $checkStamp = true): string
{
if ($check_stamp && !self::isValidTimeStamp($date))
{
$date = strtotime($date);
}
return date('jS', $date);
return DateHelper::setDay($date, $checkStamp);
}
/**
* set the date month as 5
* Convert a date to the numeric month (e.g., "5").
*
* @param string|int $date The date as a string or timestamp.
* @param bool $checkStamp Whether to check if the input is a timestamp.
*
* @return string Numeric month.
* @since 3.0.0
* @deprecated 4.0.0 Use DateHelper::setMonth($date, $checkStamp);
*/
public static function setMonth($date, $check_stamp = true)
public static function setMonth($date, bool $checkStamp = true): string
{
if ($check_stamp && !self::isValidTimeStamp($date))
{
$date = strtotime($date);
}
return date('n', $date);
return DateHelper::setMonth($date, $checkStamp);
}
/**
* set the date year as 2004 (for charts)
* Convert a date to the full year (e.g., "2024").
*
* @param string|int $date The date as a string or timestamp.
* @param bool $checkStamp Whether to check if the input is a timestamp.
*
* @return string Full year.
* @since 3.0.0
* @deprecated 4.0.0 Use DateHelper::setYear($date, $checkStamp);
*/
public static function setYear($date, $check_stamp = true)
public static function setYear($date, bool $checkStamp = true): string
{
if ($check_stamp && !self::isValidTimeStamp($date))
{
$date = strtotime($date);
}
return date('Y', $date);
return DateHelper::setYear($date, $checkStamp);
}
/**
* set the date as 2004/05 (for charts)
* Convert a date to a year/month format (e.g., "2024/05").
*
* @param string|int $date The date as a string or timestamp.
* @param string $spacer The spacer between year and month.
* @param bool $checkStamp Whether to check if the input is a timestamp.
*
* @return string Year/Month format.
* @since 3.0.0
* @deprecated 4.0.0 Use DateHelper::setYearMonth($date, $spacer, $checkStamp);
*/
public static function setYearMonth($date, $spacer = '/', $check_stamp = true)
public static function setYearMonth($date, string $spacer = '/', bool $checkStamp = true): string
{
if ($check_stamp && !self::isValidTimeStamp($date))
{
$date = strtotime($date);
}
return date('Y' . $spacer . 'm', $date);
return DateHelper::setYearMonth($date, $spacer, $checkStamp);
}
/**
* set the date as 2004/05/03 (for charts)
* Convert a date to a year/month/day format (e.g., "2024/05/03").
*
* @param string|int $date The date as a string or timestamp.
* @param string $spacer The spacer between year and month.
* @param bool $checkStamp Whether to check if the input is a timestamp.
*
* @return string Year/Month/Day format.
* @since 3.0.0
* @deprecated 4.0.0 Use DateHelper::setYearMonthDay($date, $spacer, $checkStamp);
*/
public static function setYearMonthDay($date, $spacer = '/', $check_stamp = true)
public static function setYearMonthDay($date, string $spacer = '/', bool $checkStamp = true): string
{
if ($check_stamp && !self::isValidTimeStamp($date))
{
$date = strtotime($date);
}
return date('Y' . $spacer . 'm' . $spacer . 'd', $date);
return DateHelper::setYearMonthDay($date, $spacer, $checkStamp);
}
/**
* set the date as 03/05/2004
* Convert a date to a day/month/year format (e.g., "03/05/2024").
*
* @param string|int $date The date as a string or timestamp.
* @param string $spacer The spacer between year and month.
* @param bool $checkStamp Whether to check if the input is a timestamp.
*
* @return string Day/Month/Year format.
* @since 3.0.0
* @deprecated 4.0.0 Use DateHelper::setDayMonthYear($date, $spacer, $checkStamp);
*/
public static function setDayMonthYear($date, $spacer = '/', $check_stamp = true)
public static function setDayMonthYear($date, string $spacer = '/', bool $checkStamp = true): string
{
if ($check_stamp && !self::isValidTimeStamp($date))
{
$date = strtotime($date);
}
return date('d' . $spacer . 'm' . $spacer . 'Y', $date);
return DateHelper::setDayMonthYear($date, $spacer, $checkStamp);
}
/**
* Check if string is a valid time stamp
* Convert a date string to a valid timestamp.
*
* @param string|int $date The date as a string or timestamp.
* @param bool $checkStamp Whether to check if the input is a timestamp.
*
* @return int The valid timestamp.
* @since 3.0.0
* @deprecated 4.0.0 Use DateHelper::getValidTimestamp($date, $checkStamp);
*/
public static function isValidTimeStamp($timestamp)
public static function getValidTimestamp($date, bool $checkStamp): int
{
return ((int) $timestamp === $timestamp)
&& ($timestamp <= PHP_INT_MAX)
&& ($timestamp >= ~PHP_INT_MAX);
return DateHelper::getValidTimestamp($date, $checkStamp);
}
/**
* Check if string is a valid date
* https://www.php.net/manual/en/function.checkdate.php#113205
* Check if the input is a valid Unix timestamp.
*
* @param mixed $timestamp The timestamp to validate.
*
* @return bool True if valid timestamp, false otherwise.
* @since 3.0.0
* @deprecated 4.0.0 Use DateHelper::isValidTimeStamp($timestamp);
*/
public static function isValidateDate($date, $format = 'Y-m-d H:i:s')
public static function isValidTimeStamp($timestamp): bool
{
$d = DateTime::createFromFormat($format, $date);
return $d && $d->format($format) == $date;
return DateHelper::isValidTimeStamp($timestamp);
}
/**
* Check if a string is a valid date according to the specified format.
*
* @param string $date The date string to validate.
* @param string $format The format to check against (default is 'Y-m-d H:i:s').
*
* @return bool True if valid date, false otherwise.
* @since 3.0.0
* @deprecated 4.0.0 Use DateHelper::isValidateDate($date, $format);
*/
public static function isValidateDate($date, string $format = 'Y-m-d H:i:s'): bool
{
return DateHelper::isValidateDate($date, $format);
}
/**

View File

@ -4126,9 +4126,9 @@ COM_COMPONENTBUILDER_CUSTOM_CODE_HASHENDTARGET_DESCRIPTION="The end hash target
COM_COMPONENTBUILDER_CUSTOM_CODE_HASHENDTARGET_HINT="autogenerated md5 hash"
COM_COMPONENTBUILDER_CUSTOM_CODE_HASHENDTARGET_LABEL="End Hash Target"
COM_COMPONENTBUILDER_CUSTOM_CODE_HASHENDTARGET_MESSAGE="Error! Please add some text here."
COM_COMPONENTBUILDER_CUSTOM_CODE_HASHTARGET_DESCRIPTION="The start hash target to help insert the code at the correct place, if the line position change. This hash is the md5 of a few lines above the custom code"
COM_COMPONENTBUILDER_CUSTOM_CODE_HASHTARGET_DESCRIPTION="The end hash target to help insert the code until the correct place, if the line position change. This hash is the md5 of a few lines below the custom code"
COM_COMPONENTBUILDER_CUSTOM_CODE_HASHTARGET_HINT="autogenerated md5 hash"
COM_COMPONENTBUILDER_CUSTOM_CODE_HASHTARGET_LABEL="Start Hash Target"
COM_COMPONENTBUILDER_CUSTOM_CODE_HASHTARGET_LABEL="End Hash Target"
COM_COMPONENTBUILDER_CUSTOM_CODE_HASHTARGET_MESSAGE="Error! Please add some text here."
COM_COMPONENTBUILDER_CUSTOM_CODE_HASH_AUTOMATION="Hash (automation)"
COM_COMPONENTBUILDER_CUSTOM_CODE_HTML="HTML"

View File

@ -24,6 +24,7 @@ use Joomla\Registry\Registry;
use Joomla\String\StringHelper;
use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Helper\TagsHelper;
use VDM\Joomla\Utilities\SessionHelper;
use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
use VDM\Joomla\Utilities\ObjectHelper;
use VDM\Joomla\Utilities\GuidHelper;
@ -114,7 +115,7 @@ class ComponentbuilderModelAdmin_fields_relations extends AdminModel
$id = $_id;
}
// set the id and view name to session
if ($vdm = ComponentbuilderHelper::get('admin_fields_relations__'.$id))
if (($vdm = SessionHelper::get('admin_fields_relations__'.$id)) !== null)
{
$this->vastDevMod = $vdm;
}
@ -122,17 +123,17 @@ class ComponentbuilderModelAdmin_fields_relations extends AdminModel
{
// set the vast development method key
$this->vastDevMod = UtilitiesStringHelper::random(50);
ComponentbuilderHelper::set($this->vastDevMod, 'admin_fields_relations__'.$id);
ComponentbuilderHelper::set('admin_fields_relations__'.$id, $this->vastDevMod);
SessionHelper::set($this->vastDevMod, 'admin_fields_relations__'.$id);
SessionHelper::set('admin_fields_relations__'.$id, $this->vastDevMod);
// set a return value if found
$jinput = Factory::getApplication()->input;
$return = $jinput->get('return', null, 'base64');
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
SessionHelper::set($this->vastDevMod . '__return', $return);
// set a GUID value if found
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
&& GuidHelper::valid($item->guid))
{
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
}
}
}
@ -187,7 +188,7 @@ class ComponentbuilderModelAdmin_fields_relations extends AdminModel
$id = $item->id;
}
// set the id and view name to session
if ($vdm = ComponentbuilderHelper::get('admin_fields_relations__'.$id))
if (($vdm = SessionHelper::get('admin_fields_relations__'.$id)) !== null)
{
$this->vastDevMod = $vdm;
}
@ -195,17 +196,17 @@ class ComponentbuilderModelAdmin_fields_relations extends AdminModel
{
// set the vast development method key
$this->vastDevMod = UtilitiesStringHelper::random(50);
ComponentbuilderHelper::set($this->vastDevMod, 'admin_fields_relations__'.$id);
ComponentbuilderHelper::set('admin_fields_relations__'.$id, $this->vastDevMod);
SessionHelper::set($this->vastDevMod, 'admin_fields_relations__'.$id);
SessionHelper::set('admin_fields_relations__'.$id, $this->vastDevMod);
// set a return value if found
$jinput = Factory::getApplication()->input;
$return = $jinput->get('return', null, 'base64');
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
SessionHelper::set($this->vastDevMod . '__return', $return);
// set a GUID value if found
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
&& GuidHelper::valid($item->guid))
{
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
}
}
}

View File

@ -24,6 +24,7 @@ use Joomla\Registry\Registry;
use Joomla\String\StringHelper;
use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Helper\TagsHelper;
use VDM\Joomla\Utilities\SessionHelper;
use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
use VDM\Joomla\Utilities\ObjectHelper;
use VDM\Joomla\Utilities\GuidHelper;
@ -263,7 +264,7 @@ class ComponentbuilderModelAdmin_view extends AdminModel
$id = $_id;
}
// set the id and view name to session
if ($vdm = ComponentbuilderHelper::get('admin_view__'.$id))
if (($vdm = SessionHelper::get('admin_view__'.$id)) !== null)
{
$this->vastDevMod = $vdm;
}
@ -271,17 +272,17 @@ class ComponentbuilderModelAdmin_view extends AdminModel
{
// set the vast development method key
$this->vastDevMod = UtilitiesStringHelper::random(50);
ComponentbuilderHelper::set($this->vastDevMod, 'admin_view__'.$id);
ComponentbuilderHelper::set('admin_view__'.$id, $this->vastDevMod);
SessionHelper::set($this->vastDevMod, 'admin_view__'.$id);
SessionHelper::set('admin_view__'.$id, $this->vastDevMod);
// set a return value if found
$jinput = Factory::getApplication()->input;
$return = $jinput->get('return', null, 'base64');
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
SessionHelper::set($this->vastDevMod . '__return', $return);
// set a GUID value if found
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
&& GuidHelper::valid($item->guid))
{
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
}
}
}
@ -612,7 +613,7 @@ class ComponentbuilderModelAdmin_view extends AdminModel
$id = $item->id;
}
// set the id and view name to session
if ($vdm = ComponentbuilderHelper::get('admin_view__'.$id))
if (($vdm = SessionHelper::get('admin_view__'.$id)) !== null)
{
$this->vastDevMod = $vdm;
}
@ -620,17 +621,17 @@ class ComponentbuilderModelAdmin_view extends AdminModel
{
// set the vast development method key
$this->vastDevMod = UtilitiesStringHelper::random(50);
ComponentbuilderHelper::set($this->vastDevMod, 'admin_view__'.$id);
ComponentbuilderHelper::set('admin_view__'.$id, $this->vastDevMod);
SessionHelper::set($this->vastDevMod, 'admin_view__'.$id);
SessionHelper::set('admin_view__'.$id, $this->vastDevMod);
// set a return value if found
$jinput = Factory::getApplication()->input;
$return = $jinput->get('return', null, 'base64');
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
SessionHelper::set($this->vastDevMod . '__return', $return);
// set a GUID value if found
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
&& GuidHelper::valid($item->guid))
{
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
}
}
// update the fields
@ -1016,7 +1017,7 @@ class ComponentbuilderModelAdmin_view extends AdminModel
// change to false
$form->setFieldAttribute($requiredField, 'required', 'false');
// also clear the data set
$data[$requiredField] = '';
unset($data[$requiredField]);
}
}
}

View File

@ -28,6 +28,7 @@ use VDM\Joomla\Componentbuilder\Search\Factory as SearchFactory;
use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
use VDM\Joomla\Utilities\GetHelper;
use VDM\Joomla\Utilities\GuidHelper;
use VDM\Joomla\Utilities\SessionHelper;
use VDM\Joomla\Utilities\Base64Helper;
use VDM\Joomla\Componentbuilder\Compiler\Utilities\FieldHelper;
use Joomla\CMS\Uri\Uri;
@ -1595,7 +1596,7 @@ class ComponentbuilderModelAjax extends ListModel
* @var array
* @since 3.0.13
*/
protected $viewid = [];
protected array $viewid = [];
/**
* Get the view details via the session
@ -1615,7 +1616,7 @@ class ComponentbuilderModelAjax extends ListModel
if ($vdm)
{
// set view and id
if ($view = ComponentbuilderHelper::get($vdm))
if (($view = SessionHelper::get($vdm)) !== null)
{
$current = (array) explode('__', $view);
if (StringHelper::check($current[0]) && isset($current[1]) && is_numeric($current[1]))
@ -1628,7 +1629,7 @@ class ComponentbuilderModelAjax extends ListModel
}
}
// set GUID if found
if (($guid = ComponentbuilderHelper::get($vdm . '__guid')) !== false)
if (($guid = SessionHelper::get($vdm . '__guid')) !== null)
{
if (GuidHelper::valid($guid))
{
@ -1636,7 +1637,7 @@ class ComponentbuilderModelAjax extends ListModel
}
}
// set return if found
if (($return = ComponentbuilderHelper::get($vdm . '__return')) !== false)
if (($return = SessionHelper::get($vdm . '__return')) !== null)
{
if (StringHelper::check($return))
{

View File

@ -24,6 +24,7 @@ use Joomla\Registry\Registry;
use Joomla\String\StringHelper;
use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Helper\TagsHelper;
use VDM\Joomla\Utilities\SessionHelper;
use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
use VDM\Joomla\Utilities\ObjectHelper;
use VDM\Joomla\Utilities\GuidHelper;
@ -118,7 +119,7 @@ class ComponentbuilderModelClass_extends extends AdminModel
$id = $_id;
}
// set the id and view name to session
if ($vdm = ComponentbuilderHelper::get('class_extends__'.$id))
if (($vdm = SessionHelper::get('class_extends__'.$id)) !== null)
{
$this->vastDevMod = $vdm;
}
@ -126,17 +127,17 @@ class ComponentbuilderModelClass_extends extends AdminModel
{
// set the vast development method key
$this->vastDevMod = UtilitiesStringHelper::random(50);
ComponentbuilderHelper::set($this->vastDevMod, 'class_extends__'.$id);
ComponentbuilderHelper::set('class_extends__'.$id, $this->vastDevMod);
SessionHelper::set($this->vastDevMod, 'class_extends__'.$id);
SessionHelper::set('class_extends__'.$id, $this->vastDevMod);
// set a return value if found
$jinput = Factory::getApplication()->input;
$return = $jinput->get('return', null, 'base64');
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
SessionHelper::set($this->vastDevMod . '__return', $return);
// set a GUID value if found
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
&& GuidHelper::valid($item->guid))
{
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
}
}
}
@ -195,7 +196,7 @@ class ComponentbuilderModelClass_extends extends AdminModel
$id = $item->id;
}
// set the id and view name to session
if ($vdm = ComponentbuilderHelper::get('class_extends__'.$id))
if (($vdm = SessionHelper::get('class_extends__'.$id)) !== null)
{
$this->vastDevMod = $vdm;
}
@ -203,17 +204,17 @@ class ComponentbuilderModelClass_extends extends AdminModel
{
// set the vast development method key
$this->vastDevMod = UtilitiesStringHelper::random(50);
ComponentbuilderHelper::set($this->vastDevMod, 'class_extends__'.$id);
ComponentbuilderHelper::set('class_extends__'.$id, $this->vastDevMod);
SessionHelper::set($this->vastDevMod, 'class_extends__'.$id);
SessionHelper::set('class_extends__'.$id, $this->vastDevMod);
// set a return value if found
$jinput = Factory::getApplication()->input;
$return = $jinput->get('return', null, 'base64');
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
SessionHelper::set($this->vastDevMod . '__return', $return);
// set a GUID value if found
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
&& GuidHelper::valid($item->guid))
{
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
}
}
}

View File

@ -24,6 +24,7 @@ use Joomla\Registry\Registry;
use Joomla\String\StringHelper;
use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Helper\TagsHelper;
use VDM\Joomla\Utilities\SessionHelper;
use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
use VDM\Joomla\Utilities\ObjectHelper;
use VDM\Joomla\Utilities\GuidHelper;
@ -122,7 +123,7 @@ class ComponentbuilderModelClass_method extends AdminModel
$id = $_id;
}
// set the id and view name to session
if ($vdm = ComponentbuilderHelper::get('class_method__'.$id))
if (($vdm = SessionHelper::get('class_method__'.$id)) !== null)
{
$this->vastDevMod = $vdm;
}
@ -130,17 +131,17 @@ class ComponentbuilderModelClass_method extends AdminModel
{
// set the vast development method key
$this->vastDevMod = UtilitiesStringHelper::random(50);
ComponentbuilderHelper::set($this->vastDevMod, 'class_method__'.$id);
ComponentbuilderHelper::set('class_method__'.$id, $this->vastDevMod);
SessionHelper::set($this->vastDevMod, 'class_method__'.$id);
SessionHelper::set('class_method__'.$id, $this->vastDevMod);
// set a return value if found
$jinput = Factory::getApplication()->input;
$return = $jinput->get('return', null, 'base64');
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
SessionHelper::set($this->vastDevMod . '__return', $return);
// set a GUID value if found
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
&& GuidHelper::valid($item->guid))
{
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
}
}
}
@ -205,7 +206,7 @@ class ComponentbuilderModelClass_method extends AdminModel
$id = $item->id;
}
// set the id and view name to session
if ($vdm = ComponentbuilderHelper::get('class_method__'.$id))
if (($vdm = SessionHelper::get('class_method__'.$id)) !== null)
{
$this->vastDevMod = $vdm;
}
@ -213,17 +214,17 @@ class ComponentbuilderModelClass_method extends AdminModel
{
// set the vast development method key
$this->vastDevMod = UtilitiesStringHelper::random(50);
ComponentbuilderHelper::set($this->vastDevMod, 'class_method__'.$id);
ComponentbuilderHelper::set('class_method__'.$id, $this->vastDevMod);
SessionHelper::set($this->vastDevMod, 'class_method__'.$id);
SessionHelper::set('class_method__'.$id, $this->vastDevMod);
// set a return value if found
$jinput = Factory::getApplication()->input;
$return = $jinput->get('return', null, 'base64');
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
SessionHelper::set($this->vastDevMod . '__return', $return);
// set a GUID value if found
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
&& GuidHelper::valid($item->guid))
{
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
}
}
}
@ -554,7 +555,7 @@ class ComponentbuilderModelClass_method extends AdminModel
// change to false
$form->setFieldAttribute($requiredField, 'required', 'false');
// also clear the data set
$data[$requiredField] = '';
unset($data[$requiredField]);
}
}
}

View File

@ -24,6 +24,7 @@ use Joomla\Registry\Registry;
use Joomla\String\StringHelper;
use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Helper\TagsHelper;
use VDM\Joomla\Utilities\SessionHelper;
use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
use VDM\Joomla\Utilities\ObjectHelper;
use VDM\Joomla\Utilities\GuidHelper;
@ -119,7 +120,7 @@ class ComponentbuilderModelClass_property extends AdminModel
$id = $_id;
}
// set the id and view name to session
if ($vdm = ComponentbuilderHelper::get('class_property__'.$id))
if (($vdm = SessionHelper::get('class_property__'.$id)) !== null)
{
$this->vastDevMod = $vdm;
}
@ -127,17 +128,17 @@ class ComponentbuilderModelClass_property extends AdminModel
{
// set the vast development method key
$this->vastDevMod = UtilitiesStringHelper::random(50);
ComponentbuilderHelper::set($this->vastDevMod, 'class_property__'.$id);
ComponentbuilderHelper::set('class_property__'.$id, $this->vastDevMod);
SessionHelper::set($this->vastDevMod, 'class_property__'.$id);
SessionHelper::set('class_property__'.$id, $this->vastDevMod);
// set a return value if found
$jinput = Factory::getApplication()->input;
$return = $jinput->get('return', null, 'base64');
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
SessionHelper::set($this->vastDevMod . '__return', $return);
// set a GUID value if found
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
&& GuidHelper::valid($item->guid))
{
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
}
}
}
@ -196,7 +197,7 @@ class ComponentbuilderModelClass_property extends AdminModel
$id = $item->id;
}
// set the id and view name to session
if ($vdm = ComponentbuilderHelper::get('class_property__'.$id))
if (($vdm = SessionHelper::get('class_property__'.$id)) !== null)
{
$this->vastDevMod = $vdm;
}
@ -204,17 +205,17 @@ class ComponentbuilderModelClass_property extends AdminModel
{
// set the vast development method key
$this->vastDevMod = UtilitiesStringHelper::random(50);
ComponentbuilderHelper::set($this->vastDevMod, 'class_property__'.$id);
ComponentbuilderHelper::set('class_property__'.$id, $this->vastDevMod);
SessionHelper::set($this->vastDevMod, 'class_property__'.$id);
SessionHelper::set('class_property__'.$id, $this->vastDevMod);
// set a return value if found
$jinput = Factory::getApplication()->input;
$return = $jinput->get('return', null, 'base64');
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
SessionHelper::set($this->vastDevMod . '__return', $return);
// set a GUID value if found
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
&& GuidHelper::valid($item->guid))
{
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
}
}
}
@ -545,7 +546,7 @@ class ComponentbuilderModelClass_property extends AdminModel
// change to false
$form->setFieldAttribute($requiredField, 'required', 'false');
// also clear the data set
$data[$requiredField] = '';
unset($data[$requiredField]);
}
}
}

View File

@ -24,6 +24,7 @@ use Joomla\Registry\Registry;
use Joomla\String\StringHelper;
use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Helper\TagsHelper;
use VDM\Joomla\Utilities\SessionHelper;
use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
use VDM\Joomla\Utilities\ObjectHelper;
use VDM\Joomla\Utilities\GuidHelper;
@ -122,7 +123,7 @@ class ComponentbuilderModelComponent_dashboard extends AdminModel
$id = $_id;
}
// set the id and view name to session
if ($vdm = ComponentbuilderHelper::get('component_dashboard__'.$id))
if (($vdm = SessionHelper::get('component_dashboard__'.$id)) !== null)
{
$this->vastDevMod = $vdm;
}
@ -130,17 +131,17 @@ class ComponentbuilderModelComponent_dashboard extends AdminModel
{
// set the vast development method key
$this->vastDevMod = UtilitiesStringHelper::random(50);
ComponentbuilderHelper::set($this->vastDevMod, 'component_dashboard__'.$id);
ComponentbuilderHelper::set('component_dashboard__'.$id, $this->vastDevMod);
SessionHelper::set($this->vastDevMod, 'component_dashboard__'.$id);
SessionHelper::set('component_dashboard__'.$id, $this->vastDevMod);
// set a return value if found
$jinput = Factory::getApplication()->input;
$return = $jinput->get('return', null, 'base64');
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
SessionHelper::set($this->vastDevMod . '__return', $return);
// set a GUID value if found
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
&& GuidHelper::valid($item->guid))
{
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
}
}
}
@ -201,7 +202,7 @@ class ComponentbuilderModelComponent_dashboard extends AdminModel
$id = $item->id;
}
// set the id and view name to session
if ($vdm = ComponentbuilderHelper::get('component_dashboard__'.$id))
if (($vdm = SessionHelper::get('component_dashboard__'.$id)) !== null)
{
$this->vastDevMod = $vdm;
}
@ -209,17 +210,17 @@ class ComponentbuilderModelComponent_dashboard extends AdminModel
{
// set the vast development method key
$this->vastDevMod = UtilitiesStringHelper::random(50);
ComponentbuilderHelper::set($this->vastDevMod, 'component_dashboard__'.$id);
ComponentbuilderHelper::set('component_dashboard__'.$id, $this->vastDevMod);
SessionHelper::set($this->vastDevMod, 'component_dashboard__'.$id);
SessionHelper::set('component_dashboard__'.$id, $this->vastDevMod);
// set a return value if found
$jinput = Factory::getApplication()->input;
$return = $jinput->get('return', null, 'base64');
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
SessionHelper::set($this->vastDevMod . '__return', $return);
// set a GUID value if found
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
&& GuidHelper::valid($item->guid))
{
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
}
}
// update the fields

View File

@ -24,6 +24,7 @@ use Joomla\Registry\Registry;
use Joomla\String\StringHelper;
use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Helper\TagsHelper;
use VDM\Joomla\Utilities\SessionHelper;
use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
use VDM\Joomla\Utilities\ObjectHelper;
use VDM\Joomla\Utilities\GuidHelper;
@ -123,7 +124,7 @@ class ComponentbuilderModelComponent_router extends AdminModel
$id = $_id;
}
// set the id and view name to session
if ($vdm = ComponentbuilderHelper::get('component_router__'.$id))
if (($vdm = SessionHelper::get('component_router__'.$id)) !== null)
{
$this->vastDevMod = $vdm;
}
@ -131,17 +132,17 @@ class ComponentbuilderModelComponent_router extends AdminModel
{
// set the vast development method key
$this->vastDevMod = UtilitiesStringHelper::random(50);
ComponentbuilderHelper::set($this->vastDevMod, 'component_router__'.$id);
ComponentbuilderHelper::set('component_router__'.$id, $this->vastDevMod);
SessionHelper::set($this->vastDevMod, 'component_router__'.$id);
SessionHelper::set('component_router__'.$id, $this->vastDevMod);
// set a return value if found
$jinput = Factory::getApplication()->input;
$return = $jinput->get('return', null, 'base64');
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
SessionHelper::set($this->vastDevMod . '__return', $return);
// set a GUID value if found
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
&& GuidHelper::valid($item->guid))
{
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
}
}
}
@ -214,7 +215,7 @@ class ComponentbuilderModelComponent_router extends AdminModel
$id = $item->id;
}
// set the id and view name to session
if ($vdm = ComponentbuilderHelper::get('component_router__'.$id))
if (($vdm = SessionHelper::get('component_router__'.$id)) !== null)
{
$this->vastDevMod = $vdm;
}
@ -222,17 +223,17 @@ class ComponentbuilderModelComponent_router extends AdminModel
{
// set the vast development method key
$this->vastDevMod = UtilitiesStringHelper::random(50);
ComponentbuilderHelper::set($this->vastDevMod, 'component_router__'.$id);
ComponentbuilderHelper::set('component_router__'.$id, $this->vastDevMod);
SessionHelper::set($this->vastDevMod, 'component_router__'.$id);
SessionHelper::set('component_router__'.$id, $this->vastDevMod);
// set a return value if found
$jinput = Factory::getApplication()->input;
$return = $jinput->get('return', null, 'base64');
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
SessionHelper::set($this->vastDevMod . '__return', $return);
// set a GUID value if found
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
&& GuidHelper::valid($item->guid))
{
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
}
}
}

View File

@ -24,6 +24,7 @@ use Joomla\Registry\Registry;
use Joomla\String\StringHelper;
use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Helper\TagsHelper;
use VDM\Joomla\Utilities\SessionHelper;
use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
use VDM\Joomla\Utilities\ObjectHelper;
use VDM\Joomla\Utilities\GuidHelper;
@ -180,7 +181,7 @@ class ComponentbuilderModelCustom_admin_view extends AdminModel
$id = $_id;
}
// set the id and view name to session
if ($vdm = ComponentbuilderHelper::get('custom_admin_view__'.$id))
if (($vdm = SessionHelper::get('custom_admin_view__'.$id)) !== null)
{
$this->vastDevMod = $vdm;
}
@ -188,17 +189,17 @@ class ComponentbuilderModelCustom_admin_view extends AdminModel
{
// set the vast development method key
$this->vastDevMod = UtilitiesStringHelper::random(50);
ComponentbuilderHelper::set($this->vastDevMod, 'custom_admin_view__'.$id);
ComponentbuilderHelper::set('custom_admin_view__'.$id, $this->vastDevMod);
SessionHelper::set($this->vastDevMod, 'custom_admin_view__'.$id);
SessionHelper::set('custom_admin_view__'.$id, $this->vastDevMod);
// set a return value if found
$jinput = Factory::getApplication()->input;
$return = $jinput->get('return', null, 'base64');
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
SessionHelper::set($this->vastDevMod . '__return', $return);
// set a GUID value if found
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
&& GuidHelper::valid($item->guid))
{
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
}
}
}
@ -349,7 +350,7 @@ class ComponentbuilderModelCustom_admin_view extends AdminModel
$id = $item->id;
}
// set the id and view name to session
if ($vdm = ComponentbuilderHelper::get('custom_admin_view__'.$id))
if (($vdm = SessionHelper::get('custom_admin_view__'.$id)) !== null)
{
$this->vastDevMod = $vdm;
}
@ -357,17 +358,17 @@ class ComponentbuilderModelCustom_admin_view extends AdminModel
{
// set the vast development method key
$this->vastDevMod = UtilitiesStringHelper::random(50);
ComponentbuilderHelper::set($this->vastDevMod, 'custom_admin_view__'.$id);
ComponentbuilderHelper::set('custom_admin_view__'.$id, $this->vastDevMod);
SessionHelper::set($this->vastDevMod, 'custom_admin_view__'.$id);
SessionHelper::set('custom_admin_view__'.$id, $this->vastDevMod);
// set a return value if found
$jinput = Factory::getApplication()->input;
$return = $jinput->get('return', null, 'base64');
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
SessionHelper::set($this->vastDevMod . '__return', $return);
// set a GUID value if found
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
&& GuidHelper::valid($item->guid))
{
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
}
}

View File

@ -24,6 +24,7 @@ use Joomla\Registry\Registry;
use Joomla\String\StringHelper;
use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Helper\TagsHelper;
use VDM\Joomla\Utilities\SessionHelper;
use VDM\Joomla\Utilities\StringHelper as UtilitiesStringHelper;
use VDM\Joomla\Utilities\ObjectHelper;
use VDM\Joomla\Utilities\GuidHelper;
@ -134,7 +135,7 @@ class ComponentbuilderModelCustom_code extends AdminModel
$id = $_id;
}
// set the id and view name to session
if ($vdm = ComponentbuilderHelper::get('custom_code__'.$id))
if (($vdm = SessionHelper::get('custom_code__'.$id)) !== null)
{
$this->vastDevMod = $vdm;
}
@ -142,17 +143,17 @@ class ComponentbuilderModelCustom_code extends AdminModel
{
// set the vast development method key
$this->vastDevMod = UtilitiesStringHelper::random(50);
ComponentbuilderHelper::set($this->vastDevMod, 'custom_code__'.$id);
ComponentbuilderHelper::set('custom_code__'.$id, $this->vastDevMod);
SessionHelper::set($this->vastDevMod, 'custom_code__'.$id);
SessionHelper::set('custom_code__'.$id, $this->vastDevMod);
// set a return value if found
$jinput = Factory::getApplication()->input;
$return = $jinput->get('return', null, 'base64');
ComponentbuilderHelper::set($this->vastDevMod . '__return', $return);
SessionHelper::set($this->vastDevMod . '__return', $return);
// set a GUID value if found
if (isset($item) && ObjectHelper::check($item) && isset($item->guid)
&& GuidHelper::valid($item->guid))
{
ComponentbuilderHelper::set($this->vastDevMod . '__guid', $item->guid);
SessionHelper::set($this->vastDevMod . '__guid', $item->guid);
}
}
}
@ -205,7 +206,7 @@ class ComponentbuilderModelCustom_code extends AdminModel
$id = $item->id;
}
// set the id and view name to session
if ($vdm = ComponentbuilderHelper::get('custom_code__'.$id))
if (($vdm = SessionHelper::get('custom_code__'.$id)) !== null)
{
$this->vastDevMod = $vdm;
}
@ -213,17 +214,17 @@ class ComponentbuilderModelCustom_code extends AdminModel
{
// set the vast development method key
$this->vastDevMod = UtilitiesStringHelper::random(50);
ComponentbuilderHelper::set($this->vastDevMod, 'custom_code__'.$id);
ComponentbuilderHelper::set('custom_code__'.$id, $this->vastDevMod);
SessionHelper::set($this->vastDevMod, 'custom_code__'.$id);
SessionHelper::set('custom_code__'.$id, $