Many Japanese translation updates, thanks to Kazuya Masuda.
---- Changes since 1.440 ----
Russian translation updates, thanks to Anton Statutov.
+Webmin's serialization functions can now handle objects, which allows them to be passed as parameters to remote function calls. Both caller and recipient must have the object's class installed though.
elsif ($r eq 'REF') {
$rv = &serialise_variable(${$_[0]});
}
+elsif ($r) {
+ # An object - treat as a hash
+ $r = "OBJECT ".&urlize($r);
+ $rv = join(",", map { &urlize(&serialise_variable($_)).",".
+ &urlize(&serialise_variable($_[0]->{$_})) }
+ keys %{$_[0]});
+ }
return ($r ? $r : 'VAL').",".$rv;
}
elsif ($v[0] eq 'UNDEF') {
$rv = undef;
}
+elsif ($v[0] =~ /^OBJECT\s+(.*)$/) {
+ # An object hash that we have to re-bless
+ local $cls = $1;
+ $rv = { };
+ for($i=1; $i<@v; $i+=2) {
+ $rv->{&unserialise_variable(&un_urlize($v[$i]))} =
+ &unserialise_variable(&un_urlize($v[$i+1]));
+ }
+ eval "use $cls";
+ bless $rv, $cls;
+ }
return $rv;
}