[Cloud] Decoding log_params for blocks?

2019-12-04 Thread Roy Smith
Is there a description somewhere of what the log_params mean in this query? MariaDB [enwiki_p]> select log_params from logging_logindex where log_namespace = 2 and log_title = 'RoySmith-testing' and log_type = 'block' order by log_timestamp asc; +-

Re: [Cloud] Decoding log_params for blocks?

2019-12-04 Thread Dennis Tobar
AFAIK, this kind of information is from serialize[1] and unserialize php functions. See the information from Mediawiki table documentation[2] [1] https://www.php.net/manual/en/function.serialize.php [2] https://www.mediawiki.org/wiki/Manual:Logging_table#log_params On Wed, Dec 4, 2019 at 9:50 PM

Re: [Cloud] Decoding log_params for blocks?

2019-12-04 Thread Roy Smith
Well, that answers the syntax of the encoding, but I'm also looking for the semantics, i.e. what the various fields mean, although I can guess at some of it. I also need to figure out how to parse this in Python. I have much empathy for the anonymous author of this comment

Re: [Cloud] Decoding log_params for blocks?

2019-12-04 Thread Roy Smith
> On Dec 4, 2019, at 8:07 PM, Roy Smith wrote: > > I also need to figure out how to parse this in Python. Oh, looks like https://pypi.org/project/phpserialize/ can handle that part.___ Wikimedia Cloud Services

Re: [Cloud] Decoding log_params for blocks?

2019-12-04 Thread Morten Wang
Yeah, phpserialize will handle these parameters. Keep in mind that this field is stored as a byte string in the database, so you might have to convert it to a string (using encode()) for phpserialize to parse it. You can find information about some of the parameters in the Help:Blocking users

Re: [Cloud] Decoding log_params for blocks?

2019-12-04 Thread Dennis Tobar
Roy: Sorry if I was bit rude in my previous email. The unparsed string has an array with the follow keys: * duration (time calculated(?) in plain English) * flags (permissions restricted) * sitewide: 1 if it's a fully block; 0 partial block See more in https://www.mediawiki.org/wiki/Manual:Log_

Re: [Cloud] Decoding log_params for blocks?

2019-12-04 Thread Roy Smith
> On Dec 4, 2019, at 9:51 PM, Dennis Tobar wrote: > > Roy: > > Sorry if I was bit rude in my previous email. Oh, not at all. I didn't think you were rude. You got me pointed in the right direction, which I appreciate, and I think I've got enough here (and from Morten Wang's additional help