[07:03:34] hi, again. ... i cannot seem to be able to upload files to my wiki: [07:03:44] the error is Sorry! We could not process your edit due to a loss of session data. [07:03:58] there are no errors in the log for the POST [07:04:24] i checked the php directory to be ok in terms of permissions [07:04:42] php_value session.save_path "/var/lib/php/session" [07:04:52] is in the php.conf file [07:05:09] and it's drwxrwx---. 2 root apache 4096 Mar 22 23:44 /var/lib/php/session [07:05:27] my images directory is also group owned (recursely by apache) [07:05:39] is there any way to turn on more debugging? [07:07:16] httpd is running as user apache [07:09:59] actually, even editing pages is giving the same error [07:10:08] maybe focus on that first [07:22:56] removing the sess_* files deep in the php sessions directory appears to have worked. weird [07:23:10] because logging out and in did not work [07:23:21] and i see no more sessions after logging out and in again [16:15:57] Hi. I want to use SPARQL to query the database for a specific wiki entry (item) and grab it's properties. I am not sure how to specify the item I am looking for (e.g. item == Q1234). How do I do this? [18:08:42] I was wondering if anyone could help me with how to set a timezone for an extension to match the client's timezone instead of servers [18:08:46] Hi. I want to use SPARQL to query the database for a specific wiki entry (item) and grab it's properties. I am not sure how to specify the item I am looking for (e.g. item == Q1234). How do I do this? [18:33:56] I also would like if anyone could please help with https://phabricator.wikimedia.org/T152929 (WikiForum captcha triggers interference issue) [18:58:23] Reedy: thanks for your answer. Replied. [19:57:37] Someone submitted this code to a MW extension of mine: [19:57:40] $options['ORDER BY'] = "page_title {$this->options[self::OPT_SORT_ORDER]}" [19:57:49] I'm a bit rusty on the MW DB abstraction layer [19:58:08] If I'm not mistaken this variable should be escaped [19:58:16] What's the best way to do that? [19:58:52] JeroenDeDauw: link to code? [19:59:37] MTres19_M: https://github.com/JeroenDeDauw/SubPageList/pull/41/files#diff-5a978cabd226635ba06bb62602cf4f2e [20:07:47] Guess it depends whether there's any user input appearing there [20:07:56] does ORDER BY foobar 'ASC' work? [20:09:11] JeroenDeDauw: looks ok to me except for indenting... I think the brackets {} let you use variables like that but I never/rarely do it myself so I'm not certain. [20:10:39] He's not asking about that [20:10:54] He's asking if there should be any escaping for the sql query that results [20:14:04] Oh, oops. But it looks ok. It seems that setSortOrder checks user input already...? [20:23:29] Reedy: MTres19_M the setter for the field checks the value yes. And before that there is other code that already should have filtered user input. However I'd be more confortable with escaping in the code that builds the query as well [21:19:06] Is there a way to get a list of the section headers in a wiki page using the API? [21:21:50] Or maybe just a count of sections. [21:24:24] a somewhat crude method may be to screenscrape and get s with class .mw-headline [21:30:03] I think the api can retrieve that info, action=parse maybe? [21:30:42] Niharika, try this https://en.wikipedia.org/w/api.php?action=parse&page=Laticauda_colubrina&contentmodel=wikitext&prop=sections [21:31:12] neat :) [21:31:15] OH-: NICE! Thanks :D