quickfix: contrôle du defined; valeur par défaut

This commit is contained in:
Mitsukarenai 2013-07-01 19:44:29 +02:00
parent e13089514c
commit 61a6fdf14a
3 changed files with 4 additions and 3 deletions

View File

@ -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

View File

@ -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', '');

View File

@ -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 = '';
// ----------------------------