From 5b3bb96178c74d8e367ba8000b571a9b575f24d9 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Tue, 28 Aug 2012 09:56:00 +0200 Subject: [PATCH] jappixmini: reverse logic for the option to do not add so not set yields the known behavior of inserting the chat witget --- jappixmini/jappixmini.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/jappixmini/jappixmini.php b/jappixmini/jappixmini.php index df0d474e..f5ed71c7 100644 --- a/jappixmini/jappixmini.php +++ b/jappixmini/jappixmini.php @@ -221,8 +221,8 @@ function jappixmini_settings(&$a, &$s) { $activate = get_pconfig(local_user(),'jappixmini','activate'); $activate = intval($activate) ? ' checked="checked"' : ''; - $insertchat = get_pconfig(local_user(),'jappixmini','insertchat'); - $insertchat = intval($insertchat) ? ' checked="checked"' : ''; + $dontinsertchat = get_pconfig(local_user(),'jappixmini','dontinsertchat'); + $insertchat = !(intval($dontinsertchat) ? ' checked="checked"' : ''); $username = get_pconfig(local_user(),'jappixmini','username'); $username = htmlentities($username); @@ -268,8 +268,8 @@ function jappixmini_settings(&$a, &$s) { $s .= ''; $s .= ' '; $s .= '
'; - $s .= ''; - $s .= ''; + $s .= ''; + $s .= ''; $s .= '
'; $s .= ''; $s .= ' '; @@ -384,7 +384,7 @@ function jappixmini_settings_post(&$a,&$b) { set_pconfig($uid,'jappixmini','autosubscribe',intval($b['jappixmini-autosubscribe'])); set_pconfig($uid,'jappixmini','autoapprove',intval($b['jappixmini-autoapprove'])); set_pconfig($uid,'jappixmini','activate',intval($b['jappixmini-activate'])); - set_pconfig($uid,'jappixmini','insertchat',intval($b['jappixmini-insertchat'])); + set_pconfig($uid,'jappixmini','dontinsertchat',intval($b['jappixmini-dont-insertchat'])); set_pconfig($uid,'jappixmini','encrypt',$encrypt); info( 'Jappix Mini settings saved.' ); @@ -401,8 +401,8 @@ function jappixmini_script(&$a,&$s) { if(! local_user()) return; $activate = get_pconfig(local_user(),'jappixmini','activate'); - $insertchat = get_pconfig(local_user(), 'jappixmini','insertchat'); - if (!$activate or !$insertchat) return; + $dontinsertchat = get_pconfig(local_user(), 'jappixmini','dontinsertchat'); + if (!$activate or $dontinsertchat) return; $a->page['htmlhead'] .= ''."\r\n"; $a->page['htmlhead'] .= ''."\r\n";