Fatal error: Unknown function: _image_get_sizes() in C:\Program Files\xampp\htdocs\drupal-4.7.0-rc4\modules\shazamgallery\shazamgallery.module on line 22

The line:
foreach (_image_get_sizes() as $size) {

breaks access control in 4.7rc4 as _image_get_sizes() does not appear to exist. Is it part of another module? I commented out that block and was able to get some basic access control setup.

There are also calls to _image_get_vid() which appears to not exist. If some other module is required, can that be documented (if it is, then more clearly :) somewhere.

Comments

Boraa’s picture

Status: Active » Needs review

I think that it's connected with new version of Image. That function was removed. To fix it you may add this into image.module.

/**
 * Returns (and possibly creates) a new vocabulary for Image galleries.
 */
function _image_get_vid() {
  $vid = variable_get('image_nav_vocabulary', '');
  if (empty($vid)) {
    // Check to see if a forum vocabulary exists
    $vid = db_result(db_query("SELECT vid FROM {vocabulary} WHERE module='%s'", 'image'));
    if (!$vid) {
      //$vocabulary = taxonomy_save_vocabulary(array('name' => t('Image Galleries'), 'multiple' => '0', 'required' => '0', 'hierarchy' => '1', 'relations' => '0', 'module' => 'image', 'nodes' => array('image')));
      switch (taxonomy_save_vocabulary($edit)) {
		  case SAVED_NEW:
		    drupal_set_message(t('Created new vocabulary %name.', array('%name' => theme('placeholder', $edit['name']))));
		    break;
		  case SAVED_UPDATED:
		    drupal_set_message(t('Updated vocabulary %name.', array('%name' => theme('placeholder', $edit['name']))));
		    break;
		  case SAVED_DELETED:
		    drupal_set_message(t('Deleted vocabulary %name.', array('%name' => theme('placeholder', $deleted_name))));
		    break;
		}
      $vid = $vocabulary['vid'];
    }
    variable_set('image_nav_vocabulary', $vid);
  }

  return $vid;
}


garphy’s picture

Status: Needs review » Closed (won't fix)

this piece of code keep on creating new vocabulary for each viewed image : i mean, each time an image is viewed, a new category is created.