This module adds a proxy configuration file page to Drupal site. Proxy configuration file can be a Proxy Auto-Config (proxy.pac) file or a Web Proxy Autodiscovery Protocol (wpad.dat) file or both. These files will have
correct configurable mimetype application/x-ns-proxy-autoconfig or application/x-javascript-config. Configuration file will available at: $base_url/proxy.pac or $base_url/wpad.dat or both.

Project page: https://drupal.org/sandbox/andre4s_y/2202733
Git clone: git clone --branch 7.x-1.x http://git.drupal.org/sandbox/andre4s_y/2202733.git proxy_auto
Drupal version: 7, not further dependencies

There is branch for Drupal 8 also: git clone --branch 8.x-1.x http://git.drupal.org/sandbox/andre4s_y/2202733.git proxy_auto

Reviews of other projects:
@todo :)

Comments

andre4s_y’s picture

Issue summary: View changes
PA robot’s picture

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.

Fernly’s picture

Hi andre4s_y,

You might want to separate the admin settings form in a separate file proxy_auto.admin.inc to minimise the .module file.

You can change this (in the module file):

$menus['admin/config/system/proxy_auto'] = array(
    'title' => 'Proxy Auto Settings',
    'description' => 'Configure Proxy Auto Module',
    'page callback' => 'drupal_get_form',
    'page arguments' => array('proxy_auto_settings'),
    'access arguments' => array('administer site configuration'),
  );

To:

$menus['admin/config/system/proxy_auto'] = array(
    'title' => 'Proxy Auto Settings',
    'description' => 'Configure Proxy Auto Module',
    'page callback' => 'drupal_get_form',
    'page arguments' => array('proxy_auto_settings'),
    'access arguments' => array('administer site configuration'),
    'file' => 'proxy_auto.admin.inc',
  );

and move the settings form function to this file.

A few grammatical changes:

  • Line 117: Comment lines will not be included in the output.
  • Line 119: Must return a value of type String.
  • Line 120: Use spaces instead of tabs.
  • Line 182: Proxy configuration content must have at least one return value of type String.

Greets.

imgio’s picture

Dear andre4s_y,
thanks for submitting this new functionality to the Drupal community.

I installed and tested the module as well as reviewing the code.
I think it works as desired, except I would like you to take a look at the following:

1. Fix the grammar of the rules, as stated by lennartvv above, in README.txt

2. Fix the grammar of the rules in the .module file itself (lines 117-120):

3. In the README.txt, Installation, point 3:

You have:
Edit the proxy configuration file under "Administration" -> "Configuration" -> "Proxy Auto Settings"

It should be:
Edit the proxy configuration file under "Administration" -> "Configuration" -> "System" -> "Proxy Auto Settings"

Good luck,

imgio

imgio’s picture

Status: Needs review » Needs work
andre4s_y’s picture

Status: Needs work » Needs review

Dear lennartvv and imgio,

Thank you for your review.
I have updated the code based on your suggestions for both branches.
Since I am newbie, I have some questions:
1. Do I require to create test file for this module?
2. At this point, can I update the code directly to git without show/upload some .patch file?

Thank you..

Fernly’s picture

Hi andre4s_y,

You are not obliged to add a test file. But it's obviously a nice extra.
You can commit and push all your changes to the current 7.x-1.x branch without making patches.

Good luck!

heddn’s picture

Status: Needs review » Needs work

The function short descriptions use an @desc format that is not customary for Drupal. Please see https://drupal.org/coding-standards/docs#drupal

function proxy_auto_settings_validate()
Validate functions typically do not modify input data. This should only happen when retrieving the stored data. This still applies to Drupal7, see https://drupal.org/node/213156.

Instead it should only be doing form_set_error type logic.

PA robot’s picture

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

Closing due to lack of activity. If you are still working on this application, you should fix all known problems and then set the status to "Needs review". (See also the project application workflow).

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

andre4s_y’s picture

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

Dear heddn,

Thank you for your review and your guidance.
I will update the code based on your suggestions for both branches.
IMHO, It is better if I move modification of input data from validate function to submit function.

andre4s_y’s picture

Assigned: Unassigned » andre4s_y
Status: Needs review » Needs work

Sorry, still needs work.

gwprod’s picture

Assigned: andre4s_y » Unassigned

Your code fails automated testing:

http://pareview.sh/pareview/httpgitdrupalorgsandboxandre4sy2202733git

in proxy_auto_settings, you are using html in t() which should be avoided.

You should implement hook_uninstall to remove variables you have created.

PA robot’s picture

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

Closing due to lack of activity. If you are still working on this application, you should fix all known problems and then set the status to "Needs review". (See also the project application workflow).

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