[freeside-commits] freeside/FS/FS/UI Web.pm,1.11,1.12
Ivan,,,
ivan at wavetail.420.am
Wed Nov 16 05:14:49 PST 2005
Update of /home/cvs/cvsroot/freeside/FS/FS/UI
In directory wavetail:/tmp/cvs-serv1709/FS/FS/UI
Modified Files:
Web.pm
Log Message:
bulk svcpart change
Index: Web.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/UI/Web.pm,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- Web.pm 25 Sep 2005 08:13:35 -0000 1.11
+++ Web.pm 16 Nov 2005 13:14:47 -0000 1.12
@@ -130,16 +130,15 @@
package FS::UI::Web::JSRPC;
use strict;
-use vars qw(@ISA $DEBUG);
+use vars qw($DEBUG);
use Storable qw(nfreeze);
use MIME::Base64;
-#use JavaScript::RPC::Server::CGI;
+use JSON;
use FS::UID;
use FS::Record qw(qsearchs);
use FS::queue;
-#@ISA = qw( JavaScript::RPC::Server::CGI );
-$DEBUG = 0;
+$DEBUG = 1;
sub new {
my $class = shift;
@@ -151,6 +150,8 @@
bless $self, $class;
+ die "CGI object required as second argument" unless $self->{'cgi'};
+
return $self;
}
@@ -255,23 +256,9 @@
@return = ( 'error', $job ? $job->statustext : $jobnum );
}
- #join("\n", at return);
-
- #XXX should use JSON!
- @return = map {
- s/\\/\\\\/g;
- s/\n/\\n/g;
- s/"/\"/g;
- $_
- } @return;
-
- '[ '. join(', ', map { qq("$_") } @return). " ]\n";
+ objToJson(\@return);
}
-#sub get_new_query {
-# FS::UID::cgi();
-#}
-
1;
More information about the freeside-commits
mailing list