From 010edf140760f95053b6867803c4f2d43c4d4a79 Mon Sep 17 00:00:00 2001 From: Potherca-Bot Date: Thu, 4 Sep 2025 09:10:57 +0000 Subject: [PATCH 1/2] Adds separate file for 'KeyValueStore.php'. --- core/counter.class.inc.php => sources/Core/KeyValueStore.php | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename core/counter.class.inc.php => sources/Core/KeyValueStore.php (100%) diff --git a/core/counter.class.inc.php b/sources/Core/KeyValueStore.php similarity index 100% rename from core/counter.class.inc.php rename to sources/Core/KeyValueStore.php From ddff020a1dc8a41591713f95214dd46ee0416b76 Mon Sep 17 00:00:00 2001 From: Potherca-Bot Date: Thu, 4 Sep 2025 09:10:57 +0000 Subject: [PATCH 2/2] Changes content in separated file 'KeyValueStore.php'. --- sources/Core/KeyValueStore.php | 55 +++++++++++----------------------- 1 file changed, 18 insertions(+), 37 deletions(-) diff --git a/sources/Core/KeyValueStore.php b/sources/Core/KeyValueStore.php index 9a1e0b4ee7..db6da2e3f6 100644 --- a/sources/Core/KeyValueStore.php +++ b/sources/Core/KeyValueStore.php @@ -1,22 +1,4 @@ '', - 'key_type' => 'autoincrement', - 'name_attcode' => array('key_name'), - 'state_attcode' => '', - 'reconc_keys' => array(''), - 'db_table' => 'key_value_store', - 'db_key_field' => 'id', + 'category' => '', + 'key_type' => 'autoincrement', + 'name_attcode' => array('key_name'), + 'state_attcode' => '', + 'reconc_keys' => array(''), + 'db_table' => 'key_value_store', + 'db_key_field' => 'id', 'db_finalclass_field' => '', - 'indexes' => array ( - array ( + 'indexes' => array( + array( 0 => 'key_name', 1 => 'namespace', ), - ),); + ), + ); MetaModel::Init_Params($aParams); MetaModel::Init_InheritAttributes(); - MetaModel::Init_AddAttribute(new AttributeString("namespace", array("allowed_values"=>null, "sql"=>'namespace', "default_value"=>null, "is_null_allowed"=>true, "depends_on"=>array(), "always_load_in_tables"=>false))); - MetaModel::Init_AddAttribute(new AttributeString("key_name", array("allowed_values"=>null, "sql"=>'key_name', "default_value"=>'', "is_null_allowed"=>false, "depends_on"=>array(), "always_load_in_tables"=>false))); - MetaModel::Init_AddAttribute(new AttributeString("value", array("allowed_values"=>null, "sql"=>'value', "default_value"=>'0', "is_null_allowed"=>false, "depends_on"=>array(), "always_load_in_tables"=>false))); + MetaModel::Init_AddAttribute(new AttributeString("namespace", array("allowed_values" => null, "sql" => 'namespace', "default_value" => null, "is_null_allowed" => true, "depends_on" => array(), "always_load_in_tables" => false))); + MetaModel::Init_AddAttribute(new AttributeString("key_name", array("allowed_values" => null, "sql" => 'key_name', "default_value" => '', "is_null_allowed" => false, "depends_on" => array(), "always_load_in_tables" => false))); + MetaModel::Init_AddAttribute(new AttributeString("value", array("allowed_values" => null, "sql" => 'value', "default_value" => '0', "is_null_allowed" => false, "depends_on" => array(), "always_load_in_tables" => false))); - MetaModel::Init_SetZListItems('details', array ( + MetaModel::Init_SetZListItems('details', array( 0 => 'key_name', 1 => 'value', 2 => 'namespace', )); - MetaModel::Init_SetZListItems('standard_search', array ( + MetaModel::Init_SetZListItems('standard_search', array( 0 => 'key_name', 1 => 'value', 2 => 'namespace', )); - MetaModel::Init_SetZListItems('list', array ( + MetaModel::Init_SetZListItems('list', array( 0 => 'key_name', 1 => 'value', 2 => 'namespace', - )); - ; + ));; }