Voicemail - Messages: Implement paging.

This commit is contained in:
fusionate
2024-06-07 15:18:14 -06:00
parent cb2b1b4132
commit a33975dc29
2 changed files with 36 additions and 3 deletions

View File

@@ -37,6 +37,7 @@
public $voicemail_message_uuid;
public $order_by;
public $order;
public $offset;
public $type;
/**
@@ -253,6 +254,12 @@
else {
$sql .= "order by v.voicemail_id, m.".$this->order_by." ".$this->order." ";
}
//if paging offset defined, apply it along with rows per page
if (isset($this->offset)) {
$rows_per_page = $_SESSION['domain']['paging']['numeric'] != '' ? $_SESSION['domain']['paging']['numeric'] : 50;
$offset = isset($this->offset) && is_numeric($this->offset) ? $this->offset : 0;
$sql .= limit_offset($rows_per_page, $offset);
}
$parameters['domain_uuid'] = $this->domain_uuid;
$parameters['time_zone'] = $time_zone;
$database = new database;
@@ -1057,4 +1064,4 @@ foreach ($_SESSION['user']['extension'] as $value) {
}
*/
?>
?>