https://bugzilla.wikimedia.org/show_bug.cgi?id=22093
Roan Kattouw <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #11 from Roan Kattouw <[email protected]> 2010-05-28 20:00:49 UTC --- (In reply to comment #10) > + // MSSQL doesn't have EXTRACT(epoch FROM XXX) > + if (strpos($sql, "EXTRACT(epoch FROM ") > 0) { > + // This is same as UNIX_TIMESTAMP, we need to calc # of seconds > from 1970 > + $sql = str_replace("EXTRACT(epoch FROM ", > "DATEDIFF(s,CONVERT(datetime,'1/1/1970'),", $sql); > + } > > I think you can drop this code. I wouldn't worry about extensions using > EXTRACT() unless you know of some that actually do (and which can't be easily > changed). First of all, it's not a common need. And second of all, EXTRACT() > doesn't work for anything other than PostgreSQL anyway AFAICT, so it's > unlikely > that anything would be hardcoding it, except for those two cases in core > (which > probably started by splitting MySQL to its own case then pgsql to the default > case, and other DBs added to their own cases). Note that a number of QueryPage subclasses use EXTRACT(). In the querypage-work2 branch, I've refactored this so it no longer uses EXTRACT(), but the point is we have code using EXTRACT() in core right now. -- Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. You are on the CC list for the bug. _______________________________________________ Wikibugs-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
