Closed (fixed)
Project:
Drupal.org CVS applications
Component:
new project application
Priority:
Normal
Category:
Task
Assigned:
Issue tags:
Reporter:
Created:
27 Jul 2010 at 13:55 UTC
Updated:
13 Jan 2019 at 09:59 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
michaelpporter commentedattached is the simple_mobile_redirect module I am proposing
Comment #2
michaelpporter commentedattached file
Comment #3
avpadernoHello, and thanks for applying for a CVS account. I am adding the review tags, and some volunteers will review the code, pointing out what it needs to be changed.
As per requirements, the motivation message should be expanded to contain more features of the proposed project. For themes, it should include also a screenshot of the theme, and (when possible) a link to a working demo site using the proposed theme; for modules, it should include also a comparison with the existing solutions.
Comment #4
michaelpporter commentedThis is working on http://www.duoconsulting.com/ you have to browse with a mobile device or change the header using dev tools to fake an iPhone/iPad etc. once on the mobile site http://m.duoconsulting.com/ you can link back to the main site which sets a cookie to used to not redirect you back to the mobile site.
Comment #5
michaelpporter commentedThe simple_mobile_redirect module is designed to make it easy to direct people to a mobile version of the site that is hosted on a different URL. There are settings for: iPad, iPhone/iPod touch,Android,Opera Mini,Blackberry,Palm Web OS,Window Mobile. If you browse to a site that contains '?nomobi=yes' it will set a cookie to prevent redirecting the user to the mobile site. Browsing to '/clearsimplemobileredirect' it will clear the cookie and redirect per the settings.
Comment #6
michaelpporter commentedWhat is the status of the review?
Comment #7
michaelpporter commentedComment #8
michaelpporter commentedcorrected spelling of name
Comment #9
michaelpporter commentedUpdated to the project name
Comment #10
avpadernoComment #11
meba commentedThe module has obvious coding standard issues like indenting, see http://drupal.org/coding-standards please.
Security seems fine.
Comment #12
avpadernoThose lines need to be removed from the .info file.
The permission doesn't follow the schema used for Drupal permissions. It should be .
The code is not using the correct Drupal function that should be used to redirect users to a different location. Drupal can be installed on a sub-directory of the web root directory; redirecting the user to / would not redirect it to the home page of a Drupal-powered site.
I would not use
switch()when the code is not checking a variable (or the value returned from a function) against different values; apart that, there is a PHP error in the code.Comments should be placed in a different line than the code.
The function being called doesn't exist.
Comment #13
michaelpporter commentedI have updated the module based on the notes above. I have added comments to some cases where I keep the code as is.
4. I can not use drupal_goto() here as this is part of the boot hook, per drupal loading still. I have added a setting/variable that can be set for the non-mobile home page.
5. I feel a switch is better here even though there is not one variable being checked, this allows the code to move on once it found a match, better than a if/ifelse/else IMO
Comment #14
avpadernoLeave an empty line between a function and the other.
See http://drupal.org/coding-standards to understand how a module should be written. In particular, see how constants should be written, and how the code should be formatted.
The syntax used for
case (preg_match('/ipad/i',$user_agent));is not the syntax suggested by the coding standards.The code should be written as
Comment #15
michaelpporter commentedCleaned up the layout based on the latest comments.
Comment #16
avpadernoComment #17
michaelpporter commentedkiamlaluno thank you for your time and input.
Comment #18
avpadernoThe code is not using spaces where the coding standards suggest to use it. That is done in almost all the code, and that makes it difficult to read. Point #2 of my previous comment is still applicable.
Comment #19
michaelpporter commentedUpdated the code to change end of functions and "if's" from ){ to ) { per formatting.
Comment #20
avpadernoComment #21
michaelpporter commentedComment #22
avpadernoComment #25
avpaderno