v.2.4
Restore shifts
This commit is contained in:
@@ -20,8 +20,23 @@ class POSTRestoreShift extends HRCCommand implements HRCCommandInterface {
|
||||
protected $signature = 'postrestoreshift';
|
||||
|
||||
public function command($input, $output = null) {
|
||||
function dirDel($dir) {
|
||||
$d = opendir($dir);
|
||||
while (($entry = readdir($d)) !== false) {
|
||||
if ($entry != "." && $entry != "..") {
|
||||
if (is_dir($dir . "/" . $entry)) {
|
||||
dirDel($dir . "/" . $entry);
|
||||
} else {
|
||||
unlink($dir . "/" . $entry);
|
||||
}
|
||||
}
|
||||
}
|
||||
closedir($d);
|
||||
rmdir($dir);
|
||||
}
|
||||
$shift_id = 4;
|
||||
$cache_dir = __DIR__ . "\\..\\..\\..\\Cache\\";
|
||||
dirDel($cache_dir);
|
||||
$terminal_updates_old = TerminalUpdate::where('method', '=', 'online')->get();
|
||||
foreach ($terminal_updates_old as $key => $terminal_online) {
|
||||
$old_date = date_create($terminal_online['next_at']);
|
||||
|
||||
Reference in New Issue
Block a user