attempt to fix config
This commit is contained in:
parent
f25928b988
commit
a8601314e7
|
@ -1,13 +1,13 @@
|
|||
<?php
|
||||
$api_key = FreshRSS_Context::$user_conf->kagi_api_key;
|
||||
$kagi_api_key = FreshRSS_Context::$user_conf->kagi_api_key;
|
||||
?>
|
||||
|
||||
<form action="<?php echo _url('extension', 'configure', 'e', urlencode($this->getName())); ?>" method="post">
|
||||
<input type="hidden" name="_csrf" value="<?php echo FreshRSS_Auth::csrfToken(); ?>" />
|
||||
<div class="form-group">
|
||||
<label class="group-name" for="api_key"><?php echo _t('ext.kagiSummarizer.configure.api_key'); ?></label>
|
||||
<label class="group-name" for="kagi_api_key"><?php echo _t('ext.kagiSummarizer.configure.kagi_api_key'); ?></label>
|
||||
<div class="group-controls">
|
||||
<input type="text" name="api_key" id="api_key" value="<?php echo $api_key; ?>">
|
||||
<input type="text" name="kagi_api_key" id="kagi_api_key" value="<?php echo $kagi_api_key; ?>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group form-actions">
|
||||
|
|
|
@ -16,8 +16,7 @@ class KagiSummarizerExtension extends Minz_Extension {
|
|||
$this->registerTranslates();
|
||||
|
||||
if (Minz_Request::isPost()) {
|
||||
$api_key = Minz_Request::param('api_key', '');
|
||||
FreshRSS_Context::$user_conf->kagi_api_key = $api_key;
|
||||
FreshRSS_Context::$user_conf->kagi_api_key = Minz_Request::param('kagi_api_key', '');
|
||||
FreshRSS_Context::$user_conf->save();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
return array(
|
||||
'kagiSummarizer' => array(
|
||||
'configure' => array(
|
||||
'api_key' => 'Kagi API Key'
|
||||
'kagi_api_key' => 'Kagi API Key'
|
||||
)
|
||||
)
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue