mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-03-08 01:28:43 +00:00
List View: Updates to action classes.
This commit is contained in:
@@ -870,14 +870,14 @@ if (!class_exists('modules')) {
|
||||
//filter out unchecked modules, build where clause for below
|
||||
foreach($records as $record) {
|
||||
if ($record['checked'] == 'true' && is_uuid($record['uuid'])) {
|
||||
$record_uuids[] = $this->uuid_prefix."uuid = '".$record['uuid']."'";
|
||||
$uuids[] = "'".$record['uuid']."'";
|
||||
}
|
||||
}
|
||||
|
||||
//get module details
|
||||
if (is_array($record_uuids) && @sizeof($record_uuids) != 0) {
|
||||
if (is_array($uuids) && @sizeof($uuids) != 0) {
|
||||
$sql = "select ".$this->uuid_prefix."uuid as uuid, module_name as module, module_enabled as enabled from v_".$this->table." ";
|
||||
$sql .= "where ( ".implode(' or ', $record_uuids)." ) ";
|
||||
$sql .= "where ".$this->uuid_prefix."uuid in (".implode(', ', $uuids).") ";
|
||||
$database = new database;
|
||||
$rows = $database->select($sql, $parameters, 'all');
|
||||
if (is_array($rows) && @sizeof($rows) != 0) {
|
||||
@@ -946,14 +946,14 @@ if (!class_exists('modules')) {
|
||||
//filter out unchecked modules, build where clause for below
|
||||
foreach($records as $record) {
|
||||
if ($record['checked'] == 'true' && is_uuid($record['uuid'])) {
|
||||
$record_uuids[] = $this->uuid_prefix."uuid = '".$record['uuid']."'";
|
||||
$uuids[] = "'".$record['uuid']."'";
|
||||
}
|
||||
}
|
||||
|
||||
//get module details
|
||||
if (is_array($record_uuids) && @sizeof($record_uuids) != 0) {
|
||||
if (is_array($uuids) && @sizeof($uuids) != 0) {
|
||||
$sql = "select ".$this->uuid_prefix."uuid as uuid, module_name as module from v_".$this->table." ";
|
||||
$sql .= "where ( ".implode(' or ', $record_uuids)." ) ";
|
||||
$sql .= "where ".$this->uuid_prefix."uuid in (".implode(', ', $uuids).") ";
|
||||
$database = new database;
|
||||
$rows = $database->select($sql, $parameters, 'all');
|
||||
if (is_array($rows) && @sizeof($rows) != 0) {
|
||||
@@ -1039,12 +1039,12 @@ if (!class_exists('modules')) {
|
||||
//get current toggle state
|
||||
foreach($records as $x => $record) {
|
||||
if ($record['checked'] == 'true' && is_uuid($record['uuid'])) {
|
||||
$record_uuids[] = $this->uuid_prefix."uuid = '".$record['uuid']."'";
|
||||
$uuids[] = "'".$record['uuid']."'";
|
||||
}
|
||||
}
|
||||
if (is_array($record_uuids) && @sizeof($record_uuids) != 0) {
|
||||
if (is_array($uuids) && @sizeof($uuids) != 0) {
|
||||
$sql = "select ".$this->uuid_prefix."uuid as uuid, ".$this->toggle_field." as state, module_name as name from v_".$this->table." ";
|
||||
$sql .= "where ( ".implode(' or ', $record_uuids)." ) ";
|
||||
$sql .= "where ".$this->uuid_prefix."uuid in (".implode(', ', $uuids).") ";
|
||||
$database = new database;
|
||||
$rows = $database->select($sql, $parameters, 'all');
|
||||
if (is_array($rows) && @sizeof($rows) != 0) {
|
||||
|
||||
Reference in New Issue
Block a user