~ubuntu-branches/ubuntu/jaunty/moodle/jaunty

« back to all changes in this revision

Viewing changes to lib/phpmailer/class.phpmailer.php

  • Committer: Bazaar Package Importer
  • Author(s): Jordan Mantha, Matt Oquist
  • Date: 2009-02-25 15:16:22 UTC
  • mfrom: (1.1.11 upstream)
  • Revision ID: james.westby@ubuntu.com-20090225151622-0ekt1liwhv2obfza
Tags: 1.9.4.dfsg-0ubuntu1
* Merge with Debian git (Closes LP: #322961, #239481, #334611):
  - use Ubuntu's smarty lib directory for linking
  - use internal yui library 
  - add update-notifier support back in

[Matt Oquist]
  * renamed prerm script
  * significantly rewrote postinst and other maintainer scripts to improve
    user experience and package maintainability
    (Closes LP: #225662, #325450, #327843, #303078, #234609)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1192
1192
 
1193
1193
    /// Start Moodle Hack - do our own multibyte-safe header encoding
1194
1194
        $textlib = textlib_get_instance();
1195
 
        $result = $textlib->encode_mimeheader($str, $this->CharSet);
1196
 
        if ($result !== false) {
1197
 
            return $result;
 
1195
        $encoded = $textlib->encode_mimeheader($str, $this->CharSet);
 
1196
        if ($encoded !== false) {
 
1197
            $encoded = str_replace("\n", $this->LE, $encoded);
 
1198
            if ($position == 'phrase') {
 
1199
                return ("\"$encoded\"");
 
1200
            }
 
1201
            return $encoded;
1198
1202
        }
1199
1203
        // try the old way that does not handle binary-safe line splitting in mime header
1200
1204
    /// End Moodle Hack
1469
1473
        $tz = date("Z");
1470
1474
        $tzs = ($tz < 0) ? "-" : "+";
1471
1475
        $tz = abs($tz);
1472
 
        $tz = ($tz/3600)*100 + ($tz%3600)/60;
 
1476
        $tz = (($tz - ($tz%3600) )/3600)*100 + ($tz%3600)/60; // moodle change - MDL-12596
1473
1477
        $result = sprintf("%s %s%04d", date("D, j M Y H:i:s"), $tzs, $tz);
1474
1478
 
1475
1479
        return $result;