modified: 0.3/index.php
- avec [export] en JSON typé objet, facile d'extraire les feed_url. [feedexport] n'est plus nécessaire.
This commit is contained in:
parent
04a8e8125b
commit
5d80708ffa
22
0.3/index.php
Executable file → Normal file
22
0.3/index.php
Executable file → Normal file
|
@ -136,7 +136,7 @@ if (isset($_GET['check']))
|
||||||
/**
|
/**
|
||||||
* Simple and Full Export
|
* Simple and Full Export
|
||||||
**/
|
**/
|
||||||
if (isset($_GET['export']) || isset($_GET['feedexport'])) {
|
if (isset($_GET['export'])) {
|
||||||
header('Content-Type: application/json');
|
header('Content-Type: application/json');
|
||||||
$directory = "./";
|
$directory = "./";
|
||||||
$subdirs = glob($directory . "*");
|
$subdirs = glob($directory . "*");
|
||||||
|
@ -154,23 +154,15 @@ if (isset($_GET['export']) || isset($_GET['feedexport'])) {
|
||||||
unset($ini);
|
unset($ini);
|
||||||
|
|
||||||
$feed=$config->feed_url;
|
$feed=$config->feed_url;
|
||||||
|
$type=$config->site_type;
|
||||||
|
$title=$config->site_title;
|
||||||
|
$url=$config->site_url;
|
||||||
|
$reponse[$unit] = array("SITE_TYPE"=>"$type", "SITE_TITLE"=>"$title", "SITE_URL"=>"$url", "FEED_URL"=>"$feed");
|
||||||
|
|
||||||
if( isset($_GET['export']) ) {
|
|
||||||
$type=$config->site_type;
|
|
||||||
$title=$config->site_title;
|
|
||||||
$url=$config->site_url;
|
|
||||||
$reponse[$unit] = array("SITE_TYPE"=>"$type", "SITE_TITLE"=>"$title", "SITE_URL"=>"$url", "FEED_URL"=>"$feed");
|
|
||||||
}
|
|
||||||
// export feed only
|
|
||||||
else
|
|
||||||
$reponse=$reponse.";$feed";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if( isset($_GET['export']) )
|
echo json_encode( array( "meta"=> array("xsaf-version"=>XSAF_VERSION,"xsaf-db_transfer"=>"true","xsaf-media_transfer"=>"true"),
|
||||||
echo json_encode( array( "meta"=> array("xsaf-version"=>XSAF_VERSION,"xsaf-db_transfer"=>"true","xsaf-media_transfer"=>"true"),
|
|
||||||
"autoblogs"=>$reponse));
|
"autoblogs"=>$reponse));
|
||||||
else
|
|
||||||
echo json_encode(explode(';', substr($reponse, 1)));
|
|
||||||
die;
|
die;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -549,7 +541,7 @@ if( !empty($_POST['opml']) && ALLOW_NEW_AUTOBLOGS && ALLOW_NEW_AUTOBLOGS_BY_OPML
|
||||||
→ <a href="https://duckduckgo.com/?q=!g%20%22Voici%20une%20liste%20d'autoblogs%20hébergés%22">Rechercher</a>
|
→ <a href="https://duckduckgo.com/?q=!g%20%22Voici%20une%20liste%20d'autoblogs%20hébergés%22">Rechercher</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<div class="clear"><a href="?export">export<sup> JSON</sup></a></div>
|
<div class="clear"><a href="?sitemap">sitemap</a> | <a href="?export">export<sup> JSON</sup></a></div>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$directory = "./";
|
$directory = "./";
|
||||||
|
|
Loading…
Reference in a new issue