Correct XML validation / bug fixed on get the username
parent
f1578c0a52
commit
c7fd8be234
7
api.php
7
api.php
|
|
@ -23,14 +23,17 @@ if(!defined('entry')) define('entry',true);
|
||||||
?>
|
?>
|
||||||
<gelato version="1.0">
|
<gelato version="1.0">
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if (isset($_GET["action"]) && $_GET["action"] == "read") {
|
if (isset($_GET["action"]) && $_GET["action"] == "read") {
|
||||||
if (isset($_GET["start"])) { $start = $_GET["start"]; } else { $start = 0; }
|
if (isset($_GET["start"])) { $start = $_GET["start"]; } else { $start = 0; }
|
||||||
if (isset($_GET["total"])) { $total = $_GET["total"]; } else { $total = 20; }
|
if (isset($_GET["total"])) { $total = $_GET["total"]; } else { $total = 20; }
|
||||||
if (isset($_GET["type"])) { $hasType = true; } else { $hasType = false; }
|
if (isset($_GET["type"])) { $hasType = true; } else { $hasType = false; }
|
||||||
if ($total > 50) { $total = 50; }
|
if ($total > 50) { $total = 50; }
|
||||||
|
$user = new user();
|
||||||
|
$userData = $user->getUserByID(1);
|
||||||
|
$username = ($userData["name"] == "") ? "gelato" : $userData["name"];
|
||||||
?>
|
?>
|
||||||
<tumblelog name="<?php echo $_SESSION["user_login"];?>" timezone="<?php echo $conf->offsetCity;?>" title="<?php echo $conf->title;?>"><?php
|
<tumblelog name="<?php echo $username;?>" timezone="<?php echo $conf->offsetCity;?>" title="<?php echo $conf->title;?>">
|
||||||
|
<?php
|
||||||
echo "\n\t".$conf->description."\n";
|
echo "\n\t".$conf->description."\n";
|
||||||
?>
|
?>
|
||||||
<feeds>
|
<feeds>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue