[03:47:36] Is parser function called every time whenever page loads? [04:21:38] akangupt_: Not usually. [09:20:07] Everyone should upvote http://stackoverflow.com/a/14857668/1333493 so that clueless visitors get some decent API docs entry point... [12:29:13] saper: How would i call getName() from another class since i think i may have found a way to detect when to show the text but just need to know how i can call getName() from another class. [12:29:34] I am doing something like $this->getName() == 'ask_delete_page_permanently' for example [12:36:04] That wont work i doint thin. [12:36:34] Could i have some help to be able to detect weather to show text since ive looked at delete action but that dosent help. [12:50:11] paladox: will download your latest patch and see [12:50:23] saper: Thanks. [12:53:06] paladox: what is this hook for? onDeletesPagesPermanently [12:53:32] It is for deleting the pages. [12:54:15] saper: Oh wait no, It is for $wgHooks['SkinTemplateNavigation::Universal'][] [12:54:21] can't you just install AddSkinHook function ? [12:54:29] so why not do it in extension.json? [12:54:42] well you carnt do &$this [12:54:46] in extension.json [12:55:56] but do you need it? [12:56:06] Yes [12:56:13] what for? [12:56:37] It is for listing the action under the drop down action menu on page. [12:56:44] oh please [12:56:58] you are not using the class DeletePagesForGood for anything [12:57:11] AddSkinHook is not referring to this at all, is it? [12:57:25] Yes. [12:59:03] so register SkinTemplateNavigation::Universal directly and get rid of the hooks file [12:59:37] i tryed removing it and under the action menu on page the delete page permenatly [12:59:51] saper: Ok we can get rid of hooks file. [12:59:58] Not needed now. [13:03:53] you didn't study how alterForm works [13:04:26] Yes i did. I looked in FormAction.php [13:04:28] file. [13:04:38] I studied purge and deleteaction. [13:04:46] you create a new form with "
" [13:05:22] Do you mean $form = new HTMLForm( $this->fields, $this->getContext(), $this->getName() ); [13:06:44] saper: I am getting http 500 error when i remove extension function and move hook to extension.json instead of having it in the class file. [13:07:49] check the logs [13:07:51] php log [13:08:09] also, your default permissions no longer work [13:08:14] Hooks does also new DeletePagesForGood(). [13:08:19] Ok how would i fix them. [13:09:09] check the logs [13:09:30] you really require hand-holding, don't you? [13:10:51] No i just doint know what to do. Since nothing i do is working i try if ($this->onSuccess ) { That dosent work. I thought if you are onSuccess anything in the if will not show but still does. [13:13:08] saper: Fixed http 500 error. It forgot to make the function a public static [13:20:56] paladox: the permissions work, it was my mistake, good! [13:21:22] saper: Oh thanks. Ive uploaded new patch with changes. Need to read your new comments. [13:26:37] saper: Would removing and leaving just and the code inside, Would that clean it up or would i need to do something like$form = new HTMLForm( $this->fields, $this->getContext(), $this->getName() ); [13:29:36] saper: Would $wgOut->addWikiMsg( 'confirmdeletetext' ); Ignore message in it i will change it but would that work for replacing the form code. [13:38:18] saper: Fixed the bug you occurred. I described what the problem was in patch. [13:59:19] paladox: yes I think it works now, thanks [13:59:32] saper: Ok good. [14:00:13] oh the action disappears [14:00:23] I don't know why it happens but this is good :) [14:00:44] ah ok [14:00:46] you check it [14:00:49] in the hook, god [14:00:51] good [14:00:58] I think I am done with remarks [14:01:08] you can simplify your code greatly [14:01:18] and you probably never need to touch $wgOut [14:03:15] Ok. [14:05:45] saper: changing $wgOut to $form dosent work causing errors. [15:00:02] paladox: study harder! [15:00:08] ok. [15:37:22] sir [15:37:24] sirs [15:37:34] i need help installing ldap-php via command [15:37:57] when i enter command , yum install php-ldap [15:38:13] it says missing dependency php-common, but php-common is alreayd installed and updated [15:38:22] im using CentOS 5.10 server [15:39:43] DarthVader: you may try asking on a CentOS support channel. That question seems specific to that and not MediaWiki [15:40:46] ok. thanks for the tip [15:44:17] saper: How can i do line breaks for $form->addPreText( $this->msg( 'confirmdeletetext' )->parse()); since i found a way to hide certain peices of text. [16:23:45] saper: Ive uploaded a new patch with changes could you review it. I havent changed everything you said too. So if you see those bit could you rewrite to say to do that part otherise i only need to do the errors part. [16:54:23] paladox: I don't understand... [16:54:30] saper: PM [16:54:58] saper: Please could you review the patch. I re did most and fixed my issue and addressed yours. [17:00:24] Hydronium: nothing arrived [17:00:48] paladox: where in the submit code are you checking for the namespace thing? [17:02:18] saper: I am not sure what your asking. If you mean $wgDeletePagesForGoodNamespaces then it is checking that the namespace has been enabled for deleting the pages in the namespace. [17:03:41] paladox: where? [17:03:44] which line? [17:04:17] 248 [17:07:31] paladox: ok let's do an experiment, ok? [17:07:46] saper: Ok. [17:09:09] first, you need some baking soda and some vinegar [17:09:41] my joke is so bad it makes people /leave [17:10:16] Hydronium: don't take it personal, it was just timeout of some fscking NAT :) [17:10:26] :P [17:10:44] paladox: add $wgDeletePagesForGoodNamespaces[NS_TEMPLATE] = false; [17:10:50] to your config [17:10:59] and create [[Template:P]] okay [17:11:04] saper: Ok. [17:12:02] got it? [17:12:16] do you have "delete pages permanently" action button? [17:12:47] saper: Ive created the page and no i doint get that action button [17:12:55] which means i fixed the problem. [17:13:13] ok [17:13:16] let's now try this [17:13:21] ok [17:13:35] you have the URL "somethingsomething/Template:P" right? [17:13:44] yes [17:13:50] http://simple-random-wikisaur.tk/index.php?title=Template:P [17:13:55] now let's change this to "somethingsomething/Template:P?action=delete_page_permanently" [17:13:59] manually [17:14:46] what are you getting paladox ? [17:15:15] I get the delete pagew [17:15:17] page [17:15:37] and if you click Yes [17:15:44] what happens [17:16:27] It comes up with This page can not be deleted permanently but it deletes the page. [17:16:44] do you know why? [17:17:07] Nope. It may have been like that before. [17:17:34] you check too late [17:18:17] let me submit a patch for you [17:18:51] saper: Ok thanks [17:22:32] saper: I may have fixed the problem not totaly but if the user presses yes on a namespace that isent enabled it will just keep letting them press yes it wont let them delete it. [17:24:06] saper: Ive done https://dpaste.de/3ai2 [17:27:34] paladox: this is good direction but there is a better way, hold on [17:27:44] saper: Ok thanks. [17:30:30] I wonder, can you delete files with this extension? [17:31:15] BTW https://www.mediawiki.org/wiki/Project:Requests welcomes comments [17:32:03] saper: You may since it allows images If an image is beeing deleted, some extra work needs to be done [17:32:21] do you do the extra work? [17:32:46] Nemo_bis: give me everything!! [17:33:00] saper: I woulden think so it is a comment if you go to line 169 [17:34:02] saper: But i am not sure if it can delete files, files since i can only see image supported. [17:34:32] paladox: what does it mean "since i can only see image supported. [17:35:45] saper: Well it starts of with if ( $ns == NS_IMAGE ) { for deleting images. I carn't find any code relating to deleting any other files that arn't images. [17:38:22] >_< [17:39:27] paladox: files and images are the same in MediaWIki, NS_FILE is the same NS_IMAGE, it got renamed at some point in history long time ago [17:39:49] hi -- just installed MediaWiki -- trying to get to the config file but get "You don't have permission to access /index.php on this server." [17:40:03] saper: So NS_IMAGE is the same thing so it does support deleting files then. [17:40:08] what should the rights for index.php look like? [17:41:01] noob777: check the directory and index.php - they have to be readable be the user running the webserver [17:41:13] noob777, definitely +r for www-data or whatever is your webserver's username, but a+r is usually also ok [17:52:10] saper: So NS_IMAGE is the same thing so it does support deleting files then. [18:31:26] paladox: yes, you should change NS_IMAGE to NS_FILE in the code [18:31:42] Ok. [18:33:06] do you understand what I did? do you understand my comments? [18:34:13] Yes. [18:34:32] try to see how the error is reported now, looks like an input error in the form [18:34:39] not very cool but works [18:57:25] Its all fix yes the way you did you looks fine and can be changed un follow up patchs if it dosent look nice to others. Its looks nice because it shows up in red if it carn't delete the page [19:12:36] paladox: ok so fix the rest of the issues and we can proceed to start doing the redirect for the success page. [19:28:46] saper: Ok ive uploaded a new patch with the changes. [19:32:52] This was fast http://meta.stackoverflow.com/a/309301/ [19:58:08] paladox: you have my comments plus complains from jenkins [19:59:50] Nemo_bis: efficient cabal it seems [20:13:08] saper: Ok ive addressed some of your comments in the new patch i uploaded. [20:55:40] saper: can i merge. Please read patch for the information on why. [21:05:37] saper: Meant to say can i merge the patch please.