~ubuntu-branches/ubuntu/utopic/moodle/utopic

« back to all changes in this revision

Viewing changes to badges/lib/bakerlib.php

  • Committer: Package Import Robot
  • Author(s): Thijs Kinkhorst
  • Date: 2014-05-12 16:10:38 UTC
  • mfrom: (36.1.3 sid)
  • Revision ID: package-import@ubuntu.com-20140512161038-puyqf65k4e0s8ytz
Tags: 2.6.3-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
120
120
            debugging('Key is too big');
121
121
        }
122
122
 
123
 
        if ($type == 'iTXt') {
124
 
            // iTXt International textual data.
125
 
            // Keyword:             1-79 bytes (character string)
126
 
            // Null separator:      1 byte
127
 
            // Compression flag:    1 byte
128
 
            // Compression method:  1 byte
129
 
            // Language tag:        0 or more bytes (character string)
130
 
            // Null separator:      1 byte
131
 
            // Translated keyword:  0 or more bytes
132
 
            // Null separator:      1 byte
133
 
            // Text:                0 or more bytes
134
 
            $data = $key . "\000'json'\0''\0\"{'method': 'hosted', 'assertionUrl': '" . $value . "'}\"";
135
 
        } else {
136
 
            // tEXt Textual data.
137
 
            // Keyword:        1-79 bytes (character string)
138
 
            // Null separator: 1 byte
139
 
            // Text:           n bytes (character string)
140
 
            $data = $key . "\0" . $value;
141
 
        }
 
123
        // tEXt Textual data.
 
124
        // Keyword:        1-79 bytes (character string)
 
125
        // Null separator: 1 byte
 
126
        // Text:           n bytes (character string)
 
127
        $data = $key . "\0" . $value;
142
128
        $crc = pack("N", crc32($type . $data));
143
129
        $len = pack("N", strlen($data));
144
130