function processFunctions() { global $ax, $repair, $compact, $backup, $restore, $events, $delevt, $fromD, $tillD; echo "<table><tr><td>\n"; if ($repair) { checkDb(); } if ($compact) { compactTables(); } if ($backup) { backupTables(); } if ($restore) { restoreTables(); } if ($events) { processEvents(); } echo "</td></tr></table>\n"; echo "<form action='index.php?lc' method='post'>\n\t\t<input type='hidden' name='repair' id='repair' value='{$repair}'>\n\t\t<input type='hidden' name='compact' id='compact' value='{$compact}'>\n\t\t<input type='hidden' name='backup' id='backup' value='{$backup}'>\n\t\t<input type='hidden' name='restore' id='restore' value='{$restore}'>\n\t\t<input type='hidden' name='events' id='events' value='{$events}'>\n\t\t<input type='hidden' name='delevt' id='delevt' value='{$delevt}'>\n\t\t<input type='hidden' name='fromD' id='fromD' value='" . IDtoDD($fromD) . "'>\n\t\t<input type='hidden' name='tillD' id='tillD' value='" . IDtoDD($tillD) . "'>\n\t\t<input class='noPrint' type='submit' name='back' value=\"{$ax['back']}\">\n\t</form>\n"; }
function processFunctions() { global $ax, $compact, $backup, $restore, $events, $delEvt, $fromD, $tillD; $fName = false; if ($compact) { compactDb(); } if ($backup) { $fName = backupTables(); } if ($restore) { restoreTables(); } if ($events) { delEvents($delEvt, $fromD, $tillD); } echo "<form action='index.php?lc' method='post'>\n\t\t<input type='hidden' name='token' value='{$_SESSION['token']}'>\n\t\t<input type='hidden' name='compact' id='compact' value='{$compact}'>\n\t\t<input type='hidden' name='backup' id='backup' value='{$backup}'>\n\t\t<input type='hidden' name='restore' id='restore' value='{$restore}'>\n\t\t<input type='hidden' name='events' id='events' value='{$events}'>\n\t\t<input type='hidden' name='delEvt' id='delEvt' value='{$delEvt}'>\n\t\t<input type='hidden' name='fromD' id='fromD' value='" . IDtoDD($fromD) . "'>\n\t\t<input type='hidden' name='tillD' id='tillD' value='" . IDtoDD($tillD) . "'>\n\t\t<input class='noPrint' type='submit' name='back' value=\"{$ax['back']}\">\n"; if ($fName) { echo " <button class='noPrint' type='button' onclick=\"location.href='dloader.php?ftd={$fName}&rName={$fName}'\">{$ax['iex_download_file']}</button>\n"; } echo "</form>\n"; }
++$totalChangedNodes; } $changeCharacters = array('.', '+', '*'); $changeCharacter = '.'; if (isset($changeCharacters[$hasChanged])) { $changeCharacter = $changeCharacters[$hasChanged]; } verifyNodeData($changeCharacter, $node); list($column, $counter) = displayProgress($changeCharacter, $nodeStartTime, $counter, $nodeCount, $column); } if (count($nodeList) == 0) { $done = true; } unset($nodeList); $offset += $fetchLimit; eZContentObject::clearCache(); } flush(); if ($column > 0) { $cli->output(); } $cli->output("Updated " . $cli->stylize('emphasize', "{$changedNodes}/{$nodeCount}") . " for " . $cli->stylize('mark', $rootNode->attribute('name'))); $cli->output(); backupTables('node_' . strtolower($rootNode->attribute('name'))); } $cli->output(); $cli->output("Total update " . $cli->stylize('emphasize', "{$totalChangedNodes}/{$totalNodeCount}")); $cli->output("Node time taken: " . $cli->stylize('emphasize', formatTime(microtime(true) - $nodeGlobalStartTime))); } $cli->output("Total time taken: " . $cli->stylize('emphasize', formatTime(microtime(true) - $globalStartTime))); $script->shutdown();
function dumpLocalDb() { $oStub = new confStub(); $user = $oStub->dbUser; $pass = $oStub->dbPwd; $host = $oStub->dbHost; $name = $oStub->dbName; backupTables($host, $user, $pass, $name); }