/**
 * A tool which shows what databases are installed
 * locally as well as which are available from
 * production slaves.  Allows a copy of any of the
 * databases to be dumped on a slave and loaded
 * locally (overwrites existing db if there is
 * already a local version).
 *
 * @return String - HTML for displaying the tool.
 */
function getHtmlForDatabaseComparisonTool()
{
    $html = "";
    // Determine what databases are on this dev-box.
    global $wgWikiFactoryDB;
    //$db_dev = wfGetDB( DB_MASTER, "dump", $wgDBname );
    $db1 = wfGetDB(DB_SLAVE, "dump", $wgWikiFactoryDB);
    $db2 = wfGetDB(DB_SLAVE, "dump", $wgWikiFactoryDB . '_c2');
    // lame
    $devbox_c1_dbs = getDevBoxOverrideDatabases($db1);
    $devbox_c2_dbs = getDevBoxOverrideDatabases($db2);
    $html .= "<table class='devbox-settings'>";
    $html .= "<tr><th>" . wfMsg("devbox-section-existing", "c1") . "</th><th>" . wfMsg("devbox-section-existing", "c2") . "</th></tr>";
    // List the databases on each cluster.
    // If we are not currently overriding the db, make these links
    // If we ARE overriding the db, turn the links off
    for ($i = 0; $i < max(count($devbox_c1_dbs), count($devbox_c2_dbs)); $i++) {
        $html .= "<tr><td width='150'>";
        $cell_value = "";
        if (isset($devbox_c1_dbs[$i])) {
            if (getForcedWikiValue() == "") {
                $cell_value = "<a href=\"http://" . $devbox_c1_dbs[$i] . "." . $_SERVER['SERVER_NAME'] . "\">" . $devbox_c1_dbs[$i] . "</a>";
            } else {
                $cell_value = $devbox_c1_dbs[$i];
            }
        }
        $html .= $cell_value;
        $html .= "</td><td width='150'>";
        $cell_value = "";
        if (isset($devbox_c2_dbs[$i])) {
            if (getForcedWikiValue() == "") {
                $cell_value = "<a href=\"http://" . $devbox_c2_dbs[$i] . "." . $_SERVER['SERVER_NAME'] . "\">" . $devbox_c2_dbs[$i] . "</a>";
            } else {
                $cell_value = $devbox_c2_dbs[$i];
            }
        }
        $html .= $cell_value;
        $html .= "</td></tr>";
    }
    $html .= "</table>";
    return $html;
}
		<h2><?php 
echo wfMsg("devbox-heading-svn-tool");
?>
</h2>
		<?php 
echo $svnToolHtml;
?>
	</div>

	<div class="tab-pane" id="tab-pane-2" style="display: none">
		<h2><?php 
echo wfMsg("devbox-heading-change-wiki");
?>
</h2>
		<?php 
if (getForcedWikiValue() == "") {
    ?>
			<?php 
    echo wfMsg("devbox-change-wiki-intro", $_SERVER['SERVER_NAME']);
    ?>
		<?php 
} else {
    ?>
			<?php 
    echo wfMsg("devbox-change-wiki-success", $_SERVER['SERVER_NAME']);
    ?>
		<?php 
}
?>
		<?php 
echo $dbComparisonHtml;