summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
authorGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2013-04-27 21:08:29 +0200
committerGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2013-04-27 21:08:29 +0200
commit0e95494e29353a9ae31fb1196c6c9aaf556ae981 (patch)
treeda499463fda30157c172d92a1e02e972a6c6d6e5 /app/controllers
parent2a52d315bed725d5997a42547673bccfe2409b5d (diff)
Fix issue #26 : possibilité de s'abonner à des flux derrière authentification HTTP + correction quelques traductions
Diffstat (limited to 'app/controllers')
-rwxr-xr-xapp/controllers/configureController.php10
-rwxr-xr-xapp/controllers/feedController.php12
2 files changed, 20 insertions, 2 deletions
diff --git a/app/controllers/configureController.php b/app/controllers/configureController.php
index 81a8e97d7..f4d1a38e7 100755
--- a/app/controllers/configureController.php
+++ b/app/controllers/configureController.php
@@ -90,11 +90,19 @@ class configureController extends ActionController {
$cat = Request::param ('category', 0);
$path = Request::param ('path_entries', '');
$priority = Request::param ('priority', 0);
+ $user = Request::param ('http_user', '');
+ $pass = Request::param ('http_pass', '');
+
+ $httpAuth = '';
+ if ($user != '' || $pass != '') {
+ $httpAuth = $user . ':' . $pass;
+ }
$values = array (
'category' => $cat,
'pathEntries' => $path,
- 'priority' => $priority
+ 'priority' => $priority,
+ 'httpAuth' => $httpAuth
);
if ($feedDAO->updateFeed ($id, $values)) {
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'])) {