User:Leucosticte/Sandbox

// Every log entry before this timestamp, qrc and pushbot will treat as a mirrorlogentry; every log // entry after, they will treat as a mirrormove, etc. Also, logPuller will not import anything // beyond this cutoff into the queue. $importCutoff = '20140720000000';

if ( !$pushMapping ) { $db->query ( "UPDATE mb_queue SET mbq_status='Ignore'"           . " WHERE mbq_id=" . $row['mbq_id'] ); continue; } If a page that has rev_former_page fields pointing to it is deleted, then those revisions should remain with the page they've been merged with, even if that page is moved.

If a deleted page that has rev_former_page fields pointing to it is later undeleted, all the rev_former_page fields containing that page ID should be changed to the page_id of the new page. Also:
 * If the page they were merged into has since been moved, then they should be moved back to the rev_former_page.
 * If the page they were merged into has not been moved, then they should remain where they are. For one thing, this means that the page title remains the same, so where are they going to move to, and what would the page be undeleted as? It can only be undeleted into the page history of the page the history was merged into, since it's still there.

$wgHooks['LinkBegin'][] = 'onLinkBegin'; function onLinkBegin( $dummy, $target, &$html, &$customAttribs, &$query, &$options, &$ret ) { $dbr = wfGetDB( DB_SLAVE ); $res = $dbr->select( 'revision', array( 'rev_id', 'rev_page', 'rev_user_text' ) );

foreach ( $res as $key => $row ) { echo $key. "\n"; }	die; }