Skip to content

Commit

Permalink
Added asset config type MT 6.2.x compatibility. Bumped to version 2.5…
Browse files Browse the repository at this point in the history
….19.
  • Loading branch information
danwolfgang committed Jan 25, 2016
1 parent 277f471 commit dbb738c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion addons/ConfigAssistant.pack/config.yaml
Expand Up @@ -4,7 +4,7 @@ key: ConfigAssistant
author_link: https://github.com/openmelody/mt-plugin-configassistant
author_name: "Byrne Reese, Open Melody Software Group"
description: This plugin provides a simple YAML based framework for creating plugin and theme configuration options.
version: 2.5.18
version: 2.5.19
static_version: 21
schema_version: 4

Expand Down
Expand Up @@ -99,8 +99,17 @@ sub asset_insert_param {
&& $ts
&& $app->registry('template_sets', $ts, 'options', $field_basename);

my $ctx = $tmpl->context;
my $asset = $ctx->stash('asset');
my $ctx = $tmpl->context;

my $asset = {};
# MT 6.2+
if ( my $assets = $ctx->stash('assets') ) {
$asset = @$assets[0];
}
# MT 4.x, 5.x, 6.0.x, 6.1.x.
else {
$asset = $ctx->stash('asset');
}

my $html;
# If this asset has a URL and file path then link it for easy previewing.
Expand Down

0 comments on commit dbb738c

Please sign in to comment.