Merge branch 'develop'

pull/101/head v1.6
iglocska 2022-06-09 14:14:43 +02:00
commit b5d9d6bb6b
No known key found for this signature in database
GPG Key ID: BEA224F1FEF113AC
8 changed files with 32 additions and 24 deletions

View File

@ -25,7 +25,7 @@
"league/openapi-psr7-validator": "^0.17",
"phpunit/phpunit": "^8.5",
"psy/psysh": "@stable",
"wiremock-php/wiremock-php": "^2.32"
"wiremock-php/wiremock-php": "^2.33"
},
"suggest": {
"markstory/asset_compress": "An asset compression plugin which provides file concatenation and a flexible filter system for preprocessing and minification.",

View File

@ -37,6 +37,7 @@ use Cake\Core\Configure\Engine\PhpConfig;
use Cake\Datasource\ConnectionManager;
use Cake\Error\ConsoleErrorHandler;
use Cake\Error\ErrorHandler;
use Cake\Filesystem\File;
use Cake\Http\ServerRequest;
use Cake\Log\Log;
use Cake\Mailer\Mailer;
@ -88,10 +89,13 @@ try {
if (file_exists(CONFIG . 'app_local.php')) {
Configure::load('app_local', 'default');
//Configure::load('cerebrate', 'default', true);
$settings = file_get_contents(CONFIG . 'config.json');
$settings = json_decode($settings, true);
foreach ($settings as $path => $setting) {
Configure::write($path, $setting);
$settingsFile = new File(CONFIG . 'config.json');
if ($settingsFile->exists()) {
$settings = file_get_contents(CONFIG . 'config.json');
$settings = json_decode($settings, true);
foreach ($settings as $path => $setting) {
Configure::write($path, $setting);
}
}
}

View File

@ -1480,6 +1480,7 @@ class CRUDComponent extends Component
}
return $query->select([$field])
->distinct()
->all()
->extract($fieldToExtract)
->toList();
}

View File

@ -6,6 +6,8 @@ use App\Controller\AppController;
use Cake\Utility\Hash;
use Cake\Utility\Text;
use \Cake\Database\Expression\QueryExpression;
use Cake\Http\Exception\NotFoundException;
use Cake\Http\Exception\MethodNotAllowedException;
class LocalToolsController extends AppController
{
@ -110,6 +112,9 @@ class LocalToolsController extends AppController
$actionDetails = $this->LocalTools->getActionDetails($actionName);
$params['connection'] = $connection;
$results = $this->LocalTools->action($this->ACL->getUser()['id'], $connection->connector, $actionName, $params, $this->request);
if (empty($results)) {
throw new MethodNotAllowedException(__('Could not execute the requested action.'));
}
if (!empty($results['redirect'])) {
$this->redirect($results['redirect']);
}

View File

@ -1,4 +1,4 @@
{
"version": "1.4",
"version": "1.6",
"application": "Cerebrate"
}

View File

@ -209,7 +209,7 @@ class BootstrapGeneric
{
$html = '';
foreach ($params as $k => $v) {
if (!empty($k) && !empty($v)) {
if (!empty($k) && (isset($v) && $v !== '')) {
$html .= BootstrapGeneric::genHTMLParam($k, $v) . ' ';
}
}

View File

@ -39,24 +39,22 @@
var url = $('#view-child-body-<?= h($randomId) ?>').data('content-url');
var loadon = $('#view-child-body-<?= h($randomId) ?>').data('load-on');
if (loadon === 'ready') {
$.ajax({
success:function (data, textStatus) {
$('#view-child-body-<?= h($randomId) ?>').html(data);
},
type: "get",
cache: false,
url: url,
});
AJAXApi.quickFetchURL(url, {})
.then((html) => {
$('#view-child-body-<?= h($randomId) ?>').html(html);
})
.catch((err) => {
$('#view-child-body-<?= h($randomId) ?>').text(err.message);
})
} else {
$('#view-child-<?= h($randomId) ?>').on('hidden.bs.collapse', function () {
$.ajax({
success:function (data, textStatus) {
$('#view-child-body-<?= h($randomId) ?>').html(data);
},
type: "get",
cache: false,
url: url,
});
AJAXApi.quickFetchURL(url, {})
.then((html) => {
$('#view-child-body-<?= h($randomId) ?>').html(html);
})
.catch((err) => {
$('#view-child-body-<?= h($randomId) ?>').text(err.message);
})
})
}
});

View File

@ -76,7 +76,7 @@ trait WireMockTestTrait
$headers = $stub->getRequest()->getHeaders();
if (is_array($headers)) {
foreach ($headers as $header => $rule) {
$validator = $validator->withHeader($header, ValueMatchingStrategy::fromArray($rule));
$validator = $validator->withHeader($header, $rule);
}
}