Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
aggregator.module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
11 Mar 2009 at 15:05 UTC
Updated:
3 Jan 2014 at 00:07 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
alex_b commentedAfter this is done, calls to aggregator_save_item() can be simplified.
Comment #2
foxtrotcharlie commentedTo clarify - what needs to be done is to change all the keys of the $item array to lowercase?
So, for example, change
to
Is that all?
Comment #3
alex_b commentedright, that's all :-)
Comment #4
foxtrotcharlie commentedThis patch makes all the uppercase keys in function aggregator_parse_feed() in aggregator.parse.inc lowercase. The goal is to then be able to simplify the aggregator_save_item() function.
Comment #5
foxtrotcharlie commentedI wasn't sure of a couple of uppercase items which I changed - see attached screenshot for the two lines I'm talking about. Let me know if I shouldn't have changed these.
Comment #7
alex_b commented#5 - You'll have to change all of these uppercase keys. Also don't forget to change depending code in the rest of the module - OTOH, there is a bunch of uppercase keys work in aggregator.processor.inc. This is the reason why this patch failed testing.
Comment #8
foxtrotcharlie commentedthanks alex_b
I've rerolled the patch to remove uppercase keys from aggregator.parser.inc and now also from aggregator.processor.inc too.
I did find this a bit tricky, and it's my first multiple file patch.
There are some keys in a comment at the top of function hook_aggregator_parse() in aggregator.api.php which I did not change as I wasn't sure:
I also found and left the following, because I wasn't sure, in aggregator.admin.inc function _aggregator_parse_opml()
the keys: OUTLINE, XMLURL, TEXT and OUTLINE (not sure if this one's a key?)
Comment #9
alex_b commented#8 All of these keys need to be changed.
Comment #11
aron novakNice work!
Well, only one line was needed to get the things work.
In fact you need to convert the uppercase string to lowercase before examining.
Comment #12
spuky commentedI thought this patch is a easy patch so it could be one to get my feet wet with patch reviewing...
- aplyed the patch run simple tests on the agreator module (no error)
- added some feeds to my site which got parsed without error
- I read the patch and it is indeed just changing case of the keys
- got nothing from coder module
I don't know if that is sufficent for a "reviewed & tested by the community.
so I'd love to get feedback how I did reviewing this patch
spuky
Comment #13
spuky commentedsince I got no feedback i am setting this one to rtbc
still not shure if my review is sufficent
spuky
Comment #14
dries commentedCommitted to CVS HEAD. Thanks!