Support array_map in PHP <5.5

Resolves #109
This commit is contained in:
Trevor Slocum 2020-08-10 14:52:27 -07:00
parent c3e137d48d
commit 3b4e486160

View File

@ -3,6 +3,14 @@ if (!defined('TINYIB_BOARD')) {
die(''); die('');
} }
if (!function_exists('array_column')) {
function array_column($array, $column_name) {
return array_map(function ($element) use ($column_name) {
return $element[$column_name];
}, $array);
}
}
if (TINYIB_DBMODE == 'pdo' && TINYIB_DBDRIVER == 'pgsql') { if (TINYIB_DBMODE == 'pdo' && TINYIB_DBDRIVER == 'pgsql') {
$posts_sql = 'CREATE TABLE "' . TINYIB_DBPOSTS . '" ( $posts_sql = 'CREATE TABLE "' . TINYIB_DBPOSTS . '" (
"id" bigserial NOT NULL, "id" bigserial NOT NULL,