mirror of
https://github.com/Yetangitu/ampache
synced 2025-10-03 09:49:30 +02:00
Merge branch 'develop' of https://github.com/Psy-Virus/ampache into Psy-Virus-develop
Conflicts: templates/show_album_row.inc.php templates/show_artist_row.inc.php templates/show_label_row.inc.php templates/show_playlist_song_row.inc.php templates/show_song_row.inc.php templates/show_video_row.inc.php Apply align_equals and concat_with_spaces on code style
This commit is contained in:
commit
5124a5ed4c
303 changed files with 4334 additions and 4561 deletions
|
@ -85,7 +85,7 @@ switch ($_REQUEST['action']) {
|
|||
$access = new Access($_REQUEST['access_id']);
|
||||
$access->update($_POST);
|
||||
if (!Error::occurred()) {
|
||||
show_confirmation(T_('Updated'), T_('Access List Entry updated'), AmpConfig::get('web_path').'/admin/access.php');
|
||||
show_confirmation(T_('Updated'), T_('Access List Entry updated'), AmpConfig::get('web_path') . '/admin/access.php');
|
||||
} else {
|
||||
$access->format();
|
||||
require_once AmpConfig::get('prefix') . UI::find_template('show_edit_access.inc.php');
|
||||
|
|
|
@ -41,7 +41,7 @@ switch ($_REQUEST['action']) {
|
|||
License::create($_POST);
|
||||
$text = T_('License Created');
|
||||
}
|
||||
show_confirmation($text,'',AmpConfig::get('web_path').'/admin/license.php');
|
||||
show_confirmation($text,'',AmpConfig::get('web_path') . '/admin/license.php');
|
||||
break;
|
||||
case 'show_edit':
|
||||
$license = new License($_REQUEST['license_id']);
|
||||
|
@ -50,7 +50,7 @@ switch ($_REQUEST['action']) {
|
|||
break;
|
||||
case 'delete':
|
||||
License::delete($_REQUEST['license_id']);
|
||||
show_confirmation(T_('License Deleted'),'',AmpConfig::get('web_path').'/admin/license.php');
|
||||
show_confirmation(T_('License Deleted'),'',AmpConfig::get('web_path') . '/admin/license.php');
|
||||
break;
|
||||
default:
|
||||
$browse = new Browse();
|
||||
|
|
|
@ -36,7 +36,7 @@ switch ($_REQUEST['action']) {
|
|||
if ($shout->id) {
|
||||
$shout->update($_POST);
|
||||
}
|
||||
show_confirmation(T_('Shoutbox Post Updated'),'',AmpConfig::get('web_path').'/admin/shout.php');
|
||||
show_confirmation(T_('Shoutbox Post Updated'),'',AmpConfig::get('web_path') . '/admin/shout.php');
|
||||
break;
|
||||
case 'show_edit':
|
||||
$shout = new Shoutbox($_REQUEST['shout_id']);
|
||||
|
@ -48,7 +48,7 @@ switch ($_REQUEST['action']) {
|
|||
break;
|
||||
case 'delete':
|
||||
Shoutbox::delete($_REQUEST['shout_id']);
|
||||
show_confirmation(T_('Shoutbox Post Deleted'),'',AmpConfig::get('web_path').'/admin/shout.php');
|
||||
show_confirmation(T_('Shoutbox Post Deleted'),'',AmpConfig::get('web_path') . '/admin/shout.php');
|
||||
break;
|
||||
default:
|
||||
$browse = new Browse();
|
||||
|
|
|
@ -44,11 +44,11 @@ switch ($_REQUEST['action']) {
|
|||
exit;
|
||||
case 'write_config':
|
||||
write_config(AmpConfig::get('prefix') . '/config/ampache.cfg.php');
|
||||
header('Location: '. AmpConfig::get('web_path') . '/index.php');
|
||||
header('Location: ' . AmpConfig::get('web_path') . '/index.php');
|
||||
exit;
|
||||
case 'reset_db_charset':
|
||||
Dba::reset_db_charset();
|
||||
show_confirmation(T_('Database Charset Updated'), T_('Your Database and associated tables have been updated to match your currently configured charset'), AmpConfig::get('web_path').'/admin/system.php?action=show_debug');
|
||||
show_confirmation(T_('Database Charset Updated'), T_('Your Database and associated tables have been updated to match your currently configured charset'), AmpConfig::get('web_path') . '/admin/system.php?action=show_debug');
|
||||
break;
|
||||
case 'show_debug':
|
||||
$configuration = AmpConfig::get_all();
|
||||
|
@ -63,7 +63,7 @@ switch ($_REQUEST['action']) {
|
|||
case 'artist' : Artist::clear_cache(); break;
|
||||
case 'album' : Album::clear_cache(); break;
|
||||
}
|
||||
show_confirmation(T_('Cache cleared'), T_('Your cache has been cleared successfully.'), AmpConfig::get('web_path').'/admin/system.php?action=show_debug');
|
||||
show_confirmation(T_('Cache cleared'), T_('Your cache has been cleared successfully.'), AmpConfig::get('web_path') . '/admin/system.php?action=show_debug');
|
||||
break;
|
||||
default:
|
||||
// Rien a faire
|
||||
|
|
|
@ -111,7 +111,7 @@ switch ($_REQUEST['action']) {
|
|||
}
|
||||
$client->upload_avatar();
|
||||
|
||||
show_confirmation(T_('User Updated'), $client->fullname . "(" . $client->username . ")" . T_('updated'), AmpConfig::get('web_path'). '/admin/users.php');
|
||||
show_confirmation(T_('User Updated'), $client->fullname . "(" . $client->username . ")" . T_('updated'), AmpConfig::get('web_path') . '/admin/users.php');
|
||||
break;
|
||||
case 'add_user':
|
||||
if (AmpConfig::get('demo_mode')) {
|
||||
|
@ -174,7 +174,7 @@ switch ($_REQUEST['action']) {
|
|||
}
|
||||
|
||||
/* HINT: %1 Username, %2 Access num */
|
||||
show_confirmation(T_('New User Added'),sprintf(T_('%1$s has been created with an access level of %2$s'), $username, $access), AmpConfig::get('web_path').'/admin/users.php');
|
||||
show_confirmation(T_('New User Added'),sprintf(T_('%1$s has been created with an access level of %2$s'), $username, $access), AmpConfig::get('web_path') . '/admin/users.php');
|
||||
break;
|
||||
case 'enable':
|
||||
$client = new User($_REQUEST['user_id']);
|
||||
|
@ -182,14 +182,14 @@ switch ($_REQUEST['action']) {
|
|||
if (!AmpConfig::get('user_no_email_confirm')) {
|
||||
Registration::send_account_enabled($client->username, $client->fullname, $client->email);
|
||||
}
|
||||
show_confirmation(T_('User Enabled'),$client->fullname . ' (' . $client->username . ')', AmpConfig::get('web_path'). '/admin/users.php');
|
||||
show_confirmation(T_('User Enabled'),$client->fullname . ' (' . $client->username . ')', AmpConfig::get('web_path') . '/admin/users.php');
|
||||
break;
|
||||
case 'disable':
|
||||
$client = new User($_REQUEST['user_id']);
|
||||
if ($client->disable()) {
|
||||
show_confirmation(T_('User Disabled'),$client->fullname . ' (' . $client->username . ')', AmpConfig::get('web_path'). '/admin/users.php');
|
||||
show_confirmation(T_('User Disabled'),$client->fullname . ' (' . $client->username . ')', AmpConfig::get('web_path') . '/admin/users.php');
|
||||
} else {
|
||||
show_confirmation(T_('Error'), T_('Unable to Disabled last Administrator'), AmpConfig::get('web_path').'/admin/users.php');
|
||||
show_confirmation(T_('Error'), T_('Unable to Disabled last Administrator'), AmpConfig::get('web_path') . '/admin/users.php');
|
||||
}
|
||||
break;
|
||||
case 'show_edit':
|
||||
|
@ -209,9 +209,9 @@ switch ($_REQUEST['action']) {
|
|||
}
|
||||
$client = new User($_REQUEST['user_id']);
|
||||
if ($client->delete()) {
|
||||
show_confirmation(T_('User Deleted'), sprintf(T_('%s has been Deleted'), $client->username), AmpConfig::get('web_path'). "/admin/users.php");
|
||||
show_confirmation(T_('User Deleted'), sprintf(T_('%s has been Deleted'), $client->username), AmpConfig::get('web_path') . "/admin/users.php");
|
||||
} else {
|
||||
show_confirmation(T_('Delete Error'), T_("Unable to delete last Admin User"), AmpConfig::get('web_path')."/admin/users.php");
|
||||
show_confirmation(T_('Delete Error'), T_("Unable to delete last Admin User"), AmpConfig::get('web_path') . "/admin/users.php");
|
||||
}
|
||||
break;
|
||||
case 'delete':
|
||||
|
@ -221,7 +221,7 @@ switch ($_REQUEST['action']) {
|
|||
$client = new User($_REQUEST['user_id']);
|
||||
show_confirmation(T_('Deletion Request'),
|
||||
sprintf(T_('Are you sure you want to permanently delete %s?'), $client->fullname),
|
||||
AmpConfig::get('web_path')."/admin/users.php?action=confirm_delete&user_id=" . $_REQUEST['user_id'],1,'delete_user');
|
||||
AmpConfig::get('web_path') . "/admin/users.php?action=confirm_delete&user_id=" . $_REQUEST['user_id'],1,'delete_user');
|
||||
break;
|
||||
case 'show_delete_avatar':
|
||||
$user_id = $_REQUEST['user_id'];
|
||||
|
|
|
@ -35,7 +35,7 @@ switch ($_REQUEST['action']) {
|
|||
show_confirmation(
|
||||
T_('Album Deletion'),
|
||||
T_('Are you sure you want to permanently delete this album?'),
|
||||
AmpConfig::get('web_path')."/albums.php?action=confirm_delete&album_id=" . $album_id,
|
||||
AmpConfig::get('web_path') . "/albums.php?action=confirm_delete&album_id=" . $album_id,
|
||||
1,
|
||||
'delete_album'
|
||||
);
|
||||
|
@ -81,7 +81,7 @@ switch ($_REQUEST['action']) {
|
|||
// Retrieving final song order from url
|
||||
foreach ($_GET as $key => $data) {
|
||||
$_GET[$key] = unhtmlentities(scrub_in($data));
|
||||
debug_event('albums', $key.'='.$_GET[$key], '5');
|
||||
debug_event('albums', $key . '=' . $_GET[$key], '5');
|
||||
}
|
||||
|
||||
if (isset($_GET['order'])) {
|
||||
|
|
|
@ -37,7 +37,7 @@ switch ($_REQUEST['action']) {
|
|||
show_confirmation(
|
||||
T_('Artist Deletion'),
|
||||
T_('Are you sure you want to permanently delete this artist?'),
|
||||
AmpConfig::get('web_path')."/artists.php?action=confirm_delete&artist_id=" . $artist_id,
|
||||
AmpConfig::get('web_path') . "/artists.php?action=confirm_delete&artist_id=" . $artist_id,
|
||||
1,
|
||||
'delete_artist'
|
||||
);
|
||||
|
|
|
@ -34,7 +34,7 @@ $headers = apache_request_headers();
|
|||
//$daapAccessIndex = $headers['Client-DAAP-Access-Index'];
|
||||
//$daapVersion = $headers['Client-DAAP-Version'];
|
||||
//$daapValidation = $headers['Client-DAAP-Validation']; // That's header hash, we don't care about it (only required by iTunes >= 7.0)
|
||||
debug_event('daap', 'Request headers: '. print_r($headers, true), '5');
|
||||
debug_event('daap', 'Request headers: ' . print_r($headers, true), '5');
|
||||
|
||||
// Get the list of possible methods for the Plex API
|
||||
$methods = get_class_methods('daap_api');
|
||||
|
|
|
@ -138,7 +138,7 @@ if (!empty($image)) {
|
|||
if (!empty($etag)) {
|
||||
header('ETag: ' . $etag);
|
||||
header('Cache-Control: private');
|
||||
header('Last-Modified: '.gmdate('D, d M Y H:i:s \G\M\T', time()));
|
||||
header('Last-Modified: ' . gmdate('D, d M Y H:i:s \G\M\T', time()));
|
||||
}
|
||||
$browser->downloadHeaders($filename, $mime, true);
|
||||
echo $image;
|
||||
|
|
|
@ -35,7 +35,7 @@ switch ($_REQUEST['action']) {
|
|||
show_confirmation(
|
||||
T_('Label Deletion'),
|
||||
T_('Are you sure you want to permanently delete this label?'),
|
||||
AmpConfig::get('web_path')."/labels.php?action=confirm_delete&label_id=" . $label_id,
|
||||
AmpConfig::get('web_path') . "/labels.php?action=confirm_delete&label_id=" . $label_id,
|
||||
1,
|
||||
'delete_label'
|
||||
);
|
||||
|
|
|
@ -67,12 +67,12 @@ class Ajax
|
|||
if (AmpConfig::get('ajax_load') && $method == 'load') {
|
||||
$source_txt = "$( document ).ready(";
|
||||
} else {
|
||||
$source_txt = "$(".$source_txt.").on('".$method."', ";
|
||||
$source_txt = "$(" . $source_txt . ").on('" . $method . "', ";
|
||||
}
|
||||
if (!empty($confirm)) {
|
||||
$observe .= $source_txt . "function(){ ".$methodact." if (confirm(\"".$confirm."\")) { ".$action." }});";
|
||||
$observe .= $source_txt . "function(){ " . $methodact . " if (confirm(\"" . $confirm . "\")) { " . $action . " }});";
|
||||
} else {
|
||||
$observe .= $source_txt . "function(){ ".$methodact." ".$action.";});";
|
||||
$observe .= $source_txt . "function(){ " . $methodact . " " . $action . ";});";
|
||||
}
|
||||
$observe .= "</script>";
|
||||
|
||||
|
@ -140,7 +140,7 @@ class Ajax
|
|||
|
||||
// If they passed a span class
|
||||
if ($class) {
|
||||
$class = ' class="'.$class.'"';
|
||||
$class = ' class="' . $class . '"';
|
||||
}
|
||||
|
||||
$string = UI::get_icon($icon, $alt);
|
||||
|
@ -148,7 +148,7 @@ class Ajax
|
|||
// Generate an <a> so that it's more compliant with older
|
||||
// browsers (ie :hover actions) and also to unify linkbuttons
|
||||
// (w/o ajax) display
|
||||
$string = "<a href=\"javascript:void(0);\" id=\"$source\" $class>".$string."</a>\n";
|
||||
$string = "<a href=\"javascript:void(0);\" id=\"$source\" $class>" . $string . "</a>\n";
|
||||
|
||||
$string .= self::observe($source, 'click', $ajax_string, $confirm);
|
||||
|
||||
|
|
|
@ -285,7 +285,7 @@ class Album extends database_object implements library_item
|
|||
"COUNT(DISTINCT(`song`.`artist`)) AS `artist_count`, " .
|
||||
"COUNT(`song`.`id`) AS `song_count`, " .
|
||||
"SUM(`song`.`time`) as `total_duration`," .
|
||||
"`song`.`catalog` as `catalog_id`,".
|
||||
"`song`.`catalog` as `catalog_id`," .
|
||||
"`artist`.`name` AS `artist_name`, " .
|
||||
"`artist`.`prefix` AS `artist_prefix`, " .
|
||||
"`artist`.`id` AS `artist_id` " .
|
||||
|
@ -970,7 +970,7 @@ class Album extends database_object implements library_item
|
|||
$song = new Song($id);
|
||||
$deleted = $song->remove_from_disk();
|
||||
if (!$deleted) {
|
||||
debug_event('album', 'Error when deleting the song `' . $id .'`.', 1);
|
||||
debug_event('album', 'Error when deleting the song `' . $id . '`.', 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -224,7 +224,7 @@ class Api
|
|||
|
||||
// Now we need to quickly get the song totals
|
||||
$sql = 'SELECT COUNT(`id`) AS `song`, ' .
|
||||
'COUNT(DISTINCT(`album`)) AS `album`, '.
|
||||
'COUNT(DISTINCT(`album`)) AS `album`, ' .
|
||||
'COUNT(DISTINCT(`artist`)) AS `artist` ' .
|
||||
'FROM `song`';
|
||||
$db_results = Dba::read($sql);
|
||||
|
|
|
@ -1727,7 +1727,7 @@ class Art extends database_object
|
|||
if ($prettyPhoto) {
|
||||
if ($size['width'] >= 150) {
|
||||
echo "<div class=\"item_art_play\">";
|
||||
echo Ajax::text('?page=stream&action=directplay&object_type=' . $object_type . '&object_id=' . $object_id . '\' + getPagePlaySettings() + \'', '<span class="item_art_play_icon" title="' . T_('Play') . '" />', 'directplay_art_' . $object_type . '_' .$object_id);
|
||||
echo Ajax::text('?page=stream&action=directplay&object_type=' . $object_type . '&object_id=' . $object_id . '\' + getPagePlaySettings() + \'', '<span class="item_art_play_icon" title="' . T_('Play') . '" />', 'directplay_art_' . $object_type . '_' . $object_id);
|
||||
echo "</div>";
|
||||
}
|
||||
|
||||
|
|
|
@ -880,7 +880,7 @@ class Artist extends database_object implements library_item
|
|||
$album = new Album($id);
|
||||
$deleted = $album->remove_from_disk();
|
||||
if (!$deleted) {
|
||||
debug_event('artist', 'Error when deleting the album `' . $id .'`.', 1);
|
||||
debug_event('artist', 'Error when deleting the album `' . $id . '`.', 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -236,7 +236,7 @@ class Auth
|
|||
), $pipes);
|
||||
|
||||
if (is_resource($proc)) {
|
||||
fwrite($pipes[0], $username."\n".$password."\n");
|
||||
fwrite($pipes[0], $username . "\n" . $password . "\n");
|
||||
fclose($pipes[0]);
|
||||
fclose($pipes[1]);
|
||||
if ($stderr = fread($pipes[2], 8192)) {
|
||||
|
|
|
@ -356,7 +356,7 @@ class Broadcast extends database_object implements library_item
|
|||
if ($this->id) {
|
||||
if ($GLOBALS['user']->has_access('75')) {
|
||||
echo "<a id=\"edit_broadcast_ " . $this->id . "\" onclick=\"showEditDialog('broadcast_row', '" . $this->id . "', 'edit_broadcast_" . $this->id . "', '" . T_('Broadcast edit') . "', 'broadcast_row_')\">" . UI::get_icon('edit', T_('Edit')) . "</a>";
|
||||
echo " <a href=\"" . AmpConfig::get('web_path') . "/broadcast.php?action=show_delete&id=" . $this->id ."\">" . UI::get_icon('delete', T_('Delete')) . "</a>";
|
||||
echo " <a href=\"" . AmpConfig::get('web_path') . "/broadcast.php?action=show_delete&id=" . $this->id . "\">" . UI::get_icon('delete', T_('Delete')) . "</a>";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -109,13 +109,13 @@ class Broadcast_Server implements MessageComponentInterface
|
|||
break;
|
||||
default:
|
||||
if ($this->verbose) {
|
||||
echo "[" . time() ."][warning]Unknown message code." . "\r\n";
|
||||
echo "[" . time() . "][warning]Unknown message code." . "\r\n";
|
||||
}
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
if ($this->verbose) {
|
||||
echo "[" . time() ."][error]Wrong message format (" . $command . ")." . "\r\n";
|
||||
echo "[" . time() . "][error]Wrong message format (" . $command . ")." . "\r\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -156,7 +156,7 @@ class Broadcast_Server implements MessageComponentInterface
|
|||
$this->broadcastMessage($clients, self::BROADCAST_SONG, base64_encode($this->getSongJS($song_id)));
|
||||
|
||||
if ($this->verbose) {
|
||||
echo "[" . time() ."][info]Broadcast " . $broadcast->id . " now playing song " . $song_id . "." . "\r\n";
|
||||
echo "[" . time() . "][info]Broadcast " . $broadcast->id . " now playing song " . $song_id . "." . "\r\n";
|
||||
}
|
||||
} else {
|
||||
debug_event('broadcast', 'Action unauthorized.', '3');
|
||||
|
@ -180,7 +180,7 @@ class Broadcast_Server implements MessageComponentInterface
|
|||
$broadcast->song_position = $song_position;
|
||||
|
||||
if ($this->verbose) {
|
||||
echo "[" . time() ."][info]Broadcast " . $broadcast->id . " has song position to " . $song_position . "." . "\r\n";
|
||||
echo "[" . time() . "][info]Broadcast " . $broadcast->id . " has song position to " . $song_position . "." . "\r\n";
|
||||
}
|
||||
} else {
|
||||
debug_event('broadcast', 'Action unauthorized.', '3');
|
||||
|
@ -200,7 +200,7 @@ class Broadcast_Server implements MessageComponentInterface
|
|||
$this->broadcastMessage($clients, self::BROADCAST_PLAYER_PLAY, $play ? 'true' : 'false');
|
||||
|
||||
if ($this->verbose) {
|
||||
echo "[" . time() ."][info]Broadcast " . $broadcast->id . " player state: " . $play . "." . "\r\n";
|
||||
echo "[" . time() . "][info]Broadcast " . $broadcast->id . " player state: " . $play . "." . "\r\n";
|
||||
}
|
||||
} else {
|
||||
debug_event('broadcast', 'Action unauthorized.', '3');
|
||||
|
@ -219,7 +219,7 @@ class Broadcast_Server implements MessageComponentInterface
|
|||
$this->broadcastMessage($clients, self::BROADCAST_ENDED);
|
||||
|
||||
if ($this->verbose) {
|
||||
echo "[" . time() ."][info]Broadcast " . $broadcast->id . " ended." . "\r\n";
|
||||
echo "[" . time() . "][info]Broadcast " . $broadcast->id . " ended." . "\r\n";
|
||||
}
|
||||
} else {
|
||||
debug_event('broadcast', 'Action unauthorized.', '3');
|
||||
|
@ -259,7 +259,7 @@ class Broadcast_Server implements MessageComponentInterface
|
|||
unset($this->broadcasters[$conn->resourceId]);
|
||||
|
||||
if ($this->verbose) {
|
||||
echo "[" . time() ."][info]Broadcast " . $broadcast->id . " unregistered." . "\r\n";
|
||||
echo "[" . time() . "][info]Broadcast " . $broadcast->id . " unregistered." . "\r\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -193,7 +193,7 @@ class Browse extends Query
|
|||
|
||||
$argument_param = ($argument ? '&argument=' . scrub_in($argument) : '');
|
||||
|
||||
debug_event('browse', 'Show objects called for type {'.$type.'}', '5');
|
||||
debug_event('browse', 'Show objects called for type {' . $type . '}', '5');
|
||||
|
||||
$limit_threshold = $this->get_threshold();
|
||||
|
||||
|
@ -370,7 +370,7 @@ class Browse extends Query
|
|||
$total = $this->get_total();
|
||||
$next_offset = $start + $limit;
|
||||
if ($next_offset <= $total) {
|
||||
echo '<a class="jscroll-next" href="' . AmpConfig::get('ajax_url') . '?page=browse&action=page&browse_id=' . $this->id . '&start=' . $next_offset . '&xoutput=raw&xoutputnode='. $this->get_content_div() . '&show_header=false' . $argument . '">' . T_('More') . '</a>';
|
||||
echo '<a class="jscroll-next" href="' . AmpConfig::get('ajax_url') . '?page=browse&action=page&browse_id=' . $this->id . '&start=' . $next_offset . '&xoutput=raw&xoutputnode=' . $this->get_content_div() . '&show_header=false' . $argument . '">' . T_('More') . '</a>';
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -196,7 +196,7 @@ abstract class Catalog extends database_object
|
|||
$sql = "DELETE FROM `catalog` WHERE `catalog_type` = ?";
|
||||
Dba::query($sql, array($this->get_type()));
|
||||
|
||||
$sql = "DROP TABLE `catalog_" . $this->get_type() ."`";
|
||||
$sql = "DROP TABLE `catalog_" . $this->get_type() . "`";
|
||||
Dba::query($sql);
|
||||
|
||||
return true;
|
||||
|
@ -1561,7 +1561,7 @@ abstract class Catalog extends database_object
|
|||
if ($song->id && array_key_exists('rating', $results) && is_array($results['rating'])) {
|
||||
// For each user's ratings, call the function
|
||||
foreach ($results['rating'] as $user => $rating) {
|
||||
debug_event('Rating', "Updating rating for Song ".$song->id." to $rating for user $user", 5);
|
||||
debug_event('Rating', "Updating rating for Song " . $song->id . " to $rating for user $user", 5);
|
||||
$o_rating = new Rating($song->id, 'song');
|
||||
$o_rating->set_rating($rating, $user);
|
||||
}
|
||||
|
@ -1619,7 +1619,7 @@ abstract class Catalog extends database_object
|
|||
|
||||
$dead_total = $this->clean_catalog_proc();
|
||||
|
||||
debug_event('clean', 'clean finished, ' . $dead_total . ' removed from '. $this->name, 5);
|
||||
debug_event('clean', 'clean finished, ' . $dead_total . ' removed from ' . $this->name, 5);
|
||||
|
||||
// Remove any orphaned artists/albums/etc.
|
||||
self::gc();
|
||||
|
@ -2006,8 +2006,8 @@ abstract class Catalog extends database_object
|
|||
$song->format();
|
||||
|
||||
$xml = array();
|
||||
$xml['key']= $results['id'];
|
||||
$xml['dict']['Track ID']= intval($results['id']);
|
||||
$xml['key'] = $results['id'];
|
||||
$xml['dict']['Track ID'] = intval($results['id']);
|
||||
$xml['dict']['Name'] = $song->title;
|
||||
$xml['dict']['Artist'] = $song->f_artist_full;
|
||||
$xml['dict']['Album'] = $song->f_album_full;
|
||||
|
@ -2034,12 +2034,12 @@ abstract class Catalog extends database_object
|
|||
echo '"' . $song->id . '","' .
|
||||
$song->title . '","' .
|
||||
$song->f_artist_full . '","' .
|
||||
$song->f_album_full .'","' .
|
||||
$song->f_album_full . '","' .
|
||||
$song->f_time . '","' .
|
||||
$song->f_track . '","' .
|
||||
$song->year .'","' .
|
||||
$song->year . '","' .
|
||||
date("Y-m-d\TH:i:s\Z", $song->addition_time) . '","' .
|
||||
$song->f_bitrate .'","' .
|
||||
$song->f_bitrate . '","' .
|
||||
$song->played . '","' .
|
||||
$song->file . "\n";
|
||||
}
|
||||
|
|
|
@ -184,7 +184,7 @@ class Channel extends database_object implements media, library_item
|
|||
echo Ajax::button('?page=index&action=start_channel&id=' . $this->id,'run', T_('Start Channel'),'channel_start_' . $this->id);
|
||||
echo " " . Ajax::button('?page=index&action=stop_channel&id=' . $this->id,'stop', T_('Stop Channel'),'channel_stop_' . $this->id);
|
||||
echo " <a id=\"edit_channel_ " . $this->id . "\" onclick=\"showEditDialog('channel_row', '" . $this->id . "', 'edit_channel_" . $this->id . "', '" . T_('Channel edit') . "', 'channel_row_', 'refresh_channel')\">" . UI::get_icon('edit', T_('Edit')) . "</a>";
|
||||
echo " <a href=\"" . AmpConfig::get('web_path') . "/channel.php?action=show_delete&id=" . $this->id ."\">" . UI::get_icon('delete', T_('Delete')) . "</a>";
|
||||
echo " <a href=\"" . AmpConfig::get('web_path') . "/channel.php?action=show_delete&id=" . $this->id . "\">" . UI::get_icon('delete', T_('Delete')) . "</a>";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ class Graph
|
|||
{
|
||||
switch ($zoom) {
|
||||
case 'hour':
|
||||
$df = "DATE_FORMAT(FROM_UNIXTIME(" . $field ."), '%Y-%m-%d %H:00:00')";
|
||||
$df = "DATE_FORMAT(FROM_UNIXTIME(" . $field . "), '%Y-%m-%d %H:00:00')";
|
||||
break;
|
||||
case 'year':
|
||||
$df = "DATE_FORMAT(FROM_UNIXTIME(" . $field . "), '%Y-01-01')";
|
||||
|
@ -335,13 +335,13 @@ class Graph
|
|||
/* Add a border to the picture */
|
||||
$myPicture->drawRectangle(0,0,$width-1,$height-1,array("R"=>0,"G"=>0,"B"=>0));
|
||||
|
||||
$font_path = AmpConfig::get('prefix')."/lib/vendor/szymach/c-pchart/src/Resources/fonts";
|
||||
$font_path = AmpConfig::get('prefix') . "/lib/vendor/szymach/c-pchart/src/Resources/fonts";
|
||||
/* Write the chart title */
|
||||
$myPicture->setFontProperties(array("FontName"=>$font_path."/Forgotte.ttf","FontSize"=>11));
|
||||
$myPicture->setFontProperties(array("FontName"=>$font_path . "/Forgotte.ttf","FontSize"=>11));
|
||||
$myPicture->drawText(150,35,$title,array("FontSize"=>20,"Align"=>TEXT_ALIGN_BOTTOMMIDDLE));
|
||||
|
||||
/* Set the default font */
|
||||
$myPicture->setFontProperties(array("FontName"=>$font_path."/pf_arma_five.ttf","FontSize"=>6));
|
||||
$myPicture->setFontProperties(array("FontName"=>$font_path . "/pf_arma_five.ttf","FontSize"=>6));
|
||||
|
||||
/* Define the chart area */
|
||||
$myPicture->setGraphArea(60,40,$width-20,$height-50);
|
||||
|
|
|
@ -416,7 +416,7 @@ class Label extends database_object implements library_item
|
|||
*/
|
||||
public static function update_label_list($labels_comma, $artist_id, $overwrite)
|
||||
{
|
||||
debug_event('label.class', 'Updating labels for values {'.$labels_comma.'} artist {'.$artist_id.'}', '5');
|
||||
debug_event('label.class', 'Updating labels for values {' . $labels_comma . '} artist {' . $artist_id . '}', '5');
|
||||
|
||||
$clabels = Label::get_labels($artist_id);
|
||||
$editedLabels = explode(",", $labels_comma);
|
||||
|
@ -425,7 +425,7 @@ class Label extends database_object implements library_item
|
|||
foreach ($clabels as $clid => $clv) {
|
||||
if ($clid) {
|
||||
$clabel = new Label($clid);
|
||||
debug_event('label.class', 'Processing label {'.$clabel->name.'}...', '5');
|
||||
debug_event('label.class', 'Processing label {' . $clabel->name . '}...', '5');
|
||||
$found = false;
|
||||
|
||||
foreach ($editedLabels as $lk => $lv) {
|
||||
|
@ -451,7 +451,7 @@ class Label extends database_object implements library_item
|
|||
// Look if we need to add some new labels
|
||||
foreach ($editedLabels as $lk => $lv) {
|
||||
if ($lv != '') {
|
||||
debug_event('label.class', 'Adding new label {'.$lv.'}', '5');
|
||||
debug_event('label.class', 'Adding new label {' . $lv . '}', '5');
|
||||
$label_id = Label::lookup(array('name' => $lv));
|
||||
if ($label_id === 0) {
|
||||
debug_event('label.class', 'Creating a label directly from artist editing is not allowed.', '5');
|
||||
|
|
|
@ -371,7 +371,7 @@ class Playlist extends playlist_object
|
|||
$db_results = Dba::read($sql, array($this->id));
|
||||
$data = Dba::fetch_assoc($db_results);
|
||||
$base_track = $data['track'];
|
||||
debug_event('add_medias', 'Track number: '.$base_track, '5');
|
||||
debug_event('add_medias', 'Track number: ' . $base_track, '5');
|
||||
|
||||
$i = 0;
|
||||
foreach ($medias as $data) {
|
||||
|
|
|
@ -300,7 +300,7 @@ class Plex_Api
|
|||
break;
|
||||
}
|
||||
header("Content-type: text/html", true);
|
||||
header("HTTP/1.0 ". $code . " " . $error, true, $code);
|
||||
header("HTTP/1.0 " . $code . " " . $error, true, $code);
|
||||
|
||||
$html = "<html><head><title>" . $error . "</title></head><body><h1>" . $code . " " . $error . "</h1></body></html>";
|
||||
self::apiOutput($html);
|
||||
|
|
|
@ -1328,10 +1328,10 @@ class Query
|
|||
$filter_sql = " `song`.`played`='0' AND ";
|
||||
break;
|
||||
case 'album':
|
||||
$filter_sql = " `song`.`album` = '". Dba::escape($value) . "' AND ";
|
||||
$filter_sql = " `song`.`album` = '" . Dba::escape($value) . "' AND ";
|
||||
break;
|
||||
case 'artist':
|
||||
$filter_sql = " `song`.`artist` = '". Dba::escape($value) . "' AND ";
|
||||
$filter_sql = " `song`.`artist` = '" . Dba::escape($value) . "' AND ";
|
||||
break;
|
||||
case 'add_gt':
|
||||
$filter_sql = " `song`.`addition_time` >= '" . Dba::escape($value) . "' AND ";
|
||||
|
@ -1394,7 +1394,7 @@ class Query
|
|||
}
|
||||
break;
|
||||
case 'artist':
|
||||
$filter_sql = " `artist`.`id` = '". Dba::escape($value) . "' AND ";
|
||||
$filter_sql = " `artist`.`id` = '" . Dba::escape($value) . "' AND ";
|
||||
break;
|
||||
case 'add_lt':
|
||||
$this->set_join('left', '`song`', '`song`.`album`', '`album`.`id`', 100);
|
||||
|
|
|
@ -138,7 +138,7 @@ class Rating extends database_object
|
|||
return parent::get_from_cache($key, $this->id);
|
||||
}
|
||||
|
||||
$sql = "SELECT `rating` FROM `rating` WHERE `user` = ? ".
|
||||
$sql = "SELECT `rating` FROM `rating` WHERE `user` = ? " .
|
||||
"AND `object_id` = ? AND `object_type` = ?";
|
||||
$db_results = Dba::read($sql, array($user_id, $this->id, $this->type));
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ class Recommendation
|
|||
public static function album_search($artist, $album)
|
||||
{
|
||||
$api_key = AmpConfig::get('lastfm_api_key');
|
||||
$url = 'http://ws.audioscrobbler.com/2.0/?method=album.getInfo&artist='. urlencode($artist) .'&album=' . urlencode($album) . '&api_key=' . $api_key;
|
||||
$url = 'http://ws.audioscrobbler.com/2.0/?method=album.getInfo&artist=' . urlencode($artist) . '&album=' . urlencode($album) . '&api_key=' . $api_key;
|
||||
|
||||
return self::query_lastfm($url);
|
||||
}
|
||||
|
|
|
@ -41,7 +41,7 @@ class scrobbler
|
|||
$this->host = $host;
|
||||
$this->scheme = $scheme;
|
||||
$this->api_key = $api_key;
|
||||
$this->secret=$secret;
|
||||
$this->secret =$secret;
|
||||
$this->queued_tracks = array();
|
||||
} // scrobbler
|
||||
|
||||
|
@ -55,7 +55,7 @@ class scrobbler
|
|||
ksort($vars);
|
||||
$sig = '';
|
||||
foreach ($vars as $name => $value) {
|
||||
$sig .= $name.$value;
|
||||
$sig .= $name . $value;
|
||||
}
|
||||
$sig .= $this->secret;
|
||||
$sig = md5($sig);
|
||||
|
@ -75,8 +75,8 @@ class scrobbler
|
|||
'http'=>array(
|
||||
'method'=>$method,
|
||||
'header'=> array(
|
||||
'Host: '.$this->host,
|
||||
'User-Agent: Ampache/'.AmpConfig::get('version')
|
||||
'Host: ' . $this->host,
|
||||
'User-Agent: Ampache/' . AmpConfig::get('version')
|
||||
),
|
||||
)
|
||||
);
|
||||
|
@ -84,13 +84,13 @@ class scrobbler
|
|||
if ($method == 'POST') {
|
||||
$opts['http']['content'] = $params;
|
||||
$opts['http']['header'][] = 'Content-type: application/x-www-form-urlencoded';
|
||||
$opts['http']['header'][] = 'Content-length: '.strlen($params);
|
||||
$params='';
|
||||
$opts['http']['header'][] = 'Content-length: ' . strlen($params);
|
||||
$params ='';
|
||||
}
|
||||
$context = stream_context_create($opts);
|
||||
if ($params!='') {
|
||||
// If there are paramters for GET request, adding the "?" caracter before
|
||||
$params='?'.$params;
|
||||
$params='?' . $params;
|
||||
}
|
||||
//debug_event('SCROBBLER', "$this->scheme://$this->host$url$params", 5);
|
||||
//debug_event('SCROBBLER', serialize($opts), 5);
|
||||
|
|
|
@ -1008,7 +1008,7 @@ class Search extends playlist_object
|
|||
foreach ($join['tag'] as $key => $value) {
|
||||
$table['tag_' . $key] =
|
||||
"LEFT JOIN (" .
|
||||
"SELECT `object_id`, COUNT(`name`) AS `match` ".
|
||||
"SELECT `object_id`, COUNT(`name`) AS `match` " .
|
||||
"FROM `tag` LEFT JOIN `tag_map` " .
|
||||
"ON `tag`.`id`=`tag_map`.`tag_id` " .
|
||||
"WHERE `tag_map`.`object_type`='album' " .
|
||||
|
@ -1113,7 +1113,7 @@ class Search extends playlist_object
|
|||
foreach ($join['tag'] as $key => $value) {
|
||||
$table['tag_' . $key] =
|
||||
"LEFT JOIN (" .
|
||||
"SELECT `object_id`, COUNT(`name`) AS `match` ".
|
||||
"SELECT `object_id`, COUNT(`name`) AS `match` " .
|
||||
"FROM `tag` LEFT JOIN `tag_map` " .
|
||||
"ON `tag`.`id`=`tag_map`.`tag_id` " .
|
||||
"WHERE `tag_map`.`object_type`='artist' " .
|
||||
|
@ -1295,7 +1295,7 @@ class Search extends playlist_object
|
|||
foreach ($join['tag'] as $key => $value) {
|
||||
$table['tag_' . $key] =
|
||||
"LEFT JOIN (" .
|
||||
"SELECT `object_id`, COUNT(`name`) AS `match` ".
|
||||
"SELECT `object_id`, COUNT(`name`) AS `match` " .
|
||||
"FROM `tag` LEFT JOIN `tag_map` " .
|
||||
"ON `tag`.`id`=`tag_map`.`tag_id` " .
|
||||
"WHERE `tag_map`.`object_type`='song' " .
|
||||
|
|
|
@ -203,8 +203,8 @@ class Share extends database_object
|
|||
{
|
||||
if ($this->id) {
|
||||
if ($GLOBALS['user']->has_access('75') || $this->user == $GLOBALS['user']->id) {
|
||||
echo "<a id=\"edit_share_ " . $this->id ."\" onclick=\"showEditDialog('share_row', '" . $this->id . "', 'edit_share_" . $this->id . "', '" . T_('Share edit') . "', 'share_')\">" . UI::get_icon('edit', T_('Edit')) . "</a>";
|
||||
echo "<a href=\"" . AmpConfig::get('web_path') . "/share.php?action=show_delete&id=" . $this->id ."\">" . UI::get_icon('delete', T_('Delete')) . "</a>";
|
||||
echo "<a id=\"edit_share_ " . $this->id . "\" onclick=\"showEditDialog('share_row', '" . $this->id . "', 'edit_share_" . $this->id . "', '" . T_('Share edit') . "', 'share_')\">" . UI::get_icon('edit', T_('Edit')) . "</a>";
|
||||
echo "<a href=\"" . AmpConfig::get('web_path') . "/share.php?action=show_delete&id=" . $this->id . "\">" . UI::get_icon('delete', T_('Delete')) . "</a>";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -357,7 +357,7 @@ class Share extends database_object
|
|||
public static function display_ui_links($object_type, $object_id)
|
||||
{
|
||||
echo "<ul>";
|
||||
echo "<li><a onclick=\"handleShareAction('". AmpConfig::get('web_path') . "/share.php?action=show_create&type=" . $object_type . "&id=" . $object_id . "')\">" . UI::get_icon('share', T_('Advanced Share')) . " " . T_('Advanced Share') . "</a></li>";
|
||||
echo "<li><a onclick=\"handleShareAction('" . AmpConfig::get('web_path') . "/share.php?action=show_create&type=" . $object_type . "&id=" . $object_id . "')\">" . UI::get_icon('share', T_('Advanced Share')) . " " . T_('Advanced Share') . "</a></li>";
|
||||
if (AmpConfig::get('download')) {
|
||||
$dllink = "";
|
||||
if ($object_type == "song" || $object_type == "video") {
|
||||
|
@ -378,7 +378,7 @@ class Share extends database_object
|
|||
echo "<li style='padding-top: 8px; text-align: right;'>";
|
||||
$plugins = Plugin::get_plugins('external_share');
|
||||
foreach ($plugins as $plugin_name) {
|
||||
echo "<a onclick=\"handleShareAction('". AmpConfig::get('web_path') . "/share.php?action=external_share&plugin=" . $plugin_name . "&type=" . $object_type . "&id=" . $object_id . "')\" target=\"_blank\">" . UI::get_icon('share_' . strtolower($plugin_name), $plugin_name) . "</a> ";
|
||||
echo "<a onclick=\"handleShareAction('" . AmpConfig::get('web_path') . "/share.php?action=external_share&plugin=" . $plugin_name . "&type=" . $object_type . "&id=" . $object_id . "')\" target=\"_blank\">" . UI::get_icon('share_' . strtolower($plugin_name), $plugin_name) . "</a> ";
|
||||
}
|
||||
echo "</li>";
|
||||
echo "</ul>";
|
||||
|
|
|
@ -297,7 +297,7 @@ class Shoutbox
|
|||
$html .= "<div class='shoutbox-info'>";
|
||||
if ($details) {
|
||||
$html .= "<div class='shoutbox-object'>" . $object->f_link . "</div>";
|
||||
$html .= "<div class='shoutbox-date'>".date("Y/m/d H:i:s", $this->date) . "</div>";
|
||||
$html .= "<div class='shoutbox-date'>" . date("Y/m/d H:i:s", $this->date) . "</div>";
|
||||
}
|
||||
$html .= "<div class='shoutbox-text'>" . $this->f_text . "</div>";
|
||||
$html .= "</div>";
|
||||
|
@ -306,8 +306,8 @@ class Shoutbox
|
|||
if ($details) {
|
||||
$html .= "<div class='shoutbox-actions'>";
|
||||
if ($jsbuttons) {
|
||||
$html .= Ajax::button('?page=stream&action=directplay&playtype=' . $this->object_type .'&' . $this->object_type . '_id=' . $this->object_id,'play', T_('Play'),'play_' . $this->object_type . '_' . $this->object_id);
|
||||
$html .= Ajax::button('?action=basket&type=' . $this->object_type .'&id=' . $this->object_id,'add', T_('Add'),'add_' . $this->object_type . '_' . $this->object_id);
|
||||
$html .= Ajax::button('?page=stream&action=directplay&playtype=' . $this->object_type . '&' . $this->object_type . '_id=' . $this->object_id,'play', T_('Play'),'play_' . $this->object_type . '_' . $this->object_id);
|
||||
$html .= Ajax::button('?action=basket&type=' . $this->object_type . '&id=' . $this->object_id,'add', T_('Add'),'add_' . $this->object_type . '_' . $this->object_id);
|
||||
}
|
||||
if (Access::check('interface','25')) {
|
||||
$html .= "<a href=\"" . AmpConfig::get('web_path') . "/shout.php?action=show_add_shout&type=" . $this->object_type . "&id=" . $this->object_id . "\">" . UI::get_icon('comment', T_('Post Shout')) . "</a>";
|
||||
|
|
|
@ -464,7 +464,7 @@ class Song extends database_object implements media, library_item
|
|||
$sql = 'SELECT `song`.`id`, `file`, `catalog`, `album`, ' .
|
||||
'`year`, `artist`, `title`, `bitrate`, `rate`, ' .
|
||||
'`mode`, `size`, `time`, `track`, `played`, ' .
|
||||
'`song`.`enabled`, `update_time`, `tag_map`.`tag_id`, '.
|
||||
'`song`.`enabled`, `update_time`, `tag_map`.`tag_id`, ' .
|
||||
'`mbid`, `addition_time`, `license`, `composer`, `user_upload` ' .
|
||||
'FROM `song` LEFT JOIN `tag_map` ' .
|
||||
'ON `tag_map`.`object_id`=`song`.`id` ' .
|
||||
|
@ -903,7 +903,7 @@ class Song extends database_object implements media, library_item
|
|||
public function update(array $data)
|
||||
{
|
||||
foreach ($data as $key=>$value) {
|
||||
debug_event('song.class.php', $key.'='.$value, '5');
|
||||
debug_event('song.class.php', $key . '=' . $value, '5');
|
||||
|
||||
switch ($key) {
|
||||
case 'artist_name':
|
||||
|
@ -1614,7 +1614,7 @@ class Song extends database_object implements media, library_item
|
|||
if ($transcode_cfg == 'always' || ($transcode_cfg != 'never' && !in_array('native', $valid_types))) {
|
||||
$transcode_settings = $media->get_transcode_settings(null);
|
||||
if ($transcode_settings) {
|
||||
debug_event("media", "Changing play url type from {".$type."} to {".$transcode_settings['format']."} due to encoding settings...", 5);
|
||||
debug_event("media", "Changing play url type from {" . $type . "} to {" . $transcode_settings['format'] . "} due to encoding settings...", 5);
|
||||
$type = $transcode_settings['format'];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -257,7 +257,7 @@ class Stats
|
|||
|
||||
/* Select Top objects counting by # of rows */
|
||||
$sql = "SELECT object_id as `id`, COUNT(*) AS `count` FROM object_count" .
|
||||
" WHERE `object_type` = '" . $type ."' AND `date` >= '" . $date . "' ";
|
||||
" WHERE `object_type` = '" . $type . "' AND `date` >= '" . $date . "' ";
|
||||
if (AmpConfig::get('catalog_disable')) {
|
||||
$sql .= "AND " . Catalog::get_enable_filter($type, '`object_id`');
|
||||
}
|
||||
|
@ -310,7 +310,7 @@ class Stats
|
|||
}
|
||||
|
||||
$sql = "SELECT DISTINCT(`object_id`) as `id`, MAX(`date`) FROM object_count" .
|
||||
" WHERE `object_type` = '" . $type ."'" . $user_sql;
|
||||
" WHERE `object_type` = '" . $type . "'" . $user_sql;
|
||||
if (AmpConfig::get('catalog_disable')) {
|
||||
$sql .= " AND " . Catalog::get_enable_filter($type, '`object_id`');
|
||||
}
|
||||
|
@ -426,7 +426,7 @@ class Stats
|
|||
$sql .= "WHERE `catalog`.`enabled` = '1' ";
|
||||
}
|
||||
if ($catalog > 0) {
|
||||
$sql .= "AND `catalog` = '" . scrub_in($catalog) ."' ";
|
||||
$sql .= "AND `catalog` = '" . scrub_in($catalog) . "' ";
|
||||
}
|
||||
$sql .= "GROUP BY `$type` ORDER BY `real_atime` DESC ";
|
||||
|
||||
|
|
|
@ -138,7 +138,7 @@ class Stream
|
|||
*/
|
||||
public static function start_transcode($media, $type = null, $player = null, $options = array())
|
||||
{
|
||||
debug_event('stream.class.php', 'Starting transcode for {'.$media->file.'}. Type {'.$type.'}. Options: ' . print_r($options, true) . '}...', 5);
|
||||
debug_event('stream.class.php', 'Starting transcode for {' . $media->file . '}. Type {' . $type . '}. Options: ' . print_r($options, true) . '}...', 5);
|
||||
|
||||
$transcode_settings = $media->get_transcode_settings($type, $player, $options);
|
||||
// Bail out early if we're unutterably broken
|
||||
|
@ -263,7 +263,7 @@ class Stream
|
|||
|
||||
debug_event('stream', "Transcode command prefix: " . $cmdPrefix, 3);
|
||||
|
||||
$process = proc_open($cmdPrefix.$command, $descriptors, $pipes);
|
||||
$process = proc_open($cmdPrefix . $command, $descriptors, $pipes);
|
||||
$parray = array(
|
||||
'process' => $process,
|
||||
'handle' => $pipes[1],
|
||||
|
@ -451,7 +451,7 @@ class Stream
|
|||
|
||||
// Load our javascript
|
||||
echo "<script type=\"text/javascript\">";
|
||||
echo Core::get_reloadutil() . "('".$_SESSION['iframe']['target']."');";
|
||||
echo Core::get_reloadutil() . "('" . $_SESSION['iframe']['target'] . "');";
|
||||
echo "</script>";
|
||||
} // run_playlist_method
|
||||
|
||||
|
|
|
@ -69,7 +69,7 @@ class Stream_Playlist
|
|||
|
||||
private function _add_url($url)
|
||||
{
|
||||
debug_event("stream_playlist.class.php", "Adding url {".json_encode($url)."}...", 5);
|
||||
debug_event("stream_playlist.class.php", "Adding url {" . json_encode($url) . "}...", 5);
|
||||
|
||||
$this->urls[] = $url;
|
||||
$sql = 'INSERT INTO `stream_playlist` ';
|
||||
|
@ -240,7 +240,7 @@ class Stream_Playlist
|
|||
return false;
|
||||
}
|
||||
|
||||
debug_event('stream_playlist', 'Generating a {'.$type.'} object...', 5);
|
||||
debug_event('stream_playlist', 'Generating a {' . $type . '} object...', 5);
|
||||
|
||||
$ext = $type;
|
||||
switch ($type) {
|
||||
|
@ -374,7 +374,7 @@ class Stream_Playlist
|
|||
$i = 0;
|
||||
foreach ($this->urls as $url) {
|
||||
$i++;
|
||||
$ret .= 'File' . $i . '='. $url->url . "\n";
|
||||
$ret .= 'File' . $i . '=' . $url->url . "\n";
|
||||
$ret .= 'Title' . $i . '=' . $url->author . ' - ' .
|
||||
$url->title . "\n";
|
||||
$ret .= 'Length' . $i . '=' . $url->time . "\n";
|
||||
|
|
|
@ -553,15 +553,15 @@ class Subsonic_Api
|
|||
$search['type'] = "album";
|
||||
$i = 0;
|
||||
if ($fromYear) {
|
||||
$search['rule_'.$i.'_input'] = $fromYear;
|
||||
$search['rule_'.$i.'_operator'] = 0;
|
||||
$search['rule_'.$i.''] = "year";
|
||||
$search['rule_' . $i . '_input'] = $fromYear;
|
||||
$search['rule_' . $i . '_operator'] = 0;
|
||||
$search['rule_' . $i . ''] = "year";
|
||||
++$i;
|
||||
}
|
||||
if ($toYear) {
|
||||
$search['rule_'.$i.'_input'] = $toYear;
|
||||
$search['rule_'.$i.'_operator'] = 1;
|
||||
$search['rule_'.$i.''] = "year";
|
||||
$search['rule_' . $i . '_input'] = $toYear;
|
||||
$search['rule_' . $i . '_operator'] = 1;
|
||||
$search['rule_' . $i . ''] = "year";
|
||||
++$i;
|
||||
}
|
||||
|
||||
|
@ -630,21 +630,21 @@ class Subsonic_Api
|
|||
$search['type'] = "song";
|
||||
$i = 0;
|
||||
if ($genre) {
|
||||
$search['rule_'.$i.'_input'] = $genre;
|
||||
$search['rule_'.$i.'_operator'] = 0;
|
||||
$search['rule_'.$i.''] = "tag";
|
||||
$search['rule_' . $i . '_input'] = $genre;
|
||||
$search['rule_' . $i . '_operator'] = 0;
|
||||
$search['rule_' . $i . ''] = "tag";
|
||||
++$i;
|
||||
}
|
||||
if ($fromYear) {
|
||||
$search['rule_'.$i.'_input'] = $fromYear;
|
||||
$search['rule_'.$i.'_operator'] = 0;
|
||||
$search['rule_'.$i.''] = "year";
|
||||
$search['rule_' . $i . '_input'] = $fromYear;
|
||||
$search['rule_' . $i . '_operator'] = 0;
|
||||
$search['rule_' . $i . ''] = "year";
|
||||
++$i;
|
||||
}
|
||||
if ($toYear) {
|
||||
$search['rule_'.$i.'_input'] = $toYear;
|
||||
$search['rule_'.$i.'_operator'] = 1;
|
||||
$search['rule_'.$i.''] = "year";
|
||||
$search['rule_' . $i . '_input'] = $toYear;
|
||||
$search['rule_' . $i . '_operator'] = 1;
|
||||
$search['rule_' . $i . ''] = "year";
|
||||
++$i;
|
||||
}
|
||||
if ($musicFolderId) {
|
||||
|
@ -665,9 +665,9 @@ class Subsonic_Api
|
|||
$ftype = "catalog";
|
||||
}
|
||||
}
|
||||
$search['rule_'.$i.'_input'] = $finput;
|
||||
$search['rule_'.$i.'_operator'] = $operator;
|
||||
$search['rule_'.$i.''] = $ftype;
|
||||
$search['rule_' . $i . '_input'] = $finput;
|
||||
$search['rule_' . $i . '_operator'] = $operator;
|
||||
$search['rule_' . $i . ''] = $ftype;
|
||||
++$i;
|
||||
}
|
||||
if ($i > 0) {
|
||||
|
@ -1763,15 +1763,15 @@ class Subsonic_Api
|
|||
|
||||
$i = 0;
|
||||
if ($artist) {
|
||||
$search['rule_'.$i.'_input'] = $artist;
|
||||
$search['rule_'.$i.'_operator'] = 5;
|
||||
$search['rule_'.$i.''] = "artist";
|
||||
$search['rule_' . $i . '_input'] = $artist;
|
||||
$search['rule_' . $i . '_operator'] = 5;
|
||||
$search['rule_' . $i . ''] = "artist";
|
||||
++$i;
|
||||
}
|
||||
if ($title) {
|
||||
$search['rule_'.$i.'_input'] = $title;
|
||||
$search['rule_'.$i.'_operator'] = 5;
|
||||
$search['rule_'.$i.''] = "title";
|
||||
$search['rule_' . $i . '_input'] = $title;
|
||||
$search['rule_' . $i . '_operator'] = 5;
|
||||
$search['rule_' . $i . ''] = "title";
|
||||
++$i;
|
||||
}
|
||||
|
||||
|
|
|
@ -239,7 +239,7 @@ class Tag extends database_object implements library_item
|
|||
"SELECT ?,`user`,`object_type`,`object_id` " .
|
||||
"FROM `tag_map` AS `tm`" .
|
||||
"WHERE `tm`.`tag_id` = ? AND NOT EXISTS ( " .
|
||||
"SELECT 1 FROM `tag_map` ".
|
||||
"SELECT 1 FROM `tag_map` " .
|
||||
"WHERE `tag_map`.`tag_id` = ? " .
|
||||
"AND `tag_map`.`object_id` = `tm`.`object_id` " .
|
||||
"AND `tag_map`.`object_type` = `tm`.`object_type` " .
|
||||
|
@ -261,7 +261,7 @@ class Tag extends database_object implements library_item
|
|||
{
|
||||
$sql = "SELECT `tag`.`id`, `tag`.`name`" .
|
||||
"FROM `tag_merge` " .
|
||||
"INNER JOIN `tag` ON `tag`.`id` = `tag_merge`.`merged_to` ".
|
||||
"INNER JOIN `tag` ON `tag`.`id` = `tag_merge`.`merged_to` " .
|
||||
"WHERE `tag_merge`.`tag_id` = ? " .
|
||||
"ORDER BY `tag`.`name` ";
|
||||
|
||||
|
@ -428,7 +428,7 @@ class Tag extends database_object implements library_item
|
|||
$limit = intval($limit);
|
||||
$sql = "SELECT `tag_map`.`id`, `tag_map`.`tag_id`, `tag`.`name`, `tag_map`.`user` FROM `tag` " .
|
||||
"LEFT JOIN `tag_map` ON `tag_map`.`tag_id`=`tag`.`id` " .
|
||||
"WHERE `tag_map`.`object_type`='$type' AND `tag_map`.`object_id`='$object_id' ".
|
||||
"WHERE `tag_map`.`object_type`='$type' AND `tag_map`.`object_id`='$object_id' " .
|
||||
"GROUP BY `tag`.`name` LIMIT $limit";
|
||||
|
||||
$db_results = Dba::read($sql);
|
||||
|
@ -586,7 +586,7 @@ class Tag extends database_object implements library_item
|
|||
*/
|
||||
public static function update_tag_list($tags_comma, $type, $object_id, $overwrite)
|
||||
{
|
||||
debug_event('tag.class', 'Updating tags for values {'.$tags_comma.'} type {'.$type.'} object_id {'.$object_id.'}', '5');
|
||||
debug_event('tag.class', 'Updating tags for values {' . $tags_comma . '} type {' . $type . '} object_id {' . $object_id . '}', '5');
|
||||
|
||||
$ctags = Tag::get_top_tags($type, $object_id);
|
||||
$editedTags = explode(",", $tags_comma);
|
||||
|
@ -595,7 +595,7 @@ class Tag extends database_object implements library_item
|
|||
foreach ($ctags as $ctid => $ctv) {
|
||||
if ($ctv['id'] != '') {
|
||||
$ctag = new Tag($ctv['id']);
|
||||
debug_event('tag.class', 'Processing tag {'.$ctag->name.'}...', '5');
|
||||
debug_event('tag.class', 'Processing tag {' . $ctag->name . '}...', '5');
|
||||
$found = false;
|
||||
|
||||
foreach ($editedTags as $tk => $tv) {
|
||||
|
@ -621,7 +621,7 @@ class Tag extends database_object implements library_item
|
|||
// Look if we need to add some new tags
|
||||
foreach ($editedTags as $tk => $tv) {
|
||||
if ($tv != '') {
|
||||
debug_event('tag.class', 'Adding new tag {'.$tv.'}', '5');
|
||||
debug_event('tag.class', 'Adding new tag {' . $tv . '}', '5');
|
||||
Tag::add($type, $object_id, $tv, false);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -413,7 +413,7 @@ class TVShow extends database_object implements library_item
|
|||
$season = new TVShow_Season($id);
|
||||
$deleted = $season->remove_from_disk();
|
||||
if (!$deleted) {
|
||||
debug_event('tvshow', 'Error when deleting the season `' . $id .'`.', 1);
|
||||
debug_event('tvshow', 'Error when deleting the season `' . $id . '`.', 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -157,7 +157,7 @@ class TVShow_Episode extends Video
|
|||
|
||||
$this->f_file = $this->f_tvshow;
|
||||
if ($this->episode_number) {
|
||||
$this->f_file .= ' - S'. sprintf('%02d', $season->season_number) . 'E'. sprintf('%02d', $this->episode_number);
|
||||
$this->f_file .= ' - S' . sprintf('%02d', $season->season_number) . 'E' . sprintf('%02d', $this->episode_number);
|
||||
}
|
||||
$this->f_file .= ' - ' . $this->f_title;
|
||||
$this->f_full_title = $this->f_file;
|
||||
|
|
|
@ -321,7 +321,7 @@ class TVShow_Season extends database_object implements library_item
|
|||
$video = Video::create_from_id($id);
|
||||
$deleted = $video->remove_from_disk();
|
||||
if (!$deleted) {
|
||||
debug_event('tvshow_season', 'Error when deleting the video `' . $id .'`.', 1);
|
||||
debug_event('tvshow_season', 'Error when deleting the video `' . $id . '`.', 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -240,7 +240,7 @@ END;
|
|||
$hover_url = self::_find_icon($hover_name);
|
||||
}
|
||||
if ($bUseSprite) {
|
||||
$tag = '<span class="sprite sprite-icon_'.$name.'" ';
|
||||
$tag = '<span class="sprite sprite-icon_' . $name . '" ';
|
||||
} else {
|
||||
$tag = '<img src="' . $icon_url . '" ';
|
||||
}
|
||||
|
@ -372,7 +372,7 @@ END;
|
|||
echo "data: displayNotification('" . json_encode($value) . "', 5000)\n\n";
|
||||
} else {
|
||||
if (!empty($field)) {
|
||||
echo "<script>updateText('" . $field . "', '" . json_encode($value) ."');</script>\n";
|
||||
echo "<script>updateText('" . $field . "', '" . json_encode($value) . "');</script>\n";
|
||||
} else {
|
||||
echo "<br />" . $value . "<br /><br />\n";
|
||||
}
|
||||
|
|
|
@ -329,8 +329,8 @@ class Update
|
|||
$update_string = '- Add option to allow/disallow to show personnal information to other users (now playing and recently played).<br />';
|
||||
$version[] = array('version' => '360027','description' => $update_string);
|
||||
|
||||
$update_string = '- Personnal information: allow/disallow to show in now playing.<br />'.
|
||||
'- Personnal information: allow/disallow to show in recently played.<br />'.
|
||||
$update_string = '- Personnal information: allow/disallow to show in now playing.<br />' .
|
||||
'- Personnal information: allow/disallow to show in recently played.<br />' .
|
||||
'- Personnal information: allow/disallow to show time and/or agent in recently played.<br />';
|
||||
$version[] = array('version' => '360028','description' => $update_string);
|
||||
|
||||
|
@ -2771,13 +2771,13 @@ class Update
|
|||
$sql = "INSERT INTO `license`(`name`, `external_link`) VALUES ('CC BY ND', 'https://creativecommons.org/licenses/by-nd/3.0/')";
|
||||
$retval = Dba::write($sql) ? $retval : false;
|
||||
$sql = "INSERT INTO `license`(`name`, `external_link`) VALUES ('CC BY SA', 'https://creativecommons.org/licenses/by-sa/3.0/')";
|
||||
$retval= Dba::write($sql) ? $retval : false;
|
||||
$retval = Dba::write($sql) ? $retval : false;
|
||||
$sql = "INSERT INTO `license`(`name`, `external_link`) VALUES ('Licence Art Libre', 'http://artlibre.org/licence/lal/')";
|
||||
$retval = Dba::write($sql) ? $retval : false;
|
||||
$sql = "INSERT INTO `license`(`name`, `external_link`) VALUES ('Yellow OpenMusic', 'http://openmusic.linuxtag.org/yellow.html')";
|
||||
$retval = Dba::write($sql) ? $retval : false;
|
||||
$sql = "INSERT INTO `license`(`name`, `external_link`) VALUES ('Green OpenMusic', 'http://openmusic.linuxtag.org/green.html')";
|
||||
$retval= Dba::write($sql) ? $retval : false;
|
||||
$retval = Dba::write($sql) ? $retval : false;
|
||||
$sql = "INSERT INTO `license`(`name`, `external_link`) VALUES ('Gnu GPL Art', 'http://gnuart.org/english/gnugpl.html')";
|
||||
$retval = Dba::write($sql) ? $retval : false;
|
||||
$sql = "INSERT INTO `license`(`name`, `external_link`) VALUES ('WTFPL', 'https://en.wikipedia.org/wiki/WTFPL')";
|
||||
|
@ -3028,7 +3028,7 @@ class Update
|
|||
public static function update_370014()
|
||||
{
|
||||
$retval = true;
|
||||
$sql="ALTER TABLE `video` CHANGE COLUMN `release_date` `release_date` INT NULL DEFAULT NULL" ;
|
||||
$sql ="ALTER TABLE `video` CHANGE COLUMN `release_date` `release_date` INT NULL DEFAULT NULL" ;
|
||||
$retval = Dba::write($sql) ? $retval : false;
|
||||
return $retval;
|
||||
}
|
||||
|
|
|
@ -69,34 +69,34 @@ class Upnp_Api
|
|||
{
|
||||
$strHeader = 'NOTIFY * HTTP/1.1' . "\r\n";
|
||||
$strHeader .= 'HOST: ' . $host . ':' . $port . "\r\n";
|
||||
$strHeader .= 'LOCATION: http://' . AmpConfig::get('http_host') . ':'. AmpConfig::get('http_port') . AmpConfig::get('raw_web_path') . '/upnp/MediaServerServiceDesc.php' . "\r\n";
|
||||
$strHeader .= 'LOCATION: http://' . AmpConfig::get('http_host') . ':' . AmpConfig::get('http_port') . AmpConfig::get('raw_web_path') . '/upnp/MediaServerServiceDesc.php' . "\r\n";
|
||||
$strHeader .= 'SERVER: DLNADOC/1.50 UPnP/1.0 Ampache/' . AmpConfig::get('version') . "\r\n";
|
||||
$strHeader .= 'CACHE-CONTROL: max-age=1800' . "\r\n";
|
||||
$strHeader .= 'NTS: ssdp:alive' . "\r\n";
|
||||
$uuidStr = self::get_uuidStr();
|
||||
|
||||
$rootDevice = $prefix . ': upnp:rootdevice' . "\r\n";
|
||||
$rootDevice .= 'USN: uuid:' . $uuidStr . '::upnp:rootdevice' . "\r\n". "\r\n";
|
||||
$rootDevice .= 'USN: uuid:' . $uuidStr . '::upnp:rootdevice' . "\r\n" . "\r\n";
|
||||
$buf = $strHeader . $rootDevice;
|
||||
self::udpSend($buf, $delay, $host, $port);
|
||||
|
||||
$uuid = $prefix . ': uuid:' . $uuidStr . "\r\n";
|
||||
$uuid .= 'USN: uuid:' . $uuidStr . "\r\n". "\r\n";
|
||||
$uuid .= 'USN: uuid:' . $uuidStr . "\r\n" . "\r\n";
|
||||
$buf = $strHeader . $uuid;
|
||||
self::udpSend($buf, $delay, $host, $port);
|
||||
|
||||
$deviceType = $prefix . ': urn:schemas-upnp-org:device:MediaServer:1' . "\r\n";
|
||||
$deviceType .= 'USN: uuid:' . $uuidStr . '::urn:schemas-upnp-org:device:MediaServer:1' . "\r\n". "\r\n";
|
||||
$deviceType .= 'USN: uuid:' . $uuidStr . '::urn:schemas-upnp-org:device:MediaServer:1' . "\r\n" . "\r\n";
|
||||
$buf = $strHeader . $deviceType;
|
||||
self::udpSend($buf, $delay, $host, $port);
|
||||
|
||||
$serviceCM = $prefix . ': urn:schemas-upnp-org:service:ConnectionManager:1' . "\r\n";
|
||||
$serviceCM .= 'USN: uuid:' . $uuidStr . '::urn:schemas-upnp-org:service:ConnectionManager:1' . "\r\n". "\r\n";
|
||||
$serviceCM .= 'USN: uuid:' . $uuidStr . '::urn:schemas-upnp-org:service:ConnectionManager:1' . "\r\n" . "\r\n";
|
||||
$buf = $strHeader . $serviceCM;
|
||||
self::udpSend($buf, $delay, $host, $port);
|
||||
|
||||
$serviceCD = $prefix . ': urn:schemas-upnp-org:service:ContentDirectory:1' . "\r\n";
|
||||
$serviceCD .= 'USN: uuid:' . $uuidStr . '::urn:schemas-upnp-org:service:ContentDirectory:1' . "\r\n". "\r\n";
|
||||
$serviceCD .= 'USN: uuid:' . $uuidStr . '::urn:schemas-upnp-org:service:ContentDirectory:1' . "\r\n" . "\r\n";
|
||||
$buf = $strHeader . $serviceCD;
|
||||
self::udpSend($buf, $delay, $host, $port);
|
||||
}
|
||||
|
|
|
@ -534,7 +534,7 @@ class User extends database_object
|
|||
$username = Dba::escape($this->username);
|
||||
|
||||
$sql = "SELECT `id`,`ip` FROM `session` WHERE `username`='$username'" .
|
||||
" AND `expire` > ". time();
|
||||
" AND `expire` > " . time();
|
||||
$db_results = Dba::read($sql);
|
||||
|
||||
if ($row = Dba::fetch_assoc($db_results)) {
|
||||
|
@ -831,7 +831,7 @@ class User extends database_object
|
|||
*/
|
||||
public function update_stats($media_type, $media_id, $agent = '', $location = array(), $noscrobble = false)
|
||||
{
|
||||
debug_event('user.class.php', 'Updating stats for {'.$media_type.'/'.$media_id.'} {'.$agent.'}...', 5);
|
||||
debug_event('user.class.php', 'Updating stats for {' . $media_type . '/' . $media_id . '} {' . $agent . '}...', 5);
|
||||
$media = new $media_type($media_id);
|
||||
$media->format();
|
||||
$user = $this->id;
|
||||
|
|
|
@ -118,7 +118,7 @@ class Userflag extends database_object
|
|||
return parent::get_from_cache($key, $this->id);
|
||||
}
|
||||
|
||||
$sql = "SELECT `id` FROM `user_flag` WHERE `user` = ? ".
|
||||
$sql = "SELECT `id` FROM `user_flag` WHERE `user` = ? " .
|
||||
"AND `object_id` = ? AND `object_type` = ?";
|
||||
$db_results = Dba::read($sql, array($user_id, $this->id, $this->type));
|
||||
|
||||
|
|
|
@ -91,7 +91,7 @@ class WebPlayer
|
|||
if ($transcode_cfg == 'always' || ($transcode_cfg != 'never' && in_array('transcode', $valid_types))) {
|
||||
// Transcode forced from client side
|
||||
if (!empty($force_type) && AmpConfig::get('transcode_player_customize')) {
|
||||
debug_event("webplayer.class.php", "Forcing type to {".$force_type."}", 5);
|
||||
debug_event("webplayer.class.php", "Forcing type to {" . $force_type . "}", 5);
|
||||
// Transcode only if excepted type available
|
||||
$transcode_settings = $media->get_transcode_settings($force_type, 'webplayer');
|
||||
if ($transcode_settings) {
|
||||
|
@ -158,7 +158,7 @@ class WebPlayer
|
|||
$types['player'] = $types['real'];
|
||||
}
|
||||
|
||||
debug_event("webplayer.class.php", "Types {".json_encode($types)."}", 5);
|
||||
debug_event("webplayer.class.php", "Types {" . json_encode($types) . "}", 5);
|
||||
return $types;
|
||||
}
|
||||
|
||||
|
@ -294,7 +294,7 @@ class WebPlayer
|
|||
$js['poster'] = $item->image_url;
|
||||
}
|
||||
|
||||
debug_event("webplayer.class.php", "Return get_media_js_param {".json_encode($js)."}", 5);
|
||||
debug_event("webplayer.class.php", "Return get_media_js_param {" . json_encode($js) . "}", 5);
|
||||
|
||||
return json_encode($js);
|
||||
}
|
||||
|
|
|
@ -456,11 +456,11 @@ class XML_Data
|
|||
'"><![CDATA[' . $song->get_artist_name() .
|
||||
"]]></artist>\n" .
|
||||
"\t<album id=\"" . $song->album .
|
||||
'"><![CDATA[' . $song->get_album_name().
|
||||
'"><![CDATA[' . $song->get_album_name() .
|
||||
"]]></album>\n";
|
||||
if ($song->albumartist) {
|
||||
$string .= "\t<albumartist id=\"" . $song->albumartist .
|
||||
"\"><![CDATA[" . $song->get_album_artist_name(). "]]></albumartist>\n";
|
||||
"\"><![CDATA[" . $song->get_album_artist_name() . "]]></albumartist>\n";
|
||||
}
|
||||
$string .= $tag_string .
|
||||
"\t<filename><![CDATA[" . $song->file . "]]></filename>\n" .
|
||||
|
@ -664,7 +664,7 @@ class XML_Data
|
|||
"\t\t<date>" . $shout->date . "</date>\n" .
|
||||
"\t\t<text><![CDATA[" . $shout->text . "]]></text>\n";
|
||||
if ($user->id) {
|
||||
$string .= "\t\t<username><![CDATA[" . $user->username ."]]></username>";
|
||||
$string .= "\t\t<username><![CDATA[" . $user->username . "]]></username>";
|
||||
}
|
||||
$string .= "\t</shout>n";
|
||||
}
|
||||
|
@ -696,7 +696,7 @@ class XML_Data
|
|||
"\t\t<object_id>" . $activity->object_id . "</object_id>\n" .
|
||||
"\t\t<action><![CDATA[" . $shout->text . "]]></action>\n";
|
||||
if ($user->id) {
|
||||
$string .= "\t\t<username><![CDATA[" . $user->username ."]]></username>";
|
||||
$string .= "\t\t<username><![CDATA[" . $user->username . "]]></username>";
|
||||
}
|
||||
$string .= "\t</activity>n";
|
||||
}
|
||||
|
@ -755,7 +755,7 @@ class XML_Data
|
|||
"<title>" . ($title ?: "Ampache XSPF Playlist") . "</title>\n" .
|
||||
"<creator>" . scrub_out(AmpConfig::get('site_title')) . "</creator>\n" .
|
||||
"<annotation>" . scrub_out(AmpConfig::get('site_title')) . "</annotation>\n" .
|
||||
"<info>". AmpConfig::get('web_path') ."</info>\n" .
|
||||
"<info>" . AmpConfig::get('web_path') . "</info>\n" .
|
||||
"<trackList>\n";
|
||||
break;
|
||||
case 'itunes':
|
||||
|
|
|
@ -387,14 +387,14 @@ function create_preference_input($name,$value)
|
|||
$plugin = new Plugin($plugin_name);
|
||||
$url = $plugin->_plugin->url;
|
||||
$api_key = rawurlencode(AmpConfig::get('lastfm_api_key'));
|
||||
$callback = rawurlencode(AmpConfig::get('web_path').'/preferences.php?tab=plugins&action=grant&plugin='.$plugin_name);
|
||||
echo "<a href='$url/api/auth/?api_key=$api_key&cb=$callback'>" . UI::get_icon('plugin', T_("Click for grant Ampache to ").$plugin_name).'</a>';
|
||||
$callback = rawurlencode(AmpConfig::get('web_path') . '/preferences.php?tab=plugins&action=grant&plugin=' . $plugin_name);
|
||||
echo "<a href='$url/api/auth/?api_key=$api_key&cb=$callback'>" . UI::get_icon('plugin', T_("Click for grant Ampache to ") . $plugin_name) . '</a>';
|
||||
break;
|
||||
default:
|
||||
if (preg_match('/_pass$/', $name)) {
|
||||
echo '<input type="password" name="' . $name . '" value="******" />';
|
||||
} else {
|
||||
echo '<input type="text" name="' . $name . '" value="' . $value .'" />';
|
||||
echo '<input type="text" name="' . $name . '" value="' . $value . '" />';
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
|
@ -647,11 +647,11 @@ function xml_get_header($type)
|
|||
case 'xspf':
|
||||
$header = "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n" .
|
||||
"<!-- XML Generated by Ampache v." . AmpConfig::get('version') . " -->";
|
||||
"<playlist version = \"1\" xmlns=\"http://xspf.org/ns/0/\">\n ".
|
||||
"<playlist version = \"1\" xmlns=\"http://xspf.org/ns/0/\">\n " .
|
||||
"<title>Ampache XSPF Playlist</title>\n" .
|
||||
"<creator>" . AmpConfig::get('site_title') . "</creator>\n" .
|
||||
"<annotation>" . AmpConfig::get('site_title') . "</annotation>\n" .
|
||||
"<info>". AmpConfig::get('web_path') ."</info>\n" .
|
||||
"<info>" . AmpConfig::get('web_path') . "</info>\n" .
|
||||
"<trackList>\n\n\n\n";
|
||||
return $header;
|
||||
default:
|
||||
|
|
|
@ -96,7 +96,7 @@ class Catalog_dropbox extends Catalog
|
|||
*/
|
||||
public function install()
|
||||
{
|
||||
$sql = "CREATE TABLE `catalog_dropbox` (`id` INT( 11 ) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY , ".
|
||||
$sql = "CREATE TABLE `catalog_dropbox` (`id` INT( 11 ) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY , " .
|
||||
"`apikey` VARCHAR( 255 ) COLLATE utf8_unicode_ci NOT NULL , " .
|
||||
"`secret` VARCHAR( 255 ) COLLATE utf8_unicode_ci NOT NULL , " .
|
||||
"`path` VARCHAR( 255 ) COLLATE utf8_unicode_ci NOT NULL , " .
|
||||
|
@ -214,7 +214,7 @@ class Catalog_dropbox extends Catalog
|
|||
echo "<form action='" . get_current_path() . "' method='post' enctype='multipart/form-data'>";
|
||||
if ($_REQUEST['action']) {
|
||||
echo "<input type='hidden' name='action' value='" . scrub_in($_REQUEST['action']) . "' />";
|
||||
echo "<input type='hidden' name='catalogs[]' value='". $this->id ."' />";
|
||||
echo "<input type='hidden' name='catalogs[]' value='" . $this->id . "' />";
|
||||
}
|
||||
echo "<input type='hidden' name='perform_ready' value='true' />";
|
||||
echo "<input type='text' name='authcode' /> ";
|
||||
|
|
|
@ -90,7 +90,7 @@ class Catalog_local extends Catalog
|
|||
*/
|
||||
public function install()
|
||||
{
|
||||
$sql = "CREATE TABLE `catalog_local` (`id` INT( 11 ) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY , ".
|
||||
$sql = "CREATE TABLE `catalog_local` (`id` INT( 11 ) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY , " .
|
||||
"`path` VARCHAR( 255 ) COLLATE utf8_unicode_ci NOT NULL , " .
|
||||
"`catalog_id` INT( 11 ) NOT NULL" .
|
||||
") ENGINE = MYISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci";
|
||||
|
@ -259,7 +259,7 @@ class Catalog_local extends Catalog
|
|||
debug_event('Memory', UI::format_bytes(memory_get_usage(true)), 5);
|
||||
|
||||
/* Create the new path */
|
||||
$full_file = $path.$slash_type.$file;
|
||||
$full_file = $path . $slash_type . $file;
|
||||
$this->add_file($full_file, $options);
|
||||
} // end while reading directory
|
||||
|
||||
|
|
|
@ -86,7 +86,7 @@ class Catalog_remote extends Catalog
|
|||
*/
|
||||
public function install()
|
||||
{
|
||||
$sql = "CREATE TABLE `catalog_remote` (`id` INT( 11 ) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY , ".
|
||||
$sql = "CREATE TABLE `catalog_remote` (`id` INT( 11 ) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY , " .
|
||||
"`uri` VARCHAR( 255 ) COLLATE utf8_unicode_ci NOT NULL , " .
|
||||
"`username` VARCHAR( 255 ) COLLATE utf8_unicode_ci NOT NULL , " .
|
||||
"`password` VARCHAR( 255 ) COLLATE utf8_unicode_ci NOT NULL , " .
|
||||
|
|
|
@ -90,7 +90,7 @@ class Catalog_soundcloud extends Catalog
|
|||
*/
|
||||
public function install()
|
||||
{
|
||||
$sql = "CREATE TABLE `catalog_soundcloud` (`id` INT( 11 ) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY , ".
|
||||
$sql = "CREATE TABLE `catalog_soundcloud` (`id` INT( 11 ) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY , " .
|
||||
"`userid` VARCHAR( 255 ) COLLATE utf8_unicode_ci NOT NULL , " .
|
||||
"`secret` VARCHAR( 255 ) COLLATE utf8_unicode_ci NOT NULL , " .
|
||||
"`authtoken` VARCHAR( 255 ) COLLATE utf8_unicode_ci NULL , " .
|
||||
|
@ -195,7 +195,7 @@ class Catalog_soundcloud extends Catalog
|
|||
echo "<form action='" . get_current_path() . "' method='post' enctype='multipart/form-data'>";
|
||||
if ($_REQUEST['action']) {
|
||||
echo "<input type='hidden' name='action' value='" . scrub_in($_REQUEST['action']) . "' />";
|
||||
echo "<input type='hidden' name='catalogs[]' value='". $this->id ."' />";
|
||||
echo "<input type='hidden' name='catalogs[]' value='" . $this->id . "' />";
|
||||
}
|
||||
echo "<input type='hidden' name='perform_ready' value='true' />";
|
||||
echo "<input type='text' name='authcode' />";
|
||||
|
|
|
@ -86,7 +86,7 @@ class Catalog_subsonic extends Catalog
|
|||
*/
|
||||
public function install()
|
||||
{
|
||||
$sql = "CREATE TABLE `catalog_subsonic` (`id` INT( 11 ) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY , ".
|
||||
$sql = "CREATE TABLE `catalog_subsonic` (`id` INT( 11 ) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY , " .
|
||||
"`uri` VARCHAR( 255 ) COLLATE utf8_unicode_ci NOT NULL , " .
|
||||
"`username` VARCHAR( 255 ) COLLATE utf8_unicode_ci NOT NULL , " .
|
||||
"`password` VARCHAR( 255 ) COLLATE utf8_unicode_ci NOT NULL , " .
|
||||
|
|
|
@ -125,7 +125,7 @@ class SubsonicClient
|
|||
}
|
||||
if (empty($protocol)) {
|
||||
if (!preg_match("/^http\:\/\//", $server)) {
|
||||
$server = "http://". $server;
|
||||
$server = "http://" . $server;
|
||||
}
|
||||
$protocol = "http://";
|
||||
}
|
||||
|
@ -154,7 +154,7 @@ class SubsonicClient
|
|||
|
||||
protected function error($error, $data=null)
|
||||
{
|
||||
error_log($error ."\n". print_r($data, true));
|
||||
error_log($error . "\n" . print_r($data, true));
|
||||
return (object) array("success"=>false, "error"=>$error, "data"=>$data);
|
||||
}
|
||||
|
||||
|
|
|
@ -84,7 +84,7 @@ class AmpacheHttpq extends localplay_controller
|
|||
*/
|
||||
public function install()
|
||||
{
|
||||
$sql = "CREATE TABLE `localplay_httpq` (`id` INT( 11 ) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY , ".
|
||||
$sql = "CREATE TABLE `localplay_httpq` (`id` INT( 11 ) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY , " .
|
||||
"`name` VARCHAR( 128 ) COLLATE utf8_unicode_ci NOT NULL , " .
|
||||
"`owner` INT( 11 ) NOT NULL, " .
|
||||
"`host` VARCHAR( 255 ) COLLATE utf8_unicode_ci NOT NULL , " .
|
||||
|
|
|
@ -524,7 +524,7 @@ class AmpacheMpd extends localplay_controller
|
|||
|
||||
$url_data = $this->parse_url($playlist_item['file']);
|
||||
|
||||
debug_event('mdp.controller.php', 'Status result. Current song ('. $track . ') info: ' . json_encode($playlist_item), '5');
|
||||
debug_event('mdp.controller.php', 'Status result. Current song (' . $track . ') info: ' . json_encode($playlist_item), '5');
|
||||
|
||||
if (count($url_data) > 0 && !empty($url_data['oid'])) {
|
||||
$song = new Song($url_data['oid']);
|
||||
|
|
|
@ -85,7 +85,7 @@ class AmpacheUPnP extends localplay_controller
|
|||
*/
|
||||
public function install()
|
||||
{
|
||||
$sql = "CREATE TABLE `localplay_upnp` (`id` INT( 11 ) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY , ".
|
||||
$sql = "CREATE TABLE `localplay_upnp` (`id` INT( 11 ) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY , " .
|
||||
"`name` VARCHAR( 128 ) COLLATE utf8_unicode_ci NOT NULL , " .
|
||||
"`owner` INT( 11 ) NOT NULL, " .
|
||||
"`url` VARCHAR( 255 ) COLLATE utf8_unicode_ci NOT NULL " .
|
||||
|
|
|
@ -77,7 +77,7 @@ class UPnPDevice
|
|||
$body .='<s:Envelope s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body>';
|
||||
$body .=' <u:' . $method . ' xmlns:u="urn:schemas-upnp-org:service:' . $type . ':1">';
|
||||
foreach ( $arguments as $arg=>$value ) {
|
||||
$body .=' <'.$arg.'>'.$value.'</'.$arg.'>';
|
||||
$body .=' <' . $arg . '>' . $value . '</' . $arg . '>';
|
||||
}
|
||||
$body .=' </u:' . $method . '>';
|
||||
$body .='</s:Body></s:Envelope>';
|
||||
|
|
|
@ -84,7 +84,7 @@ class AmpacheVlc extends localplay_controller
|
|||
*/
|
||||
public function install()
|
||||
{
|
||||
$sql = "CREATE TABLE `localplay_vlc` (`id` INT( 11 ) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY , ".
|
||||
$sql = "CREATE TABLE `localplay_vlc` (`id` INT( 11 ) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY , " .
|
||||
"`name` VARCHAR( 128 ) COLLATE utf8_unicode_ci NOT NULL , " .
|
||||
"`owner` INT( 11 ) NOT NULL, " .
|
||||
"`host` VARCHAR( 255 ) COLLATE utf8_unicode_ci NOT NULL , " .
|
||||
|
|
|
@ -484,64 +484,64 @@ class VlcPlayer
|
|||
if (!is_array($current) or (!in_array($tag, array_keys($current)))) { //Insert New tag
|
||||
$current[$tag] = $result;
|
||||
if ($attributes_data) {
|
||||
$current[$tag. '_attr'] = $attributes_data;
|
||||
$current[$tag . '_attr'] = $attributes_data;
|
||||
}
|
||||
$repeated_tag_index[$tag.'_'.$level] = 1;
|
||||
$repeated_tag_index[$tag . '_' . $level] = 1;
|
||||
|
||||
$current = &$current[$tag];
|
||||
} else { //There was another element with the same tag name
|
||||
|
||||
if (isset($current[$tag][0])) {
|
||||
//If there is a 0th element it is already an array
|
||||
$current[$tag][$repeated_tag_index[$tag.'_'.$level]] = $result;
|
||||
$repeated_tag_index[$tag.'_'.$level]++;
|
||||
$current[$tag][$repeated_tag_index[$tag . '_' . $level]] = $result;
|
||||
$repeated_tag_index[$tag . '_' . $level]++;
|
||||
} else {
|
||||
//This section will make the value an array if multiple tags with the same name appear together
|
||||
$current[$tag] = array($current[$tag],$result);//This will combine the existing item and the new item together to make an array
|
||||
$repeated_tag_index[$tag.'_'.$level] = 2;
|
||||
$repeated_tag_index[$tag . '_' . $level] = 2;
|
||||
|
||||
if (isset($current[$tag.'_attr'])) { //The attribute of the last(0th) tag must be moved as well
|
||||
$current[$tag]['0_attr'] = $current[$tag.'_attr'];
|
||||
unset($current[$tag.'_attr']);
|
||||
if (isset($current[$tag . '_attr'])) { //The attribute of the last(0th) tag must be moved as well
|
||||
$current[$tag]['0_attr'] = $current[$tag . '_attr'];
|
||||
unset($current[$tag . '_attr']);
|
||||
}
|
||||
}
|
||||
$last_item_index = $repeated_tag_index[$tag.'_'.$level]-1;
|
||||
$last_item_index = $repeated_tag_index[$tag . '_' . $level]-1;
|
||||
$current = &$current[$tag][$last_item_index];
|
||||
}
|
||||
} elseif ($type == "complete") { //Tags that ends in 1 line '<tag />'
|
||||
//See if the key is already taken.
|
||||
if (!isset($current[$tag])) { //New Key
|
||||
$current[$tag] = $result;
|
||||
$repeated_tag_index[$tag.'_'.$level] = 1;
|
||||
$repeated_tag_index[$tag . '_' . $level] = 1;
|
||||
if ($priority == 'tag' and $attributes_data) {
|
||||
$current[$tag. '_attr'] = $attributes_data;
|
||||
$current[$tag . '_attr'] = $attributes_data;
|
||||
}
|
||||
} else { //If taken, put all things inside a list(array)
|
||||
if (isset($current[$tag][0]) and is_array($current[$tag])) {
|
||||
//If it is already an array...
|
||||
|
||||
// ...push the new element into that array.
|
||||
$current[$tag][$repeated_tag_index[$tag.'_'.$level]] = $result;
|
||||
$current[$tag][$repeated_tag_index[$tag . '_' . $level]] = $result;
|
||||
|
||||
if ($priority == 'tag' and $get_attributes and $attributes_data) {
|
||||
$current[$tag][$repeated_tag_index[$tag.'_'.$level] . '_attr'] = $attributes_data;
|
||||
$current[$tag][$repeated_tag_index[$tag . '_' . $level] . '_attr'] = $attributes_data;
|
||||
}
|
||||
$repeated_tag_index[$tag.'_'.$level]++;
|
||||
$repeated_tag_index[$tag . '_' . $level]++;
|
||||
} else { //If it is not an array...
|
||||
$current[$tag] = array($current[$tag],$result); //...Make it an array using using the existing value and the new value
|
||||
$repeated_tag_index[$tag.'_'.$level] = 1;
|
||||
$repeated_tag_index[$tag . '_' . $level] = 1;
|
||||
if ($priority == 'tag' and $get_attributes) {
|
||||
if (isset($current[$tag.'_attr'])) { //The attribute of the last(0th) tag must be moved as well
|
||||
if (isset($current[$tag . '_attr'])) { //The attribute of the last(0th) tag must be moved as well
|
||||
|
||||
$current[$tag]['0_attr'] = $current[$tag.'_attr'];
|
||||
unset($current[$tag.'_attr']);
|
||||
$current[$tag]['0_attr'] = $current[$tag . '_attr'];
|
||||
unset($current[$tag . '_attr']);
|
||||
}
|
||||
|
||||
if ($attributes_data) {
|
||||
$current[$tag][$repeated_tag_index[$tag.'_'.$level] . '_attr'] = $attributes_data;
|
||||
$current[$tag][$repeated_tag_index[$tag . '_' . $level] . '_attr'] = $attributes_data;
|
||||
}
|
||||
}
|
||||
$repeated_tag_index[$tag.'_'.$level]++; //0 and 1 index is already taken
|
||||
$repeated_tag_index[$tag . '_' . $level]++; //0 and 1 index is already taken
|
||||
}
|
||||
}
|
||||
} elseif ($type == 'close') { //End of tag '</tag>'
|
||||
|
|
|
@ -90,7 +90,7 @@ class AmpacheXbmc extends localplay_controller
|
|||
*/
|
||||
public function install()
|
||||
{
|
||||
$sql = "CREATE TABLE `localplay_xbmc` (`id` INT( 11 ) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY , ".
|
||||
$sql = "CREATE TABLE `localplay_xbmc` (`id` INT( 11 ) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY , " .
|
||||
"`name` VARCHAR( 128 ) COLLATE utf8_unicode_ci NOT NULL , " .
|
||||
"`owner` INT( 11 ) NOT NULL, " .
|
||||
"`host` VARCHAR( 255 ) COLLATE utf8_unicode_ci NOT NULL , " .
|
||||
|
|
|
@ -117,7 +117,7 @@ class AmpacheCatalogFavorites
|
|||
echo Ajax::button('?action=basket&type=' . $userflag['type'] . '&id=' . $userflag['id'],'add', T_('Add to temporary playlist'),'play_full_' . $userflag['id']);
|
||||
echo '</span>';
|
||||
echo '</div>';
|
||||
echo '<div style="float: right; opacity: 0.5;">' . T_('recommended by') . ' '. $user->f_link . '</div>';
|
||||
echo '<div style="float: right; opacity: 0.5;">' . T_('recommended by') . ' ' . $user->f_link . '</div>';
|
||||
|
||||
echo '</div><br />';
|
||||
|
||||
|
@ -126,7 +126,7 @@ class AmpacheCatalogFavorites
|
|||
$item->display_art(2);
|
||||
echo '</div>';
|
||||
|
||||
echo '<div style="white-space: normal;">'. $item->get_description() .'</div>';
|
||||
echo '<div style="white-space: normal;">' . $item->get_description() . '</div>';
|
||||
echo '</div>';
|
||||
|
||||
echo '</td></tr>';
|
||||
|
|
|
@ -93,7 +93,7 @@ class AmpacheGoogleAnalytics
|
|||
echo "(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),\n";
|
||||
echo "m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)\n";
|
||||
echo "})(window,document,'script','//www.google-analytics.com/analytics.js','ga');\n";
|
||||
echo "ga('create', '" . scrub_out($this->tracking_id) ."', 'auto');\n";
|
||||
echo "ga('create', '" . scrub_out($this->tracking_id) . "', 'auto');\n";
|
||||
echo "ga('send', 'pageview');\n";
|
||||
echo "</script>\n";
|
||||
}
|
||||
|
|
|
@ -46,7 +46,7 @@ class AmpacheLastfm
|
|||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->url = $this->scheme.'://'.$this->host;
|
||||
$this->url = $this->scheme . '://' . $this->host;
|
||||
return true;
|
||||
} // constructor
|
||||
|
||||
|
@ -203,7 +203,7 @@ class AmpacheLastfm
|
|||
public function load($user)
|
||||
{
|
||||
$this->api_key=AmpConfig::get('lastfm_api_key');
|
||||
$this->secret=AmpConfig::get('lastfm_api_secret');
|
||||
$this->secret =AmpConfig::get('lastfm_api_secret');
|
||||
$user->set_preferences();
|
||||
$data = $user->prefs;
|
||||
$this->user_id = $user->id;
|
||||
|
|
|
@ -46,7 +46,7 @@ class Ampachelibrefm
|
|||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->url = $this->scheme.'://'.$this->host;
|
||||
$this->url = $this->scheme . '://' . $this->host;
|
||||
return true;
|
||||
} // constructor
|
||||
|
||||
|
@ -204,7 +204,7 @@ class Ampachelibrefm
|
|||
public function load($user)
|
||||
{
|
||||
$this->api_key=AmpConfig::get('lastfm_api_key');
|
||||
$this->secret='';
|
||||
$this->secret ='';
|
||||
$user->set_preferences();
|
||||
$data = $user->prefs;
|
||||
$this->user_id = $user->id;
|
||||
|
|
|
@ -96,7 +96,7 @@ class AmpachePiwik
|
|||
echo "<script type='text/javascript'>\n";
|
||||
echo "var _paq = _paq || [];\n";
|
||||
//echo "_paq.push(['trackPageView']);\n"; // Doesn't work when using Ajax page loading
|
||||
echo "_paq.push(['trackLink', '" . $currentUrl ."', 'link']);\n";
|
||||
echo "_paq.push(['trackLink', '" . $currentUrl . "', 'link']);\n";
|
||||
echo "_paq.push(['enableLinkTracking']);\n";
|
||||
echo "(function() {\n";
|
||||
echo "var u='" . scrub_out($this->piwik_url) . "';\n";
|
||||
|
|
|
@ -106,7 +106,7 @@ class AmpacheRSSView
|
|||
if (isset($item->image)) {
|
||||
echo '<div style="float: left; margin-right: 20px;"><img src="' . $item->image . '" style="width: auto; max-height: 48px;" /></div>';
|
||||
}
|
||||
echo '<div>'. $item->description .'</div>';
|
||||
echo '<div>' . $item->description . '</div>';
|
||||
echo '</div>';
|
||||
echo '</td></tr>';
|
||||
|
||||
|
|
|
@ -81,7 +81,7 @@ if (!$type) {
|
|||
$type = 'song';
|
||||
}
|
||||
|
||||
debug_event('play', 'Asked for type {'.$type."}", 5);
|
||||
debug_event('play', 'Asked for type {' . $type . "}", 5);
|
||||
|
||||
if ($type == 'playlist') {
|
||||
$playlist_type = scrub_in($_REQUEST['playlist_type']);
|
||||
|
@ -201,7 +201,7 @@ if (!$share_id) {
|
|||
|
||||
/* If we are in demo mode.. die here */
|
||||
if (AmpConfig::get('demo_mode') || (!Access::check('interface','25') )) {
|
||||
debug_event('UI::access_denied', "Streaming Access Denied:" .AmpConfig::get('demo_mode') . "is the value of demo_mode. Current user level is " . $GLOBALS['user']->access,'3');
|
||||
debug_event('UI::access_denied', "Streaming Access Denied:" . AmpConfig::get('demo_mode') . "is the value of demo_mode. Current user level is " . $GLOBALS['user']->access,'3');
|
||||
UI::access_denied();
|
||||
exit;
|
||||
}
|
||||
|
@ -433,8 +433,8 @@ if (AmpConfig::get('downsample_remote')) {
|
|||
}
|
||||
}
|
||||
|
||||
debug_event('play', 'Playing file ('.$media->file.'}...', 5);
|
||||
debug_event('play', 'Media type {'.$media->type.'}', 5);
|
||||
debug_event('play', 'Playing file (' . $media->file . '}...', 5);
|
||||
debug_event('play', 'Media type {' . $media->type . '}', 5);
|
||||
|
||||
$cpaction = $_REQUEST['custom_play_action'];
|
||||
// Determine whether to transcode
|
||||
|
@ -442,8 +442,8 @@ $transcode = false;
|
|||
// transcode_to should only have an effect if the media is the wrong format
|
||||
$transcode_to = $transcode_to == $media->type ? null : $transcode_to;
|
||||
|
||||
debug_event('play', 'Custom play action {'.$cpaction.'}', 5);
|
||||
debug_event('play', 'Transcode to {'.$transcode_to.'}', 5);
|
||||
debug_event('play', 'Custom play action {' . $cpaction . '}', 5);
|
||||
debug_event('play', 'Transcode to {' . $transcode_to . '}', 5);
|
||||
|
||||
// If custom play action, do not try to transcode
|
||||
if (!$cpaction) {
|
||||
|
@ -483,7 +483,7 @@ if (!$cpaction) {
|
|||
}
|
||||
} else {
|
||||
if ($transcode_cfg != 'never') {
|
||||
debug_event('play', 'Transcoding is not enabled for this media type. Valid types: {'.json_encode($valid_types).'}', 5);
|
||||
debug_event('play', 'Transcoding is not enabled for this media type. Valid types: {' . json_encode($valid_types) . '}', 5);
|
||||
} else {
|
||||
debug_event('play', 'Transcode disabled in user settings.', 5);
|
||||
}
|
||||
|
@ -611,7 +611,7 @@ if (!isset($_REQUEST['segment'])) {
|
|||
} else {
|
||||
if (!$share_id) {
|
||||
if ($_SERVER['REQUEST_METHOD'] != 'HEAD') {
|
||||
debug_event('play', 'Registering stream stats for {'.$media->get_stream_name() .'}...', 5);
|
||||
debug_event('play', 'Registering stream stats for {' . $media->get_stream_name() . '}...', 5);
|
||||
$sessionkey = $sid ?: Stream::get_session();
|
||||
$agent = Session::agent($sessionkey);
|
||||
$location = Session::get_geolocation($sessionkey);
|
||||
|
|
|
@ -101,7 +101,7 @@ switch ($_REQUEST['action']) {
|
|||
// Retrieving final song order from url
|
||||
foreach ($_GET as $key => $data) {
|
||||
$_GET[$key] = unhtmlentities(scrub_in($data));
|
||||
debug_event('playlist', $key.'='.$_GET[$key], '5');
|
||||
debug_event('playlist', $key . '=' . $_GET[$key], '5');
|
||||
}
|
||||
|
||||
if (isset($_GET['order'])) {
|
||||
|
|
|
@ -42,7 +42,7 @@ $clientPlatform = $headers['X-Plex-Client-Platform'];
|
|||
$version = $headers['X-Plex-Version'];
|
||||
$language = $headers['X-Plex-Language'];
|
||||
$clientFeatures = $headers['X-Plex-Client-Capabilities'];*/
|
||||
debug_event('plex', 'Request headers: '. print_r($headers, true), '5');
|
||||
debug_event('plex', 'Request headers: ' . print_r($headers, true), '5');
|
||||
|
||||
// Get the list of possible methods for the Plex API
|
||||
$methods = get_class_methods('plex_api');
|
||||
|
|
|
@ -90,7 +90,7 @@ switch ($_REQUEST['action']) {
|
|||
UI::access_denied();
|
||||
exit;
|
||||
}
|
||||
$fullname= T_('Server');
|
||||
$fullname = T_('Server');
|
||||
$preferences = $GLOBALS['user']->get_preferences($_REQUEST['tab'], true);
|
||||
break;
|
||||
case 'user':
|
||||
|
@ -160,11 +160,11 @@ switch ($_REQUEST['action']) {
|
|||
$plugin->load($GLOBALS['user']);
|
||||
if ($plugin->_plugin->get_session($GLOBALS['user']->id, $_REQUEST['token'])) {
|
||||
$title = T_('Updated');
|
||||
$text = T_('Your Account has been updated').' : '.$_REQUEST['plugin'];
|
||||
$text = T_('Your Account has been updated') . ' : ' . $_REQUEST['plugin'];
|
||||
$next_url = AmpConfig::get('web_path') . '/preferences.php?tab=plugins';
|
||||
} else {
|
||||
$title = T_('Error');
|
||||
$text = T_('Your Account has not been updated').' : '.$_REQUEST['plugin'];
|
||||
$text = T_('Your Account has not been updated') . ' : ' . $_REQUEST['plugin'];
|
||||
$next_url = AmpConfig::get('web_path') . '/preferences.php?tab=plugins';
|
||||
}
|
||||
}
|
||||
|
|
|
@ -98,7 +98,7 @@ switch ($action) {
|
|||
show_confirmation(
|
||||
T_('Message Deletion'),
|
||||
T_('Are you sure you want to permanently delete the selected messages?'),
|
||||
AmpConfig::get('web_path')."/pvmsg.php?action=confirm_delete&msgs=" . $msgs,
|
||||
AmpConfig::get('web_path') . "/pvmsg.php?action=confirm_delete&msgs=" . $msgs,
|
||||
1,
|
||||
'delete_message'
|
||||
);
|
||||
|
|
|
@ -14,7 +14,7 @@ fi
|
|||
|
||||
PHPCSFIXERARGS="fix -v --fixers="
|
||||
# Mandatory fix
|
||||
FIXERS1="indentation,linefeed,trailing_spaces,short_tag,braces,controls_spaces,eof_ending,visibility"
|
||||
FIXERS1="indentation,linefeed,trailing_spaces,short_tag,braces,controls_spaces,eof_ending,visibility,align_equals,concat_with_spaces"
|
||||
# Optionnal fix & false positive
|
||||
#FIXERS2="visibility"
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ xoutput_headers();
|
|||
|
||||
$page = isset($_REQUEST['page']) ? $_REQUEST['page'] : null;
|
||||
|
||||
debug_event('ajax.server.php', 'Called for page: {'.$page.'}', '5');
|
||||
debug_event('ajax.server.php', 'Called for page: {' . $page . '}', '5');
|
||||
|
||||
switch ($page) {
|
||||
case 'stats':
|
||||
|
|
|
@ -39,7 +39,7 @@ if (isset($_REQUEST['browse_id'])) {
|
|||
$browse_id = null;
|
||||
}
|
||||
|
||||
debug_event('browse.ajax.php', 'Called for action: {'.$_REQUEST['action'].'}', '5');
|
||||
debug_event('browse.ajax.php', 'Called for action: {' . $_REQUEST['action'] . '}', '5');
|
||||
|
||||
$browse = new Browse($browse_id);
|
||||
|
||||
|
|
|
@ -62,7 +62,7 @@ switch ($_REQUEST['action']) {
|
|||
}
|
||||
|
||||
$_SESSION['iframe']['target'] = AmpConfig::get('web_path') . '/stream.php?action=democratic&democratic_id=' . scrub_out($_REQUEST['democratic_id']);
|
||||
$results['rfc3514'] = '<script type="text/javascript">' . Core::get_reloadutil() . '("'.$_SESSION['iframe']['target'].'")</script>';
|
||||
$results['rfc3514'] = '<script type="text/javascript">' . Core::get_reloadutil() . '("' . $_SESSION['iframe']['target'] . '")</script>';
|
||||
break;
|
||||
case 'clear_playlist':
|
||||
if (!Access::check('interface','100')) {
|
||||
|
|
|
@ -31,7 +31,7 @@ require_once '../lib/init.php';
|
|||
|
||||
$results = '';
|
||||
|
||||
debug_event('edit.server.php', 'Called for action: {'.$_REQUEST['action'].'}', '5');
|
||||
debug_event('edit.server.php', 'Called for action: {' . $_REQUEST['action'] . '}', '5');
|
||||
|
||||
// Post first
|
||||
$type = $_POST['type'];
|
||||
|
|
|
@ -44,7 +44,7 @@ class fs
|
|||
}
|
||||
if ($this->base && strlen($this->base)) {
|
||||
if (strpos($temp, $this->base) !== 0) {
|
||||
throw new Exception('Path is not inside base ('.$this->base.'): ' . $temp);
|
||||
throw new Exception('Path is not inside base (' . $this->base . '): ' . $temp);
|
||||
}
|
||||
}
|
||||
return $temp;
|
||||
|
@ -143,7 +143,7 @@ class fs
|
|||
$dat['content'] = 'data:'.finfo_file(finfo_open(FILEINFO_MIME_TYPE), $dir).';base64,'.base64_encode(file_get_contents($dir));
|
||||
break;*/
|
||||
default:
|
||||
$dat['content'] = 'File not recognized: '.$this->id($dir);
|
||||
$dat['content'] = 'File not recognized: ' . $this->id($dir);
|
||||
break;
|
||||
}
|
||||
return $dat;
|
||||
|
|
|
@ -53,7 +53,7 @@ switch ($_REQUEST['action']) {
|
|||
case 'append_item':
|
||||
// Only song item are supported with playlists
|
||||
|
||||
debug_event('playlist', 'Appending items to playlist {'.$_REQUEST['playlist_id'].'}...', '5');
|
||||
debug_event('playlist', 'Appending items to playlist {' . $_REQUEST['playlist_id'] . '}...', '5');
|
||||
|
||||
if (!isset($_REQUEST['playlist_id']) || empty($_REQUEST['playlist_id'])) {
|
||||
if (!Access::check('interface','25')) {
|
||||
|
@ -87,7 +87,7 @@ switch ($_REQUEST['action']) {
|
|||
}
|
||||
break;
|
||||
case 'album':
|
||||
debug_event('playlist', 'Adding all songs of album(s) {'.$item_id.'}...', '5');
|
||||
debug_event('playlist', 'Adding all songs of album(s) {' . $item_id . '}...', '5');
|
||||
$albums_array = explode(',', $item_id);
|
||||
foreach ($albums_array as $a) {
|
||||
$album = new Album($a);
|
||||
|
@ -98,13 +98,13 @@ switch ($_REQUEST['action']) {
|
|||
}
|
||||
break;
|
||||
case 'artist':
|
||||
debug_event('playlist', 'Adding all songs of artist {'.$item_id.'}...', '5');
|
||||
debug_event('playlist', 'Adding all songs of artist {' . $item_id . '}...', '5');
|
||||
$artist = new Artist($item_id);
|
||||
$songs[] = $artist->get_songs();
|
||||
break;
|
||||
case 'song_preview':
|
||||
case 'song':
|
||||
debug_event('playlist', 'Adding song {'.$item_id.'}...', '5');
|
||||
debug_event('playlist', 'Adding song {' . $item_id . '}...', '5');
|
||||
$songs = explode(',', $item_id);
|
||||
break;
|
||||
case 'playlist':
|
||||
|
|
|
@ -24,7 +24,7 @@ define('AJAX_INCLUDE','1');
|
|||
|
||||
require_once '../lib/init.php';
|
||||
|
||||
debug_event('refresh_reordered.server.php', 'Called for action: {'.$_REQUEST['action'].'}', '5');
|
||||
debug_event('refresh_reordered.server.php', 'Called for action: {' . $_REQUEST['action'] . '}', '5');
|
||||
|
||||
/* Switch on the action passed in */
|
||||
switch ($_REQUEST['action']) {
|
||||
|
|
|
@ -59,7 +59,7 @@ switch ($_REQUEST['action']) {
|
|||
$shout = new Shoutbox($id);
|
||||
$shout->format();
|
||||
$key = intval($shout->data);
|
||||
echo "if (shouts['" . $key. "'] == undefined) { shouts['" . $key . "'] = new Array(); }\r\n";
|
||||
echo "if (shouts['" . $key . "'] == undefined) { shouts['" . $key . "'] = new Array(); }\r\n";
|
||||
echo "shouts['" . $key . "'].push('" . addslashes($shout->get_display(false)) . "');\r\n";
|
||||
echo "$('.waveform-shouts').append('<div style=\'position:absolute; width: 3px; height: 3px; background-color: #2E2EFE; top: 15px; left: " . ((($shout->data / $media->time) * 400) - 1) . "px;\' />');\r\n";
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ if (!defined('AJAX_INCLUDE')) {
|
|||
exit;
|
||||
}
|
||||
|
||||
debug_event('stream.ajax.php', 'Called for action {'.$_REQUEST['action'].'}', 5);
|
||||
debug_event('stream.ajax.php', 'Called for action {' . $_REQUEST['action'] . '}', 5);
|
||||
|
||||
$results = array();
|
||||
switch ($_REQUEST['action']) {
|
||||
|
@ -75,7 +75,7 @@ switch ($_REQUEST['action']) {
|
|||
break;
|
||||
case 'directplay':
|
||||
|
||||
debug_event('stream.ajax.php', 'Play type {'.$_REQUEST['playtype'].'}', 5);
|
||||
debug_event('stream.ajax.php', 'Play type {' . $_REQUEST['playtype'] . '}', 5);
|
||||
$object_type = $_REQUEST['object_type'];
|
||||
$object_id = $_REQUEST['object_id'];
|
||||
if (is_array($object_id)) {
|
||||
|
@ -100,7 +100,7 @@ switch ($_REQUEST['action']) {
|
|||
unset($_SESSION['iframe']['subtitle']);
|
||||
}
|
||||
}
|
||||
$results['rfc3514'] = '<script type="text/javascript">' . Core::get_reloadutil() . '(\''. AmpConfig::get('web_path') . '/util.php\');</script>';
|
||||
$results['rfc3514'] = '<script type="text/javascript">' . Core::get_reloadutil() . '(\'' . AmpConfig::get('web_path') . '/util.php\');</script>';
|
||||
}
|
||||
break;
|
||||
case 'basket':
|
||||
|
@ -115,7 +115,7 @@ switch ($_REQUEST['action']) {
|
|||
|
||||
// We need to set the basket up!
|
||||
$_SESSION['iframe']['target'] = AmpConfig::get('web_path') . '/stream.php?action=basket&playlist_method=' . scrub_out($_REQUEST['playlist_method']);
|
||||
$results['rfc3514'] = '<script type="text/javascript">' . Core::get_reloadutil() . '(\''. AmpConfig::get('web_path') . '/util.php\');</script>';
|
||||
$results['rfc3514'] = '<script type="text/javascript">' . Core::get_reloadutil() . '(\'' . AmpConfig::get('web_path') . '/util.php\');</script>';
|
||||
break;
|
||||
default:
|
||||
$results['rfc3514'] = '0x1';
|
||||
|
|
|
@ -76,7 +76,7 @@ switch ($action) {
|
|||
T_('You can now start sharing the following url:') . '<br />' .
|
||||
'<a href="' . $share->public_url . '" target="_blank">' . $share->public_url . '</a><br />' .
|
||||
'<div id="share_qrcode" style="text-align: center"></div>' .
|
||||
'<script language="javascript" type="text/javascript">$(\'#share_qrcode\').qrcode({text: "' . $share->public_url .'", width: 128, height: 128});</script>' .
|
||||
'<script language="javascript" type="text/javascript">$(\'#share_qrcode\').qrcode({text: "' . $share->public_url . '", width: 128, height: 128});</script>' .
|
||||
'<br /><br />' .
|
||||
T_('You can also embed this share as a web player into your website, with the following html code:') . '<br />' .
|
||||
'<i>' . htmlentities('<iframe style="width: 630px; height: 75px;" src="' . Share::get_url($share->id, $share->secret) . '&embed=true"></iframe>') . '</i><br />';
|
||||
|
|
|
@ -25,7 +25,7 @@ require_once 'lib/init.php';
|
|||
if (isset($_REQUEST['param_name'])) {
|
||||
$name = scrub_in($_REQUEST['param_name']);
|
||||
if (isset($_REQUEST[$name])) {
|
||||
echo $name . ": ". scrub_in($_REQUEST[$name]);
|
||||
echo $name . ": " . scrub_in($_REQUEST[$name]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
2
song.php
2
song.php
|
@ -35,7 +35,7 @@ switch ($_REQUEST['action']) {
|
|||
show_confirmation(
|
||||
T_('Song Deletion'),
|
||||
T_('Are you sure you want to permanently delete this song?'),
|
||||
AmpConfig::get('web_path')."/song.php?action=confirm_delete&song_id=" . $song_id,
|
||||
AmpConfig::get('web_path') . "/song.php?action=confirm_delete&song_id=" . $song_id,
|
||||
1,
|
||||
'delete_song'
|
||||
);
|
||||
|
|
|
@ -38,7 +38,7 @@ if (!defined('NO_SESSION')) {
|
|||
$media_ids = array();
|
||||
$web_path = AmpConfig::get('web_path');
|
||||
|
||||
debug_event("stream.php", "Asked for {".$_REQUEST['action']."}.", 5);
|
||||
debug_event("stream.php", "Asked for {" . $_REQUEST['action'] . "}.", 5);
|
||||
|
||||
/**
|
||||
* action switch
|
||||
|
@ -162,7 +162,7 @@ switch ($_REQUEST['action']) {
|
|||
break;
|
||||
}
|
||||
|
||||
debug_event('stream.php' , 'Stream Type: ' . $stream_type . ' Media IDs: '. json_encode($media_ids), 5);
|
||||
debug_event('stream.php' , 'Stream Type: ' . $stream_type . ' Media IDs: ' . json_encode($media_ids), 5);
|
||||
|
||||
if (count($media_ids) || isset($urls)) {
|
||||
if ($stream_type != 'democratic') {
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
$playlist->format();
|
||||
?>
|
||||
<li>
|
||||
<?php echo Ajax::text('?page=playlist&action=append_item&playlist_id='. $playlist->id, $playlist->f_name, 'rb_append_playlist_'.$playlist->id);
|
||||
<?php echo Ajax::text('?page=playlist&action=append_item&playlist_id=' . $playlist->id, $playlist->f_name, 'rb_append_playlist_' . $playlist->id);
|
||||
?>
|
||||
</li>
|
||||
<?php
|
||||
|
|
|
@ -145,11 +145,11 @@ if (AmpConfig::get('sociable') && $owner_id > 0) {
|
|||
?>
|
||||
</li>
|
||||
<li>
|
||||
<a id="<?php echo 'add_playlist_'.$album->id ?>" onclick="showPlaylistDialog(event, 'album', '<?php echo $album->id ?>')">
|
||||
<a id="<?php echo 'add_playlist_' . $album->id ?>" onclick="showPlaylistDialog(event, 'album', '<?php echo $album->id ?>')">
|
||||
<?php echo UI::get_icon('playlist_add', T_('Add to existing playlist'));
|
||||
?>
|
||||
</a>
|
||||
<a id="<?php echo 'add_playlist_'.$album->id ?>" onclick="showPlaylistDialog(event, 'album', '<?php echo $album->id ?>')">
|
||||
<a id="<?php echo 'add_playlist_' . $album->id ?>" onclick="showPlaylistDialog(event, 'album', '<?php echo $album->id ?>')">
|
||||
<?php echo T_('Add to existing playlist') ?>
|
||||
</a>
|
||||
</li>
|
||||
|
@ -251,11 +251,11 @@ if (AmpConfig::get('sociable') && $owner_id > 0) {
|
|||
}
|
||||
?>
|
||||
<li>
|
||||
<a id="<?php echo 'edit_album_'.$album->id ?>" onclick="showEditDialog('album_row', '<?php echo $album->id ?>', '<?php echo 'edit_album_'.$album->id ?>', '<?php echo T_('Album edit') ?>', '')">
|
||||
<a id="<?php echo 'edit_album_' . $album->id ?>" onclick="showEditDialog('album_row', '<?php echo $album->id ?>', '<?php echo 'edit_album_' . $album->id ?>', '<?php echo T_('Album edit') ?>', '')">
|
||||
<?php echo UI::get_icon('edit', T_('Edit'));
|
||||
?>
|
||||
</a>
|
||||
<a id="<?php echo 'edit_album_'.$album->id ?>" onclick="showEditDialog('album_row', '<?php echo $album->id ?>', '<?php echo 'edit_album_'.$album->id ?>', '<?php echo T_('Album edit') ?>', '')">
|
||||
<a id="<?php echo 'edit_album_' . $album->id ?>" onclick="showEditDialog('album_row', '<?php echo $album->id ?>', '<?php echo 'edit_album_' . $album->id ?>', '<?php echo T_('Album edit') ?>', '')">
|
||||
<?php echo T_('Edit Album');
|
||||
?>
|
||||
</a>
|
||||
|
@ -279,7 +279,7 @@ if (AmpConfig::get('sociable') && $owner_id > 0) {
|
|||
<?php if (Catalog::can_remove($album)) {
|
||||
?>
|
||||
<li>
|
||||
<a id="<?php echo 'delete_album_'.$album->id ?>" href="<?php echo AmpConfig::get('web_path');
|
||||
<a id="<?php echo 'delete_album_' . $album->id ?>" href="<?php echo AmpConfig::get('web_path');
|
||||
?>/albums.php?action=delete&album_id=<?php echo $album->id;
|
||||
?>">
|
||||
<?php echo UI::get_icon('delete', T_('Delete'));
|
||||
|
|
|
@ -191,7 +191,7 @@ if ($directplay_limit > 0) {
|
|||
<?php echo UI::get_icon('file_refresh', T_('Update from tags'));
|
||||
?>
|
||||
</a>
|
||||
<a id="<?php echo 'edit_album_'.$c_album->id ?>" onclick="showEditDialog('album_row', '<?php echo $c_album->id ?>', '<?php echo 'edit_album_'.$c_album->id ?>', '<?php echo T_('Album edit') ?>', '')">
|
||||
<a id="<?php echo 'edit_album_' . $c_album->id ?>" onclick="showEditDialog('album_row', '<?php echo $c_album->id ?>', '<?php echo 'edit_album_' . $c_album->id ?>', '<?php echo T_('Album edit') ?>', '')">
|
||||
<?php echo UI::get_icon('edit', T_('Edit'));
|
||||
?>
|
||||
</a>
|
||||
|
|
|
@ -23,26 +23,17 @@
|
|||
<td class="cel_play">
|
||||
<span class="cel_play_content"> </span>
|
||||
<div class="cel_play_hover">
|
||||
<?php if ($show_direct_play) {
|
||||
?>
|
||||
<?php echo Ajax::button('?page=stream&action=directplay&object_type=album&' . $libitem->get_http_album_query_ids('object_id'), 'play', T_('Play'), 'play_album_' . $libitem->id);
|
||||
?>
|
||||
<?php if (Stream_Playlist::check_autoplay_append()) {
|
||||
?>
|
||||
<?php echo Ajax::button('?page=stream&action=directplay&object_type=album&' . $libitem->get_http_album_query_ids('object_id') . '&append=true', 'play_add', T_('Play last'), 'addplay_album_' . $libitem->id);
|
||||
?>
|
||||
<?php
|
||||
}
|
||||
if ($show_direct_play) {
|
||||
echo Ajax::button('?page=stream&action=directplay&object_type=album&' . $libitem->get_http_album_query_ids('object_id'), 'play', T_('Play'), 'play_album_' . $libitem->id);
|
||||
if (Stream_Playlist::check_autoplay_append()) {
|
||||
echo Ajax::button('?page=stream&action=directplay&object_type=album&' . $libitem->get_http_album_query_ids('object_id') . '&append=true', 'play_add', T_('Play last'), 'addplay_album_' . $libitem->id);
|
||||
if (Stream_Playlist::check_autoplay_next()) {
|
||||
echo Ajax::button('?page=stream&action=directplay&object_type=album&object_id=' . $libitem->id . '&playnext=true', 'play_next', T_('Play next'), 'nextplay_album_' . $libitem->id);
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
<?php if (Stream_Playlist::check_autoplay_next()) {
|
||||
?>
|
||||
<?php echo Ajax::button('?page=stream&action=directplay&object_type=album&object_id=' . $libitem->id . '&playnext=true', 'play_next', T_('Play next'), 'nextplay_album_' . $libitem->id);
|
||||
?>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
} ?>
|
||||
</div>
|
||||
</td>
|
||||
<?php
|
||||
|
@ -59,23 +50,21 @@ if (Art::is_enabled()) {
|
|||
<td class="cel_album"><?php echo $libitem->f_link; ?></td>
|
||||
<td class="cel_add">
|
||||
<span class="cel_item_add">
|
||||
<?php if ($show_playlist_add) {
|
||||
?>
|
||||
<?php echo Ajax::button('?action=basket&type=album&' . $libitem->get_http_album_query_ids('id'), 'add', T_('Add to temporary playlist'), 'add_album_' . $libitem->id);
|
||||
?>
|
||||
<?php echo Ajax::button('?action=basket&type=album_random&' . $libitem->get_http_album_query_ids('id'), 'random', T_('Random to temporary playlist'), 'random_album_' . $libitem->id);
|
||||
<?php
|
||||
if ($show_playlist_add) {
|
||||
echo Ajax::button('?action=basket&type=album&' . $libitem->get_http_album_query_ids('id'), 'add', T_('Add to temporary playlist'), 'add_album_' . $libitem->id);
|
||||
echo Ajax::button('?action=basket&type=album_random&' . $libitem->get_http_album_query_ids('id'), 'random', T_('Random to temporary playlist'), 'random_album_' . $libitem->id);
|
||||
?>
|
||||
<a id="<?php echo 'add_playlist_'.$libitem->id ?>" onclick="showPlaylistDialog(event, 'album', '<?php if (!count($libitem->album_suite)) {
|
||||
echo $libitem->id;
|
||||
} else {
|
||||
} else {
|
||||
echo implode(',', $libitem->album_suite);
|
||||
}
|
||||
}
|
||||
?>')">
|
||||
<?php echo UI::get_icon('playlist_add', T_('Add to existing playlist'));
|
||||
?>
|
||||
<?php echo UI::get_icon('playlist_add', T_('Add to existing playlist')); ?>
|
||||
</a>
|
||||
<?php
|
||||
} ?>
|
||||
} ?>
|
||||
</span>
|
||||
</td>
|
||||
<td class="cel_artist"><?php echo (!empty($libitem->f_album_artist_link) ? $libitem->f_album_artist_link : $libitem->f_artist_link); ?></td>
|
||||
|
@ -83,87 +72,64 @@ if (Art::is_enabled()) {
|
|||
<td class="cel_year"><?php if ($libitem->year > 0) {
|
||||
echo $libitem->year;
|
||||
} ?></td>
|
||||
<?php if (AmpConfig::get('show_played_times')) {
|
||||
?>
|
||||
<td class="cel_counter"><?php echo $libitem->object_cnt;
|
||||
?></td>
|
||||
<?php
|
||||
} ?>
|
||||
if (AmpConfig::get('show_played_times')) { ?>
|
||||
<td class="cel_counter"><?php echo $libitem->object_cnt; ?></td>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<td class="cel_tags"><?php echo $libitem->f_tags; ?></td>
|
||||
<?php if (User::is_registered()) {
|
||||
?>
|
||||
<?php if (AmpConfig::get('ratings')) {
|
||||
?>
|
||||
<?php
|
||||
if (User::is_registered()) {
|
||||
if (AmpConfig::get('ratings')) { ?>
|
||||
<td class="cel_rating" id="rating_<?php echo $libitem->id;
|
||||
?>_album"><?php Rating::show($libitem->id, 'album');
|
||||
?></td>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<?php if (AmpConfig::get('userflags')) {
|
||||
?>
|
||||
}
|
||||
if (AmpConfig::get('userflags')) { ?>
|
||||
<td class="cel_userflag" id="userflag_<?php echo $libitem->id;
|
||||
?>_album"><?php Userflag::show($libitem->id, 'album');
|
||||
?></td>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
} ?>
|
||||
}
|
||||
}
|
||||
?>
|
||||
<td class="cel_action">
|
||||
<?php if (!AmpConfig::get('use_auth') || Access::check('interface','25')) {
|
||||
if (AmpConfig::get('sociable') && (!$libitem->allow_group_disks || ($libitem->allow_group_disks && !count($libitem->album_suite)))) {
|
||||
?>
|
||||
<?php if (AmpConfig::get('sociable') && (!$libitem->allow_group_disks || ($libitem->allow_group_disks && !count($libitem->album_suite)))) {
|
||||
?>
|
||||
<a href="<?php echo AmpConfig::get('web_path');
|
||||
?>/shout.php?action=show_add_shout&type=album&id=<?php echo $libitem->id;
|
||||
?>">
|
||||
<?php echo UI::get_icon('comment', T_('Post Shout'));
|
||||
?>
|
||||
<a href="<?php echo AmpConfig::get('web_path'); ?>/shout.php?action=show_add_shout&type=album&id=<?php echo $libitem->id; ?>">
|
||||
<?php echo UI::get_icon('comment', T_('Post Shout')); ?>
|
||||
</a>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<?php if (Access::check('interface','25')) {
|
||||
?>
|
||||
<?php if (AmpConfig::get('share') && (!$libitem->allow_group_disks || ($libitem->allow_group_disks && !count($libitem->album_suite)))) {
|
||||
?>
|
||||
<?php Share::display_ui('album', $libitem->id, false);
|
||||
?>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
} ?>
|
||||
<?php if (Access::check_function('batch_download') && check_can_zip('album')) {
|
||||
?>
|
||||
<a rel="nohtml" href="<?php echo AmpConfig::get('web_path');
|
||||
?>/batch.php?action=album&<?php echo $libitem->get_http_album_query_ids('id');
|
||||
?>">
|
||||
<?php echo UI::get_icon('batch_download', T_('Batch Download'));
|
||||
?>
|
||||
if (AmpConfig::get('share') && (!$libitem->allow_group_disks || ($libitem->allow_group_disks && !count($libitem->album_suite)))) {
|
||||
Share::display_ui('album', $libitem->id, false);
|
||||
|
||||
}
|
||||
if (AmpConfig::get('share') && (!$libitem->allow_group_disks || ($libitem->allow_group_disks && !count($libitem->album_suite)))) {
|
||||
Share::display_ui('album', $libitem->id, false);
|
||||
}
|
||||
}
|
||||
if (Access::check_function('batch_download') && check_can_zip('album')) { ?>
|
||||
<a rel="nohtml" href="<?php echo AmpConfig::get('web_path'); ?>
|
||||
/batch.php?action=album&<?php echo $libitem->get_http_album_query_ids('id'); ?>">
|
||||
<?php echo UI::get_icon('batch_download', T_('Batch Download')); ?>
|
||||
</a>
|
||||
<?php
|
||||
} ?>
|
||||
<?php if (Access::check('interface','50') && (!$libitem->allow_group_disks || ($libitem->allow_group_disks && !count($libitem->album_suite)))) {
|
||||
?>
|
||||
}
|
||||
if (Access::check('interface','50') && (!$libitem->allow_group_disks || ($libitem->allow_group_disks && !count($libitem->album_suite)))) { ?>
|
||||
<a id="<?php echo 'edit_album_'.$libitem->id ?>" onclick="showEditDialog('album_row', '<?php echo $libitem->id ?>', '<?php echo 'edit_album_'.$libitem->id ?>', '<?php echo T_('Album edit') ?>', 'album_')">
|
||||
<?php echo UI::get_icon('edit', T_('Edit'));
|
||||
?>
|
||||
<?php echo UI::get_icon('edit', T_('Edit')); ?>
|
||||
</a>
|
||||
<?php
|
||||
} ?>
|
||||
<?php if (Catalog::can_remove($libitem)) {
|
||||
?>
|
||||
<a id="<?php echo 'delete_album_'.$libitem->id ?>" href="<?php echo AmpConfig::get('web_path');
|
||||
?>/albums.php?action=delete&album_id=<?php echo $libitem->id;
|
||||
?>">
|
||||
}
|
||||
if (Catalog::can_remove($libitem)) { ?>
|
||||
<a id="<?php echo 'delete_album_'.$libitem->id ?>" href="<?php echo AmpConfig::get('web_path'); ?>/albums.php?action=delete&album_id=<?php echo $libitem->id; ?>">
|
||||
<?php echo UI::get_icon('delete', T_('Delete'));
|
||||
?>
|
||||
</a>
|
||||
<?php
|
||||
} ?>
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
|
|
|
@ -37,7 +37,7 @@ UI::show_box_top($artist->f_name, 'info-box');
|
|||
?>
|
||||
<?php
|
||||
if (AmpConfig::get('lastfm_api_key')) {
|
||||
echo Ajax::observe('window', 'load', Ajax::action('?page=index&action=artist_info&artist='.$artist->id, 'artist_info'));
|
||||
echo Ajax::observe('window', 'load', Ajax::action('?page=index&action=artist_info&artist=' . $artist->id, 'artist_info'));
|
||||
?>
|
||||
<div class="item_right_info">
|
||||
<div class="external_links">
|
||||
|
@ -258,11 +258,11 @@ if (AmpConfig::get('sociable') && $owner_id > 0) {
|
|||
}
|
||||
?>
|
||||
<li>
|
||||
<a id="<?php echo 'edit_artist_'.$artist->id ?>" onclick="showEditDialog('artist_row', '<?php echo $artist->id ?>', '<?php echo 'edit_artist_'.$artist->id ?>', '<?php echo T_('Artist edit') ?>', '')">
|
||||
<a id="<?php echo 'edit_artist_' . $artist->id ?>" onclick="showEditDialog('artist_row', '<?php echo $artist->id ?>', '<?php echo 'edit_artist_' . $artist->id ?>', '<?php echo T_('Artist edit') ?>', '')">
|
||||
<?php echo UI::get_icon('edit', T_('Edit'));
|
||||
?>
|
||||
</a>
|
||||
<a id="<?php echo 'edit_artist_'.$artist->id ?>" onclick="showEditDialog('artist_row', '<?php echo $artist->id ?>', '<?php echo 'edit_artist_'.$artist->id ?>', '<?php echo T_('Artist edit') ?>', '')">
|
||||
<a id="<?php echo 'edit_artist_' . $artist->id ?>" onclick="showEditDialog('artist_row', '<?php echo $artist->id ?>', '<?php echo 'edit_artist_' . $artist->id ?>', '<?php echo T_('Artist edit') ?>', '')">
|
||||
<?php echo T_('Edit Artist');
|
||||
?>
|
||||
</a>
|
||||
|
@ -272,7 +272,7 @@ if (AmpConfig::get('sociable') && $owner_id > 0) {
|
|||
<?php if (Catalog::can_remove($artist)) {
|
||||
?>
|
||||
<li>
|
||||
<a id="<?php echo 'delete_artist_'.$artist->id ?>" href="<?php echo AmpConfig::get('web_path');
|
||||
<a id="<?php echo 'delete_artist_' . $artist->id ?>" href="<?php echo AmpConfig::get('web_path');
|
||||
?>/artists.php?action=delete&artist_id=<?php echo $artist->id;
|
||||
?>">
|
||||
<?php echo UI::get_icon('delete', T_('Delete'));
|
||||
|
@ -338,7 +338,7 @@ if (AmpConfig::get('sociable') && $owner_id > 0) {
|
|||
</div>
|
||||
<?php
|
||||
if (AmpConfig::get('wanted')) {
|
||||
echo Ajax::observe('missing_albums_link','click', Ajax::action('?page=index&action=wanted_missing_albums&artist='.$artist->id, 'missing_albums'));
|
||||
echo Ajax::observe('missing_albums_link','click', Ajax::action('?page=index&action=wanted_missing_albums&artist=' . $artist->id, 'missing_albums'));
|
||||
?>
|
||||
<div id="missing_albums" class="tab_content">
|
||||
<?php UI::show_box_top(T_('Missing Albums'), 'info-box');
|
||||
|
@ -350,7 +350,7 @@ if (AmpConfig::get('wanted')) {
|
|||
} ?>
|
||||
<?php
|
||||
if (AmpConfig::get('show_similar')) {
|
||||
echo Ajax::observe('similar_artist_link','click', Ajax::action('?page=index&action=similar_artist&artist='.$artist->id, 'similar_artist'));
|
||||
echo Ajax::observe('similar_artist_link','click', Ajax::action('?page=index&action=similar_artist&artist=' . $artist->id, 'similar_artist'));
|
||||
?>
|
||||
<div id="similar_artist" class="tab_content">
|
||||
<?php UI::show_box_top(T_('Similar Artists'), 'info-box');
|
||||
|
@ -362,7 +362,7 @@ if (AmpConfig::get('show_similar')) {
|
|||
} ?>
|
||||
<?php
|
||||
if (AmpConfig::get('show_concerts')) {
|
||||
echo Ajax::observe('concerts_link','click', Ajax::action('?page=index&action=concerts&artist='.$artist->id, 'concerts'));
|
||||
echo Ajax::observe('concerts_link','click', Ajax::action('?page=index&action=concerts&artist=' . $artist->id, 'concerts'));
|
||||
?>
|
||||
<div id="concerts" class="tab_content">
|
||||
<?php UI::show_box_top(T_('Events'), 'info-box');
|
||||
|
@ -374,7 +374,7 @@ if (AmpConfig::get('show_concerts')) {
|
|||
} ?>
|
||||
<?php
|
||||
if (AmpConfig::get('label')) {
|
||||
echo Ajax::observe('labels_link','click', Ajax::action('?page=index&action=labels&artist='.$artist->id, 'labels'));
|
||||
echo Ajax::observe('labels_link','click', Ajax::action('?page=index&action=labels&artist=' . $artist->id, 'labels'));
|
||||
?>
|
||||
<div id="labels" class="tab_content">
|
||||
<?php UI::show_box_top(T_('Labels'), 'info-box');
|
||||
|
|
|
@ -23,26 +23,17 @@
|
|||
<td class="cel_play">
|
||||
<span class="cel_play_content"> </span>
|
||||
<div class="cel_play_hover">
|
||||
<?php if ($show_direct_play) {
|
||||
?>
|
||||
<?php echo Ajax::button('?page=stream&action=directplay&object_type=artist&object_id=' . $libitem->id,'play', T_('Play'),'play_artist_' . $libitem->id);
|
||||
?>
|
||||
<?php if (Stream_Playlist::check_autoplay_append()) {
|
||||
?>
|
||||
<?php echo Ajax::button('?page=stream&action=directplay&object_type=artist&object_id=' . $libitem->id . '&append=true','play_add', T_('Play last'),'addplay_artist_' . $libitem->id);
|
||||
?>
|
||||
<?php
|
||||
}
|
||||
if ($show_direct_play) {
|
||||
echo Ajax::button('?page=stream&action=directplay&object_type=artist&object_id=' . $libitem->id,'play', T_('Play'),'play_artist_' . $libitem->id);
|
||||
if (Stream_Playlist::check_autoplay_append()) {
|
||||
echo Ajax::button('?page=stream&action=directplay&object_type=artist&object_id=' . $libitem->id . '&append=true','play_add', T_('Play last'),'addplay_artist_' . $libitem->id);
|
||||
if (Stream_Playlist::check_autoplay_next()) {
|
||||
echo Ajax::button('?page=stream&action=directplay&object_type=artist&object_id=' . $libitem->id . '&playnext=true', 'play_next', T_('Play next'), 'nextplay_artist_' . $libitem->id);
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
<?php if (Stream_Playlist::check_autoplay_next()) {
|
||||
?>
|
||||
<?php echo Ajax::button('?page=stream&action=directplay&object_type=artist&object_id=' . $libitem->id . '&playnext=true', 'play_next', T_('Play next'), 'nextplay_artist_' . $libitem->id);
|
||||
?>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
} ?>
|
||||
</div>
|
||||
</td>
|
||||
<?php
|
||||
|
@ -59,15 +50,13 @@ if (Art::is_enabled()) {
|
|||
<td class="cel_artist"><?php echo $libitem->f_link; ?></td>
|
||||
<td class="cel_add">
|
||||
<span class="cel_item_add">
|
||||
<?php if ($show_playlist_add) {
|
||||
?>
|
||||
<?php echo Ajax::button('?action=basket&type=artist&id=' . $libitem->id,'add', T_('Add to temporary playlist'),'add_artist_' . $libitem->id);
|
||||
?>
|
||||
<?php echo Ajax::button('?action=basket&type=artist_random&id=' . $libitem->id,'random', T_('Random to temporary playlist'),'random_artist_' . $libitem->id);
|
||||
<?php
|
||||
if ($show_playlist_add) {
|
||||
echo Ajax::button('?action=basket&type=artist&id=' . $libitem->id,'add', T_('Add to temporary playlist'),'add_artist_' . $libitem->id);
|
||||
echo Ajax::button('?action=basket&type=artist_random&id=' . $libitem->id,'random', T_('Random to temporary playlist'),'random_artist_' . $libitem->id);
|
||||
?>
|
||||
<a id="<?php echo 'add_playlist_'.$libitem->id ?>" onclick="showPlaylistDialog(event, 'artist', '<?php echo $libitem->id ?>')">
|
||||
<?php echo UI::get_icon('playlist_add', T_('Add to existing playlist'));
|
||||
?>
|
||||
<?php echo UI::get_icon('playlist_add', T_('Add to existing playlist')); ?>
|
||||
</a>
|
||||
<?php
|
||||
} ?>
|
||||
|
@ -76,75 +65,43 @@ if (Art::is_enabled()) {
|
|||
<td class="cel_songs"><?php echo $libitem->songs; ?></td>
|
||||
<td class="cel_albums"><?php echo $libitem->albums; ?></td>
|
||||
<td class="cel_time"><?php echo $libitem->f_time; ?></td>
|
||||
<?php if (AmpConfig::get('show_played_times')) {
|
||||
?>
|
||||
<td class="cel_counter"><?php echo $libitem->object_cnt;
|
||||
?></td>
|
||||
<?php if (AmpConfig::get('show_played_times')) { ?>
|
||||
<td class="cel_counter"><?php echo $libitem->object_cnt; ?></td>
|
||||
<?php
|
||||
} ?>
|
||||
<td class="cel_tags"><?php echo $libitem->f_tags; ?></td>
|
||||
<?php if (User::is_registered()) {
|
||||
?>
|
||||
<?php if (AmpConfig::get('ratings')) {
|
||||
?>
|
||||
<td class="cel_rating" id="rating_<?php echo $libitem->id;
|
||||
?>_artist"><?php Rating::show($libitem->id,'artist');
|
||||
?></td>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<?php if (AmpConfig::get('userflags')) {
|
||||
?>
|
||||
<td class="cel_userflag" id="userflag_<?php echo $libitem->id;
|
||||
?>_artist"><?php Userflag::show($libitem->id,'artist');
|
||||
?></td>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
} ?>
|
||||
if (User::is_registered()) {
|
||||
if (AmpConfig::get('ratings')) { ?>
|
||||
<td class="cel_rating" id="rating_<?php echo $libitem->id; ?>_artist"><?php Rating::show($libitem->id,'artist'); ?></td>
|
||||
<?php
|
||||
}
|
||||
if (AmpConfig::get('userflags')) { ?>
|
||||
<td class="cel_userflag" id="userflag_<?php echo $libitem->id; ?>_artist"><?php Userflag::show($libitem->id,'artist'); ?></td>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
<td class="cel_action">
|
||||
<?php if (!AmpConfig::get('use_auth') || Access::check('interface','25')) {
|
||||
if (AmpConfig::get('sociable') && (!$libitem->allow_group_disks || ($libitem->allow_group_disks && !count($libitem->album_suite)))) {
|
||||
?>
|
||||
<?php if (AmpConfig::get('sociable') && (!$libitem->allow_group_disks || ($libitem->allow_group_disks && !count($libitem->album_suite)))) {
|
||||
?>
|
||||
<a href="<?php echo AmpConfig::get('web_path');
|
||||
?>/shout.php?action=show_add_shout&type=artist&id=<?php echo $libitem->id;
|
||||
?>">
|
||||
<?php echo UI::get_icon('comment', T_('Post Shout'));
|
||||
?>
|
||||
<a href="<?php echo AmpConfig::get('web_path'); ?>/shout.php?action=show_add_shout&type=artist&id=<?php echo $libitem->id; ?>">
|
||||
<?php echo UI::get_icon('comment', T_('Post Shout')); ?>
|
||||
</a>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
} ?>
|
||||
<?php if (Access::check_function('batch_download') && check_can_zip('artist')) {
|
||||
?>
|
||||
<a rel="nohtml" href="<?php echo AmpConfig::get('web_path');
|
||||
?>/batch.php?action=artist&id=<?php echo $libitem->id;
|
||||
?>">
|
||||
<?php echo UI::get_icon('batch_download', T_('Batch Download'));
|
||||
?>
|
||||
</a>
|
||||
<?php
|
||||
} ?>
|
||||
<?php if ($libitem->can_edit()) {
|
||||
?>
|
||||
}
|
||||
if ($libitem->can_edit()) { ?>
|
||||
<a id="<?php echo 'edit_artist_'.$libitem->id ?>" onclick="showEditDialog('artist_row', '<?php echo $libitem->id ?>', '<?php echo 'edit_artist_'.$libitem->id ?>', '<?php echo T_('Artist edit') ?>', 'artist_')">
|
||||
<?php echo UI::get_icon('edit', T_('Edit'));
|
||||
?>
|
||||
<?php echo UI::get_icon('edit', T_('Edit')); ?>
|
||||
</a>
|
||||
<?php
|
||||
} ?>
|
||||
<?php if (Catalog::can_remove($libitem)) {
|
||||
?>
|
||||
<a id="<?php echo 'delete_artist_'.$libitem->id ?>" href="<?php echo AmpConfig::get('web_path');
|
||||
?>/artists.php?action=delete&artist_id=<?php echo $libitem->id;
|
||||
?>">
|
||||
<?php echo UI::get_icon('delete', T_('Delete'));
|
||||
?>
|
||||
<?php
|
||||
}
|
||||
if (Catalog::can_remove($libitem)) { ?>
|
||||
<a id="<?php echo 'delete_artist_'.$libitem->id ?>" href="<?php echo AmpConfig::get('web_path'); ?>/artists.php?action=delete&artist_id=<?php echo $libitem->id; ?>">
|
||||
<?php echo UI::get_icon('delete', T_('Delete')); ?>
|
||||
</a>
|
||||
<?php
|
||||
} ?>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
|
|
|
@ -24,10 +24,7 @@
|
|||
<span class="cel_play_content"> </span>
|
||||
<div class="cel_play_hover">
|
||||
<?php if (AmpConfig::get('directplay')) {
|
||||
?>
|
||||
<?php echo Ajax::button('?page=stream&action=directplay&object_type=broadcast&object_id=' . $libitem->id,'play', T_('Play'),'play_broadcast_' . $libitem->id);
|
||||
?>
|
||||
<?php
|
||||
echo Ajax::button('?page=stream&action=directplay&object_type=broadcast&object_id=' . $libitem->id,'play', T_('Play'),'play_broadcast_' . $libitem->id);
|
||||
} ?>
|
||||
</div>
|
||||
</td>
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
?>
|
||||
<li>
|
||||
<a href="javascript:void(0);" id="rb_append_dbroadcast_<?php echo $broadcast->id;
|
||||
?>" onclick="handleBroadcastAction('<?php echo AmpConfig::get('ajax_url').'?page=player&action=broadcast&broadcast_id='.$broadcast->id;
|
||||
?>" onclick="handleBroadcastAction('<?php echo AmpConfig::get('ajax_url') . '?page=player&action=broadcast&broadcast_id=' . $broadcast->id;
|
||||
?>', 'rb_append_dbroadcast_<?php echo $broadcast->id;
|
||||
?>');">
|
||||
<?php echo $broadcast->f_name;
|
||||
|
@ -40,6 +40,6 @@
|
|||
<?php
|
||||
} ?>
|
||||
</ul><br />
|
||||
<a href="javascript:void(0);" id="rb_append_dbroadcast_new" onclick="handleBroadcastAction('<?php echo AmpConfig::get('ajax_url'). '?page=player&action=broadcast'; ?>', 'rb_append_dbroadcast_new');">
|
||||
<a href="javascript:void(0);" id="rb_append_dbroadcast_new" onclick="handleBroadcastAction('<?php echo AmpConfig::get('ajax_url') . '?page=player&action=broadcast'; ?>', 'rb_append_dbroadcast_new');">
|
||||
<?php echo T_('New broadcast'); ?>
|
||||
</a>
|
||||
|
|
|
@ -24,10 +24,7 @@
|
|||
<span class="cel_play_content"> </span>
|
||||
<div class="cel_play_hover">
|
||||
<?php if (AmpConfig::get('directplay')) {
|
||||
?>
|
||||
<?php echo Ajax::button('?page=stream&action=directplay&object_type=channel&object_id=' . $libitem->id,'play', T_('Play'),'play_channel_' . $libitem->id);
|
||||
?>
|
||||
<?php
|
||||
echo Ajax::button('?page=stream&action=directplay&object_type=channel&object_id=' . $libitem->id,'play', T_('Play'),'play_channel_' . $libitem->id);
|
||||
} ?>
|
||||
</div>
|
||||
</td>
|
||||
|
|
|
@ -30,34 +30,35 @@
|
|||
<tr>
|
||||
<td class="edit_dialog_content_header"><?php echo T_('Artist') ?></td>
|
||||
<td>
|
||||
<?php if (Access::check('interface', 50)) {
|
||||
<?php
|
||||
if (Access::check('interface', 50)) {
|
||||
if ($libitem->artist_count == '1') {
|
||||
show_artist_select('artist', $libitem->artist_id);
|
||||
} else {
|
||||
echo T_('Various');
|
||||
}
|
||||
} else {
|
||||
} else {
|
||||
echo $libitem->f_artist_name;
|
||||
}
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="edit_dialog_content_header"><?php echo T_('Album Artist') ?></td>
|
||||
<td>
|
||||
<?php if (Access::check('interface', 50)) {
|
||||
?>
|
||||
<?php show_artist_select('album_artist', $libitem->album_artist, true, $libitem->id, true);
|
||||
<?php
|
||||
if (Access::check('interface', 50)) {
|
||||
show_artist_select('album_artist', $libitem->album_artist, true, $libitem->id, true);
|
||||
?>
|
||||
<div id="album_artist_select_album_<?php echo $libitem->id ?>">
|
||||
<?php echo Ajax::observe('album_artist_select_'.$libitem->id, 'change', 'check_inline_song_edit("album_artist", '.$libitem->id.')');
|
||||
<?php echo Ajax::observe('album_artist_select_' . $libitem->id, 'change', 'check_inline_song_edit("album_artist", ' . $libitem->id . ')');
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
|
||||
} else {
|
||||
} else {
|
||||
echo $libitem->f_album_artist_name;
|
||||
}
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -77,12 +78,11 @@
|
|||
<input type="text" name="mbid" value="<?php echo $libitem->mbid;
|
||||
?>" />
|
||||
<?php
|
||||
|
||||
} else {
|
||||
echo $libitem->mbid;
|
||||
}
|
||||
?>
|
||||
<?php echo $libitem->mbid;
|
||||
?>
|
||||
<?php
|
||||
} ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -93,11 +93,9 @@
|
|||
<input type="text" name="mbid_group" value="<?php echo $libitem->mbid_group;
|
||||
?>" />
|
||||
<?php
|
||||
|
||||
} else {
|
||||
?>
|
||||
<?php echo $libitem->mbid_group;
|
||||
?>
|
||||
<?php
|
||||
echo $libitem->mbid_group;
|
||||
} ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -36,10 +36,7 @@
|
|||
?>" />
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
<?php echo $libitem->mbid;
|
||||
?>
|
||||
<?php
|
||||
echo $libitem->mbid;
|
||||
} ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -39,15 +39,17 @@
|
|||
<td class="edit_dialog_content_header"></td>
|
||||
<td><input type="checkbox" name="allow_stream" value="1" <?php echo ($libitem->allow_stream) ? 'checked' : ''; ?> /> <?php echo T_('Allow Stream') ?></td>
|
||||
</tr>
|
||||
<?php if ((($libitem->object_type == 'song' || $libitem->object_type == 'video') && Access::check_function('download')) || Access::check_function('batch_download')) {
|
||||
<?php
|
||||
if ((($libitem->object_type == 'song' || $libitem->object_type == 'video') && Access::check_function('download')) || Access::check_function('batch_download')) {
|
||||
?>
|
||||
<tr>
|
||||
<td class="edit_dialog_content_header"></td>
|
||||
<td><input type="checkbox" name="allow_download" value="1" <?php echo ($libitem->allow_download) ? 'checked' : '';
|
||||
?> /> <?php echo T_('Allow Download') ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
} ?>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
<input type="hidden" name="id" value="<?php echo $libitem->id; ?>" />
|
||||
<input type="hidden" name="type" value="share_row" />
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue