From 215f54dba67992efea6848bdcfcecf85d983e4bb Mon Sep 17 00:00:00 2001 From: Sven Slootweg Date: Sun, 16 Dec 2012 02:29:17 +0100 Subject: [PATCH] Specify port, username and password for the console dropper as variables instead of hardcoded text in the template --- frontend/module.vps.console.php | 7 ++++--- frontend/templates/default/client/vps/console.tpl | 6 +++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/frontend/module.vps.console.php b/frontend/module.vps.console.php index 0b7ee8e..3dd83d8 100644 --- a/frontend/module.vps.console.php +++ b/frontend/module.vps.console.php @@ -13,8 +13,9 @@ if(!isset($_CVM)) { die("Unauthorized."); } -/* TODO: Specify user, password and port as variables. */ - $sPageContents .= Templater::AdvancedParse("{$sTheme}/client/vps/console", $locale->strings, array( - 'host' => htmlspecialchars($_SERVER['SERVER_NAME']) + 'host' => htmlspecialchars($_SERVER['SERVER_NAME']), + 'port' => 22, + 'username' => "vzshell", + 'password' => "vzshell" )); diff --git a/frontend/templates/default/client/vps/console.tpl b/frontend/templates/default/client/vps/console.tpl index ff6e468..dc9cb85 100644 --- a/frontend/templates/default/client/vps/console.tpl +++ b/frontend/templates/default/client/vps/console.tpl @@ -11,15 +11,15 @@ {%!console-title-port} - 22 + {%?port} {%!console-title-username} - vz + {%?username} {%!console-title-password} - vz + {%?password}