From: River Tarnell Date: Thu, 8 Mar 2007 20:29:19 +0000 (+0000) Subject: need to actually implement pg_fkey_deltype() X-Git-Tag: 1.31.0-rc.0~53850 X-Git-Url: http://git.cyclocoop.org/%22.%24h.%22?a=commitdiff_plain;h=e5b07c4d169d7c0ae766592ea2ea6257a636ec54;p=lhc%2Fweb%2Fwiklou.git need to actually implement pg_fkey_deltype() --- diff --git a/maintenance/updaters.inc b/maintenance/updaters.inc index b3aaabb3b1..f129e2477a 100644 --- a/maintenance/updaters.inc +++ b/maintenance/updaters.inc @@ -1225,6 +1225,24 @@ global $wgDatabase, $wgDBmwschema; return $exists === $rule; } +function +pg_fkey_deltype($fkey) +{ +global $wgDatabase, $wgDBmwschema; + $q = <<query(sprintf($q, + $wgDatabase->addQuotes($wgDBmwschema), + $wgDatabase->addQuotes($fkey))); + if (!($row = $wgDatabase->fetchRow($r))) + return null; + return $row[0]; +} + function do_postgres_updates() { global $wgDatabase, $wgVersion, $wgDBmwschema;