summaryrefslogtreecommitdiff
path: root/app/controllers/feedController.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/feedController.php')
-rwxr-xr-xapp/controllers/feedController.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/app/controllers/feedController.php b/app/controllers/feedController.php
index 1232ddff4..c235e8b0f 100755
--- a/app/controllers/feedController.php
+++ b/app/controllers/feedController.php
@@ -16,11 +16,20 @@ class feedController extends ActionController {
if (Request::isPost ()) {
$url = Request::param ('url_rss');
$cat = Request::param ('category');
+ $user = Request::param ('username');
+ $pass = Request::param ('password');
$params = array ();
try {
$feed = new Feed ($url);
$feed->_category ($cat);
+
+ $httpAuth = '';
+ if ($user != '' || $pass != '') {
+ $httpAuth = $user . ':' . $pass;
+ }
+ $feed->_httpAuth ($httpAuth);
+
$feed->load ();
$feedDAO = new FeedDAO ();
@@ -31,7 +40,8 @@ class feedController extends ActionController {
'name' => $feed->name (),
'website' => $feed->website (),
'description' => $feed->description (),
- 'lastUpdate' => time ()
+ 'lastUpdate' => time (),
+ 'httpAuth' => $feed->httpAuth (),
);
if ($feedDAO->searchByUrl ($values['url'])) {