librefm-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Librefm-commits] [1095] keep free.php separate because the query still


From: Clint Adams
Subject: [Librefm-commits] [1095] keep free.php separate because the query still takes 1.5 seconds
Date: Fri, 01 May 2009 01:44:36 +0000

Revision: 1095
          http://svn.sv.gnu.org/viewvc/?view=rev&root=librefm&revision=1095
Author:   clint
Date:     2009-05-01 01:44:35 +0000 (Fri, 01 May 2009)
Log Message:
-----------
keep free.php separate because the query still takes 1.5 seconds

Added Paths:
-----------
    trunk/nixtape/free.php

Added: trunk/nixtape/free.php
===================================================================
--- trunk/nixtape/free.php                              (rev 0)
+++ trunk/nixtape/free.php      2009-05-01 01:44:35 UTC (rev 1095)
@@ -0,0 +1,45 @@
+<?php
+
+/* Libre.fm -- a free network service for sharing your music listening habits
+
+   Copyright (C) 2009 Libre.fm Project
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Affero General Public License as published by
+   the Free Software Foundation, either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Affero General Public License for more details.
+
+   You should have received a copy of the GNU Affero General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+*/
+
+require_once('database.php');
+require_once('templating.php');
+require_once('data/sanitize.php');
+require_once('data/Server.php');
+require_once('data/TagCloud.php');
+
+$aTagCloud = TagCloud::GenerateTagCloud('Free_Scrobbles', 'artist');
+if (!PEAR::isError ($aTagCloud)) {
+       $smarty->assign('tagcloud', $aTagCloud);
+}
+
+$aLastScrobbles = Server::getRecentScrobbles(20);
+if (!PEAR::isError ($aLastScrobbles)) {
+       $smarty->assign('recenttracks', $aLastScrobbles);
+}
+
+$aNowPlaying = Server::getNowPlaying(10);
+if (!PEAR::isError ($aNowPlaying)) {
+       $smarty->assign('nowplaying', $aNowPlaying);
+}
+
+$smarty->assign('welcome', true);
+$smarty->display('welcome.tpl');
+?>





reply via email to

[Prev in Thread] Current Thread [Next in Thread]