mirror of
https://github.com/nerzhul/ocsms.git
synced 2025-06-10 17:36:21 +00:00
Config setting fix and remove button loop
This commit is contained in:
parent
76decabe11
commit
3d8c834a43
@ -34,11 +34,11 @@ class ConfigMapper extends Mapper {
|
||||
$this->crypto = $crypto;
|
||||
}
|
||||
|
||||
public function set($backend, $key, $value){
|
||||
public function set($key, $value){
|
||||
$value = $this->crypto->encrypt($value);
|
||||
if($this->hasKey($key, $value)){
|
||||
$sql = "UPDATE `*PREFIX*ocsms_config` SET `value` = ? WHERE `user` = ? AND `keyi` = ?";
|
||||
$this->execute($sql, array($value, $this->user, $backend, $key));
|
||||
$sql = "UPDATE `*PREFIX*ocsms_config` SET `value` = ? WHERE `user` = ? AND `key` = ?";
|
||||
$this->execute($sql, array($value, $this->user, $key));
|
||||
} else {
|
||||
$sql = "INSERT INTO `*PREFIX*ocsms_config` (`user`,`key`,`value`) VALUES (?,?,?);";
|
||||
$this->execute($sql, array($this->user, $key, $value));
|
||||
|
@ -23,7 +23,7 @@ use \OCA\OcSms\Lib\CountryCodes;
|
||||
<option><?php p($code); ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
<button class="new-button primary icon-checkmark-white" ng-repeat="button in buttons" ng-click="sendCountry();"></button>
|
||||
<button class="new-button primary icon-checkmark-white" ng-click="sendCountry();"></button>
|
||||
</div> <!-- app-settings-content -->
|
||||
</div>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user