mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-10-20 07:14:33 -04:00
Fix bugs
- Add missing `MailchimpPlugin.` prefix to lang() calls. - Do not subscribe customer if consent is not true. - Escape output in tabular_helper.php - Removed testConnection() as unneeded code - Fix activity count logic - Whitelist Sort Column Headers for Plugins.php - Store encrypted API key as base64 instead of raw binary to prevent truncation - Rollback on batchSave partial failure. - Remove dead code. - Disable plugin before uninstalling it. - Fix getPluginSettings() internal key leak - Add action column to plugin headers function - Automatically add grant to all admins in case person_id 1 is not active Signed-off-by: objec <objecttothis@gmail.com>
This commit is contained in:
1 parent
478934321d
commit
cd91ac3ff3
7 files changed
+51
-59
No files matched your search
@@ -49,7 +49,8 @@ class PluginConfig extends Model
|
||||
public function getPluginSettings(string $pluginId): array
|
||||
{
|
||||
$builder = $this->db->table('plugin_config');
|
||||
$builder->like('key', $pluginId . '_', 'after');
|
||||
$builder->like('key', $pluginId . '_', 'after')
|
||||
->notLike('key', $pluginId . '__', 'after');
|
||||
$query = $builder->get();
|
||||
|
||||
$settings = [];
|
||||
@@ -79,17 +80,17 @@ class PluginConfig extends Model
|
||||
|
||||
public function batchSave(array $data): bool
|
||||
{
|
||||
$success = true;
|
||||
|
||||
$this->db->transStart();
|
||||
$this->db->transBegin();
|
||||
|
||||
foreach ($data as $key => $value) {
|
||||
$success &= $this->setValue($key, $value);
|
||||
if (!$this->setValue($key, $value)) {
|
||||
$this->db->transRollback();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
$this->db->transComplete();
|
||||
|
||||
return $success && $this->db->transStatus();
|
||||
$this->db->transCommit();
|
||||
return true;
|
||||
}
|
||||
|
||||
public function getAll(): array
|
||||
|
||||
Reference in new issue
Block a user