diff --git a/application/controllers/Widgets.php b/application/controllers/Widgets.php index 783faf654..5f0b22638 100644 --- a/application/controllers/Widgets.php +++ b/application/controllers/Widgets.php @@ -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); }