forked from friendica/friendica-addons
[irc] fixed index error
This commit is contained in:
parent
59fe5be987
commit
f91b114ba7
1 changed files with 10 additions and 5 deletions
15
irc/irc.php
15
irc/irc.php
|
@ -6,6 +6,7 @@
|
||||||
* Author: tony baldwin <https://free-haven.org/profile/tony>
|
* Author: tony baldwin <https://free-haven.org/profile/tony>
|
||||||
* Author: Tobias Diekershoff <https://f.diekershoff.de/u/tobias>
|
* Author: Tobias Diekershoff <https://f.diekershoff.de/u/tobias>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use Friendica\Core\Config;
|
use Friendica\Core\Config;
|
||||||
use Friendica\Core\Hook;
|
use Friendica\Core\Hook;
|
||||||
use Friendica\Core\L10n;
|
use Friendica\Core\L10n;
|
||||||
|
@ -51,13 +52,17 @@ function irc_addon_settings(&$a,&$s) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function irc_addon_settings_post(&$a,&$b) {
|
function irc_addon_settings_post(&$a, &$b) {
|
||||||
if(! local_user())
|
if(!local_user())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if($_POST['irc-submit']) {
|
if(!empty($_POST['irc-submit']) && $_POST['irc-submit']) {
|
||||||
PConfig::set( local_user(), 'irc','autochans',trim($_POST['autochans']));
|
if (!isset($_POST['autochans'])) {
|
||||||
PConfig::set( local_user(), 'irc','sitechats',trim($_POST['sitechats']));
|
PConfig::set(local_user(), 'irc', 'autochans', trim(($_POST['autochans'])));
|
||||||
|
}
|
||||||
|
if (!isset($_POST['sitechats'])) {
|
||||||
|
PConfig::set(local_user(), 'irc', 'sitechats', trim($_POST['sitechats']));
|
||||||
|
}
|
||||||
/* upid pop-up thing */
|
/* upid pop-up thing */
|
||||||
info(L10n::t('IRC settings saved.') . EOL);
|
info(L10n::t('IRC settings saved.') . EOL);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue