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)
This commit is contained in:
Ian 2015-01-18 16:38:03 +01:00
parent 254ecb4c6a
commit 1025ec5748
2 changed files with 9 additions and 2 deletions

View File

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

View File

@ -293,3 +293,6 @@
{if $case_default}
{if $showML}{$showML}{/if}
{/if}
{if $showMLbutton}
<a id="ml_link" class="button_link" href="?serendipity[adminModule]=media">{$CONST.MEDIA_LIBRARY}</a>
{/if}