summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--admin/users.php18
-rwxr-xr-xdocs/CHANGELOG1
-rw-r--r--lib/class/catalog.class.php4
3 files changed, 12 insertions, 11 deletions
diff --git a/admin/users.php b/admin/users.php
index 4c505100..d6593218 100644
--- a/admin/users.php
+++ b/admin/users.php
@@ -118,13 +118,13 @@ switch ($_REQUEST['action']) {
show_confirmation(_('New User Added'),__('%user% has been created with an access level of ' . $access,'%user%',$username),'admin/users.php');
break;
case 'enable':
- $working_user = new User($user_id);
- $working_user->enable();
+ $client = new User($_REQUEST['user_id']);
+ $client->enable();
show_confirmation(_('User Enabled'),'','admin/users.php');
break;
case 'disable':
- $working_user = new User($user_id);
- if ($working_user->disable()) {
+ $client = new User($_REQUEST['user_id']);
+ if ($client->disable()) {
show_confirmation(_('User Disabled'),'','admin/users.php');
}
else {
@@ -143,14 +143,14 @@ switch ($_REQUEST['action']) {
switch ($_REQUEST['action']) {
case 'show_edit':
if (Config::get('demo_mode')) { break; }
- $client = new User($user_id);
+ $client = new User($_REQUEST['user_id']);
require_once Config::get('prefix') . '/templates/show_edit_user.inc.php';
break;
case 'confirm_delete':
if (Config::get('demo_mode')) { break; }
- $working_user = new User($_REQUEST['user_id']);
- if ($working_user->delete()) {
- show_confirmation(_('User Deleted'), "$working_user->username has been Deleted","admin/users.php");
+ $clint = new User($_REQUEST['user_id']);
+ if ($client->delete()) {
+ show_confirmation(_('User Deleted'), "$client->username has been Deleted","admin/users.php");
}
else {
show_confirmation(_('Delete Error'), _("Unable to delete last Admin User"),"admin/users.php");
@@ -158,7 +158,7 @@ switch ($_REQUEST['action']) {
break;
case 'delete':
if (Config::get('demo_mode')) { break; }
- $client = new User($user_id);
+ $client = new User($_REQUEST['user_id']);
show_confirmation(_('Deletion Request'),
_('Are you sure you want to permanently delete') . " $client->fullname ($client->username)?",
"admin/users.php?action=confirm_delete&user_id=$user_id",1);
diff --git a/docs/CHANGELOG b/docs/CHANGELOG
index 6f00a658..b2701638 100755
--- a/docs/CHANGELOG
+++ b/docs/CHANGELOG
@@ -4,6 +4,7 @@
--------------------------------------------------------------------------
v.3.4-Alpha4
+ - Fixed disable/re-enable of users
- Fixed a bug where ajax actions wouldn't trigger a redirect to login
when session expired, instead they would just break
- Fixed a bug with Random Play if you had no artists/albums/playlists
diff --git a/lib/class/catalog.class.php b/lib/class/catalog.class.php
index 79203977..21d725db 100644
--- a/lib/class/catalog.class.php
+++ b/lib/class/catalog.class.php
@@ -113,8 +113,8 @@ class Catalog {
$this->f_name = truncate_with_ellipsis($this->name,Config::get('ellipse_threshold_title'));
$this->f_name_link = '<a href="' . Config::get('web_path') . '/admin/catalog.php?action=show_customize_catalog&catalog_id=' . $this->id . '" title="' . scrub_out($this->name) . '">' . scrub_out($this->f_name) . '</a>';
$this->f_path = truncate_with_ellipsis($this->path,Config::get('ellipse_threshold_title'));
- $this->f_update = date('d/m/Y h:i',$this->last_update);
- $this->f_add = date('d/m/Y h:i',$this->last_add);
+ $this->f_update = $this->last_update ? date('d/m/Y h:i',$this->last_update) : _('Never');
+ $this->f_add = $this->last_add ? date('d/m/Y h:i',$this->last_add) : _('Never');
} // format