summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2006-01-15 06:27:55 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2006-01-15 06:27:55 +0000
commit2d5ed879bd17024154e87de22c811bbfd0e69433 (patch)
treefbc39798312d1799510cc5ef0f103ebb554e3776 /modules
parente3e529394d526608e3ebeadb69234120f0f300ed (diff)
downloadampache-2d5ed879bd17024154e87de22c811bbfd0e69433.tar.gz
ampache-2d5ed879bd17024154e87de22c811bbfd0e69433.tar.bz2
ampache-2d5ed879bd17024154e87de22c811bbfd0e69433.zip
more flagging fixes, you can flag files now you just cant do anything about it
Diffstat (limited to 'modules')
-rw-r--r--modules/init.php35
-rw-r--r--modules/lib.php141
2 files changed, 16 insertions, 160 deletions
diff --git a/modules/init.php b/modules/init.php
index 22ca81b6..27144e27 100644
--- a/modules/init.php
+++ b/modules/init.php
@@ -83,7 +83,7 @@ if (!$results['conf']['allow_stream_playback']) {
$results['conf']['raw_web_path'] = $results['conf']['web_path'];
$results['conf']['web_path'] = $http_type . $_SERVER['HTTP_HOST'] . $results['conf']['web_path'];
-$results['conf']['version'] = '3.3.2-Beta2 (Build 002)';
+$results['conf']['version'] = '3.3.2-Beta2 (Build 003)';
$results['conf']['catalog_file_pattern']= 'mp3|mpc|m4p|m4a|mp4|aac|ogg|rm|wma|asf|flac|spx|ra';
$results['conf']['http_port'] = $_SERVER['SERVER_PORT'];
if (!$results['conf']['prefix']) {
@@ -164,15 +164,11 @@ require_once(conf('prefix') . "/lib/xmlrpc.php");
require_once(conf('prefix') . "/modules/xmlrpc/xmlrpc.inc");
if (conf('allow_slim_playback')) {
- require_once(conf('prefix') . "/modules/slimserver/slim.class.php");
+ require_once(conf('prefix') . '/modules/slimserver/slim.class.php');
}
if (conf('allow_mpd_playback')) {
- require_once(conf('prefix') . "/modules/mpd/mpd.class.php");
-}
-
-if (conf('allow_xmms2_playback')) {
- require_once(conf('prefix') . "/modules/xmms2/xmms2.class.php");
+ require_once(conf('prefix') . '/modules/mpd/mpd.class.php');
}
if (conf('ratings')) {
@@ -181,18 +177,19 @@ if (conf('ratings')) {
}
// Classes
-require_once(conf('prefix') . "/lib/class/catalog.class.php");
-require_once(conf('prefix') . "/lib/class/stream.class.php");
-require_once(conf('prefix') . "/lib/class/playlist.class.php");
-require_once(conf('prefix') . "/lib/class/song.class.php");
-require_once(conf('prefix') . "/lib/class/view.class.php");
-require_once(conf('prefix') . "/lib/class/update.class.php");
-require_once(conf('prefix') . "/lib/class/user.class.php");
-require_once(conf('prefix') . "/lib/class/album.class.php");
-require_once(conf('prefix') . "/lib/class/artist.class.php");
-require_once(conf('prefix') . "/lib/class/access.class.php");
-require_once(conf('prefix') . "/lib/class/error.class.php");
-require_once(conf('prefix') . "/lib/class/genre.class.php");
+require_once(conf('prefix') . '/lib/class/catalog.class.php');
+require_once(conf('prefix') . '/lib/class/stream.class.php');
+require_once(conf('prefix') . '/lib/class/playlist.class.php');
+require_once(conf('prefix') . '/lib/class/song.class.php');
+require_once(conf('prefix') . '/lib/class/view.class.php');
+require_once(conf('prefix') . '/lib/class/update.class.php');
+require_once(conf('prefix') . '/lib/class/user.class.php');
+require_once(conf('prefix') . '/lib/class/album.class.php');
+require_once(conf('prefix') . '/lib/class/artist.class.php');
+require_once(conf('prefix') . '/lib/class/access.class.php');
+require_once(conf('prefix') . '/lib/class/error.class.php');
+require_once(conf('prefix') . '/lib/class/genre.class.php');
+require_once(conf('prefix') . '/lib/class/flag.class.php');
/* Set a new Error Handler */
$old_error_handler = set_error_handler("ampache_error_handler");
diff --git a/modules/lib.php b/modules/lib.php
index f35efcc6..020e1819 100644
--- a/modules/lib.php
+++ b/modules/lib.php
@@ -39,42 +39,6 @@ function show_album_pulldown ($album) {
/*
- * show_flagged_popup($reason);
- *
- * Shows a listing of the flagged_types for when people want to mark
- * a song as being broken in some way.
- */
-
-function show_flagged_popup($reason,$label='value', $name='flagged_type', $other='') {
-
- global $settings;
- $dbh = dbh();
-
- $access = $_SESSION['userdata']['access'];
-
- $query = "SELECT type,value FROM flagged_types";
- if ($access !== 'admin') {
- $query .= " WHERE access = '$access'";
- }
- $db_result = mysql_query($query, $dbh);
-
- echo "\n<select name=\"$name\" $other>\n";
-
- while ( $r = mysql_fetch_array($db_result) ) {
- // $r[0] = id, $r[1] = type
- if ( $reason === $r['type'] ) {
- echo "\t<option value=\"".$r['type']."\" selected=\"selected\">".htmlspecialchars($r[$label])."</option>\n";
- }
- else {
- echo "\t<option value=\"".$r['type']."\">".htmlspecialchars($r[$label])."</option>\n";
- }
- }
-
- echo "\n</select>\n";
-} // show_flagged_popup()
-
-
-/*
* delete_user_stats()
*
* just delete stats for specific users or all of them
@@ -95,87 +59,6 @@ function delete_user_stats ($user) {
} // delete_user_stats()
-/*
- * insert_flagged_song()
- *
- */
-
-function insert_flagged_song($song, $reason, $comment) {
-
- $user = $_SESSION['userdata']['username'];
- $time = time();
- $sql = "INSERT INTO flagged (user,song,type,comment,date)" .
- " VALUES ('$user','$song', '$reason', '$comment', '$time')";
- $db_result = mysql_query($sql, dbh());
-
-} // insert_flagged_song()
-
-
-/*
- * get_flagged();
- *
- * Get all of the songs from the flagged table. These are songs that
- * may or may not be broken.
- * Deprecated by hopson on 7/27
- */
-
-function get_flagged() {
-
- $dbh = dbh();
-
- $sql = "SELECT flagged.id, user.username, type, song, date, comment" .
- " FROM flagged, user" .
- " WHERE flagged.user = user.username" .
- " ORDER BY date";
- $db_result = mysql_query($sql, $dbh);
-
- $arr = array();
-
- while ( $flag = mysql_fetch_object($db_result) ) {
- $arr[] = $flag;
- }
-
- return $arr;
-} // get_flagged()
-
-
-/*
- * get_flagged_type($type);
- *
- * Return the text associated with this type.
- */
-
-function get_flagged_type($type) {
-
- $dbh = dbh();
-
- $sql = "SELECT value FROM flagged_types WHERE type = '$type'";
- echo $sql;
- $db_result = mysql_query($sql, $dbh);
-
- if ($flagged_type = mysql_fetch_object($db_result)) {
- return $flagged_type->value;
- }
- else {
- return FALSE;
- }
-} // get_flagged_type()
-
-
-/*
- * delete_flagged( $flag );
- *
- */
-
-function delete_flagged($flag) {
-
- $dbh = dbh();
-
- $sql = "DELETE FROM flagged WHERE id = '$flag'";
- $db_result = mysql_query($sql, $dbh);
-} // delete_flagged()
-
-
/*********************************************************/
/* Functions for getting songs given artist, album or id */
/*********************************************************/
@@ -285,30 +168,6 @@ function get_songs_from_type ($type, $results, $artist_id = 0) {
}
-/*********************************************************/
-/* This is the main song display function. I found tieing it to the playlist functions
- was really handy in getting added functionality at no cost.
-/* Lets tie it to album too, so we can show art ;) */
-/*********************************************************/
-/* One symbol, m(__)m */
-function show_songs ($song_ids, $playlist, $album=0) {
-
- $dbh = dbh();
-
- // Get info about current user
- $user = $GLOBALS['user'];
-
- $totaltime = 0;
- $totalsize = 0;
-
- require (conf('prefix') . "/templates/show_songs.inc");
-
- return true;
-
-} // function show_songs
-
-
-
function show_playlist_form () {
print <<<ECHO