Fixed 2 issues

This commit is contained in:
ArthurHoaro 2013-02-23 20:31:13 +01:00
parent 27830d9a58
commit e1ca0af2ea

View file

@ -276,7 +276,7 @@ if(!empty($_GET['via_button']) && $_GET['number'] === '17' && ALLOW_NEW_AUTOBLOG
<input type="submit" value="Créer"></form>';
}
else {
$form .= '<p>URL du flux RSS incorrect.<br><a href="#" onclick="window.close()">Fermer la fenêtre.</a></p>';
$form .= '<p>URL du flux RSS incorrecte.<br><a href="#" onclick="window.close()">Fermer la fenêtre.</a></p>';
}
}
}
@ -330,7 +330,7 @@ if(!empty($_POST['socialaccount']) && !empty($_POST['socialinstance']) && ALLOW_
/**
* ADD BY GENERIC LINK
**/
if( !empty($_POST['generic']) && ALLOW_NEW_AUTOBLOGS && ALLOW_NEW_AUTOBLOGS_BY_LINK) {
if( !empty($_POST['generic']) && ALLOW_NEW_AUTOBLOGS && ALLOW_NEW_AUTOBLOGS_BY_LINKS) {
if(empty($_POST['rssurl']))
{$error[] = "Veuillez entrer l'adresse du flux.";}
if(empty($_POST['number']))
@ -348,12 +348,15 @@ if( !empty($_POST['generic']) && ALLOW_NEW_AUTOBLOGS && ALLOW_NEW_AUTOBLOGS_BY_L
$error = createAutoblog('generic', $sitename, $siteurl, $rssurl, $error);
if( empty($error))
$success[] = '<iframe width="1" height="1" frameborder="0" src="'. urlToFolderSlash( $siteurl ) .'/index.php"></iframe><b style="color:darkgreen">autoblog crée avec succès.</b> &rarr; <a target="_blank" href="'. urlToFolderSlash( $siteurl ) .'">afficher l\'autoblog</a>';
$success[] = '<iframe width="1" height="1" frameborder="0" src="'. urlToFolderSlash( $siteurl ) .'/index.php"></iframe><b style="color:darkgreen">Autoblog '. $sitename .' crée avec succès.</b> &rarr; <a target="_blank" href="'. urlToFolderSlash( $siteurl ) .'">afficher l\'autoblog</a>';
}
else {
// checking procedure
$rssurl = DetectRedirect($rssurl);
$datafeed = file_get_contents($rssurl);
if( $datafeed === false ) {
$error[] = 'URL "'. $rssurl .'" inaccessible.';
}
$sitetype = 'generic';
$siteurl = get_link_from_datafeed($datafeed);
$sitename = get_title_from_datafeed($datafeed);