dataset/seed/piwigo/templates/database.inc.php

32 lines
848 B
PHP

<?php
$conf['dblayer'] = 'mysqli';
$conf['db_base'] = '{{ general.mariadb.mariadb_client_database }}';
$conf['db_user'] = '{{ general.mariadb.mariadb_client_username }}';
$conf['db_password'] = '{{ general.mariadb.mariadb_client_password }}';
$conf['db_host'] = '{{ general.mariadb.mariadb_client_server_domainname }}';
if(!isset($_SERVER) && isset($_ENV) && isset($_ENV['REQUEST_URI']))
{
$_SERVER = Array('REQUEST_URI' => $_ENV['REQUEST_URI']);
}
{% for user in piwigo_users %}
{%if loop.index != 1 %}
}
else {% if True -%}{% endif -%}
{%- endif -%}
if(str_starts_with($_SERVER['REQUEST_URI'], '/{{ user }}/')) {
$prefixeTable = 'piwigo_{{ user }}_';
{% endfor %}
}
else
{
die('unknown album');
}
define('PHPWG_INSTALLED', true);
define('PWG_CHARSET', 'utf-8');
define('DB_CHARSET', 'utf8');
define('DB_COLLATE', '');
?>