diff options
author | zotlabs <mike@macgirvin.com> | 2017-03-25 14:19:32 -0700 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2017-03-31 10:27:28 +0200 |
commit | 33ff7bf968b76593ee076ee54838e2bb27552803 (patch) | |
tree | 42fbcfe29ae774265f6a87452e870e185b601fe3 /include/dba | |
parent | 57a8b3f85779d91c23855f7459622bce9ce89d55 (diff) | |
download | volse-hubzilla-33ff7bf968b76593ee076ee54838e2bb27552803.tar.gz volse-hubzilla-33ff7bf968b76593ee076ee54838e2bb27552803.tar.bz2 volse-hubzilla-33ff7bf968b76593ee076ee54838e2bb27552803.zip |
provide platform specific install script
Diffstat (limited to 'include/dba')
-rwxr-xr-x | include/dba/dba_driver.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/include/dba/dba_driver.php b/include/dba/dba_driver.php index e47f97387..ad1d9d194 100755 --- a/include/dba/dba_driver.php +++ b/include/dba/dba_driver.php @@ -15,7 +15,7 @@ class DBA { static public $scheme = 'mysql'; static public $logging = false; - static public $install_script = 'install/schema_mysql.sql'; + static public $install_script = 'schema_mysql.sql'; static public $null_date = '0001-01-01 00:00:00'; static public $utc_now = 'UTC_TIMESTAMP()'; static public $tquot = "`"; @@ -46,7 +46,7 @@ class DBA { if(!($port)) $port = 5432; - self::$install_script = 'install/schema_postgres.sql'; + self::$install_script = 'schema_postgres.sql'; self::$utc_now = "now() at time zone 'UTC'"; self::$tquot = '"'; self::$scheme = 'pgsql'; @@ -163,7 +163,9 @@ abstract class dba_driver { } function get_install_script() { - return \DBA::$install_script; + if(file_exists('install/' . PLATFORM_NAME . '/' . \DBA::$install_script)) + return 'install/' . PLATFORM_NAME . '/' . \DBA::$install_script; + return 'install/' . \DBA::$install_script; } function get_table_quote() { |