mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 03:33:49 +00:00
Update app_defaults.php
Change destination encoding from ASCII to UTF8 in convert_to function, used inside pgsql natural_sort function on Extensions page.
This commit is contained in:
@@ -82,7 +82,7 @@
|
||||
if ($db_type == 'pgsql') {
|
||||
$sql = "create or replace function natural_sort(text)\n";
|
||||
$sql .= " returns bytea language sql immutable strict as \$f\$\n";
|
||||
$sql .= " select string_agg(convert_to(coalesce(r[2], length(length(r[1])::text) || length(r[1])::text || r[1]), 'SQL_ASCII'),'\\x00')\n";
|
||||
$sql .= " select string_agg(convert_to(coalesce(r[2], length(length(r[1])::text) || length(r[1])::text || r[1]), 'UTF8'),'\\x00')\n";
|
||||
$sql .= " from regexp_matches(\$1, '0*([0-9]+)|([^0-9]+)', 'g') r;\n";
|
||||
$sql .= "\$f\$;";
|
||||
$database = new database;
|
||||
@@ -92,4 +92,4 @@
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user