mlanthaler: Bugfix: Fixed small bug. Also notified the OpenID library maintainer so that they fix the library itself.

(merged from branches/gsoc)


git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@41811 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2007-09-14 23:07:23 +00:00
parent 0eada9f41b
commit 4d7346825a
3 changed files with 11 additions and 5 deletions

View File

@ -1,9 +1,12 @@
<?php
// Required so SilverStripe includes this module
define('MCE_ROOT', 'jsparty/tiny_mce2/');
// include pear
$path = Director::baseFolder().'/sapphire/pear/';
set_include_path(get_include_path() . PATH_SEPARATOR . $path);
// include Auth
$path = Director::baseFolder().'/sapphire/security/';
set_include_path(get_include_path() . PATH_SEPARATOR . $path);
?>

View File

@ -47,8 +47,10 @@ class DB {
* @param array $database A map of options. The 'type' is the name of the subclass of Database to use. For the rest of the options, see the specific class.
*/
static function connect($databaseConfig) {
if(!$databaseConfig['type']) user_error("DB::connect: Not passed a valid database config", E_USER_ERROR);
if ($databaseConfig['pdo']) { // TODO:pkrenn_remove
if(!isset($databaseConfig['type']) || empty($databaseConfig['type'])) {
user_error("DB::connect: Not passed a valid database config", E_USER_ERROR);
}
if (isset($databaseConfig['pdo']) && $databaseConfig['pdo']) { // TODO:pkrenn_remove
$conn = new PDODatabase($databaseConfig);
} else { // TODO:pkrenn_remove begin
$dbClass = $databaseConfig['type'];

View File

@ -161,8 +161,9 @@ class Auth_OpenID_SQLStore extends Auth_OpenID_OpenIDStore {
function tableExists($table_name)
{
return !$this->isError(
$this->connection->query("SELECT * FROM %s LIMIT 0",
$table_name));
$this->connection->query(
sprintf("SELECT * FROM %s LIMIT 0",
$table_name)));
}
/**