From: Reini U. <ru...@us...> - 2004-11-19 13:23:55
|
Update of /cvsroot/phpwiki/phpwiki/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22507 Modified Files: WikiGroup.php Log Message: Another catch by Charles Corrigan: check against the dbi backend, not the WikiDB class. Index: WikiGroup.php =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/lib/WikiGroup.php,v retrieving revision 1.46 retrieving revision 1.47 diff -u -2 -b -p -d -r1.46 -r1.47 --- WikiGroup.php 18 Nov 2004 09:52:23 -0000 1.46 +++ WikiGroup.php 19 Nov 2004 13:23:47 -0000 1.47 @@ -257,11 +257,11 @@ class WikiGroup{ $sql = preg_replace('/(WHERE.*?)\s+\w+\s*=\s*["\']\$userid[\'"]/i','\\1 AND 1', $sql); $sql = str_replace('WHERE AND 1','',$sql); - if (isa($dbi, 'WikiDB_backend_ADODB')) { + if (isa($dbi, 'ADOConnection')) { $db_result = $dbi->Execute($sql); foreach ($db_result->GetArray() as $u) { $users = array_merge($users,array_values($u)); } - } elseif (isa($dbi, 'WikiDB_backend_PearDB')) { - $users = array_merge($users,$dbi->getCol($sql)); + } elseif (isa($dbi, 'DB_common')) { // PearDB + $users = array_merge($users, $dbi->getCol($sql)); } } @@ -274,10 +274,10 @@ class WikiGroup{ $dbh->getAuthParam('auth_user_exists')); $sql = str_replace('WHERE AND 1','', $sql); - if (isa($dbi, 'WikiDB_backend_ADODB')) { + if (isa($dbi, 'ADOConnection')) { $db_result = $dbi->Execute($sql); foreach ($db_result->GetArray() as $u) { $users = array_merge($users, array_values($u)); } - } elseif (isa($dbi, 'WikiDB_backend_PearDB')) { + } elseif (isa($dbi, 'DB_common')) { $users = array_merge($users, $dbi->getCol($sql)); } @@ -1097,4 +1097,8 @@ class GroupLdap extends WikiGroup { // $Log$ +// Revision 1.47 2004/11/19 13:23:47 rurban +// +// Another catch by Charles Corrigan: check against the dbi backend, not the WikiDB class. +// // Revision 1.46 2004/11/18 09:52:23 rurban // more safety, requested by Charles Corrigan |