From 5dcceb4e6edc49f7f01bb3366af9c44577d1fa03 Mon Sep 17 00:00:00 2001 From: nbm Date: Fri, 26 May 2006 10:38:05 +0000 Subject: [PATCH] Move to CSS classes for styling, and make it easier to see which item succeeded or failed. --- setup/upgrade.php | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/setup/upgrade.php b/setup/upgrade.php index b70da82..b5a2999 100644 --- a/setup/upgrade.php +++ b/setup/upgrade.php @@ -68,6 +68,8 @@ function showResult($res) { return $res; } +$GLOBALS['row'] = 1; + function performAllUpgrades () { global $default; $query = sprintf('SELECT value FROM %s WHERE name = "knowledgeTreeVersion"', $default->system_settings_table); @@ -77,14 +79,21 @@ function performAllUpgrades () { $upgrades = describeUpgrade($lastVersion, $currentVersion); foreach ($upgrades as $upgrade) { - printf('
%s
' . "\n", htmlspecialchars($upgrade->getDescription())); + if (($GLOBALS['row'] % 2) == 1) { + $class = "odd"; + } else { + $class = "even"; + } + printf('
%s
' . "\n", $class, htmlspecialchars($upgrade->getDescription())); + $GLOBALS['row']++; ob_flush(); flush(); $res = $upgrade->performUpgrade(); - printf('
%s
', showResult($res)); + printf('
%s
', showResult($res)); print '
' . "\n"; ob_flush(); flush(); + print "
\n"; if (PEAR::isError($res)) { if (!is_a($res, 'Upgrade_Already_Applied')) { break; @@ -106,10 +115,15 @@ if ($_REQUEST["go"] === "Upgrade") { ?> - KnowledgeTree Checkup + KnowledgeTree Upgrade -- libgit2 0.21.4