This module creates a block that makes it easy to embed the Mobi2Go order form into an existing drupal site.

Mobi2Go: http://mobi2go.com
Project Page: https://drupal.org/sandbox/chtombleson/2259321
Git [D6]: git clone --branch 6.x http://git.drupal.org/sandbox/chtombleson/2259321.git mobi2go
Git [D7]: git clone --branch 7.x http://git.drupal.org/sandbox/chtombleson/2259321.git mobi2go

Reviews:
https://drupal.org/node/2257711#comment-8751863
https://drupal.org/node/2251193#comment-8751889
https://drupal.org/node/2227397#comment-8751905

Comments

PA robot’s picture

Status: Needs review » Needs work

There are some errors reported by automated review tools, did you already check them? See http://pareview.sh/pareview/httpgitdrupalorgsandboxchtombleson2259321git

We are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)

Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).

I'm a robot and this is an automated message from Project Applications Scraper.

chtombleson’s picture

Status: Needs work » Needs review

I have fixed these issues.

chtombleson’s picture

Issue summary: View changes
Issue tags: +PAreview: review bonus
heddn’s picture

Status: Needs review » Needs work
Issue tags: +PAreview: security

Reviewed D7 project.

Javascript should follow https://drupal.org/node/121997 & https://drupal.org/node/172169
Move your admin UI stuff into a new file mobi2go.admin.inc and update your hook_menu() to reference it from there. This reduces the amount of stuff that must be loaded by Drupal and therefore saves memory.

mobi2go_block_view()
The site and container variables aren't passed through sanitization. This could cause XSS or other bad things. I've added PAReview: security. When you fix the issue, please don't remove the tag. It is used for trending purposes.

chtombleson’s picture

Status: Needs work » Needs review

I have made the changes to both D6 & D7 and is ready for review again.

heddn’s picture

Status: Needs review » Needs work

For D7, can you also use a js behavior and a closure?

Rather than using filter_var, consider using Drupal's sanitization functions, specifically check_plain.

Admin config form for Mobi2Go
This code comment should end in a full stop i.e. a period.

chtombleson’s picture

I have changed from using filter_var to check_plain and have added fullstop where need to comments.
I don't see a reason for using a JS behaviour as it may cause my javascript not to work as intended.

chtombleson’s picture

Status: Needs work » Needs review
sleepingmonk’s picture

I think that since your module sets variables in mobi2go.admin.inc via system_settings_form() you need to delete the variables on uninstall using hook_uninstall in mobi2go.install

chtombleson’s picture

I have added the uninstall hook to mobi2go.install

mpdonadio’s picture

Manual review, as I don't have a Mobi2Go account.

You still have a master branch in the repo; this should be removed.

Drupal 7 branch:

You should really line wrap your README.txt to 70 columns.

mobi2go_uninstall() uses the wrong number of spaces for indentation; should be two

Javascript indentation should use two spaces and not four.

Other small formatting issues, http://pareview.sh/pareview/httpgitdrupalorgsandboxchtombleson2259321git

I would implement a hook_requirements() that warns when the proper variables aren't set.

mobi2go_block_view(), line 78, you probably want to run the ID through drupal_html_class() to ensure that it is valid.

Rather than using drupal_add_js() in mobi2go_block_view(), you should use the #attached property, especially since drupal_add_js() is now deprecated in D8.

In mobi2go_block_view(), you may want to change $block['content'] = ... to $block['content']['container']['#markup'] = ... This will help if anyone needs to hook_block_view_alter() it.

I also agree with @heddn about not using a behavior. For example, this won't work if someone wants to use it where the order form gets AJAXed in.

Pretty much all of this also applies to the Drupal 6 branch.

I'm leaving this as Needs Review, as I can't actually test w/o a Mobi2Go account, and I don't know if the behavior thing is a show stopper. Otherwise, the things above are rather small.

izus’s picture

Status: Needs review » Needs work

changing status as of #11

chtombleson’s picture

Status: Needs work » Needs review

I have made the changes and is ready for review again.

heddn’s picture

Status: Needs review » Reviewed & tested by the community

Actually, a small correction to #2259343-11: [D6][D7] Mobi2Go. HTML ids should be passed through drupal_html_id(). drupal_html_class only formats a valid html class. drupal_html_id will ensure a unique HTML id.

I'm going to say that isn't a release blocker an can easily be fixed. This project is RTBCed. The next step is to wait for a git admin to review and grant access.

mpdonadio’s picture

Yeah, drupal_html_id() is correct. If nobody else thinks that not using a behavior is a blocker, then I am also fine with RBTC.

heddn’s picture

re: #2259343-15: [D6][D7] Mobi2Go, this project is now using a JS behaviour.

mpdonadio’s picture

Yes, @heddn is correct. I am going to crawl off for a little while and write myself a note to not to do anything important on Monday mornings...

klausi’s picture

Status: Reviewed & tested by the community » Fixed

It appears you are working in the "7.x" branch in git. You should really be working in a version specific branch. The most direct documentation on this is Moving from a master branch to a version branch. For additional resources please see the documentation about release naming conventions and creating a branch in git.
Review of the 7.x branch:

  • Coder Sniffer has found some issues with your code (please check the Drupal coding standards).
    FILE: /home/klausi/pareview_temp/js/mobi2go.js
    --------------------------------------------------------------------------------
    FOUND 3 ERRORS AFFECTING 2 LINES
    --------------------------------------------------------------------------------
      1 | ERROR | [ ] Missing file doc comment
     13 | ERROR | [x] Expected 1 space before "+"; 0 found
     13 | ERROR | [x] Expected 1 space after "+"; 0 found
    --------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    --------------------------------------------------------------------------------
    

This automated report was generated with PAReview.sh, your friendly project application review script. You can also use the online version to check your project. You have to get a review bonus to get a review from me.

manual review:

  1. Your git branches are still wrongly named, they should be 7.x-1.x and 6.x-1.x
  2. mobi2go_requirements(): do not pass variables to t(), only string literals should be passed to t() where possible. Otherwise the strings cannot be found by automated translation extraction tools. "$value = 'Site name is not set.';" should be "$value = $t('Site name is not set.');".

But otherwise looks good to me, so ...

Thanks for your contribution, chtombleson!

I updated your account so you can promote this to a full project and also create new projects as either a sandbox or a "full" project.

Here are some recommended readings to help with excellent maintainership:

You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and stay involved!

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.

Thanks to the dedicated reviewer(s) as well.

Status: Fixed » Closed (fixed)

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