Ignore:
Timestamp:
May 2, 2016, 12:09:23 PM (3 years ago)
Author:
jrpelegrina
Message:

Updated to moodle 3.0.3

File:
1 edited

Legend:

Unmodified
Added
Removed
  • moodle/trunk/fuentes/backup/moodle2/backup_custom_fields.php

    r136 r1331  
    8080
    8181/**
     82 * Implementation of {@link backup_final_element} that provides base64 encoding.
     83 *
     84 * This final element transparently encodes with base64_encode() contents that
     85 * normally are not safe for being stored in utf-8 xml files (binaries, serialized
     86 * data...).
     87 */
     88class base64_encode_final_element extends backup_final_element {
     89
     90    /**
     91     * Set the value for the final element, encoding it as utf-8/xml safe base64.
     92     *
     93     * @param string $value Original value coming from backup step source, usually db.
     94     */
     95    public function set_value($value) {
     96        parent::set_value(base64_encode($value));
     97    }
     98}
     99
     100/**
    82101 * Implementation of backup_nested_element that provides special handling of files
    83102 *
Note: See TracChangeset for help on using the changeset viewer.