modified: 0.3/config.php

modified:   0.3/xsaf3.php
inclusion de config.php à xsaf3.php, prise en compte ALLOW_NEW_AUTOBLOGS et ajout de ALLOW_NEW_AUTOBLOGS_BY_XSAF
This commit is contained in:
Mitsukarenai 2013-03-02 12:10:31 +01:00
parent 20e4300580
commit b369080ec8
2 changed files with 12 additions and 3 deletions

View file

@ -60,6 +60,8 @@ define( 'ALLOW_NEW_AUTOBLOGS_BY_BUTTON', TRUE );
define( 'ALLOW_NEW_AUTOBLOGS_BY_OPML_FILE', TRUE );
// OPML Link
define( 'ALLOW_NEW_AUTOBLOGS_BY_OPML_LINK', TRUE );
// XSAF
define( 'ALLOW_NEW_AUTOBLOGS_BY_XSAF', TRUE );
// Logo à utiliser

View file

@ -6,7 +6,7 @@ define('AUTOBLOG_FILE_NAME', 'autoblog.php');
define('ALLOW_REMOTE_DB_DL', false);
define('ALLOW_REMOTE_MEDIA_DL', false);
define('EXEC_TIME', 5);
define( 'ALLOW_XSAF', TRUE );
define( 'ALLOW_NEW_AUTOBLOGS_BY_XSAF', TRUE );
header("HTTP/1.0 403 Forbidden"); /* Uncivilized method to prevent bot indexing, huh :) */
header('X-Robots-Tag: noindex'); /* more civilized method, but bots may not all take into account */
@ -37,6 +37,13 @@ if(file_exists("functions.php")){
die;
}
if(file_exists("config.php")){
include "config.php";
}else{
echo "config.php not found !";
die;
}
function serverUrl() {
$https = (!empty($_SERVER['HTTPS']) && (strtolower($_SERVER['HTTPS'])=='on')) || $_SERVER["SERVER_PORT"]=='443'; // HTTPS detection.
$serverport = ($_SERVER["SERVER_PORT"]=='80' || ($https && $_SERVER["SERVER_PORT"]=='443') ? '' : ':'.$_SERVER["SERVER_PORT"]);
@ -156,14 +163,14 @@ $autoblog_farm = array(
'https://autoblog.suumitsu.eu/?export', */
);
if( DEBUG ) echo '<html><body>';
if( ALLOW_XSAF ) {
if( ALLOW_NEW_AUTOBLOGS and ALLOW_NEW_AUTOBLOGS_BY_XSAF ) {
foreach( $autoblog_farm AS $value ) {
if( !empty($value) )
xsafimport($value, EXEC_TIME);
}
}
elseif( DEBUG )
echo "<p>XSAF désactivé. Positionnez la variable ALLOW_XSAF à TRUE dans le fichier xsaf3.php pour l'activer.</p>";
echo "<p>XSAF désactivé. Positionnez les variables ALLOW_NEW_AUTOBLOGS et ALLOW_NEW_AUTOBLOGS_BY_XSAF à TRUE dans le fichier config.php pour l'activer.</p>";
if(DEBUG) {
echo "<p>XSAF import finished</p>";