Moodle

Add json_encode and json_decode function definitions for PHP4

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.7.5, 1.8.6, 1.9.2
  • Fix Version/s: 1.8.7, 1.9.3
  • Component/s: AJAX
  • Labels:
    None
  • Affected Branches:
    MOODLE_17_STABLE, MOODLE_18_STABLE, MOODLE_19_STABLE
  • Fixed Branches:
    MOODLE_18_STABLE, MOODLE_19_STABLE

Description

The PHP5 functions json_encode and json_decode are very useful for writing PHP callback files to use with AJAX requests. The PEAR SERVICES_JSON package has been added to Moodle, but it would be useful to have function calls "faking" the PHP5 functions when a lower PHP version is on the server.

Activity

Hide
Nicolas Connault added a comment -

Added php version-dependent function definitions so that we can use json_encode() and json_decode() no matter what PHP version the server is running.

Show
Nicolas Connault added a comment - Added php version-dependent function definitions so that we can use json_encode() and json_decode() no matter what PHP version the server is running.
Hide
Dongsheng Cai added a comment -

Thanks, closing.

Show
Dongsheng Cai added a comment - Thanks, closing.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: