mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-07 20:23:51 +00:00
Fix the order the IVR Menus are listed in.
This commit is contained in:
@@ -209,8 +209,7 @@ include "root.php";
|
||||
$this->connect();
|
||||
}
|
||||
//get data from the database
|
||||
$sql = "";
|
||||
$sql .= " select * from ".$this->table." ";
|
||||
$sql = " select * from ".$this->table." ";
|
||||
if ($this->where) {
|
||||
$i = 0;
|
||||
foreach($this->where as $row) {
|
||||
@@ -223,21 +222,18 @@ include "root.php";
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
if ($this->order_by) {
|
||||
if (count($this->order_by) > 0) {
|
||||
$sql .= "order by ";
|
||||
$i = 1;
|
||||
foreach($this->order_by as $row) {
|
||||
if (count($this->order_by) == $i) {
|
||||
$sql .= $row['name']." ";
|
||||
$sql .= $row['name']." ".$row['order']." ";
|
||||
}
|
||||
else {
|
||||
$sql .= $row['name'].", ";
|
||||
$sql .= $row['name']." ".$row['order'].", ";
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
if ($this->order_type) {
|
||||
$sql .= $this->order_type." ";
|
||||
}
|
||||
}
|
||||
if ($this->limit) {
|
||||
$sql .= " limit ".$this->limit." offset ".$this->offset." ";
|
||||
|
||||
Reference in New Issue
Block a user