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

Hi Titoxd, with regard to this edit, I was wondering whether should be considered as adding support for a tree, or a linked list? I guess it could be either, since a revision that's imported into pages Y and Z could still have a rev_parent_id that points to a revision in page X. Anyway, what would the Adjacency List Model that rev_parent_id adds support for be used for in MediaWiki? Thanks. Leucosticte (talk) 18:35, 24 August 2014 (UTC)