Make WordPress Core

Changeset 957 for trunk/wp-mail.php


Ignore:
Timestamp:
03/01/2004 07:55:45 PM (21 years ago)
Author:
saxmatt
Message:

Migration to get_settings and away from globals.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-mail.php

    r914 r957  
    1111$time_difference = get_settings('time_difference');
    1212
    13 if ($use_phoneemail) {
     13if (get_settings('use_phoneemail')) {
    1414    // if you're using phone email, the email will already be in your timezone
    1515    $time_difference = 0;
     
    2222$pop3 = new POP3();
    2323
    24 if(!$pop3->connect($mailserver_url, $mailserver_port)) {
     24if(!$pop3->connect(get_settings('mailserver_url'), get_settings('mailserver_port'))) {
    2525    echo "Ooops $pop3->ERROR <br />\n";
    2626    exit;
    2727}
    2828
    29 $Count = $pop3->login($mailserver_login, $mailserver_pass);
     29$Count = $pop3->login(get_settings('mailserver_login'), get_settings('mailserver_pass'));
    3030if((!$Count) || ($Count == -1)) {
    3131    echo "<h1>Login Failed: $pop3->ERROR</h1>\n";
     
    7777                  $subject = wp_iso_descrambler($subject);
    7878                }
    79                 if ($use_phoneemail) {
    80                     $subject = explode($phoneemail_separator, $subject);
     79                if (get_settings('use_phoneemail')) {
     80                    $subject = explode(get_settings('phoneemail_separator'), $subject);
    8181                    $subject = trim($subject[0]);
    8282                }
    83                 if (!ereg($subjectprefix, $subject)) {
     83                if (!ereg(get_settings('subjectprefix'), $subject)) {
    8484                    continue;
    8585                }
     
    125125    }
    126126
    127     if (preg_match('/'.$subjectprefix.'/', $subject)) {
     127    if (preg_match('/'.get_settings('subjectprefix').'/', $subject)) {
    128128
    129129        $userpassstring = '';
     
    132132        echo "<p><b>$iCount</b></p><p><b>Subject: </b>$subject</p>\n";
    133133
    134         $subject = trim(str_replace($subjectprefix, '', $subject));
     134        $subject = trim(str_replace(get_settings('subjectprefix'), '', $subject));
    135135
    136136        if ($content_type == 'multipart/alternative') {
     
    145145        echo "<p><b>Raw content:</b><br /><pre>".$content.'</pre></p>';
    146146       
    147         $btpos = strpos($content, $bodyterminator);
     147        $btpos = strpos($content, get_settings('bodyterminator'));
    148148        if ($btpos) {
    149149            $content = substr($content, 0, $btpos);
     
    155155        $secondline = $blah[1];
    156156
    157         if ($use_phoneemail) {
    158             $btpos = strpos($firstline, $phoneemail_separator);
     157        if (get_settings('use_phoneemail')) {
     158            $btpos = strpos($firstline, get_settings('phoneemail_separator'));
    159159            if ($btpos) {
    160160                $userpassstring = trim(substr($firstline, 0, $btpos));
    161                 $content = trim(substr($content, $btpos+strlen($phoneemail_separator), strlen($content)));
    162                 $btpos = strpos($content, $phoneemail_separator);
     161                $content = trim(substr($content, $btpos+strlen(get_settings('phoneemail_separator')), strlen($content)));
     162                $btpos = strpos($content, get_settings('phoneemail_separator'));
    163163                if ($btpos) {
    164164                    $userpassstring = trim(substr($content, 0, $btpos));
    165                     $content = trim(substr($content, $btpos+strlen($phoneemail_separator), strlen($content)));
     165                    $content = trim(substr($content, $btpos+strlen(get_settings('phoneemail_separator')), strlen($content)));
    166166                }
    167167            }
     
    219219            }
    220220            if (empty($post_categories)) {
    221                 $post_categories[] = $default_category;
     221                $post_categories[] = get_settings('default_category');
    222222            }
    223223
Note: See TracChangeset for help on using the changeset viewer.