diff --git a/include/admin/images.inc.php b/include/admin/images.inc.php
index 8bdfa4b5..ff282f84 100644
--- a/include/admin/images.inc.php
+++ b/include/admin/images.inc.php
@@ -161,7 +161,7 @@ switch ($serendipity['GET']['adminAction']) {
$properties = serendipity_parsePropertyForm();
$image_id = $properties['image_id'];
$created_thumbnail = true;
- $data['showML_add'] = showMediaLibrary($messages, true);
+ $data['showML'] = showMediaLibrary($messages, true);
break;
}
@@ -359,7 +359,7 @@ switch ($serendipity['GET']['adminAction']) {
foreach($new_media AS $nm) {
serendipity_insertMediaProperty('base_hidden', '', $nm['image_id'], $hidden);
}
- $data['showML_add'] = showMediaLibrary(null, true);
+ $data['showML'] = showMediaLibrary(null, true);
}
$data['messages'] = $messages;
break;
@@ -675,7 +675,7 @@ switch ($serendipity['GET']['adminAction']) {
default:
$data['case_default'] = true;
- $data['showML_def'] = showMediaLibrary();
+ $data['showML'] = showMediaLibrary();
break;
}
@@ -716,6 +716,11 @@ function showMediaLibrary($messages=false, $addvar_check = false, $smarty_vars =
return $output;
}
+if (! isset($data['showML'])) {
+ // alaways having the ML available is useful when switchting the filter after adding an image, thus being i nthe 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
$data['get']['only_path'] = $serendipity['GET']['only_path']; // we dont need other GET vars in images.inc.tpl
diff --git a/templates/2k11/admin/images.inc.tpl b/templates/2k11/admin/images.inc.tpl
index 8bac2dc2..8b45894d 100644
--- a/templates/2k11/admin/images.inc.tpl
+++ b/templates/2k11/admin/images.inc.tpl
@@ -61,7 +61,7 @@
{else}
- {$showML_add}
+ {$showML}
{/if}
{/if}
{if $case_directoryDoDelete}
@@ -290,5 +290,5 @@
{/if}
{if $case_default}
- {if $showML_def}{$showML_def}{/if}
+ {if $showML}{$showML}{/if}
{/if}