https://bugzilla.wikimedia.org/show_bug.cgi?id=28070

--- Comment #7 from Dan Nessett <[email protected]> 2011-03-23 17:03:59 UTC ---
(In reply to comment #6)
> (In reply to comment #4)
> > I am investigating the code paths that cause in this bug. The problem 
> > occurs in
> > getParameterFromSettings(), which is a method of the ApiBase class. The
> > ApiQueryWatchlist class (which implements the RSS feeds for WatchLists) 
> > extends
> > the ApiQueryGeneratorBase class, which extends the ApiQueryBase class, which
> > extends the ApiBase class. The getParameterFromSettings() method in
> > ApiQueryWatchlist comes directly through this class hierarchy from ApiBase.
> > 
> > It seems clear that getParameterFromSettings() should be overridden in
> > ApiQueryWatchlist and the switch case code for 'timestamp' modified to 
> > return
> > the database formated value.
> Please don't! Just convert timestamps to DB format using $this->getDB(
> )->timestamp( $ts ), where $ts can be in any timestamp format recognized by
> MediaWiki. Is there any reason this won't work?

It may work to fix the bug, but the conversion of timestamps to TS_MW format in
getParameterFromSettings() has been around much longer than the RSS Watchlist
code. My concern is there are other uses of getParameterFromSettings() that
rely on timestamps being converted to TS_MW format. If the case 'timestamp' 
code is changed to call $this->getDB()->timestamp(), who knows what other code
will break.

That is why someone who understands the API classes and their uses needs to
determine whether a change to the APIBase abstract class method code is the
correct way to fix this bug. Are you that person? Are there uses of
getParameterFromSettings() that are for purposes other than an ultimate call to
a db select?

Obviously, I could just change the code according to your suggestion, but I
would only test the RSS/Watchlist case. I wouldn't know if the fix breaks other
things.

-- 
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

Reply via email to