Commit 6c3f7ef3 authored by walkah's avatar walkah

issue #20779 : fix when no 'show' param is selected.

parent 1fb40367
...@@ -136,12 +136,14 @@ function gallery_block($op = 'list', $delta = 0) { ...@@ -136,12 +136,14 @@ function gallery_block($op = 'list', $delta = 0) {
case 1: case 1:
$blocks = variable_get('gallery_blocks', array()); $blocks = variable_get('gallery_blocks', array());
$show = variable_get('gallery_show', array()); $show = variable_get('gallery_show', array());
if (count($blocks) && count($show)) { if (is_array($blocks) && count($blocks) > 0) {
_gallery_init(); _gallery_init();
$params = array('blocks' => implode('|', $blocks), $params = array('blocks' => implode('|', $blocks),
'show' => implode('|', $show),
'header' => 1, 'header' => 1,
'maxsize' => 140); 'maxsize' => 140);
if (is_array($show)) {
$params['show'] = implode('|', $show);
}
list($ret, $content) = GalleryEmbed::getImageBlock($params); list($ret, $content) = GalleryEmbed::getImageBlock($params);
if ($content) { if ($content) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment