This commit is contained in:
Arthur 2013-04-30 00:13:20 +02:00
parent 3252d44c8b
commit 9d03dd69aa

View file

@ -481,15 +481,17 @@ if(!empty($_GET['via_button']) && $_GET['number'] === '17' && ALLOW_NEW_AUTOBLOG
/** /**
* ADD BY SOCIAL / SHAARLI * ADD BY SOCIAL / SHAARLI
**/ **/
if(!empty($_POST['socialaccount']) && !empty($_POST['socialinstance']) && ALLOW_NEW_AUTOBLOGS && ALLOW_NEW_AUTOBLOGS_BY_SOCIAL) if( !empty($_POST['socialinstance']) && ALLOW_NEW_AUTOBLOGS && ALLOW_NEW_AUTOBLOGS_BY_SOCIAL)
{ {;
if( !empty($_POST['number']) && !empty($_POST['antibot']) && check_antibot($_POST['number'], $_POST['antibot']) ) { $socialinstance = strtolower(escape($_POST['socialinstance']));
$socialaccount = (!empty($_POST['socialaccount'])) ? strtolower(escape($_POST['socialaccount'])) : false;
if( $socialaccount === false && $socialinstance !== 'shaarli')
$error[] = 'Le compte social doit être renseigné.';
$socialaccount = strtolower(escape($_POST['socialaccount'])); if( !empty($_POST['number']) && !empty($_POST['antibot']) && check_antibot($_POST['number'], $_POST['antibot']) && empty($error)) {
$socialinstance = strtolower(escape($_POST['socialinstance']));
if($socialinstance === 'twitter') { if($socialinstance === 'twitter') {
if( API_TWITTER !== FALSE ) { if( API_TWITTER !== FALSE ) {
$sitetype = 'twitter'; $sitetype = 'twitter';
$siteurl = 'http://twitter.com/'. $socialaccount; $siteurl = 'http://twitter.com/'. $socialaccount;
$rssurl = API_TWITTER.$socialaccount; $rssurl = API_TWITTER.$socialaccount;
@ -777,7 +779,7 @@ if( !empty($_POST['opml_file']) && ALLOW_NEW_AUTOBLOGS && ALLOW_NEW_AUTOBLOGS_BY
<h3>Ajouter un Shaarli</h3> <h3>Ajouter un Shaarli</h3>
<form method="POST"> <form method="POST">
<input type="hidden" name="socialaccount" value="shaarli"> <input type="hidden" name="socialinstance" value="shaarli">
<input placeholder="shaarli.personnel.com" type="text" name="shaarliurl" id="shaarliurl"><br> <input placeholder="shaarli.personnel.com" type="text" name="shaarliurl" id="shaarliurl"><br>
<input placeholder="Antibot : Ecrivez '<?php echo $antibot; ?>' en chiffres" type="text" name="number" class="smallinput"><br> <input placeholder="Antibot : Ecrivez '<?php echo $antibot; ?>' en chiffres" type="text" name="number" class="smallinput"><br>
<input type="hidden" name="antibot" value="<?php echo $antibot; ?>" /> <input type="hidden" name="antibot" value="<?php echo $antibot; ?>" />