From 1025ec574804cc570368ab1bc5cb60591e09e877 Mon Sep 17 00:00:00 2001 From: Ian Date: Sun, 18 Jan 2015 16:38:03 +0100 Subject: [PATCH] fix default open ML if in image properties form - give option to jump to ML w/o submittng form References #264 (was not really mentioned there, bur related) --- include/admin/images.inc.php | 8 ++++++-- templates/2k11/admin/images.inc.tpl | 3 +++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/include/admin/images.inc.php b/include/admin/images.inc.php index 85bc8ca1..6ebcf72c 100644 --- a/include/admin/images.inc.php +++ b/include/admin/images.inc.php @@ -717,8 +717,12 @@ function showMediaLibrary($messages=false, $addvar_check = false, $smarty_vars = } if (! isset($data['showML'])) { - // always having the ML available is useful when switching the filter after adding an image, thus being in the add-case - $data['showML'] = showMediaLibrary(); + if (isset($_REQUEST['go_properties'])) { + $data['showMLbutton'] = true; + } else { + // always having the ML available is useful when switching the filter after adding an image, thus being in the add-case + $data['showML'] = showMediaLibrary(); + } } $data['get']['fid'] = $serendipity['GET']['fid']; // don't trust {$smarty.get.vars} if not proofed, as we often change GET vars via serendipty['GET'] by runtime diff --git a/templates/2k11/admin/images.inc.tpl b/templates/2k11/admin/images.inc.tpl index 3a3ebd86..cec4b8b4 100644 --- a/templates/2k11/admin/images.inc.tpl +++ b/templates/2k11/admin/images.inc.tpl @@ -293,3 +293,6 @@ {if $case_default} {if $showML}{$showML}{/if} {/if} +{if $showMLbutton} + {$CONST.MEDIA_LIBRARY} +{/if}