WIP with option and result types
This commit is contained in:
@@ -14,10 +14,10 @@ FeedReaderCentral\Security::verifyUser();
|
||||
|
||||
if (key_exists('refresh', $_GET)) {
|
||||
$refreshResult = Feed::refreshAll();
|
||||
if (key_exists('ok', $refreshResult)) {
|
||||
if ($refreshResult->success()->isDefined()) {
|
||||
add_info('All feeds refreshed successfully');
|
||||
} else {
|
||||
add_error(nl2br($refreshResult['error']));
|
||||
add_error(nl2br($refreshResult->error()->get()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user