Added an optional parameter to aggregator_page_opml() to specify which category, if any, to create the OPML file for.

Modified aggregator_menu() to crerate callbacks for the files.

Comments

Prometheus6’s picture

Status: Needs review » Closed (fixed)

Doesn't seem to be much interest...

Uwe Hermann’s picture

Version: 4.6.0 » x.y.z
Status: Closed (fixed) » Active

This would be nice IMHO. Your patch seems broken, can you please re-submit a working one?

Prometheus6’s picture

I've taken a different approach. I wrote a module for my site pretty specific to my needs.

http://www.niggerati.net/sitelist

Since I know you're working on Planet Drupal, I'd be willing to ship you a not-for-distribution copy to check out. Hit me via the contact page if you're interested.

Uwe Hermann’s picture

That wouldn't help much. The Planet will run on drupal.org, so we need patches for aggregator.module. Can you merge your changes into aggregator module?

Prometheus6’s picture

StatusFileSize
new1.72 KB

All of them, no. But I did fix a problem with the initial patch. All the callbacks will be created properly.

Prometheus6’s picture

Status: Active » Needs review
Uwe Hermann’s picture

There's a ***** CVS exited normally with code 1 ***** at the bottom of your patch. I guess it won't apply.

Prometheus6’s picture

Really? Why?

Uwe Hermann’s picture

OK, my bad. The patch does apply, but that line is some error message (a quick Google lookup tells me that "code 0" is ok, "code 1" means error). It seems the line is added by WinCVS, do you use that? Are you sure the patch contains all lines it should contain? The error might mean that some lines are missing from the patch (?) Not sure...

Prometheus6’s picture

It seems the line is added by WinCVS, do you use that?

Guilty. But the patches it produces seem fine. It may be a return code from the macros that run the CVS commands. I've never needed to know what that code meant.

dries’s picture

That code is insecure (SQL injection) and does not work with table prefixing.

Plus, the callback can be removed. Additional parameters are automatically passed to aggregator_page_opml.

Prometheus6’s picture

StatusFileSize
new1 KB

Sorry, I just uploaded what was there...like I said, I'm using a seperate module for this.

Anyway, here's a correct one.

dries’s picture

Still insecure. Use the %d-directive in db_query().

Also, cat_title does not seem to be used. If cat_title isn't used, why is the category table joined?

Finally, "} else {" should be on two lines.

Prometheus6’s picture

StatusFileSize
new914 bytes

Still insecure. Use the %d-directive in db_query().

An implicit check that the variable is numeric. Okay.

Also, cat_title does not seem to be used. If cat_title isn't used, why is the category table joined?

Truth, I didn't think I'd be finishing this. I had a reason for that, I just don't remember what it was. YOu're right, it's not necessary so it's gone.

dries’s picture

Status: Needs review » Fixed

Committed to HEAD.

Anonymous’s picture

Anonymous’s picture

Prometheus6’s picture

Version: x.y.z » 4.6.3
Status: Fixed » Closed (fixed)