diff --git a/config.php.example b/config.php.example index d82b527..0280ded 100644 --- a/config.php.example +++ b/config.php.example @@ -32,7 +32,7 @@ * replace LOCAL with the twitterbridge request URL (example: 'http://www.suumitsu.eu/twitter/?u=' ) or leave LOCAL to use the included twitter2feed.php. * set to FALSE if you want to fully disable Twitter support **/ -// define( 'API_TWITTER', LOCAL ); +// define( 'API_TWITTER', 'LOCAL' ); /** * Import autoblogs from friend's autoblog farm - Add a link to the JSON export diff --git a/functions.php b/functions.php index d0ec234..273c265 100755 --- a/functions.php +++ b/functions.php @@ -29,7 +29,7 @@ if( !defined('ALLOW_NEW_AUTOBLOGS_BY_OPML_LINK')) define( 'ALLOW_NEW_AUTOBLOGS_B if( !defined('ALLOW_NEW_AUTOBLOGS_BY_XSAF')) define( 'ALLOW_NEW_AUTOBLOGS_BY_XSAF', TRUE ); // More about TwitterBridge : https://github.com/mitsukarenai/twitterbridge -if( !defined('API_TWITTER')) define( 'API_TWITTER', FALSE ); +if( !defined('API_TWITTER')) define( 'API_TWITTER', 'LOCAL' ); if( !defined('LOGO')) define( 'LOGO', 'icon-logo.svg' ); if( !defined('HEAD_TITLE')) define( 'HEAD_TITLE', ''); diff --git a/twitter2feed.php b/twitter2feed.php index 2014182..7a0cefa 100755 --- a/twitter2feed.php +++ b/twitter2feed.php @@ -11,7 +11,8 @@ if(file_exists("config.php")) require_once "config.php"; if( !defined('API_TWITTER')) {header("HTTP/1.1 404 Not Found"); die('API_TWITTER is undefined: make it LOCAL in "config.php" if you want me to work for you.');} if ('API_TWITTER' === FALSE) {header("HTTP/1.1 404 Not Found"); die('Twitter support disabled in "config.php". Sorry.');} -if ('API_TWITTER' !== 'LOCAL') {header("HTTP/1.1 404 Not Found"); die('Custom twitterbridge defined in "config.php": leave me alone.');} +$api = API_TWITTER; +if ($api === 'LOCAL') { } else {header("HTTP/1.1 404 Not Found"); die('Custom twitterbridge defined in "config.php": leave me alone.');} if(!isset($_GET['u'])) {header("HTTP/1.1 404 Not Found"); die('no username provided');} $exclude_reply = '@'; // if you want twitter2feed to return replies too: $exclude_reply = ''; // ----------------------------