commit
b5d9d6bb6b
|
@ -25,7 +25,7 @@
|
||||||
"league/openapi-psr7-validator": "^0.17",
|
"league/openapi-psr7-validator": "^0.17",
|
||||||
"phpunit/phpunit": "^8.5",
|
"phpunit/phpunit": "^8.5",
|
||||||
"psy/psysh": "@stable",
|
"psy/psysh": "@stable",
|
||||||
"wiremock-php/wiremock-php": "^2.32"
|
"wiremock-php/wiremock-php": "^2.33"
|
||||||
},
|
},
|
||||||
"suggest": {
|
"suggest": {
|
||||||
"markstory/asset_compress": "An asset compression plugin which provides file concatenation and a flexible filter system for preprocessing and minification.",
|
"markstory/asset_compress": "An asset compression plugin which provides file concatenation and a flexible filter system for preprocessing and minification.",
|
||||||
|
|
|
@ -37,6 +37,7 @@ use Cake\Core\Configure\Engine\PhpConfig;
|
||||||
use Cake\Datasource\ConnectionManager;
|
use Cake\Datasource\ConnectionManager;
|
||||||
use Cake\Error\ConsoleErrorHandler;
|
use Cake\Error\ConsoleErrorHandler;
|
||||||
use Cake\Error\ErrorHandler;
|
use Cake\Error\ErrorHandler;
|
||||||
|
use Cake\Filesystem\File;
|
||||||
use Cake\Http\ServerRequest;
|
use Cake\Http\ServerRequest;
|
||||||
use Cake\Log\Log;
|
use Cake\Log\Log;
|
||||||
use Cake\Mailer\Mailer;
|
use Cake\Mailer\Mailer;
|
||||||
|
@ -88,12 +89,15 @@ try {
|
||||||
if (file_exists(CONFIG . 'app_local.php')) {
|
if (file_exists(CONFIG . 'app_local.php')) {
|
||||||
Configure::load('app_local', 'default');
|
Configure::load('app_local', 'default');
|
||||||
//Configure::load('cerebrate', 'default', true);
|
//Configure::load('cerebrate', 'default', true);
|
||||||
|
$settingsFile = new File(CONFIG . 'config.json');
|
||||||
|
if ($settingsFile->exists()) {
|
||||||
$settings = file_get_contents(CONFIG . 'config.json');
|
$settings = file_get_contents(CONFIG . 'config.json');
|
||||||
$settings = json_decode($settings, true);
|
$settings = json_decode($settings, true);
|
||||||
foreach ($settings as $path => $setting) {
|
foreach ($settings as $path => $setting) {
|
||||||
Configure::write($path, $setting);
|
Configure::write($path, $setting);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* When debug = true the metadata cache should only last
|
* When debug = true the metadata cache should only last
|
||||||
|
|
|
@ -1480,6 +1480,7 @@ class CRUDComponent extends Component
|
||||||
}
|
}
|
||||||
return $query->select([$field])
|
return $query->select([$field])
|
||||||
->distinct()
|
->distinct()
|
||||||
|
->all()
|
||||||
->extract($fieldToExtract)
|
->extract($fieldToExtract)
|
||||||
->toList();
|
->toList();
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,6 +6,8 @@ use App\Controller\AppController;
|
||||||
use Cake\Utility\Hash;
|
use Cake\Utility\Hash;
|
||||||
use Cake\Utility\Text;
|
use Cake\Utility\Text;
|
||||||
use \Cake\Database\Expression\QueryExpression;
|
use \Cake\Database\Expression\QueryExpression;
|
||||||
|
use Cake\Http\Exception\NotFoundException;
|
||||||
|
use Cake\Http\Exception\MethodNotAllowedException;
|
||||||
|
|
||||||
class LocalToolsController extends AppController
|
class LocalToolsController extends AppController
|
||||||
{
|
{
|
||||||
|
@ -110,6 +112,9 @@ class LocalToolsController extends AppController
|
||||||
$actionDetails = $this->LocalTools->getActionDetails($actionName);
|
$actionDetails = $this->LocalTools->getActionDetails($actionName);
|
||||||
$params['connection'] = $connection;
|
$params['connection'] = $connection;
|
||||||
$results = $this->LocalTools->action($this->ACL->getUser()['id'], $connection->connector, $actionName, $params, $this->request);
|
$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'])) {
|
if (!empty($results['redirect'])) {
|
||||||
$this->redirect($results['redirect']);
|
$this->redirect($results['redirect']);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{
|
{
|
||||||
"version": "1.4",
|
"version": "1.6",
|
||||||
"application": "Cerebrate"
|
"application": "Cerebrate"
|
||||||
}
|
}
|
||||||
|
|
|
@ -209,7 +209,7 @@ class BootstrapGeneric
|
||||||
{
|
{
|
||||||
$html = '';
|
$html = '';
|
||||||
foreach ($params as $k => $v) {
|
foreach ($params as $k => $v) {
|
||||||
if (!empty($k) && !empty($v)) {
|
if (!empty($k) && (isset($v) && $v !== '')) {
|
||||||
$html .= BootstrapGeneric::genHTMLParam($k, $v) . ' ';
|
$html .= BootstrapGeneric::genHTMLParam($k, $v) . ' ';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,24 +39,22 @@
|
||||||
var url = $('#view-child-body-<?= h($randomId) ?>').data('content-url');
|
var url = $('#view-child-body-<?= h($randomId) ?>').data('content-url');
|
||||||
var loadon = $('#view-child-body-<?= h($randomId) ?>').data('load-on');
|
var loadon = $('#view-child-body-<?= h($randomId) ?>').data('load-on');
|
||||||
if (loadon === 'ready') {
|
if (loadon === 'ready') {
|
||||||
$.ajax({
|
AJAXApi.quickFetchURL(url, {})
|
||||||
success:function (data, textStatus) {
|
.then((html) => {
|
||||||
$('#view-child-body-<?= h($randomId) ?>').html(data);
|
$('#view-child-body-<?= h($randomId) ?>').html(html);
|
||||||
},
|
})
|
||||||
type: "get",
|
.catch((err) => {
|
||||||
cache: false,
|
$('#view-child-body-<?= h($randomId) ?>').text(err.message);
|
||||||
url: url,
|
})
|
||||||
});
|
|
||||||
} else {
|
} else {
|
||||||
$('#view-child-<?= h($randomId) ?>').on('hidden.bs.collapse', function () {
|
$('#view-child-<?= h($randomId) ?>').on('hidden.bs.collapse', function () {
|
||||||
$.ajax({
|
AJAXApi.quickFetchURL(url, {})
|
||||||
success:function (data, textStatus) {
|
.then((html) => {
|
||||||
$('#view-child-body-<?= h($randomId) ?>').html(data);
|
$('#view-child-body-<?= h($randomId) ?>').html(html);
|
||||||
},
|
})
|
||||||
type: "get",
|
.catch((err) => {
|
||||||
cache: false,
|
$('#view-child-body-<?= h($randomId) ?>').text(err.message);
|
||||||
url: url,
|
})
|
||||||
});
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -76,7 +76,7 @@ trait WireMockTestTrait
|
||||||
$headers = $stub->getRequest()->getHeaders();
|
$headers = $stub->getRequest()->getHeaders();
|
||||||
if (is_array($headers)) {
|
if (is_array($headers)) {
|
||||||
foreach ($headers as $header => $rule) {
|
foreach ($headers as $header => $rule) {
|
||||||
$validator = $validator->withHeader($header, ValueMatchingStrategy::fromArray($rule));
|
$validator = $validator->withHeader($header, $rule);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue