We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 03fbc14c authored by tobyink's avatar tobyink

Group page beginnings

parent 9e638e18
......@@ -6,5 +6,6 @@ RewriteRule ^artist/([^/]+)/track/([^/]+)/?$ track.php?artist=$1&track=$2 [B,
RewriteRule ^artist/([^/]+)/album/([^/]+)/track/([^/]+)/?$ track.php?artist=$1&album=$2&track=$3 [B,NC]
RewriteRule ^artist/([^/]+)/album/([^/]+)/?$ album.php?artist=$1&album=$2 [B,NC]
RewriteRule ^artist/([^/]+)/?$ artist.php?artist=$1 [B,NC]
RewriteRule ^group/([^/]+)/?$ group.php?group=$1 [B,NC]
RewriteRule ^country/([^/]+)/?$ location.php?country=$1 [B,NC]
RewriteRule ^logout login.php?action=logout [B,NC]
......@@ -304,8 +304,10 @@ class Server {
static function getTrackURL($artist, $album, $track) {
global $friendly_urls, $base_url;
if($friendly_urls) {
if ($friendly_urls && $album) {
return $base_url . "/artist/" . urlencode(stripslashes($artist)) . "/album/" . urlencode(stripslashes($album)) . "/track/" . urlencode(stripslashes($track));
} elseif ($friendly_urls) {
return $base_url . "/artist/" . urlencode(stripslashes($artist)) . "/track/" . urlencode(stripslashes($track));
} else {
return $base_url . "/track.php?artist=" . urlencode(stripslashes($artist)) . "&album=" . urlencode(stripslashes($album)) . "&track=" . urlencode(stripslashes($track));
}
......
<?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/Group.php');
require_once('data/TagCloud.php');
require_once('data/Server.php');
$group = new Group($_GET['group']);
if(isset($group->name)) {
header("Content-Type: text/plain");
print_r($group);
} else {
$smarty->assign('error', 'Group not found');
$smarty->assign('details', 'Shall I call in a missing peoples report?');
$smarty->display('error.tpl');
}
?>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment