Enabled akas() method to only show current active akas. Should fix the link register netmail from polling an invalid FTN id.
This commit is contained in:
@@ -59,17 +59,19 @@ final class Netmail extends Model implements Packet
|
||||
static::created(function($model) {
|
||||
// Save the Path
|
||||
$ppoid = NULL;
|
||||
foreach ($model->set_path as $path) {
|
||||
$po = DB::select('INSERT INTO netmail_path (netmail_id,address_id,parent_id,datetime,program) VALUES (?,?,?,?,?) RETURNING id',[
|
||||
$model->id,
|
||||
$path['node']->id,
|
||||
$ppoid,
|
||||
(string)$path['datetime'],
|
||||
$path['program'],
|
||||
]);
|
||||
|
||||
$ppoid = $po[0]->id;
|
||||
}
|
||||
if (isset($model->set_path))
|
||||
foreach ($model->set_path as $path) {
|
||||
$po = DB::select('INSERT INTO netmail_path (netmail_id,address_id,parent_id,datetime,program) VALUES (?,?,?,?,?) RETURNING id',[
|
||||
$model->id,
|
||||
$path['node']->id,
|
||||
$ppoid,
|
||||
(string)$path['datetime'],
|
||||
$path['program'],
|
||||
]);
|
||||
|
||||
$ppoid = $po[0]->id;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user