? Success

User tests: Successful: Unsuccessful:

avatar jms2win
jms2win
17 Jan 2014

We propose to add an alternative method to get the feed when the allow_url_open is OFF.
When the allow_url_open is OFF, the XMLReader::open always fails because the URL can not be connected.

So we propose to get the Feed with the alternative CURL when it is present.

avatar jms2win jms2win - open - 17 Jan 2014
avatar zero-24
zero-24 - comment - 17 Jan 2014
avatar mbabker
mbabker - comment - 17 Jan 2014

I'd actually suggest using JHttp instead of hard coding cURL in here as our JHttp library supports cURL, socket, and stream connections. Otherwise, this is a good idea IMO.

$connector = JHttpFactory::getHttp();

try {
    $feed = $connector->get($uri);
} catch (RuntimeException $e) {
    // This is typically a failed connection
} catch (UnexpectedValueException $e) {
    // The connector failed to correctly read the HTTP headers
}
avatar jms2win
jms2win - comment - 28 Jan 2014

I have updated the proposal to the the suggested JHttpFactory::getHttp();

You will see that I didn't put any Try/Catch as the function as to throw exception in case of errors.
So I have kept the JHttpFactory exceptions throw to the caller.

avatar Bakual
Bakual - comment - 28 Jan 2014

Added some notes about codestyle (http://joomla.github.io/coding-standards/)

avatar jms2win
jms2win - comment - 8 Jun 2014

@roland-d I have removed the Trailing spaces requested

avatar phproberto phproberto - reference | 38df614 - 9 Jun 14
avatar phproberto phproberto - reference | 859fe45 - 9 Jun 14
avatar phproberto phproberto - close - 9 Jun 2014
avatar phproberto phproberto - change - 9 Jun 2014
Status New Closed
Closed_Date 0000-00-00 00:00:00 2014-06-09 01:55:37
avatar phproberto phproberto - close - 9 Jun 2014

Add a Comment

Login with GitHub to post a comment