  |
53 | 53 | | return $this->_groups[$this->getID($code)]['size_height']; |
| |
54 | 54 | | } |
| |
55 | 55 | | |
  |
56 | | - | function show(&$image, &$title, $parameters = '', $group = 'default') { |
| |
| 56 | + | function exists($code) { |
| |
| 57 | + | return isset($this->_groups[$this->getID($code)]); |
| |
| 58 | + | } |
| |
| 59 | + | |
| |
| 60 | + | function show(&$image, &$title, $parameters = '', $group = '') { |
| |
| 61 | + | if (empty($group) || !$this->exists($group)) { |
| |
| 62 | + | $group = $this->getCode(DEFAULT_IMAGE_GROUP_ID); |
| |
| 63 | + | } |
| |
| 64 | + | |
  |
57 | 65 | | $group_id = $this->getID($group); |
| |
58 | 66 | | |
| |
59 | 67 | | $width = $height = ''; |