Simple and minimalistic module to flush all image styles in Drupal 7.

http://drupal.org/sandbox/StepanKuzmin/1454096
git clone --branch master StepanKuzmin@git.drupal.org:sandbox/StepanKuzmin/1454096.git imagestyleflush

Image style flush

Comments

kongoji’s picture

Status: Needs review » Needs work

Hi StepanKuzmin,
module works well, just some notes to your module:

1) you should translate messages in drupal_set_message function.
From

  if ($success) {
    drupal_set_message('Image styles was successfully flushed.');
  }
  else {
    drupal_set_message('There are some errors occured.', 'error');
  }

to

  if ($success) {
    drupal_set_message(t('Image styles was successfully flushed.'));
  }
  else {
    drupal_set_message(t('There are some errors occured.'), 'error');
  }

2) I noticed you are working on master branch and you should switch to 7.x-1.x branch (read http://drupal.org/node/1127732)

3) can you provide also a flush link for each single image style? Flushing all styles at the same time could be very resource compsuming for a big website with thousands of images uploaded. You should also give a look to the patch proposed at http://drupal.org/node/700696

4) Seems you have very little corrections to do to pass automatic validation online tool, the results are here:
http://ventral.org/pareview/httpgitdrupalorgsandboxstepankuzmin1454096git

Summarizing: module seems to work pretty well, it adds a functionality it really miss in D7, but maybe it needs some little improvements to be perfect. Good job anyway, i like your module!

Status just moved to "Needs work", switch back to "Needs review" when you think module is ready for review again.

to.stepan.kuzmin@gmail.com’s picture

Status: Needs work » Needs review
StatusFileSize
new47.51 KB

I've updated module based on your notes. Now you can flush single image style.

imagestyleflush

mkadin’s picture

Cool module. Here's a link to the results from the automated review script - a few changes to be made, nothing major:
http://ventral.org/pareview/httpgitdrupalorgsandboxstepankuzmin1454096git

A few manual notes:
1) This message is not in proper english and could be more specific to the user:

drupal_set_message(t('There are some errors occured.', 'error'));

Something like, "An error occurred while flushing the image caches." might be better.

Make sure you remove everything from the master branch in your git repository. I just spent some time reviewing old code!

You might also consider offering this as a patch to core drupal instead of a standalone module. It seems lean, simple, and useful enough to make the cut. I'd love to see this functionality in every drupal install.

mkadin’s picture

Status: Needs review » Needs work
to.stepan.kuzmin@gmail.com’s picture

Status: Needs work » Needs review

I've fixed code style issues, changed message to "An error occurred while flushing the image caches." and removed all files from master branch.

Maybe I'll create a patch to Drupal core Image module later.

sam152’s picture

Status: Needs review » Reviewed & tested by the community

Hi,

Great module by the way, I have been thinking of doing something like this for a while, great to see you have already taken the initiative.

I have downloaded and installed the module and it functions exactly as described. The code looks clean and feels logical. I think it deserves RTBC status.

~Sam

klausi’s picture

Would you like to take part in the review bonus program? I personally only review/approve applications with a review bonus, but of course you can also wait for other git administrators to take a look at your code.

to.stepan.kuzmin@gmail.com’s picture

Issue tags: +PAreview: review bonus

Thanks klausi! As far as I understand, I should add "PAReview: review bonus" tag to this comment. So here it is.

klausi’s picture

Issue tags: -PAreview: review bonus

Removing review bonus tag, you have not listed any reviews in the issue summary. Please read #1410826: [META] Review bonus again.

klausi’s picture

Status: Reviewed & tested by the community » Fixed
Issue tags: +PAreview: single application approval

manual review:

  • project page is too short, please see http://drupal.org/node/997024
  • Same for README.txt, contains no useful instructions/explanations.
  • "Flush all image styles form submit": All comments should end in some punctuation.
  • This project is too short to approve you as git vetted user. We are currently discussing how much code we need, but everything with less than 120 lines of code or less than 5 functions cannot be seriously reviewed (imagestyleflush_image_style_list() was just copied/pasted, so you only have ~110 lines of code). However, I can promote this single project manually to a full project for you. You can get back to us if you have something bigger to review.

Thanks for your contribution, StepanKuzmin! Welcome to the community of project contributors on drupal.org.

I have promoted this to a full project: http://drupal.org/project/imagestyleflush

Now that this experimental project has been promoted, you'll need to update the URL of your remote repository or reclone it.

Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.

As you continue to work on your module, keep in mind: Commit messages - providing history and credit and Release naming conventions.

Thanks to the dedicated reviewer(s) as well.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

quiptime’s picture

Status: Closed (fixed) » Active
klausi’s picture

Status: Active » Closed (fixed)

This application is closed. Please report to the issue queue of the project only.

patrickd’s picture

Not related, please open a separate issue in the module issue queue.

// too slow xP

patrickd’s picture

Issue summary: View changes

Added link to project and git clone instructions.