X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2FUI%2FWeb.pm;h=f63854ca0eb6c22e721fcc2dc06253f4d8f5d296;hp=3fd61efd8fbcbe2b5d88f9d8f8285fa0cfa02d3a;hb=63973c641c4be00765fa27e55c57cc5b9aa4da19;hpb=602d22bbe08490648362a571672d89e7f944f6bd diff --git a/FS/FS/UI/Web.pm b/FS/FS/UI/Web.pm index 3fd61efd8..f63854ca0 100644 --- a/FS/FS/UI/Web.pm +++ b/FS/FS/UI/Web.pm @@ -581,8 +581,8 @@ use vars qw($DEBUG); use Carp; use Storable qw(nfreeze); use MIME::Base64; -use JSON; -use FS::UID qw(getotaker); +use JSON::XS; +use FS::CurrentUser; use FS::Record qw(qsearchs); use FS::queue; use FS::CGI qw(rooturl); @@ -656,7 +656,7 @@ sub start_job { push @{$param{$field}}, $value; } } - $param{CurrentUser} = getotaker(); + $param{CurrentUser} = $FS::CurrentUser::CurrentUser->username; $param{RootURL} = rooturl($self->{cgi}->self_url); warn "FS::UI::Web::start_job\n". join('', map { @@ -726,10 +726,7 @@ sub job_status { @return = ( 'error', $job ? $job->statustext : $jobnum ); } - #to_json(\@return); #waiting on deb 5.0 for new JSON.pm? - #silence the warning though - my $to_json = JSON->can('to_json') || JSON->can('objToJson'); - &$to_json(\@return); + encode_json \@return; }