X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Ftwittersettings.php;h=89169941eb4424cbdc7a960e8f0d4df982e81421;hb=8b040eba4062bcb464f49e3e04d7a172a1d55c1e;hp=7fffa0af018b8b5909d26fa51651f6701afc3382;hpb=590f21c6a96d4d83370c9a0c590bdf5f9cc17769;p=quix0rs-gnu-social.git diff --git a/actions/twittersettings.php b/actions/twittersettings.php index 7fffa0af01..89169941eb 100644 --- a/actions/twittersettings.php +++ b/actions/twittersettings.php @@ -1,6 +1,6 @@ . * * @category Settings - * @package Laconica - * @author Evan Prodromou - * @copyright 2008-2009 Control Yourself, Inc. + * @package StatusNet + * @author Evan Prodromou + * @copyright 2008-2009 StatusNet, Inc. * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 - * @link http://laconi.ca/ + * @link http://status.net/ */ -if (!defined('LACONICA')) { +if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } @@ -38,10 +38,10 @@ require_once INSTALLDIR.'/lib/twitter.php'; * Settings for Twitter integration * * @category Settings - * @package Laconica - * @author Evan Prodromou + * @package StatusNet + * @author Evan Prodromou * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 - * @link http://laconi.ca/ + * @link http://status.net/ * * @see SettingsAction */ @@ -75,13 +75,19 @@ class TwittersettingsAction extends ConnectSettingsAction * Content area of the page * * Shows a form for associating a Twitter account with this - * Laconica account. Also lets the user set preferences. + * StatusNet account. Also lets the user set preferences. * * @return void */ function showContent() { + if (!common_config('twitter', 'enabled')) { + $this->element('div', array('class' => 'error'), + _('Twitter is not available.')); + return; + } + $user = common_current_user(); $profile = $user->getProfile(); @@ -159,7 +165,7 @@ class TwittersettingsAction extends ConnectSettingsAction ($flink->noticesync & FOREIGN_NOTICE_RECV) : false); $this->elementEnd('li'); - + } else { // preserve setting even if bidrection bridge toggled off if ($flink && ($flink->noticesync & FOREIGN_NOTICE_RECV)) {