diff --git a/app/Console/Commands/moonmailer.php b/app/Console/Commands/moonmailer.php
new file mode 100644
index 000000000..ebe72d745
--- /dev/null
+++ b/app/Console/Commands/moonmailer.php
@@ -0,0 +1,42 @@
+SetStartStatus();
-
-
-
-
-
- //Mark the job as finished
- $task->SetStopStatus();
- }
-
- private function CheckEsiScope() {
- //Check the esi scope.
- //If the esi scopes are not present then send a mail
- $mail = new EveMail;
- $mail->sender = 93738489;
- $mail->subject = 'Incorrect ESI Scope(s)';
- $mail->body = "You don't have the correct ESI Scope(s) registered.
" .
- "Please register the following scopes:
" .
- $scopes .
- "Sincerely,
" .
- "Amund Risalo";
- $mail->recipient = (int)$charId;
- $mail->recipient_type = 'character';
- $mail->save();
-
- SendEveMail::dispatch($mail);
- }
-
- private function CloneSaverMail() {
- //Setup time frame job has been sent so we don't send too many mails
-
-
- //Store a new eve mail model for the job to dispatch
- $mail = new EveMail;
- $mail->sender = $self;
- $mail->subject = 'Clone Saver Alert';
- $mail->body = 'You have failed to change clones before undocking.
Please be advised we believe you should change your clones due to your expensive implants.
Sincerely,
The Clone Saver Team';
- $mail->recipient = (int)$self;
- $mail->recipient_type = 'character';
-
- //Dispatch the job
- SendEveMail::dispatch($mail)->delay(Carbon::now()->addSeconds(1));
- }
-}
diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php
index fc953ffb4..b9013ba72 100644
--- a/app/Console/Kernel.php
+++ b/app/Console/Kernel.php
@@ -19,7 +19,6 @@ class Kernel extends ConsoleKernel
Commands\UpdateMoonPricing::class,
Commands\CalculateMarketTax::class,
Commands\holdingfinances::class,
- Commands\RunCloneSaver::class,
];
/**
@@ -45,9 +44,6 @@ class Kernel extends ConsoleKernel
$schedule->command('services:calculatemarkettax')
->monthlyOn(1, '08:00')
->withoutOverlapping();
- //$schedule->command('services:clonesaver')
- // ->everyMinute()
- // ->withoutOverlapping();
}
/**
diff --git a/app/Http/Controllers/CloneSaverController.php b/app/Http/Controllers/CloneSaverController.php
deleted file mode 100644
index ef543c9d7..000000000
--- a/app/Http/Controllers/CloneSaverController.php
+++ /dev/null
@@ -1,27 +0,0 @@
- 'required'
]);
- $date = strtotime($request->date . '00:00:01');
+ $date = new Carbon($request->date . '00:00:01');
+ //$date = strtotime($request->date . '00:00:01');
//Update the database entry
Moon::where([
'System' => $request->system,
@@ -137,7 +138,7 @@ class MoonsAdminController extends Controller
foreach($moons as $moon) {
//Setup formats as needed
$spm = $moon->System . ' - ' . $moon->Planet . ' - ' . $moon->Moon;
- $rentalEnd = date('m/d/Y', $moon->RentalEnd);
+ $rentalEnd = date('Y-m-d', $moon->RentalEnd);
$price = $moonCalc->SpatialMoonsOnlyGoo($moon->FirstOre, $moon->FirstQuantity, $moon->SecondOre, $moon->SecondQuantity,
$moon->ThirdOre, $moon->ThirdQuantity, $moon->FourthOre, $moon->FourthQuantity);
//Add the data to the html string to be passed to the view
diff --git a/app/Library/Moons/MoonMailer.php b/app/Library/Moons/MoonMailer.php
new file mode 100644
index 000000000..c42232755
--- /dev/null
+++ b/app/Library/Moons/MoonMailer.php
@@ -0,0 +1,33 @@
+sender = 93738489;
+ $mail->subject = 'Moon Rental';
+ $mail->body = $body;
+ $mail->recipient = (int)$recipient;
+ $mail->recipient_type = 'character';
+ $mail->save();
+
+ SendEveMail::dispatch($mail);
+ }
+}
+
+?>
\ No newline at end of file