diff options
-rw-r--r-- | admin/users.php | 4 | ||||
-rw-r--r-- | albums.php | 2 | ||||
-rw-r--r-- | artists.php | 2 | ||||
-rw-r--r-- | browse.php | 6 | ||||
-rw-r--r-- | lib/artist.lib.php | 2 | ||||
-rw-r--r-- | lib/class/user.class.php | 14 | ||||
-rw-r--r-- | preferences.php | 2 | ||||
-rw-r--r-- | templates/show_user.inc.php | 6 |
8 files changed, 9 insertions, 29 deletions
diff --git a/admin/users.php b/admin/users.php index 8096001d..75a280cf 100644 --- a/admin/users.php +++ b/admin/users.php @@ -193,7 +193,7 @@ switch ($action) { $sql = "SELECT `id`,`last_seen` FROM `user` where last_seen <= $inactive"; $db_results = mysql_query($sql,dbh()); $total_items = mysql_num_rows($db_results); - $view = new View($sql,'admin/users.php','fullname',$total_items,$_SESSION['userdata']['offset_limit']); + $view = new View($sql,'admin/users.php','fullname',$total_items,$user->prefs['offset_limit']); } $users = get_users($view->sql); @@ -213,7 +213,7 @@ switch ($action) { $sql = "SELECT `id` FROM `user`"; $db_results = mysql_query($sql,dbh()); $total_items = mysql_num_rows($db_results); - $view = new View($sql,'admin/users.php','fullname',$total_items,$_SESSION['userdata']['offset_limit']); + $view = new View($sql,'admin/users.php','fullname',$total_items,$user->prefs['offset_limit']); } $users = get_users($view->sql); @@ -267,7 +267,7 @@ switch ($action) { if (!$sort_order) { $sort_order = 'name'; } $db_results = mysql_query($sql, dbh()); $total_items = mysql_num_rows($db_results); - if ($match != "Show_all") { $offset_limit = $_SESSION['userdata']['offset_limit']; } + if ($match != "Show_all") { $offset_limit = $user->prefs['offset_limit']; } $view = new View($sql, 'albums.php',$sort_order,$total_items,$offset_limit); } diff --git a/artists.php b/artists.php index 03420e58..8e3241e8 100644 --- a/artists.php +++ b/artists.php @@ -234,7 +234,7 @@ switch($action) { show_artists(); } elseif ($match === "Show_all") { - $_SESSION['view_offset_limit'] = 999999; + $offset_limit = 999999; show_artists(); } else { @@ -62,7 +62,7 @@ switch($action) { elseif ($sql) { $db_results = mysql_query($sql, dbh()); $total_items = mysql_num_rows($db_results); - if ($match != "Show_all") { $offset_limit = $_SESSION['userdata']['offset_limit']; } + if ($match != "Show_all") { $offset_limit = $user->prefs['offset_limit']; } $view = new View($sql, 'albums.php','name',$total_items,$offset_limit); } @@ -95,7 +95,7 @@ switch($action) { $db_results = mysql_query($sql, dbh()); $total_items = mysql_num_rows($db_results); $offset_limit = 999999; - if ($match != 'Show_All') { $offset_limit = $_SESSION['userdata']['offset_limit']; } + if ($match != 'Show_All') { $offset_limit = $user->prefs['offset_limit']; } $view = new View($sql, 'browse.php?action=genre','name',$total_items,$offset_limit); } @@ -133,7 +133,7 @@ switch($action) { $db_results = mysql_query($sql, dbh()); $total_items = mysql_num_rows($db_results); $offset_limit = 999999; - if ($match != 'Show All') { $offset_limit = $_SESSION['userdata']['offset_limit']; } + if ($match != 'Show All') { $offset_limit = $user->prefs['offset_limit']; } $view = new View($sql, 'browse.php?action=song_title','title',$total_items,$offset_limit); } diff --git a/lib/artist.lib.php b/lib/artist.lib.php index e3acd57d..6d83a442 100644 --- a/lib/artist.lib.php +++ b/lib/artist.lib.php @@ -99,7 +99,7 @@ function show_artists ($match = '') { $offset_limit = 999999; } else { - $offset_limit = $_SESSION['userdata']['offset_limit']; + $offset_limit = $user->prefs['offset_limit']; } $view = new View($query,'artists.php','name',$total_items,$offset_limit); diff --git a/lib/class/user.class.php b/lib/class/user.class.php index 9ff68a15..804a5819 100644 --- a/lib/class/user.class.php +++ b/lib/class/user.class.php @@ -33,7 +33,6 @@ class User { var $fullname; var $access; var $disabled; - var $offset_limit=25; var $email; var $last_seen; var $create_date; @@ -61,7 +60,6 @@ class User { $this->fullname = $info->fullname; $this->access = $info->access; $this->disabled = $info->disabled; - $this->offset_limit = $info->offset_limit; $this->email = $info->email; $this->last_seen = $info->last_seen; $this->create_date = $info->create_date; @@ -413,18 +411,6 @@ class User { } // update_email - /*! - @function update_offset - @discussion this updates the users offset_limit - */ - function update_offset($new_offset) { - - $new_offset = sql_escape($new_offset); - $sql = "UPDATE user SET offset_limit='$new_offset' WHERE `id`='$this->id'"; - $db_results = mysql_query($sql, dbh()); - - } // update_offset - /** * disable * This disables the current user diff --git a/preferences.php b/preferences.php index ff92f4a8..b5b92c0e 100644 --- a/preferences.php +++ b/preferences.php @@ -46,7 +46,7 @@ switch(scrub_in($_REQUEST['action'])) { $this_user = new User($user_id); $this_user->update_fullname($_REQUEST['fullname']); $this_user->update_email($_REQUEST['email']); - $this_user->update_offset($_REQUEST['offset_limit']); + /* Check for password change */ if ($_REQUEST['password1'] !== $_REQUEST['password2'] && !empty($_REQUEST['password1'])) { diff --git a/templates/show_user.inc.php b/templates/show_user.inc.php index 634a8d19..82b965ae 100644 --- a/templates/show_user.inc.php +++ b/templates/show_user.inc.php @@ -33,12 +33,6 @@ </td> </tr> <tr> - <td><?php echo _('Results Per Page'); ?>:</td> - <td> - <input type="text" name="offset_limit" size="3" value="<?php echo scrub_out($this_user->offset_limit); ?>" /> - </td> -</tr> -<tr> <td><?php echo _('New Password'); ?>:</td> <td> <?php $GLOBALS['error']->print_error('password'); ?> |