From 4fcb218003c535160a91399f75c69256c99844eb Mon Sep 17 00:00:00 2001 From: Hugues Hiegel Date: Wed, 13 Jul 2011 12:36:12 +0200 Subject: [Cache] better out-of-order managment, with redirect (no more "unavailable/invalid" specific message) --- BigLine.php | 16 ++++++---------- 1 file 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; } -- cgit v1.2.3