Extension talk:MailNotification
Add topicPlease feel free to post comments on my extensions.
Updated MailNotification
[edit]I've updated MailNotification and it now works on modern Mediawikis, including 1.15.1. It's also been tested on Dreamhost. I've posted the code on github and wrote a little post about it on my blog: [MediaWiki Mail Notification] --Adamwolf 20:42, 23 August 2009 (UTC)
Trouble running MailNotification extension
[edit]This is a great idea for an extension. Thanks for releasing it!
I'm having some trouble getting it running. After installing, when I submit changes to the wiki, I see this
Fatal error: Call to undefined function wfquery() in /home/.author/leedh/lee.org/w/extensions/MailNotification.php on line 36
When trying to look at Special:Version, I get this:
Catchable fatal error: Object of class MailNotification could not be converted to string in /home/.author/leedh/lee.org/w/includes/SpecialVersion.php on line 241
Any ideas? I'm running
- MediaWiki: 1.9.3
- PHP: 5.2.1 (cgi-fcgi)
- MySQL: 5.0.24a-standard-log
- Dreamhost shared hosting
--Gadlen 05:20, 25 March 2007 (UTC)
Romout:
Hi,
I'm sorry that you have such troubles running my extension :-( I've implemented the extension using MamboWiki's latest release. The contained MediaWiki Version is 1.7.2. The wfquery() function is defined in includes/DatabaseFunctions.php and should be accessible. As already mentioned, I've not tried to run the extension under any later media wiki version. Nevertheless, I'll do so as soon as possible.
For now, have you some additional information or ideas on your topics?
wfQuery seems to be gone in PHP 5.2.1
[edit]Others extensions are having the same issue. You can see http://www.bad-behavior.ioerror.us/2007/01/26/bad-behavior-on-php-520/ for some details (not many though).
I have outlined the solution (by Ped Xing in the Bad Behaviour Blog, see above) and the reasons behind it on this page: http://blog.ideaday.de/max/2011/07/mediawiki-1-17-and-bad-behaviour/
Gadlen: The guy discussing Bad Behavior mentions that he is running on Dreamhost. I am also on Dreamhost which may be significant. (I added that info above). I wish I had the chops to help you solve this problem. I can volunteer some time to help you out though. See my profile to find my email address. --Gadlen 18:11, 15 April 2007 (UTC)
wfQuery provided by old MediaWiki code, removed in MediaWiki 1.17
[edit]It is provided by old MediaWiki code which has been removed as of MediaWiki 1.17. (The code used to provide compatibility for very old code and extensions, dating back to pre 1.3 release)
Look at includes/DatabaseFunctions.php in an older MediaWiki version to see the function's definition, and a short explanation what the code is for.
Database errors
[edit]When CREATE has been denied to the database user running MediaWiki, this script fails. Even if the table is created manually first. I personally think keeping the strict permissions is a better idea than relaxing them.
I worked around this by creating the table by hand and then commenting out the contents of the function that is meant to create the table. Seems to work fine.
Warning: Unprotected SQL queries
[edit]Potential SQL Injection Vulnerability
This extension appears to not sanitise page names and other user input, feeding them directly into SQL queries. At this stage, I have only had innocent attempts to create page names such as "Tom's_Boat", which only gives an SQL error... But a crafty malicious user may try something like "nothing'; DROP *" as a page name, which could be very bad (I'm not game to test it though, even though my DB user doesn't have drop permission).
I need someone with PHP/SQL skills to confirm this however, as I'm not really a developer.
--Tim Bates
Romout: Sorry for replying so late - I really had no time at all working at the extension. For some reasons (server crashes, movements, changes in software and hardware...), I was in the need of re-applying my extension and therefore came back to what you wrote.
I've simply removed the slashes using mysql_real_escape_string.
Possibility to send to a specific address only?
[edit]Hi, This extension pretty much sounds perfect for what I am wanting to use. However is it possible to edit (easily?) so that instead of sending to the user groups, but to a specific address. Also any ideas if it will run in MW 1.12? Thanks
Cameron.moody 02:49, 1 July 2008 (UTC)
Broken link
[edit]The link to download this extension with the file mailnotification-0.2.zip is broken!
Another user: Yes, it is. Please fix.
download failure
[edit]hi ,I need this extension ,but I can not download if someone has the resources,please mail to 576016880@qq.com,thank you vrey much!