X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=fromgplus%2Ffromgplus.php;h=933567ce7c07f5a9a788fd95292d25f8747076d4;hb=02e952d57d326c9ab4a324868feba7c5a472c64a;hp=1c047663fb661557a9e54eba4fa6210b8ab1fc55;hpb=70742b56c24a51f5b07bf0b5dba5291e12013794;p=friendica-addons.git diff --git a/fromgplus/fromgplus.php b/fromgplus/fromgplus.php index 1c047663..933567ce 100644 --- a/fromgplus/fromgplus.php +++ b/fromgplus/fromgplus.php @@ -9,6 +9,8 @@ define('FROMGPLUS_DEFAULT_POLL_INTERVAL', 30); // given in minutes +require_once('mod/share.php'); + function fromgplus_install() { register_hook('connector_settings', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings'); register_hook('connector_settings_post', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings_post'); @@ -30,15 +32,20 @@ function fromgplus_addon_settings(&$a,&$s) { if(! local_user()) return; + // If "gpluspost" is installed as well, then the settings are displayed there + $result = q("SELECT `installed` FROM `addon` WHERE `name` = 'gpluspost' AND `installed`"); + if (count($result) > 0) + return; + $enable_checked = (intval(get_pconfig(local_user(),'fromgplus','enable')) ? ' checked="checked"' : ''); $account = get_pconfig(local_user(),'fromgplus','account'); $s .= ''; - $s .= '

' . t('Google+ Import Settings').'

'; + $s .= '

'. t('Google+ Mirror').'

'; $s .= '
'; $s .= '