When can we expect a 7.x-2.x version of this great module?

Comments

Scyther’s picture

Working on geting out a alpha/beta/rc/stable release for 6.x-2.x with in the next week. Then I will start to port the 2.x version to Drupal 7.

Scyther’s picture

Version: 6.x-2.x-dev » 7.x-2.x-dev

Development release is now avalible. Only testing left until a release will be out.

alan d.’s picture

I just noticed a typo, probably creating a bug:

 elseif ($variables['display_unknown']) {
    $var = array(
      'code' => 'unkown',
      'iconset' => $variables['iconset'],
      'attributes' => $variables['attributes'],
      // Shouldn't this be display_unknown?
      // Otherwise an infinite loop will probably occur
      'display_unkown' => FALSE,
    );
    return theme('countryicons_icon', $var);
  }
Scyther’s picture

That is correct Alan, thanks.

It has been commited to dev branch.

alan d.’s picture

Another interesting point I found, not sure if it should be considered a bug or a feature:

$version = 2.0;
print version_compare($version, '2.0');
# outputs -1 (version is less than version 2

$version = (string) $version;
# casts to "2"
print version_compare($version, '2.0');
# outputs -1

$version = '2.0';
print version_compare($version, '2.0');
# outputs 0 (versions are equal)

So should we expect strings like "2.4.1" in the future, we need a string like '2.0' to parse this early version now. Or we can treat these as floats, and just do "$version >= 2". I really need an answer before finishing off the 2.x support via the countries module

Cheers

alan d.’s picture

Another typo that produces minor warnings:

function countryicons_theme() {
  return array(
    'countryicons_icon' => array(
      'variables' => array(
        'code' => NULL,
        'iconset' => NULL,
        'alt' => '',
        'title' => '',
        'attributes' => NULL,
        'display_unkown' => TRUE, <<<<
      ),

With these minor changes, the integration with the Countries module is complete as per the latest development version. I'm using a function_exists check for version comparison until the version string type is sorted.

I would recommend the string version, version_compare() usage is the defacto standard.

Scyther’s picture

@ comment #6
Notice that before and it was fixed in the commit with the other typo.

Scyther’s picture

' ' has now been added around the version number in countryicons_api_version().

Commited to dev branch: http://drupalcode.org/project/countryicons.git/commit/c99249c

Scyther’s picture

Assigned: Unassigned » Scyther
Scyther’s picture

7.x-2.0-beta1 is now out.

johnv’s picture

Status: Active » Fixed
Scyther’s picture

Status: Fixed » Active

Please let me change status when I think this is fixed!

johnv’s picture

sorry.

alan d.’s picture

I just noticed that the project page states that version 2.x is recommended but the project settings are suggesting that 1.x (green download) should be used over 2.x (yellow download).

This is set in the admin release bit as the "Recommended major version"

Scyther’s picture

Fixed Alan D.

johnv’s picture

Now that you're on it:
if you don't plan to work on the 1.x versions anymore, it is possible to remove the -1.x-dev versions from the list, too.

Scyther’s picture

Done

Scyther’s picture

Issue summary: View changes

As I can see, this is #2149699: Use file_create_url() in countryicons_get_icon_url(). the blocker for a stable 7.x-2.0 release. Anyone that could help test this, so we can get a new release out?