Browse Source

Fix issue #79 : possibilité de changer le nom d'un flux

Marien Fressinaud 13 years ago
parent
commit
746ae4b33a
3 changed files with 9 additions and 1 deletions
  1. 2 0
      app/controllers/configureController.php
  2. 1 1
      app/models/Entry.php
  3. 6 0
      app/views/configure/feed.phtml

+ 2 - 0
app/controllers/configureController.php

@@ -91,6 +91,7 @@ class configureController extends ActionController {
 				$this->view->categories = $catDAO->listCategories ();
 
 				if (Request::isPost () && $this->view->flux) {
+					$name = Request::param ('name', '');
 					$cat = Request::param ('category', 0);
 					$path = Request::param ('path_entries', '');
 					$priority = Request::param ('priority', 0);
@@ -103,6 +104,7 @@ class configureController extends ActionController {
 					}
 
 					$values = array (
+						'name' => $name,
 						'category' => $cat,
 						'pathEntries' => $path,
 						'priority' => $priority,

+ 1 - 1
app/models/Entry.php

@@ -239,7 +239,7 @@ class EntryDAO extends Model_pdo {
 			return true;
 		} else {
 			$info = $stm->errorInfo();
-			Log::record ('SQL error : ' . $info[2], Log::ERROR);
+			Log::record ('SQL error : ' . $info[2], Log::NOTICE);
 			return false;
 		}
 	}

+ 6 - 0
app/views/configure/feed.phtml

@@ -13,6 +13,12 @@
 
 	<form method="post" action="<?php echo _url ('configure', 'feed', 'id', $this->flux->id ()); ?>">
 		<legend><?php echo Translate::t ('informations'); ?></legend>
+		<div class="form-group">
+			<label class="group-name" for="name"><?php echo Translate::t ('title'); ?></label>
+			<div class="group-controls">
+				<input type="text" name="name" id="name" value="<?php echo $this->flux->name () ; ?>" />
+			</div>
+		</div>
 		<div class="form-group">
 			<label class="group-name"><?php echo Translate::t ('website_url'); ?></label>
 			<div class="group-controls">