mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
Extract recent QSO count in QSO widget to a constant
This commit is contained in:
@@ -8,13 +8,15 @@
|
||||
|
||||
class Widgets extends CI_Controller {
|
||||
|
||||
const LAST_QSOS_COUNT = 15; // number of of qsos to be displayed in the last qsos widget
|
||||
|
||||
public function index()
|
||||
{
|
||||
// Show a help page
|
||||
}
|
||||
|
||||
|
||||
// Can be used to embed last 11 QSOs in a iframe or javascript include.
|
||||
// Can be used to embed last self::LAST_QSOS_COUNT QSOs in a iframe or javascript include.
|
||||
public function qsos($logbook_slug = null) {
|
||||
|
||||
if($logbook_slug == null) {
|
||||
@@ -40,7 +42,10 @@ class Widgets extends CI_Controller {
|
||||
show_404(__("Unknown Public Page."));
|
||||
}
|
||||
|
||||
$data['last_qsos_list'] = $this->logbook_model->get_last_qsos(15, $logbooks_locations_array);
|
||||
$data['last_qsos_list'] = $this->logbook_model->get_last_qsos(
|
||||
self::LAST_QSOS_COUNT,
|
||||
$logbooks_locations_array,
|
||||
);
|
||||
|
||||
$this->load->view('widgets/qsos', $data);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user