3,7c3
< /* Modified by KJP (16-Sept-2005) to:
<     1) ensure image type selection works 
<     2) Allow for multiple images in the block
<     3) Use Gallery2 naming for Image Types
< */
---
> 
144,156c140,151
< /* KJP: Modified typeMap to use current G2 naming */
<   $typeMap = array('randomImage' => t('Random Image'),
< 		   'recentImage' => t('Newest Image'),
< 		   'viewedImage' => t('Most Viewed Image'),
< 		   'randomAlbum' => t('Random Album'),
< 		   'recentAlbum' => t('Newest Album'),
< 		   'viewedAlbum' => t('Most Viewed Album'),
< 		   'dailyImage' => t('Picture of the Day'),
< 		   'weeklyImage' => t('Picture of the Week'),
< 		   'monthlyImage' => t('Picture of the Month'),
< 		   'dailyAlbum' => t('Album of the Day'),
< 		   'weeklyAlbum' => t('Album of the Week'),
< 		   'monthlyAlbum' => t('Album of the Month'));
---
>   $typeMap = array('randomImage' => t('Random image'),
> 		   'recentImage' => t('Recent image'),
> 		   'viewedImage' => t('Viewed image'),
> 		   'randomAlbum' => t('Random album'),
> 		   'recentAlbum' => t('Recent album'),
> 		   'viewedAlbum' => t('Viewed album'),
> 		   'dailyImage' => t('Daily image'),
> 		   'weeklyImage' => t('Weekly image'),
> 		   'monthlyImage' => t('Monthly image'),
> 		   'dailyAlbum' => t('Daily album'),
> 		   'weeklyAlbum' => t('Weekly album'),
> 		   'monthlyAlbum' => t('Monthly album'));
164,168c159,160
<     /* KJP: Use checkboxes instead of select. Allow multiple selections but
<        require at least one (check is done on save) 
<        Also fixes a typo in v1.9 */
<     $output = form_checkboxes(t('Image type'),
< 			  'gallery_block_block_' . $delta,
---
>     $output = form_select(t('Image type'),
> 			  'gallery_block_block' . $delta,
171,172c163
< 			  t('Pick the type of image you\'d like to see'), 
< 			  NULL, TRUE);
---
> 			  t('Pick the type of image you\'d like to see'));
187,193c178
<     /* KJP: Checks if an image type was selected. If not, quietly use 
<        randomImage to avoid any errors*/
<     if (is_array($edit['gallery_block_block_' . $delta])) {
<         variable_set('gallery_block_block_' . $delta, $edit['gallery_block_block_' . $delta]);
< 	} else {
<         variable_set('gallery_block_block_' . $delta, array('randomImage'));
< 	}
---
>     variable_set('gallery_block_block_' . $delta, $edit['gallery_block_block_' . $delta]);
204,205c189
<     /* KJP: Allow for multiple image types */
<     $params['blocks'] = implode('|', variable_get('gallery_block_block_' . $delta, array('0'=>'randomImage')));
---
>     $params['block'] = variable_get('gallery_block_block_' . $delta, 'randomImage');
206a191
> 
208a194
> 
216,223c202
< 	/* KJP: If more than one image type selected then default the
< 	   subject to 'Gallery' 
< 	   Also fixes typo in v1.9 -- block => blocks */
< 	if (count(variable_get('gallery_block_block_' . $delta, 'randomImage')) > 1) {
< 	    $block['subject'] = t('Gallery');
< 	} else {
< 	    $block['subject'] = $typeMap[$params['blocks']]; 
< 	}
---
> 	$block['subject'] = $typeMap[$params['block']];
