Explorar el Código

Fix bug if a shortcut is not in the initial config

A new shortcut was never saved because ConfigurationSetter never set a
shortcut which did not appear in the initial conf.
Marien Fressinaud hace 11 años
padre
commit
9483c6cf67
Se han modificado 2 ficheros con 2 adiciones y 4 borrados
  1. 1 3
      app/Models/ConfigurationSetter.php
  2. 1 1
      app/views/configure/shortcut.phtml

+ 1 - 3
app/Models/ConfigurationSetter.php

@@ -154,9 +154,7 @@ class FreshRSS_ConfigurationSetter {
 
 	private function _shortcuts(&$data, $values) {
 		foreach ($values as $key => $value) {
-			if (isset($data['shortcuts'][$key])) {
-				$data['shortcuts'][$key] = $value;
-			}
+			$data['shortcuts'][$key] = $value;
 		}
 	}
 

+ 1 - 1
app/views/configure/shortcut.phtml

@@ -114,7 +114,7 @@
 		<div class="form-group">
 			<label class="group-name" for="close_dropdown_shortcut"><?php echo _t('conf.shortcut.close_dropdown'); ?></label>
 			<div class="group-controls">
-				<input type="text" id="help_shortcut" name="shortcuts[close_dropdown]" list="keys" value="<?php echo $s['close_dropdown']; ?>" />
+				<input type="text" id="close_dropdown" name="shortcuts[close_dropdown]" list="keys" value="<?php echo $s['close_dropdown']; ?>" />
 			</div>
 		</div>