getVal( 'target' ); if ($target == $wgUser->getName() ) { $wgOut->addHTML(wfMsg('bunchpatrol_noselfpatrol')); return; } $sk = $wgUser->getSkin(); $dbr = &wfGetDB(DB_SLAVE); $me = Title::makeTitle(NS_SPECIAL, "Bunchpatrol"); $unpatrolled = $dbr->selectField('recentchanges', array('count(*)'), array('rc_patrolled=0')); if ( !strlen( $target ) ) { $res = $dbr->query(" select rc_user, rc_user_text, count(*) as C from recentchanges where rc_patrolled=0 group by rc_user_text having C > 2 order by C desc;"); $wgOut->addHTML(""); while ( ($row = $dbr->fetchObject($res)) != null) { $u = User::newFromName($row->rc_user_text); if ($u) { $bpLink = SpecialPage::getTitleFor( 'Bunchpatrol', $u->getName() ); $wgOut->addHTML(""); } } $dbr->freeResult($res); $wgOut->addHTML("
" . $sk->makeLinkObj($bpLink,$u->getName()) . "{$row->C}
"); return; } if ($wgRequest->wasPosted() && $wgUser->isAllowed('patrol') ) { $values = $wgRequest->getValues(); $vals = array(); foreach ($values as $key=>$value) { if (strpos($key, "rc_") === 0 && $value == 'on') { $vals[] = str_replace("rc_", "", $key); } } foreach ($vals as $val) { RecentChange::markPatrolled( $val ); PatrolLog::record( $val, false ); } $res = $dbr->query(" select rc_user, rc_user_text, count(*) as C from recentchanges where rc_patrolled=0 group by rc_user_text having C > 2 order by C desc;"); $wgOut->addHTML(""); while ( ($row = $dbr->fetchObject($res)) != null) { $u = User::newFromName($row->rc_user_text); if ($u) $wgOut->addHTML(""); } $wgOut->addHTML("
" . $sk->makeLinkObj($me,$u->getName(), "target=" . $u->getName()) . "{$row->C}
"); return; } // disable if there are less than 500 unpatrolled edits if ($unpatrolled < 500 && false) { $wgOut->addWikiText(wfMsg('bunchpatrol_unpatrolledlimit', $unpatrolled)); return; } $target = str_replace('-', ' ', $target); $res = $dbr->select ( 'recentchanges', array ('rc_id', 'rc_title', 'rc_namespace', 'rc_this_oldid', 'rc_cur_id', 'rc_last_oldid'), array ('rc_user_text' =>$target, 'rc_patrolled=0' ), "wfSpecialBunchpatrol", array ('LIMIT' => 15) ); $count = 0; $wgOut->addHTML("
"); if ($wgUser->isAllowed('autopatrol')) $wgOut->addHTML("Select: "); $wgOut->addHTML(" "); while ( ($row = $dbr->fetchObject($res)) != null) { $t = Title::makeTitle($row->rc_namespace, $row->rc_title); $diff = $row->rc_this_oldid; $rcid = $row->rc_id; $oldid = $row->rc_last_oldid; $de = new DifferenceEngine( $t, $oldid, $diff, $rcid ); $wgOut->addHTML(""); $count++; } $wgOut->addHTML("
Patrol?Diff
"); $wgOut->addHTML($sk->makeLinkObj($t)); $de->showDiffPage(true); $wgOut->addHTML("


"); if ($count > 0) { $wgOut->addHTML(""); } $wgOut->addHTML("
"); $wgOut->setPageTitle(wfMsg('bunchpatrol')); $dbr->freeResult($res); if ($count == 0) { $wgOut->addWikiText(wfMsg('bunchpatrol_nounpatrollededits', $target)); } } } 'Batch patrol', 'bunchpatrol_notarget' => 'No target specified.', 'bunchpatrol_nounpatrollededits' => 'The user [[User:$1|$1]] has no unpatrolled edits.', 'bunchpatrol_noselfpatrol' => 'Sorry, you can\'t patrol your own edits.', 'bunchpatrol_unpatrolledlimit' => "There are currently less than 500 ($1) unpatrolled edits, so Bunch Patrol is disabled.", ); Category:Paralympic showdown teams - Fan History Wiki: The Fandom History Resource

Category:Paralympic showdown teams

From Fan History Wiki

Jump to: navigation, search
Personal tools
Support FH