22 lines
371 B
PHP
22 lines
371 B
PHP
|
|
<?php
|
||
|
|
if (!defined('_GNUBOARD_'))
|
||
|
|
exit;
|
||
|
|
|
||
|
|
function get_config($is_cache = false)
|
||
|
|
{
|
||
|
|
global $g5;
|
||
|
|
|
||
|
|
static $cache = [];
|
||
|
|
|
||
|
|
$cache = run_replace('get_config_cache', $cache, $is_cache);
|
||
|
|
|
||
|
|
if ($is_cache && !empty($cache)) {
|
||
|
|
return $cache;
|
||
|
|
}
|
||
|
|
|
||
|
|
$sql = "SELECT * FROM {$g5['config_table']} ";
|
||
|
|
$cache = run_replace('get_config', sql_fetch($sql));
|
||
|
|
|
||
|
|
return $cache;
|
||
|
|
}
|