X-Git-Url: https://git.cyclocoop.org/admin/?a=blobdiff_plain;f=includes%2FBlock.php;h=f97cabce15a2e23b0056f7897478b350d5f5c270;hb=a910785f1018d99d63c9fd159f059390e6f8b6df;hp=5ea64f60f0db3ea19aa0d02655ee6d3707b412ec;hpb=4049a9d9e16dcd5b8c5af55b3e019a2551912c05;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Block.php b/includes/Block.php index 5ea64f60f0..f97cabce15 100644 --- a/includes/Block.php +++ b/includes/Block.php @@ -63,6 +63,7 @@ class Block */ function load( $address = '', $user = 0, $killExpired = true ) { + global $wgDBmysql4 ; $fname = 'Block::load'; wfDebug( "Block::load: '$address', '$user', $killExpired\n" ); @@ -83,7 +84,7 @@ class Block $sql = "SELECT * FROM $ipblocks WHERE ipb_user={$user} $options"; } elseif ($user=="") { $sql = "SELECT * FROM $ipblocks WHERE ipb_address='" . $db->strencode( $address ) . "' $options"; - } elseif ( $options=='' ) { + } elseif ( $options=='' && $wgDBmysql4 ) { # If there are no optiones (e.g. FOR UPDATE), use a UNION # so that the query can make efficient use of indices $sql = "SELECT * FROM $ipblocks WHERE ipb_address='" . $db->strencode( $address ) .