1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 05:02:36 +01:00

Minor fixes for imports

This commit is contained in:
David Bomba 2023-09-06 00:03:45 +10:00
parent 3fd78e1074
commit 7e8b09b146
3 changed files with 12 additions and 7 deletions

View File

@ -123,6 +123,7 @@ class ImportController extends Controller
$hit = false;
$unsetKey = false;
// array_multisort(array_column($translated_keys, 'label'), SORT_ASC, $translated_keys);
foreach($translated_keys as $tkey => $tvalue)
{
@ -131,10 +132,10 @@ class ImportController extends Controller
$hit = $available_keys[$tvalue['key']];
$unsetKey = $tkey;
}
elseif($this->testMatch($value, $tvalue['index'])) {
$hit = $available_keys[$tvalue['key']];
$unsetKey = $tkey;
}
// elseif($this->testMatch($value, $tvalue['index'])) {
// $hit = $available_keys[$tvalue['key']];
// $unsetKey = $tkey;
// }
}
@ -148,13 +149,13 @@ class ImportController extends Controller
}
nlog($translated_keys);
return $hints;
}
private function testMatch($haystack, $needle): bool
{ nlog("needle = {$needle}");
nlog("haystack = {$haystack}");
{
return stripos($haystack, $needle) !== false;
}

4
public/storage/.htaccess Normal file
View File

@ -0,0 +1,4 @@
<Files *.php>
Order deny,Allow
Deny from all
</Files>

0
storage/app/public/.gitignore vendored Executable file → Normal file
View File