Jump to content

Extension talk:Dice

Add topic
From mediawiki.org
Latest comment: 12 years ago by Coren in topic Not null


doesnt work for me

[edit]

cant seem to make it work

i type @@4d6 but it just prints that as is, not the dicethrow 75.72.16.129 21:38, 4 August 2012 (UTC)Reply

Not null

[edit]

To get it to work, I had to go into mysql and make dice_rolls.roll_rev nullable. Thanks for sharing this extension, by the way! Leucosticte (talk) 14:36, 30 August 2012 (UTC)Reply

(Zombie thread!!1!) Ah, thanks for this. Do you have a patch to the mysql database setup? My own setup here allows me to test postgresql and Oracle only. — Coren (talk)/(enwp) 16:39, 31 January 2013 (UTC)Reply

Necessary modifications

[edit]

In Dice_body.php, make two changes to get rid of those annoying warnings about missing argument 12 for Dice::Saved() and invalid argument supplied for foreach in Dice_body.php on line 63.

Replace this:

    var $id;

with this:

    var $id = array();

Also revise static function saved() to get rid of &$redirect. This reflects the change that was made to Manual:Hooks/ArticleSaveComplete to reduce it from 12 to 11 arguments. In other words, change it from:

static function saved(&$article, &$user, $text, $summary,
    $minoredit, $watchthis, $sectionanchor, &$flags,
    $revision, &$status, $baseRevId, &$redirect) {

to:

static function saved(&$article, &$user, $text, $summary, 
    $minoredit, $watchthis, $sectionanchor, &$flags,
    $revision, &$status, $baseRevId ) {

Leucosticte (talk) 22:51, 25 September 2012 (UTC)Reply

Will do as soon as I get a second in the next week. Thanks for the pointers. — Coren (talk)/(enwp) 21:03, 1 December 2012 (UTC)Reply