diff options
author | Hugues Hiegel <hugues@hiegel.fr> | 2011-07-13 12:36:12 +0200 |
---|---|---|
committer | Hugues Hiegel <hugues@hiegel.fr> | 2011-07-13 12:36:12 +0200 |
commit | 4fcb218003c535160a91399f75c69256c99844eb (patch) | |
tree | 2c4fca1077fb19924c98ee05b3179cce8db8da12 /BigLine.php | |
parent | 5e5459c8b417c7793da75488c4aa5e3c65fc606b (diff) |
[Cache] better out-of-order managment, with redirect (no more "unavailable/invalid" specific message)
Diffstat (limited to 'BigLine.php')
-rw-r--r-- | BigLine.php | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/BigLine.php b/BigLine.php index 9f5832d..391a288 100644 --- a/BigLine.php +++ b/BigLine.php @@ -25,7 +25,7 @@ CREATE TABLE `badges` ( `lastupdate` bigint(11) default NULL, `hits` bigint(20) unsigned NOT NULL, `lasthit` bigint(11) unsigned default NULL, - `png` longblob, + `png` varchar(100) NOT NULL, PRIMARY KEY (`username`,`type`) ); @@ -78,12 +78,8 @@ $Lines[] = new Text; if (! $data["playcount"]) { - $Lines[0]->value="Sorry, $username is not"; - $Lines[0]->angle=rand(-1,2); - $Lines[] = new Text; - $Lines[1]->value="a valid Last.fm account"; - $Lines[1]->angle=rand(-2,1); - $Cache=""; + header('Location: /out-of-order.png'); + exit(); } else { @@ -115,8 +111,7 @@ else $formats = array("DEFAULT" => "\$number \$albumtrack per \$dayweekmonth", "Total" => "\$number \$albumtrack played", "Trueness" => "\$username is \$trueness listener", - "Since" => "Since \$since", - "FAILBACK" => "Sorry, '\$type' is unavailable."); + "Since" => "Since \$since"); switch($type) { @@ -159,7 +154,8 @@ else } break; default: - $format="FAILBACK"; + header('Location: /out-of-order.png'); + exit(); break; } |