summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2008-02-29 06:14:46 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2008-02-29 06:14:46 +0000
commit2c337852cff31297d681fb87d3098cc3d9041101 (patch)
tree9853ce94387c4cc7756575598dfb1e2de44a8589 /templates
parentc1f2b35e2a18b0752746f5db5794cf18714bc71d (diff)
downloadampache-2c337852cff31297d681fb87d3098cc3d9041101.tar.gz
ampache-2c337852cff31297d681fb87d3098cc3d9041101.tar.bz2
ampache-2c337852cff31297d681fb87d3098cc3d9041101.zip
major corrections to reading of preferences and a few misc fixes which I have now forgotten
Diffstat (limited to 'templates')
-rw-r--r--templates/list_header.inc.php2
-rw-r--r--templates/rightbar.inc.php2
-rw-r--r--templates/show_localplay.inc.php47
-rw-r--r--templates/show_playlist_song_row.inc.php2
-rw-r--r--templates/show_playtype_switch.inc.php4
-rw-r--r--templates/show_song_row.inc.php2
-rw-r--r--templates/sidebar_localplay.inc.php5
7 files changed, 8 insertions, 56 deletions
diff --git a/templates/list_header.inc.php b/templates/list_header.inc.php
index 551c37bc..e9cad734 100644
--- a/templates/list_header.inc.php
+++ b/templates/list_header.inc.php
@@ -27,7 +27,7 @@
*/
// Pull these variables out to allow shorthand (easier for lazy programmers)
-$limit = $GLOBALS['user']->prefs['offset_limit'] ? $GLOBALS['user']->prefs['offset_limit'] : '25';
+$limit = Config::get('offset_limit') ? Config::get('offset_limit') : '25';
$start = Browse::$start;
$total = Browse::$total_objects;
$uid = Config::get('list_header_uid');
diff --git a/templates/rightbar.inc.php b/templates/rightbar.inc.php
index bf1322e1..26ec3691 100644
--- a/templates/rightbar.inc.php
+++ b/templates/rightbar.inc.php
@@ -70,7 +70,7 @@
</ul>
</li>
</ul>
-<?php if ($GLOBALS['user']->prefs['play_type'] == 'localplay') { require_once Config::get('prefix') . '/templates/show_localplay_control.inc.php'; } ?>
+<?php if (Config::get('play_type') == 'localplay') { require_once Config::get('prefix') . '/templates/show_localplay_control.inc.php'; } ?>
<ul id="rb_current_playlist">
<?php
//FIXME :: this feels kludgy
diff --git a/templates/show_localplay.inc.php b/templates/show_localplay.inc.php
deleted file mode 100644
index 281a925c..00000000
--- a/templates/show_localplay.inc.php
+++ /dev/null
@@ -1,47 +0,0 @@
-<?php
-/*
-
- Copyright (c) 2001 - 2006 Ampache.org
- All rights reserved.
-
- This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License
- as published by the Free Software Foundation; either version 2
- of the License, or (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-*/
-
-$web_path = conf('web_path');
-$localplay = init_localplay();
-?>
-<?php show_box_top(ucfirst($localplay->type) . ' ' . _('Localplay')); ?>
-<table>
-<tr>
- <td valign="top">
- <strong><?php echo _('Actions'); ?>:</strong><br />
- <?php if ($localplay->has_function('delete_all')) { ?>
- <div><a class="button" href="<?php echo $web_path; ?>/localplay.php?action=delete_all"><?php echo _('Clear Playlist'); ?></a></div>
- <?php } ?>
- </td><td>
- <?php $add_info = "&amp;return=1"; ?>
- <?php require_once(conf('prefix') . '/templates/show_localplay_status.inc.php'); ?>
- </td>
-</tr>
-</table>
-<?php show_box_bottom(); ?>
-
-
-<?php show_box_top(_('Current Playlist')); ?>
-<div id="lp_playlist">
-<?php require_once(conf('prefix') . '/templates/show_localplay_playlist.inc.php'); ?>
-</div>
-<?php show_box_bottom(); ?>
diff --git a/templates/show_playlist_song_row.inc.php b/templates/show_playlist_song_row.inc.php
index e96aa91b..dd92f0fb 100644
--- a/templates/show_playlist_song_row.inc.php
+++ b/templates/show_playlist_song_row.inc.php
@@ -28,7 +28,7 @@
<td class="cel_track"><?php echo $song->f_track; ?></td>
<td class="cel_time"><?php echo $song->f_time; ?></td>
<td class="cel_action">
- <?php if ($GLOBALS['user']->prefs['download']) { ?>
+ <?php if (Config::get('download')) { ?>
<a href="<?php echo Config::get('web_path'); ?>/stream.php?action=download&amp;song_id=<?php echo $song->id; ?>">
<?php echo get_user_icon('download',_('Download')); ?>
</a>
diff --git a/templates/show_playtype_switch.inc.php b/templates/show_playtype_switch.inc.php
index 406329e5..7cc1ca88 100644
--- a/templates/show_playtype_switch.inc.php
+++ b/templates/show_playtype_switch.inc.php
@@ -20,7 +20,7 @@
*/
?>
<?php
-$name = "is_" . $GLOBALS['user']->prefs['play_type'];
+$name = "is_" . Config::get('play_type');
${$name} = 'selected="selected" ';
if (Preference::has_access('play_type')) {
@@ -42,6 +42,6 @@ if (Preference::has_access('play_type')) {
<?php
} // if they have access
// Else just show what it currently is
-else { echo ucwords($GLOBALS['user']->prefs['play_type']);}
+else { echo ucwords(Config::get('play_type'));}
?>
</div>
diff --git a/templates/show_song_row.inc.php b/templates/show_song_row.inc.php
index 1cf863e9..492fff9f 100644
--- a/templates/show_song_row.inc.php
+++ b/templates/show_song_row.inc.php
@@ -37,7 +37,7 @@
<?php echo get_user_icon('comment',_('Post Shout')); ?>
</a>
<?php } ?>
- <?php if ($GLOBALS['user']->prefs['download']) { ?>
+ <?php if (Config::get('download')) { ?>
<a href="<?php echo Config::get('web_path'); ?>/stream.php?action=download&amp;song_id=<?php echo $song->id; ?>">
<?php echo get_user_icon('download',_('Download')); ?>
</a>
diff --git a/templates/sidebar_localplay.inc.php b/templates/sidebar_localplay.inc.php
index ceaf6901..5e2e79ff 100644
--- a/templates/sidebar_localplay.inc.php
+++ b/templates/sidebar_localplay.inc.php
@@ -18,14 +18,13 @@
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-
?>
<ul class="sb2" id="sb_localplay">
-<?php if (Config::get('allow_localplay_playback') AND $GLOBALS['user']->prefs['localplay_controller'] AND Access::check('localplay','5')) { ?>
+<?php if (Config::get('allow_localplay_playback') AND Config::get('localplay_controller') AND Access::check('localplay','5')) { ?>
<?php
// Little bit of work to be done here
- $localplay = new Localplay($GLOBALS['user']->prefs['localplay_controller']);
+ $localplay = new Localplay(Config::get('localplay_controller'));
$current_instance = $localplay->current_instance();
$class = $current_instance ? '' : ' class="active_instance"';
?>