Timwi, Thanks for the version of the patch. I have some questions though. On Thu, Jul 08, 2004 at 12:07:08PM +0100, Timwi wrote:
- Change it to a special page?
No, please not!... I don't like special pages because they make the tabs disappear. :) I'd really rather prefer if Special:Movepage were converted to a simple &action=move thingie.
Tim Starling made the argument that special pages were easier to link to and did not involve adding more UI stuff to Article.php.
- Break down the watchers into active and passive watchers (somehow).
How do you define this distinction?
I am still thinking about this. Probably active watchers have looked at their watchlist in the past week. Doing this efficiently is the problem.
+ + # to find number of distinct authors, we need to do some + # funny stuff because of the cur/old table split: + # - first, find the name of the 'cur' author + # - then, find the number of authors in 'old' + # - then, find out if the 'cur' author is anywhere in 'old'; if not, add 1 + + # find 'cur' author + $sql = "SELECT cur_user_text FROM cur WHERE ".$cur_clause; + $cur_author = wfSingleQuery( $sql, DB_READ ); + + # find number of 'old' authors + $sql = "SELECT COUNT(DISTINCT old_user_text) FROM old WHERE ".$old_clause; + $authors = wfSingleQuery( $sql, DB_READ ); + + # find out if 'cur' author occurs in 'old' + $sql = "SELECT old_user_text FROM old WHERE ".$old_clause + ." AND old_user_text='".$cur_author."' LIMIT 1"; + $res = wfQuery( $sql, DB_READ); + $has_cur_user = wfNumRows( $res ); + wfFreeResult($res); + if ($has_cur_user < 1) { $authors++; }
Would it be quicker to turn this into two query? Where the second query is something like: + $sql = "SELECT COUNT(DISTINCT old_user_text) FROM old WH ERE ".$old_clause . " AND old_user_text != " . $cur_author; Then you can always $authors++ since the current author will not appear in the second query. So the second query is becomes more complicated, but the third query is unneeded.