aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--admin/include/functions_install.inc.php55
-rw-r--r--include/dblayer/dblayers.inc.php41
-rw-r--r--install.php6
3 files changed, 4 insertions, 98 deletions
diff --git a/admin/include/functions_install.inc.php b/admin/include/functions_install.inc.php
index 94e011cde..d9643e721 100644
--- a/admin/include/functions_install.inc.php
+++ b/admin/include/functions_install.inc.php
@@ -69,61 +69,6 @@ function execute_sqlfile($filepath, $replaced, $replacing, $dblayer)
}
/**
- * Search for database engines available
- *
- * We search for functions_DATABASE_ENGINE.inc.php
- * and we check if the connect function for that database exists
- *
- * @return array
- */
-function available_engines()
-{
- $engines = array();
-
- $pattern = PHPWG_ROOT_PATH. 'include/dblayer/functions_%s.inc.php';
- include_once PHPWG_ROOT_PATH. 'include/dblayer/dblayers.inc.php';
-
- foreach ($dblayers as $engine_name => $engine)
- {
- if (file_exists(sprintf($pattern, $engine_name)))
- {
- $engines[$engine_name]['label'] = $engine['engine'];
- $engines[$engine_name]['available'] = false;
-
- if (isset($engine['function_available'])
- && function_exists($engine['function_available']))
- {
- $engines[$engine_name]['available'] = true;
- }
- elseif (isset($engine['class_available'])
- && class_exists($engine['class_available']))
- {
- $engines[$engine_name]['available'] = true;
- }
- }
- }
-
- if ($engines['sqlite']['available'] and !$engines['pdo-sqlite']['available'])
- {
- unset($engines['pdo-sqlite']);
- }
- elseif ($engines['pdo-sqlite']['available'] and !$engines['sqlite']['available'])
- {
- unset($engines['sqlite']);
- }
- elseif (DEFAULT_DB_SQLITE=='native')
- {
- unset($engines['pdo-sqlite']);
- }
- else
- {
- unset($engines['sqlite']);
- }
-
- return $engines;
-}
-
-/**
* Automatically activate all core themes in the "themes" directory.
*
* @return void
diff --git a/include/dblayer/dblayers.inc.php b/include/dblayer/dblayers.inc.php
deleted file mode 100644
index 39c0ee958..000000000
--- a/include/dblayer/dblayers.inc.php
+++ /dev/null
@@ -1,41 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based photo gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008-2013 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-$dblayers = array();
-$dblayers['mysql'] = array('engine' => 'MySQL',
- 'function_available' => 'mysql_connect'
- );
-
-$dblayers['pgsql'] = array('engine' => 'PostgreSQL',
- 'function_available' => 'pg_connect'
- );
-
-$dblayers['sqlite'] = array('engine' => 'SQLite',
- 'class_available' => 'SQLite3'
- );
-
-$dblayers['pdo-sqlite'] = array('engine' => 'SQLite',
- 'class_available' => 'PDO'
- );
-
-?> \ No newline at end of file
diff --git a/install.php b/install.php
index a6d31be88..49a224583 100644
--- a/install.php
+++ b/install.php
@@ -311,14 +311,14 @@ define(\'DB_COLLATE\', \'\');
PHPWG_ROOT_PATH.'install/piwigo_structure-mysql.sql',
DEFAULT_PREFIX_TABLE,
$prefixeTable,
- $dblayer
+ 'mysql'
);
// We fill the tables with basic informations
execute_sqlfile(
PHPWG_ROOT_PATH.'install/config.sql',
DEFAULT_PREFIX_TABLE,
$prefixeTable,
- $dblayer
+ 'mysql'
);
$query = '
@@ -467,6 +467,8 @@ else
}
session_name($conf['session_name']);
session_set_cookie_params(0, cookie_path());
+ register_shutdown_function('session_write_close');
+
$user = build_user(1, true);
log_user($user['id'], false);