Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
feature:65 fix fatal error at the end of the install process, remove …
…unused file and function

git-svn-id: http://piwigo.org/svn/trunk@20721 68402e56-0260-453c-a942-63ccdbb3a9ee
  • Loading branch information
mistic100 committed Feb 12, 2013
1 parent e8bdcec commit 9722255
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 98 deletions.
55 changes: 0 additions & 55 deletions admin/include/functions_install.inc.php
Expand Up @@ -68,61 +68,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.
*
Expand Down
41 changes: 0 additions & 41 deletions include/dblayer/dblayers.inc.php

This file was deleted.

6 changes: 4 additions & 2 deletions install.php
Expand Up @@ -311,14 +311,14 @@
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 = '
Expand Down Expand Up @@ -467,6 +467,8 @@
}
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);

Expand Down

0 comments on commit 9722255

Please sign in to comment.