From 7e709b7f57224daea7371b0d8a0e576270437804 Mon Sep 17 00:00:00 2001 From: Sven Slootweg Date: Wed, 19 Jun 2013 21:21:39 +0200 Subject: [PATCH] Remove deprecated Templater::AdvancedParse calls and replace them with NewTemplater::Render --- frontend/authenticators/vps.php | 2 +- frontend/modules/admin/node/add.php | 2 +- frontend/modules/admin/node/list.php | 2 +- frontend/modules/admin/node/lookup.php | 2 +- frontend/modules/admin/overview/index.php | 2 +- frontend/modules/admin/user/list.php | 2 +- frontend/modules/admin/user/lookup.php | 2 +- frontend/modules/admin/vps/create.php | 2 +- frontend/modules/admin/vps/list.php | 2 +- frontend/modules/admin/vps/suspend.php | 2 +- frontend/modules/client/vps/console.php | 2 +- frontend/modules/client/vps/list.php | 2 +- frontend/modules/client/vps/lookup.php | 2 +- frontend/modules/client/vps/password.php | 2 +- frontend/modules/client/vps/reinstall.php | 2 +- frontend/modules/shared/login.php | 2 +- frontend/rewrite.php | 6 +++--- 17 files changed, 19 insertions(+), 19 deletions(-) diff --git a/frontend/authenticators/vps.php b/frontend/authenticators/vps.php index b23cadf..aef94ff 100644 --- a/frontend/authenticators/vps.php +++ b/frontend/authenticators/vps.php @@ -48,7 +48,7 @@ try catch(NotFoundException $e) { $router->uVariables['display_menu'] = false; - $sMainContents = Templater::AdvancedParse("{$sTheme}/client/vps/error/notfound", $locale->strings, array()); + $sMainContents = NewTemplater::Render("{$sTheme}/client/vps/error/notfound", $locale->strings, array()); $sRouterAuthenticated = false; } catch(UnauthorizedException $e) diff --git a/frontend/modules/admin/node/add.php b/frontend/modules/admin/node/add.php index 8fdc5bd..c43fa4c 100644 --- a/frontend/modules/admin/node/add.php +++ b/frontend/modules/admin/node/add.php @@ -83,6 +83,6 @@ if(isset($_POST['submit'])) } } -$sPageContents = Templater::AdvancedParse("{$sTheme}/admin/node/add", $locale->strings, array( +$sPageContents = NewTemplater::Render("{$sTheme}/admin/node/add", $locale->strings, array( 'errors' => $sErrors )); diff --git a/frontend/modules/admin/node/list.php b/frontend/modules/admin/node/list.php index 0e546bd..5c68082 100644 --- a/frontend/modules/admin/node/list.php +++ b/frontend/modules/admin/node/list.php @@ -29,6 +29,6 @@ if($result = $database->CachedQuery("SELECT * FROM nodes")) } } -$sPageContents = Templater::AdvancedParse("{$sTheme}/admin/node/list", $locale->strings, array( +$sPageContents = NewTemplater::Render("{$sTheme}/admin/node/list", $locale->strings, array( 'nodes' => $sNodeList )); diff --git a/frontend/modules/admin/node/lookup.php b/frontend/modules/admin/node/lookup.php index dd91ef0..3d07813 100644 --- a/frontend/modules/admin/node/lookup.php +++ b/frontend/modules/admin/node/lookup.php @@ -50,7 +50,7 @@ try } } - $sPageContents = Templater::AdvancedParse("{$sTheme}/admin/node/lookup", $locale->strings, array( + $sPageContents = NewTemplater::Render("{$sTheme}/admin/node/lookup", $locale->strings, array( 'id' => $sNode->sId, 'hostname' => $sNode->sHostname, 'location' => $sNode->sPhysicalLocation, diff --git a/frontend/modules/admin/overview/index.php b/frontend/modules/admin/overview/index.php index 2b7fefd..b8f6cc2 100644 --- a/frontend/modules/admin/overview/index.php +++ b/frontend/modules/admin/overview/index.php @@ -13,4 +13,4 @@ if(!isset($_APP)) { die("Unauthorized."); } -$sPageContents = Templater::AdvancedParse("{$sTheme}/admin/overview/index", $locale->strings, array()); +$sPageContents = NewTemplater::Render("{$sTheme}/admin/overview/index", $locale->strings, array()); diff --git a/frontend/modules/admin/user/list.php b/frontend/modules/admin/user/list.php index df66af0..64cdb0c 100644 --- a/frontend/modules/admin/user/list.php +++ b/frontend/modules/admin/user/list.php @@ -28,6 +28,6 @@ foreach($result->data as $row) ); } -$sPageContents = Templater::AdvancedParse("{$sTheme}/admin/user/list", $locale->strings, array( +$sPageContents = NewTemplater::Render("{$sTheme}/admin/user/list", $locale->strings, array( 'users' => $sUserList )); diff --git a/frontend/modules/admin/user/lookup.php b/frontend/modules/admin/user/lookup.php index f8221c1..bc93165 100644 --- a/frontend/modules/admin/user/lookup.php +++ b/frontend/modules/admin/user/lookup.php @@ -52,7 +52,7 @@ try } } - $sPageContents = Templater::AdvancedParse("{$sTheme}/admin/user/lookup", $locale->strings, array( + $sPageContents = NewTemplater::Render("{$sTheme}/admin/user/lookup", $locale->strings, array( 'id' => $sUserEntry->sId, 'username' => $sUserEntry->sUsername, 'email' => $sUserEntry->sEmailAddress, diff --git a/frontend/modules/admin/vps/create.php b/frontend/modules/admin/vps/create.php index 3b89dfd..37b1e53 100644 --- a/frontend/modules/admin/vps/create.php +++ b/frontend/modules/admin/vps/create.php @@ -205,7 +205,7 @@ foreach($result->data as $row) ); } -$sPageContents = Templater::AdvancedParse("{$sTheme}/admin/vps/add", $locale->strings, array( +$sPageContents = NewTemplater::Render("{$sTheme}/admin/vps/add", $locale->strings, array( 'errors' => $sErrors, 'nodes' => $sNodes, 'users' => $sUsers, diff --git a/frontend/modules/admin/vps/list.php b/frontend/modules/admin/vps/list.php index aa0242a..e2ce9d6 100644 --- a/frontend/modules/admin/vps/list.php +++ b/frontend/modules/admin/vps/list.php @@ -46,6 +46,6 @@ if($result = $database->CachedQuery("SELECT * FROM containers")) } } -$sPageContents = Templater::AdvancedParse("{$sTheme}/admin/vps/list", $locale->strings, array( +$sPageContents = NewTemplater::Render("{$sTheme}/admin/vps/list", $locale->strings, array( 'vpses' => $sVpsList )); diff --git a/frontend/modules/admin/vps/suspend.php b/frontend/modules/admin/vps/suspend.php index d5c3f5c..8d8ba5d 100644 --- a/frontend/modules/admin/vps/suspend.php +++ b/frontend/modules/admin/vps/suspend.php @@ -47,7 +47,7 @@ try $sSuspended = ($sVps->sStatus == CVM_STATUS_SUSPENDED) ? true : false; - $sPageContents = Templater::AdvancedParse("{$sTheme}/admin/vps/suspend", $locale->strings, array( + $sPageContents = NewTemplater::Render("{$sTheme}/admin/vps/suspend", $locale->strings, array( 'id' => $sVps->sId, 'suspended' => $sSuspended )); diff --git a/frontend/modules/client/vps/console.php b/frontend/modules/client/vps/console.php index d7f7cad..bb10b77 100644 --- a/frontend/modules/client/vps/console.php +++ b/frontend/modules/client/vps/console.php @@ -13,7 +13,7 @@ if(!isset($_APP)) { die("Unauthorized."); } -$sPageContents .= Templater::AdvancedParse("{$sTheme}/client/vps/console", $locale->strings, array( +$sPageContents .= NewTemplater::Render("{$sTheme}/client/vps/console", $locale->strings, array( 'host' => htmlspecialchars($_SERVER['SERVER_NAME']), 'port' => 22, 'username' => "vzshell", diff --git a/frontend/modules/client/vps/list.php b/frontend/modules/client/vps/list.php index 51efebe..ae97d75 100644 --- a/frontend/modules/client/vps/list.php +++ b/frontend/modules/client/vps/list.php @@ -48,7 +48,7 @@ if($sLoggedIn === true) } } - $sMainContents = Templater::AdvancedParse("{$sTheme}/client/vps/list", $locale->strings, array( + $sMainContents = NewTemplater::Render("{$sTheme}/client/vps/list", $locale->strings, array( 'vpses' => $sVpsList )); } diff --git a/frontend/modules/client/vps/lookup.php b/frontend/modules/client/vps/lookup.php index e84215d..ad7248d 100644 --- a/frontend/modules/client/vps/lookup.php +++ b/frontend/modules/client/vps/lookup.php @@ -117,5 +117,5 @@ catch (SshExitException $e) } -$sPageContents = Templater::AdvancedParse("{$sTheme}/client/vps/lookup", $locale->strings, $sVariables); +$sPageContents = NewTemplater::Render("{$sTheme}/client/vps/lookup", $locale->strings, $sVariables); diff --git a/frontend/modules/client/vps/password.php b/frontend/modules/client/vps/password.php index 5aa1ce8..6df41b5 100644 --- a/frontend/modules/client/vps/password.php +++ b/frontend/modules/client/vps/password.php @@ -76,7 +76,7 @@ if($display_form === true) 'message' => $locale->strings['warning-password-text'] )); - $sPageContents .= Templater::AdvancedParse("{$sTheme}/client/vps/password", $locale->strings, array( + $sPageContents .= NewTemplater::Render("{$sTheme}/client/vps/password", $locale->strings, array( 'id' => $sVps->sId )); } diff --git a/frontend/modules/client/vps/reinstall.php b/frontend/modules/client/vps/reinstall.php index 158a7be..63fb7c6 100644 --- a/frontend/modules/client/vps/reinstall.php +++ b/frontend/modules/client/vps/reinstall.php @@ -113,7 +113,7 @@ if($display_form === true) ); } - $sPageContents .= Templater::AdvancedParse("{$sTheme}/client/vps/reinstall", $locale->strings, array( + $sPageContents .= NewTemplater::Render("{$sTheme}/client/vps/reinstall", $locale->strings, array( 'templates' => $sTemplateList )); } diff --git a/frontend/modules/shared/login.php b/frontend/modules/shared/login.php index d4d9fe6..67859b9 100644 --- a/frontend/modules/shared/login.php +++ b/frontend/modules/shared/login.php @@ -53,7 +53,7 @@ if(isset($_POST['submit'])) } } -$sMainContents = Templater::AdvancedParse("{$sTheme}/shared/login", $locale->strings, array( +$sMainContents = NewTemplater::Render("{$sTheme}/shared/login", $locale->strings, array( 'error' => $sError, 'field-username' => $sFieldUsername )); diff --git a/frontend/rewrite.php b/frontend/rewrite.php index 4bd6ee6..5d79d81 100644 --- a/frontend/rewrite.php +++ b/frontend/rewrite.php @@ -249,7 +249,7 @@ try { if(isset($router->uVariables['menu']) && $router->uVariables['menu'] == "vps" && $router->uVariables['display_menu'] === true) { - $sMainContents .= Templater::AdvancedParse("{$sTheme}/client/vps/main", $locale->strings, array( + $sMainContents .= NewTemplater::Render("{$sTheme}/client/vps/main", $locale->strings, array( 'error' => $sError, 'contents' => $sPageContents, 'id' => $sVps->sId @@ -257,7 +257,7 @@ try } elseif(isset($router->uVariables['menu']) && $router->uVariables['menu'] == "admin" && $router->uVariables['display_menu'] === true) { - $sMainContents .= Templater::AdvancedParse("{$sTheme}/admin/main", $locale->strings, array( + $sMainContents .= NewTemplater::Render("{$sTheme}/admin/main", $locale->strings, array( 'error' => $sError, 'contents' => $sPageContents )); @@ -284,7 +284,7 @@ if(empty($router->uVariables['raw'])) 'generation' => round(microtime(true) - $timing_start, 6) )); - echo(Templater::AdvancedParse("{$sTheme}/shared/main", $locale->strings, $sTemplateParameters)); + echo(NewTemplater::Render("{$sTheme}/shared/main", $locale->strings, $sTemplateParameters)); } else {