Taarikh is a field formatter and widget module to display and input hijri dates using the fields defined by the date module. The formatter can work with all the fields defined by the date module, i.e., Date, Date (ISO format) and Date (Unix timestamp). The widget, however, does not work with Date (Unix timestamp).
The project is a sandbox at https://www.drupal.org/sandbox/hussainweb/2161577.
Repository
git clone --branch 7.x-1.x http://git.drupal.org/sandbox/hussainweb/2161577.git taarikh
cd taarikh
PAReview output can be seen at http://pareview.sh/pareview/httpgitdrupalorgsandboxhussainweb2161577git
Manual Reviews of other projects
#2465165-5: [D7] Fullscreen gallery
#2316301-30: [D7] Responsive Blocks
#2333893-10: [D7] RePEc
-- Previous
#2457903-10: [D7] Notify log
#2458731-8: [D7] Video Filter DemocracyNow
#2453657-10: [D7] United Nations Peacekeeping Operations
Comments
Comment #1
kunalkursija commentedHi Hussain,
taarikh.widgets.inc
1) I am guessing that form_error() message inside taarikh_field_widget_error() should be a translatable string. (because form_set_error demands so)
Comment #2
hussainwebI have fixed various issues and errors from pareview. The output follows at the end.
The one warning related to using
$form_state['input']is unavoidable as the subsequent code in Date module depends on it. However, this use case is commented in code.---
Review of the 7.x-1.x branch (commit c87800a):
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.
Source: http://pareview.sh/ - PAReview.sh online service
Comment #3
hussainweb@kunal.kursija: Thank you for the review.
The instance of
form_set_erroryou mention need not uset()as this is not a string literal but a variable. As you can see from the documentation of t() function, variables should never be passed to t() function except in certain cases.Thank you for the review once again.
Comment #4
hussainwebAdding review bonus tag.
Comment #5
hussainwebJust updating the IS with PAReview link.
Comment #6
kala4ekHi, manual review:
taarikh.module
taarikh.js
taarikh.element.inc
Comment #7
cafuego commentedNice one, hussainweb.
I've enabled and played with the module and it looks to be working fine.
On adding a Taarikh date field to a node type and saving that node, I got a warning:
Warning: strtotime() expects parameter 1 to be string, array given in taarikh_process_date_part() (line 218 of sites/all/modules/taarikh/taarikh.element.inc).
I have one functionality question which doesn't affect whether this should be a full project (it should :-)
I did not customise my date formats from the default. The formatter doesn't handle hour/minute/second, which is fine (it's a date, after all) but should taarikh_api be able to handle the day of the week - the
landDcharacters - or is the day name not at all relevant to Taarikh dates?Comment #8
hussainweb@kala4ek: Thank you for the review. I have pushed changes for the last two of your points.
Regarding drupal_static, from documentation page, you can see that this function is used if there is any possible need for resetting the cached value during a request. Since this controls adding of JS and CSS, I don't see that need at all. And static is fast (it doesn't matter here as it is run only once).
I am looking into the other error pointed out by @cafuego right now.
Comment #9
hussainweb@cafuego: Thank you again for the review. I have fixed the errors / warnings you experienced and tested it against required and non-required fields. Please let me know if you still face any errors.
Comment #10
cafuego commentedThe latest version doesn't produce the warning anymore, so all good. Setting the project application to RTBC.
Comment #11
klausiReview of the 7.x-1.x branch (commit 02d896a):
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:
Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.
Comment #12
hussainweb@klausi: Thanks for the review. You are right about this being a XSS exploit. I looked over the code and found this in a couple of other places and removed it. Other concerns are also fixed.
Comment #13
hussainwebAdding PAReview: review bonus tag with new reviews.
Comment #14
klausimanual review:
But otherwise looks good to me now.
Assigning to heddn as he might have time to take a final look at this.
Comment #15
hussainwebJust a gentle nudge. :)
And thank you @klausi for the review. I will definitely try to move the JS/CSS stuff to
#attached. I am just trying to keep it as close as possible todate_popupmodule for now.Comment #16
naveenvalechaReview of the 7.x-1.x branch (commit 02d896a):
No blockers.
Thanks for your contribution, hussainweb!
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.