update 2024-04-07 13:20:18
This commit is contained in:
parent
56e9e09d5f
commit
8b9f2f76f4
@ -14,7 +14,7 @@ class Insert #Gold {
|
||||
# Config $config
|
||||
# Table $table
|
||||
# Model $model
|
||||
# \JDatabaseDriver $db
|
||||
# $db
|
||||
+ __construct(?Config $config = null, ?Table $table = null, ...)
|
||||
+ value(mixed $value, int $id, ...) : bool
|
||||
+ item(object $item, ?string $table = null) : bool
|
||||
@ -30,7 +30,6 @@ note right of Insert::__construct
|
||||
?Config $config = null
|
||||
?Table $table = null
|
||||
?Model $model = null
|
||||
?\JDatabaseDriver $db = null
|
||||
end note
|
||||
|
||||
note right of Insert::value
|
||||
|
@ -55,10 +55,9 @@ class Insert implements InsertInterface
|
||||
/**
|
||||
* Database object to query local DB
|
||||
*
|
||||
* @var \JDatabaseDriver
|
||||
* @since 3.2.0
|
||||
**/
|
||||
protected \JDatabaseDriver $db;
|
||||
protected $db;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
@ -66,17 +65,16 @@ class Insert implements InsertInterface
|
||||
* @param Config|null $config The search config object.
|
||||
* @param Table|null $table The search table object.
|
||||
* @param Model|null $model The search get model object.
|
||||
* @param \JDatabaseDriver|null $db The database object.
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function __construct(?Config $config = null, ?Table $table = null,
|
||||
?Model $model = null, ?\JDatabaseDriver $db = null)
|
||||
?Model $model = null)
|
||||
{
|
||||
$this->config = $config ?: Factory::_('Config');
|
||||
$this->table = $table ?: Factory::_('Table');
|
||||
$this->model = $model ?: Factory::_('Insert.Model');
|
||||
$this->db = $db ?: JoomlaFactory::getDbo();
|
||||
$this->db = JoomlaFactory::getDbo();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -25,10 +25,9 @@
|
||||
/**
|
||||
* Database object to query local DB
|
||||
*
|
||||
* @var \JDatabaseDriver
|
||||
* @since 3.2.0
|
||||
**/
|
||||
protected \JDatabaseDriver $db;
|
||||
protected $db;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
@ -36,17 +35,16 @@
|
||||
* @param Config|null $config The search config object.
|
||||
* @param Table|null $table The search table object.
|
||||
* @param Model|null $model The search get model object.
|
||||
* @param \JDatabaseDriver|null $db The database object.
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function __construct(?Config $config = null, ?Table $table = null,
|
||||
?Model $model = null, ?\JDatabaseDriver $db = null)
|
||||
?Model $model = null)
|
||||
{
|
||||
$this->config = $config ?: Factory::_('Config');
|
||||
$this->table = $table ?: Factory::_('Table');
|
||||
$this->model = $model ?: Factory::_('Insert.Model');
|
||||
$this->db = $db ?: JoomlaFactory::getDbo();
|
||||
$this->db = JoomlaFactory::getDbo();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -119,13 +119,35 @@ class Load extends Model implements ModelInterface
|
||||
*/
|
||||
protected function validateAfter(&$value, ?string $field = null, ?string $table = null): bool
|
||||
{
|
||||
// Start note to self
|
||||
// Yes we don't search in the field->xml (field) PHP because the xml is messy
|
||||
// first of all we need to change that storage method :((( seriously
|
||||
// and the actual PHP is stored in the xml as base64 with a [__.o0=base64=Oo.__] key in front of it
|
||||
// if I can go back and drag you around by your ear... I will, but okay you did not know better.
|
||||
// Listen you have tried to fix this a few times already (I lost count) and by the time you realize how it works
|
||||
// two hours have been wasted, and you usually only then realize why it's not fixed in the first place... o boy... just walk now!
|
||||
// since unless you have three days don't even look further, this is a huge issue/mess
|
||||
// and while I agree it needs fixing, it will not take a few hours... but days
|
||||
// End note to self
|
||||
|
||||
// check values
|
||||
if (StringHelper::check($value) || ArrayHelper::check($value, true))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
// remove empty values
|
||||
return false;
|
||||
|
||||
// Start another note to self
|
||||
// If you're still here
|
||||
// the problem is not opening the PHP in the xml,
|
||||
// it is storing it with the updated changes... if any are made via the search-update methods
|
||||
// so the only way to fix this is to change the whole way the xml values in the field table is stored.
|
||||
// Yes, that is right... all the way back to the field view... and then to update all places you open that xml values
|
||||
// and get the values out of the xml string and use them, and if you've forgotten, that is nearly everywhere,
|
||||
// and so let the refactoring of the foundation begin... there I saved you another 3 hours.
|
||||
// End another note to self
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -88,13 +88,35 @@
|
||||
*/
|
||||
protected function validateAfter(&$value, ?string $field = null, ?string $table = null): bool
|
||||
{
|
||||
// Start note to self
|
||||
// Yes we don't search in the field->xml (field) PHP because the xml is messy
|
||||
// first of all we need to change that storage method :((( seriously
|
||||
// and the actual PHP is stored in the xml as base64 with a [__.o0=base64=Oo.__] key in front of it
|
||||
// if I can go back and drag you around by your ear... I will, but okay you did not know better.
|
||||
// Listen you have tried to fix this a few times already (I lost count) and by the time you realize how it works
|
||||
// two hours have been wasted, and you usually only then realize why it's not fixed in the first place... o boy... just walk now!
|
||||
// since unless you have three days don't even look further, this is a huge issue/mess
|
||||
// and while I agree it needs fixing, it will not take a few hours... but days
|
||||
// End note to self
|
||||
|
||||
// check values
|
||||
if (StringHelper::check($value) || ArrayHelper::check($value, true))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
// remove empty values
|
||||
return false;
|
||||
|
||||
// Start another note to self
|
||||
// If you're still here
|
||||
// the problem is not opening the PHP in the xml,
|
||||
// it is storing it with the updated changes... if any are made via the search-update methods
|
||||
// so the only way to fix this is to change the whole way the xml values in the field table is stored.
|
||||
// Yes, that is right... all the way back to the field view... and then to update all places you open that xml values
|
||||
// and get the values out of the xml string and use them, and if you've forgotten, that is nearly everywhere,
|
||||
// and so let the refactoring of the foundation begin... there I saved you another 3 hours.
|
||||
// End another note to self
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -24,15 +24,15 @@
|
||||
"use": "6e2ca779-f70e-4871-a138-0ee5eaec6a97",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection5": {
|
||||
"use_selection3": {
|
||||
"use": "0a59c65c-9daf-4bc9-baf4-e063ff9e6a8a",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection3": {
|
||||
"use_selection4": {
|
||||
"use": "4b225c51-d293-48e4-b3f6-5136cf5c3f18",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection4": {
|
||||
"use_selection5": {
|
||||
"use": "1f28cb53-60d9-4db1-b517-3c7dc6b429ef",
|
||||
"as": "default"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user