Remove deprecated Templater::AdvancedParse calls and replace them with NewTemplater::Render

feature/node-rewrite
Sven Slootweg 12 years ago
parent eab62d5985
commit 7e709b7f57

@ -48,7 +48,7 @@ try
catch(NotFoundException $e) catch(NotFoundException $e)
{ {
$router->uVariables['display_menu'] = false; $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; $sRouterAuthenticated = false;
} }
catch(UnauthorizedException $e) catch(UnauthorizedException $e)

@ -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 'errors' => $sErrors
)); ));

@ -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 'nodes' => $sNodeList
)); ));

@ -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, 'id' => $sNode->sId,
'hostname' => $sNode->sHostname, 'hostname' => $sNode->sHostname,
'location' => $sNode->sPhysicalLocation, 'location' => $sNode->sPhysicalLocation,

@ -13,4 +13,4 @@
if(!isset($_APP)) { die("Unauthorized."); } 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());

@ -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 'users' => $sUserList
)); ));

@ -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, 'id' => $sUserEntry->sId,
'username' => $sUserEntry->sUsername, 'username' => $sUserEntry->sUsername,
'email' => $sUserEntry->sEmailAddress, 'email' => $sUserEntry->sEmailAddress,

@ -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, 'errors' => $sErrors,
'nodes' => $sNodes, 'nodes' => $sNodes,
'users' => $sUsers, 'users' => $sUsers,

@ -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 'vpses' => $sVpsList
)); ));

@ -47,7 +47,7 @@ try
$sSuspended = ($sVps->sStatus == CVM_STATUS_SUSPENDED) ? true : false; $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, 'id' => $sVps->sId,
'suspended' => $sSuspended 'suspended' => $sSuspended
)); ));

@ -13,7 +13,7 @@
if(!isset($_APP)) { die("Unauthorized."); } 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']), 'host' => htmlspecialchars($_SERVER['SERVER_NAME']),
'port' => 22, 'port' => 22,
'username' => "vzshell", 'username' => "vzshell",

@ -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 'vpses' => $sVpsList
)); ));
} }

@ -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);

@ -76,7 +76,7 @@ if($display_form === true)
'message' => $locale->strings['warning-password-text'] '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 'id' => $sVps->sId
)); ));
} }

@ -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 'templates' => $sTemplateList
)); ));
} }

@ -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, 'error' => $sError,
'field-username' => $sFieldUsername 'field-username' => $sFieldUsername
)); ));

@ -249,7 +249,7 @@ try
{ {
if(isset($router->uVariables['menu']) && $router->uVariables['menu'] == "vps" && $router->uVariables['display_menu'] === true) 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, 'error' => $sError,
'contents' => $sPageContents, 'contents' => $sPageContents,
'id' => $sVps->sId 'id' => $sVps->sId
@ -257,7 +257,7 @@ try
} }
elseif(isset($router->uVariables['menu']) && $router->uVariables['menu'] == "admin" && $router->uVariables['display_menu'] === true) 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, 'error' => $sError,
'contents' => $sPageContents 'contents' => $sPageContents
)); ));
@ -284,7 +284,7 @@ if(empty($router->uVariables['raw']))
'generation' => round(microtime(true) - $timing_start, 6) '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 else
{ {

Loading…
Cancel
Save