[feladat @ 262]
authorrejo
Fri, 09 May 2008 15:41:02 +0000
changeset 156 04fa36f93e3a
parent 155 dd568f2909e3
child 157 af604e6e1a71
[feladat @ 262] Re-ordering of some of the questions in the installer script. The user is now presented the exact commands to create the Poweradmin database user, instead of giving a mock-up.
docs/i18n-template-php.pot
install/index.php
locale/nl_NL/LC_MESSAGES/messages.mo
locale/nl_NL/LC_MESSAGES/nl.po
--- a/docs/i18n-template-php.pot	Fri May 09 14:54:59 2008 +0000
+++ b/docs/i18n-template-php.pot	Fri May 09 15:41:02 2008 +0000
@@ -800,7 +800,7 @@
 msgstr ""
 
 #: index.php:111
-msgid "We have now updated the PowerDNS database to work with Poweradmin. You now want to give limited rights to Poweradmin so it can update the data in the tables. To do this, you should create a new user and give it rights to select, delete, insert and update records in the PowerDNS database."
+msgid "You now want to give limited rights to Poweradmin so it can update the data in the tables. To do this, you should create a new user and give it rights to select, delete, insert and update records in the PowerDNS database."
 msgstr ""
 
 #: index.php:113
@@ -816,11 +816,11 @@
 msgstr ""
 
 #: index.php:142
-msgid "Now we will put together the configuration. To do so, the installer needs some details:"
+msgid "Now we will gather all details for the configuration itself."
 msgstr ""
 
 #: index.php:148
-msgid "The username as created in the previous step."
+msgid "The username for Poweradmin. This new user will have limited rights only."
 msgstr ""
 
 #: index.php:156
--- a/install/index.php	Fri May 09 14:54:59 2008 +0000
+++ b/install/index.php	Fri May 09 15:41:02 2008 +0000
@@ -1,5 +1,13 @@
 <?php
 
+if (!isset($_POST['language'])) {
+	$language = "en_EN";
+} else {
+	$step = $_POST['step'];
+}
+
+
+
 $language = $_POST['language'];
 setlocale(LC_ALL, $language);
 $gettext_domain = 'messages';
@@ -139,45 +147,13 @@
 		}
 		echo _('done!') . "</p>";
 
-		echo "<p>" . _('We have now updated the PowerDNS database to work with Poweradmin. You now want to give limited rights to Poweradmin so it can update the data in the tables. To do this, you should create a new user and give it rights to select, delete, insert and update records in the PowerDNS database.') . " ";
-		if ($db_type=='mysql') {
-			echo _('In MySQL you should now perform the following command:') . "</p>";
-			echo "<p><tt>GRANT SELECT, INSERT, UPDATE, DELETE<BR>ON powerdns-database.*<br>TO 'poweradmin-user'@'localhost'<br>IDENTIFIED BY 'poweradmin-password';</tt></p>";
-		} elseif ($db_type == 'pgsql') {
-			echo _('On PgSQL you would use:') . "</p>";
-			echo "<p><tt>$ createuser poweradmin-user<br>" .
-				"Shall the new role be a superuser? (y/n) n<br>" . 
-				"Shall the new user be allowed to create databases? (y/n) n<br>" . 
-				"Shall the new user be allowed to create more new users? (y/n) n<br>" . 
-				"CREATE USER<br>" . 
-				"$ psql powerdns-database<br>" .
-				"psql> GRANT  SELECT, INSERT, DELETE, UPDATE<br>" . 
-				"ON powerdns-database<br>" .
-				"TO poweradmin-user;</tt></p>\n";
-		}
-		echo "<p>" . _('After you have added the new user, proceed with this installation procedure.') . "</p>\n";
-		echo "<form method=\"post\">";
-		echo "<input type=\"hidden\" name=\"host\" value=\"" . $db_host . "\">";
-		echo "<input type=\"hidden\" name=\"name\" value=\"" . $db_name . "\">";
-		echo "<input type=\"hidden\" name=\"type\" value=\"" . $db_type . "\">";
-		echo "<input type=\"hidden\" name=\"step\" value=\"" . $step . "\">";
-		echo "<input type=\"hidden\" name=\"language\" value=\"" . $language . "\">";
-		echo "<input type=\"submit\" name=\"submit\" value=\"" . _('Go to step') . " " . $step . "\">";
-		echo "</form>";
-		break;
-	
-	case 5:
-		$step++;
-		$db_host = $_POST['host'];
-		$db_name = $_POST['name'];
-		$db_type = $_POST['type'];
-		echo "<p>" . _('Now we will put together the configuration. To do so, the installer needs some details:') . "</p>\n";
+		echo "<p>" . _('Now we will gather all details for the configuration itself.') . "</p>\n";
 		echo "<form method=\"post\">";
 		echo " <table>";
 		echo "  <tr>";
 		echo "   <td>" . _('Username') . "</td>\n";
 		echo "   <td><input type=\"text\" name=\"db_user\" value=\"\"></td>\n";
-		echo "   <td>" . _('The username as created in the previous step.') . "</td>\n";
+		echo "   <td>" . _('The username for Poweradmin. This new user will have limited rights only.') . "</td>\n";
 		echo "  </tr>\n";
 		echo "  <tr>\n";
 		echo "   <td>" . _('Password') . "</td>\n";
@@ -209,6 +185,49 @@
 		echo "</form>";
 		break;
 
+	case 5:
+		$step++;
+		$db_user = $_POST['db_user'];
+		$db_pass = $_POST['db_pass'];
+		$db_host = $_POST['db_host'];
+		$db_name = $_POST['db_name'];
+		$db_type = $_POST['db_type'];
+		$dns_hostmaster = $_POST['dns_hostmaster'];
+		$dns_ns1 = $_POST['dns_ns1'];
+		$dns_ns2 = $_POST['dns_ns2'];
+
+		echo "<p>" . _('You now want to give limited rights to Poweradmin so it can update the data in the tables. To do this, you should create a new user and give it rights to select, delete, insert and update records in the PowerDNS database.') . " ";
+		if ($db_type == 'mysql') {
+			echo _('In MySQL you should now perform the following command:') . "</p>";
+			echo "<p><tt>GRANT SELECT, INSERT, UPDATE, DELETE<BR>ON " . $db_name . ".*<br>TO '" . $db_user . "'@'" . $db_host . "'<br>IDENTIFIED BY '" . $db_pass . "';</tt></p>";
+		} elseif ($db_type == 'pgsql') {
+			echo _('On PgSQL you would use:') . "</p>";
+			echo "<p><tt>$ createuser " . $db_user . "<br>" .
+				"Shall the new role be a superuser? (y/n) n<br>" . 
+				"Shall the new user be allowed to create databases? (y/n) n<br>" . 
+				"Shall the new user be allowed to create more new users? (y/n) n<br>" . 
+				"CREATE USER<br>" . 
+				"$ psql " . $db_name . "<br>" .
+				"psql> GRANT SELECT, INSERT, DELETE, UPDATE<br>" . 
+				"ON " . $db_name . "<br>" .
+				"TO " . $db_user . ";</tt></p>\n";
+		}
+		echo "<p>" . _('After you have added the new user, proceed with this installation procedure.') . "</p>\n";
+		echo "<form method=\"post\">";
+		echo "<input type=\"hidden\" name=\"db_host\" value=\"" . $db_host . "\">";
+		echo "<input type=\"hidden\" name=\"db_name\" value=\"" . $db_name . "\">";
+		echo "<input type=\"hidden\" name=\"db_type\" value=\"" . $db_type . "\">";
+		echo "<input type=\"hidden\" name=\"db_user\" value=\"" . $db_user . "\">";
+		echo "<input type=\"hidden\" name=\"db_pass\" value=\"" . $db_pass . "\">";
+		echo "<input type=\"hidden\" name=\"dns_hostmaster\" value=\"" . $dns_hostmaster . "\">";
+		echo "<input type=\"hidden\" name=\"dns_ns1\" value=\"" . $dns_ns1 . "\">";
+		echo "<input type=\"hidden\" name=\"dns_ns2\" value=\"" . $dns_ns2 . "\">";
+		echo "<input type=\"hidden\" name=\"step\" value=\"" . $step . "\">";
+		echo "<input type=\"hidden\" name=\"language\" value=\"" . $language . "\">";
+		echo "<input type=\"submit\" name=\"submit\" value=\"" . _('Go to step') . " " . $step . "\">";
+		echo "</form>";
+		break;
+	
 	case 6:
 		$step++;
 		$config = "<?php\n\n" .
Binary file locale/nl_NL/LC_MESSAGES/messages.mo has changed
--- a/locale/nl_NL/LC_MESSAGES/nl.po	Fri May 09 14:54:59 2008 +0000
+++ b/locale/nl_NL/LC_MESSAGES/nl.po	Fri May 09 15:41:02 2008 +0000
@@ -823,7 +823,7 @@
 
 #: index.php:52
 msgid "The username to use to connect to the database, make sure the username has sufficient rights to perform administrative task to the PowerDNS database (the installer wants to drop, create and fill tables to the database)."
-msgstr "De gebruikersname voor de database. Zorgt u er voor dat deze gebruiker voldoende rechten heeft voor het uitvoeren van administratieve taken op de PowerDNS database (het installatie script moet tabellen kunnen verwijderen, toevoegen en vullen)."
+msgstr "De gebruikersnaam voor de database. Zorgt u er voor dat deze gebruiker voldoende rechten heeft voor het uitvoeren van administratieve taken op de PowerDNS database (het installatie script moet tabellen kunnen verwijderen, toevoegen en vullen)."
 
 #: index.php:57 index.php:153
 msgid "The password for this username."
@@ -862,8 +862,8 @@
 msgstr "gedaan!"
 
 #: index.php:111
-msgid "We have now updated the PowerDNS database to work with Poweradmin. You now want to give limited rights to Poweradmin so it can update the data in the tables. To do this, you should create a new user and give it rights to select, delete, insert and update records in the PowerDNS database."
-msgstr "De PowerDNS database is nu voorbereid op het gebruik met Poweradmin. U zult nu een database gebruiker moeten toevoegen met beperkte rechten. Deze gebruiker moet de rechten voor SELECT, DELETE, INSERT en UPDATE van records in de PowerDNS database hebben."
+msgid "You now want to give limited rights to Poweradmin so it can update the data in the tables. To do this, you should create a new user and give it rights to select, delete, insert and update records in the PowerDNS database."
+msgstr "U zult nu voor Poweradmin een database gebruiker moeten toevoegen met beperkte rechten. Deze gebruiker moet de rechten voor SELECT, DELETE, INSERT en UPDATE van records in de PowerDNS database hebben."
 
 #: index.php:113
 msgid "In MySQL you should now perform the following command:"
@@ -878,12 +878,12 @@
 msgstr "Als u de nieuwe gebruiker heeft toegevoegd, gaat u verder met de installatie procedure."
 
 #: index.php:142
-msgid "Now we will put together the configuration. To do so, the installer needs some details:"
-msgstr "De volgende stap is het samenstellen van de configuratie. Het installatie script heeft daarvoor enkele details nodig:"
+msgid "Now we will gather all details for the configuration itself."
+msgstr "De volgende stap is het samenstellen van de configuratie van Poweradmin."
 
 #: index.php:148
-msgid "The username as created in the previous step."
-msgstr "De gebruikersnaam zoals aangemaakt in de vorige stap."
+msgid "The username for Poweradmin. This new user will have limited rights only."
+msgstr "De gebruikersnaam voor Poweradmin. Deze nieuwe database gebruiker heeft slechts beperkte rechten."
 
 #: index.php:156
 msgid "Hostmaster"