From 4009772907c70b131c863f1aa454f020f2629677 Mon Sep 17 00:00:00 2001 From: botanic Date: Mon, 8 Sep 2014 02:36:38 -0700 Subject: [PATCH] Fix smarty issues --- code/web/private_php/ams/autoload/plugincache.php | 1 + .../API_key_management/API_key_management.php | 2 +- code/web/public_php/ams/templates/layout.tpl | 9 +++++++++ code/web/public_php/ams/templates/layout_plugin.tpl | 12 +----------- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/code/web/private_php/ams/autoload/plugincache.php b/code/web/private_php/ams/autoload/plugincache.php index 20bbb0b25..7150e2087 100644 --- a/code/web/private_php/ams/autoload/plugincache.php +++ b/code/web/private_php/ams/autoload/plugincache.php @@ -266,6 +266,7 @@ class Plugincache { case strtolower($plugin_name).'_hook_call_rest': case strtolower($plugin_name).'_hook_get_db': case strtolower($plugin_name).'_hook_return_global': + case strtolower($plugin_name).'_hook_activate': $content['hook_info'][$plugin_name] = call_user_func($value); break; } diff --git a/code/web/private_php/ams/plugins/API_key_management/API_key_management.php b/code/web/private_php/ams/plugins/API_key_management/API_key_management.php index 09c895624..185fe0250 100644 --- a/code/web/private_php/ams/plugins/API_key_management/API_key_management.php +++ b/code/web/private_php/ams/plugins/API_key_management/API_key_management.php @@ -76,7 +76,7 @@ function hook_variables() * if not created. * Contains the sql code */ -function api_key_management_hook_create_tb() +function api_key_management_hook_activate() { $dbl = new DBLayer( "lib" ); $sql = " diff --git a/code/web/public_php/ams/templates/layout.tpl b/code/web/public_php/ams/templates/layout.tpl index d4735a200..6515416a2 100644 --- a/code/web/public_php/ams/templates/layout.tpl +++ b/code/web/public_php/ams/templates/layout.tpl @@ -134,6 +134,15 @@ {/if} {block name=content}{/block} + {if isset($hook_info)} +
+ {foreach from=$hook_info key=arrkey item=element} + {if $arrkey eq $smarty.get.name} + {include file=$element['TemplatePath']} + {/if} + {/foreach} +
+ {/if} {if ! isset($no_visible_elements) or $no_visible_elements eq "FALSE"} diff --git a/code/web/public_php/ams/templates/layout_plugin.tpl b/code/web/public_php/ams/templates/layout_plugin.tpl index 1a84ff3bf..139597f9c 100644 --- a/code/web/public_php/ams/templates/layout_plugin.tpl +++ b/code/web/public_php/ams/templates/layout_plugin.tpl @@ -1,12 +1,2 @@ -{block name=content} -
-{if isset($hook_info)} -{foreach from=$hook_info key=arrkey item=element} -{if $arrkey eq $smarty.get.name} -{include file=$element.TemplatePath} -{/if} -{/foreach} -{/if} -
-{/block} +