Mods-for-HESK-Netsyms/inc/status_functions.inc.php

37 lines
915 B
PHP
Raw Normal View History

<?php
2016-11-16 21:16:25 -05:00
/**
*
* This file is part of HESK - PHP Help Desk Software.
*
* (c) Copyright Klemen Stirn. All rights reserved.
2016-11-18 12:57:17 -05:00
* https://www.hesk.com
2016-11-16 21:16:25 -05:00
*
* For the full copyright and license agreement information visit
2016-11-18 12:57:17 -05:00
* https://www.hesk.com/eula.php
2016-11-16 21:16:25 -05:00
*
*/
/* Check if this is a valid include */
if (!defined('IN_SCRIPT')) {
die('Invalid attempt');
}
function mfh_getAllStatuses()
{
global $hesk_settings, $modsForHesk_settings;
$statusesSql = 'SELECT * FROM `' . hesk_dbEscape($hesk_settings['db_pfix']) . 'statuses` ORDER BY `sort` ASC';
$statusesRS = hesk_dbQuery($statusesSql);
$statuses = array();
while ($row = hesk_dbFetchAssoc($statusesRS)) {
$row['text'] = mfh_getDisplayTextForStatusId($row['ID']);
$statuses[$row['text']] = $row;
}
if ($modsForHesk_settings['statuses_order_column'] == 'name') {
ksort($statuses);
}
return $statuses;
}