chg: [inbox:createEntry] Checks for remote back connection is more flexible
Handle the case of trailing slashcli-modification-summary
parent
88313679a6
commit
e05bf61251
|
@ -62,8 +62,11 @@ class InboxTable extends AppTable
|
|||
$this->Broods = \Cake\ORM\TableRegistry::getTableLocator()->get('Broods');
|
||||
$this->Individuals = \Cake\ORM\TableRegistry::getTableLocator()->get('Individuals');
|
||||
$errors = [];
|
||||
$originUrl = trim($entryData['origin'], '/');
|
||||
$brood = $this->Broods->find()
|
||||
->where(['url' => $entryData['origin']])
|
||||
->where([
|
||||
'url IN' => [$originUrl, "{$originUrl}/"]
|
||||
])
|
||||
->first();
|
||||
if (empty($brood)) {
|
||||
$errors[] = __('Unkown brood `{0}`', $entryData['data']['cerebrateURL']);
|
||||
|
|
Loading…
Reference in New Issue