mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-08 20:22:42 +01:00
Fixes for check data
This commit is contained in:
parent
f325370986
commit
d73e05b5df
@ -918,7 +918,18 @@ class CheckData extends Command
|
||||
$p->saveQuietly();
|
||||
|
||||
|
||||
$this->logMessage("Fixing currency for # {$p->id}");
|
||||
$this->logMessage("Fixing currency for # {$p->id}");
|
||||
|
||||
});
|
||||
|
||||
Company::whereNull("subdomain")
|
||||
->cursor()
|
||||
->when(Ninja::isHosted())
|
||||
->each(function ($c) {
|
||||
$c->subdomain = MultiDB::randomSubdomainGenerator();
|
||||
$c->save();
|
||||
|
||||
$this->logMessage("Fixing subdomain for # {$c->id}");
|
||||
|
||||
});
|
||||
|
||||
|
@ -557,9 +557,9 @@ class MultiDB
|
||||
$current_db = config('database.default');
|
||||
|
||||
do {
|
||||
$length = 8;
|
||||
$length = 10;
|
||||
$string = '';
|
||||
$vowels = ['a', 'e', 'i', 'o', 'u'];
|
||||
$vowels = ['a', 'e', 'i', 'o', 'u', 'y'];
|
||||
$consonants = [
|
||||
'b', 'c', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'm',
|
||||
'n', 'p', 'r', 's', 't', 'v', 'w', 'x', 'y', 'z',
|
||||
@ -568,7 +568,7 @@ class MultiDB
|
||||
$max = $length / 2;
|
||||
for ($i = 1; $i <= $max; $i++) {
|
||||
$string .= $consonants[rand(0, 19)];
|
||||
$string .= $vowels[rand(0, 4)];
|
||||
$string .= $vowels[rand(0, 5)];
|
||||
}
|
||||
} while (! self::checkDomainAvailable($string));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user