Moodle

Wiki module doesn't work under mysqli

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Critical Critical
  • Resolution: Fixed
  • Affects Version/s: 1.8.4, 1.9
  • Fix Version/s: 1.8.5, 1.9.1
  • Component/s: Wiki (1.x)
  • Labels:
    None
  • Database:
    MySQL
  • Affected Branches:
    MOODLE_18_STABLE, MOODLE_19_STABLE
  • Fixed Branches:
    MOODLE_18_STABLE, MOODLE_19_STABLE

Description

It seems that current (e)wiki module doesn't work at all. All I get under 19_STABLE is a blank page after creating the activity.

Using MySQL DB driver.

Activity

Hide
Eloy Lafuente (stronk7) added a comment -

Tracing down the problem (nothing is showed in error logs) it seems that, in the anydb_escape_string() function (mod/wiki/ewikimoodlelib.php) we are using the mysql_escape_string() function boht under mysqli and mysql drivers.

Going to change that function to ALWAYS (any DB) return the results of a simple addslashes() really I cannot imagine any reason against that.

Ciao

Show
Eloy Lafuente (stronk7) added a comment - Tracing down the problem (nothing is showed in error logs) it seems that, in the anydb_escape_string() function (mod/wiki/ewikimoodlelib.php) we are using the mysql_escape_string() function boht under mysqli and mysql drivers. Going to change that function to ALWAYS (any DB) return the results of a simple addslashes() really I cannot imagine any reason against that. Ciao
Hide
Eloy Lafuente (stronk7) added a comment -

Done. Applied to 18_STABLE, 19_STABLE and HEAD. Works under mysqli perfectly (and should against the rest).

Closing, ciao

Show
Eloy Lafuente (stronk7) added a comment - Done. Applied to 18_STABLE, 19_STABLE and HEAD. Works under mysqli perfectly (and should against the rest). Closing, ciao
Hide
Petr Škoda (skodak) added a comment -

reviewed patch, closing -thanks!

Show
Petr Škoda (skodak) added a comment - reviewed patch, closing -thanks!

People

Dates

  • Created:
    Updated:
    Resolved: