Fixes #64
This commit is contained in:
parent
ff62d323c3
commit
8f3f91ea62
1 changed files with 8 additions and 7 deletions
15
index.php
15
index.php
|
@ -118,12 +118,7 @@ function create_from_opml($opml) {
|
||||||
try {
|
try {
|
||||||
$sitename = escape( $outline['title'] );
|
$sitename = escape( $outline['title'] );
|
||||||
$siteurl = escape($outline['htmlUrl']);
|
$siteurl = escape($outline['htmlUrl']);
|
||||||
|
|
||||||
// Lighten process by checking folderExists first
|
|
||||||
// A CHANGER SELON ISSUE #20
|
|
||||||
if(folderExists($siteurl))
|
|
||||||
throw new Exception('Erreur : l\'autoblog '. $sitename .' existe déjà.');
|
|
||||||
|
|
||||||
$sitetype = escape($outline['text']);
|
$sitetype = escape($outline['text']);
|
||||||
if ( $sitetype != 'microblog' && $sitetype != 'shaarli' && $sitetype != 'twitter' && $sitetype != 'youtube')
|
if ( $sitetype != 'microblog' && $sitetype != 'shaarli' && $sitetype != 'twitter' && $sitetype != 'youtube')
|
||||||
$sitetype = 'generic';
|
$sitetype = 'generic';
|
||||||
|
@ -228,6 +223,7 @@ function svg_status($fill, $text, $back)
|
||||||
|
|
||||||
if(!empty($headers))
|
if(!empty($headers))
|
||||||
$code=explode(" ", $headers[0]);
|
$code=explode(" ", $headers[0]);
|
||||||
|
else $code = array();
|
||||||
|
|
||||||
/* le flux est indisponible (typiquement: erreur DNS ou possible censure) - à vérifier */
|
/* le flux est indisponible (typiquement: erreur DNS ou possible censure) - à vérifier */
|
||||||
if(empty($headers) || $headers === FALSE || (!empty($code) && ($code[1] == '500' || $code[1] == '404'))) {
|
if(empty($headers) || $headers === FALSE || (!empty($code) && ($code[1] == '500' || $code[1] == '404'))) {
|
||||||
|
@ -862,7 +858,12 @@ if( !empty($_POST['opml_file']) && ALLOW_NEW_AUTOBLOGS && ALLOW_NEW_AUTOBLOGS_BY
|
||||||
<h3>Marque page</h3>
|
<h3>Marque page</h3>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<p>Pour ajouter facilement un autoblog d'un site web, glissez ce bouton dans votre barre de marque-pages → <a class="bouton" onclick="alert('Glissez ce bouton dans votre barre de marque-pages (ou clic-droit > marque-page sur ce lien)');return false;" href="javascript:(function(){var%20autoblog_url="<?php echo serverUrl().$_SERVER["REQUEST_URI"]; ?>";var%20popup=window.open("","Add%20autoblog",'height=180,width=670');popup.document.writeln('<html><head></head><body><form%20action="'+autoblog_url+'"%20method="GET">');popup.document.write('Url%20feed%20%20:%20<br/>');var%20feed_links=new%20Array();var%20links=document.getElementsByTagName('link');if(links.length>0){for(var%20i=0;i<links.length;i++){if(links[i].rel=="alternate"){popup.document.writeln('<label%20for="feed_'+i+'"><input%20id="feed_'+i+'"%20type="radio"%20name="rssurl"%20value="'+links[i].href+'"/>'+links[i].title+"%20(%20"+links[i].href+"%20)</label><br/>");}}}popup.document.writeln("<input%20id='number'%20type='hidden'%20name='number'%20value='17'>");popup.document.writeln("<input%20type='hidden'%20name='via_button'%20value='1'>");popup.document.writeln("<br/><input%20type='submit'%20value='Vérifier'%20name='Ajouter'%20>");popup.document.writeln("</form></body></html>");})();">Projet Autoblog</a>
|
<p>
|
||||||
|
Pour ajouter facilement un autoblog d'un site web, glissez ce bouton dans votre barre de marque-pages →
|
||||||
|
<a class="bouton" onclick=
|
||||||
|
"alert('Glissez ce bouton dans votre barre de marque-pages (ou clic-droit > marque-page sur ce lien)');
|
||||||
|
return false;"
|
||||||
|
href="javascript:(function(){var%20autoblog_url="<?php echo serverUrl().$_SERVER["REQUEST_URI"]; ?>";var%20popup=window.open("","Add%20autoblog",'height=180,width=670');popup.document.writeln('<html><head></head><body><form%20action="'+autoblog_url+'"%20method="GET">');popup.document.write('Url%20feed%20%20:%20<br/>');var%20feed_links=new%20Array();var%20links=document.getElementsByTagName('link');if(links.length>0){for(var%20i=0;i<links.length;i++){if(links[i].rel=="alternate"){popup.document.writeln('<label%20for="feed_'+i+'"><input%20id="feed_'+i+'"%20type="radio"%20name="rssurl"%20value="'+links[i].href+'"/>'+links[i].title+"%20(%20"+links[i].href+"%20)</label><br/>");}}}popup.document.writeln("<input%20id='number'%20type='hidden'%20name='number'%20value='17'>");popup.document.writeln("<input%20type='hidden'%20name='via_button'%20value='1'>");popup.document.writeln("<br/><input%20type='submit'%20value='Vérifier'%20name='Ajouter'%20>");popup.document.writeln("</form></body></html>");})();">Projet Autoblog</a>
|
||||||
</section>
|
</section>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</section>
|
</section>
|
||||||
|
|
Loading…
Reference in a new issue