diff --git a/inc/common.inc.php b/inc/common.inc.php index 8fe783c0..81b9b2b8 100644 --- a/inc/common.inc.php +++ b/inc/common.inc.php @@ -1982,4 +1982,15 @@ function mfh_getNumberOfDownloadsForAttachment($att_id, $table='attachments') $res = hesk_dbQuery('SELECT `download_count` FROM `'.hesk_dbEscape($hesk_settings['db_pfix'].$table)."` WHERE `att_id` = ".intval($att_id)); $rec = hesk_dbFetchAssoc($res); return $rec['download_count']; +} + +function mfh_getSettings() { + global $hesk_settings; + + $settings = array(); + $res = hesk_dbQuery("SELECT `Key`, `Value` FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."settings` WHERE `Key` <> 'version'"); + while ($row = hesk_dbFetchAssoc($res)) { + $settings[$row['Key']] = $row['Value']; + } + return $settings; } \ No newline at end of file