mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
Handle empty results
This commit is contained in:
@@ -402,7 +402,6 @@ class Update extends CI_Controller {
|
||||
$this->load->view('interface_assets/header', $data);
|
||||
$this->load->view('lotw/satupdate', $bodyData);
|
||||
$this->load->view('interface_assets/footer');
|
||||
//echo $result;
|
||||
}
|
||||
|
||||
function version_check() {
|
||||
|
||||
@@ -380,7 +380,7 @@ class Update_model extends CI_Model {
|
||||
|
||||
$response = curl_exec($curl);
|
||||
if (curl_errno($curl)) {
|
||||
echo __('cURL error:').' '.curl_error($curl).' ('.curl_errno($curl).')';
|
||||
log_message('error', __('cURL error:').' '.curl_error($curl).' ('.curl_errno($curl).')');
|
||||
return;
|
||||
}
|
||||
curl_close($curl);
|
||||
|
||||
@@ -2,12 +2,16 @@
|
||||
<h2><?php echo $page_title; ?></h2>
|
||||
|
||||
<?php
|
||||
print '<table class="table table-striped table-hover">';
|
||||
print '<tr><th>'.__('Name').'</th><th>'.__('Display Name').'</th><th>'.__('Start Date').'</th><th>'.__('End Date').'</th><th>'.__('Status').'</th></tr>';
|
||||
foreach ($satupdates as $sat) {
|
||||
print('<tr><td>'.$sat['name'].'</td><td>'.$sat['displayname'].'</td><td>'.$sat['startDate'].'</td><td>'.$sat['endDate'].'</td><td>'.$sat['status'].'</td></tr>');
|
||||
if ($satupdates) {
|
||||
echo '<table class="table table-striped table-hover">';
|
||||
echo '<tr><th>'.__('Name').'</th><th>'.__('Display Name').'</th><th>'.__('Start Date').'</th><th>'.__('End Date').'</th><th>'.__('Status').'</th></tr>';
|
||||
foreach ($satupdates as $sat) {
|
||||
echo('<tr><td>'.$sat['name'].'</td><td>'.$sat['displayname'].'</td><td>'.$sat['startDate'].'</td><td>'.$sat['endDate'].'</td><td>'.$sat['status'].'</td></tr>');
|
||||
}
|
||||
echo '</table>';
|
||||
} else {
|
||||
echo 'No updates found or file could not be parsed.';
|
||||
}
|
||||
print '</table>';
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user