Code Duplication    Length = 18-18 lines in 2 locations

catalog/admin/includes/functions/general.php 1 location

@@ 1174-1191 (lines=18) @@
1171
    return $value;
1172
  }
1173
1174
  function tep_mail($to_name, $to_email_address, $email_subject, $email_text, $from_email_name, $from_email_address) {
1175
    if (SEND_EMAILS != 'true') return false;
1176
1177
    // Instantiate a new mail object
1178
    $message = new email(array('X-Mailer: osCommerce'));
1179
1180
    // Build the text version
1181
    $text = strip_tags($email_text);
1182
    if (EMAIL_USE_HTML == 'true') {
1183
      $message->add_html($email_text, $text);
1184
    } else {
1185
      $message->add_text($text);
1186
    }
1187
1188
    // Send message
1189
    $message->build_message();
1190
    $message->send($to_name, $to_email_address, $from_email_name, $from_email_address, $email_subject);
1191
  }
1192
1193
  function tep_get_tax_class_title($tax_class_id) {
1194
    if ($tax_class_id == '0') {

catalog/includes/functions/general.php 1 location

@@ 1035-1052 (lines=18) @@
1032
// $from_email_adress The eMail address of the sender,
1033
//                    e.g. [email protected]
1034
1035
  function tep_mail($to_name, $to_email_address, $email_subject, $email_text, $from_email_name, $from_email_address) {
1036
    if (SEND_EMAILS != 'true') return false;
1037
1038
    // Instantiate a new mail object
1039
    $message = new email(array('X-Mailer: osCommerce'));
1040
1041
    // Build the text version
1042
    $text = strip_tags($email_text);
1043
    if (EMAIL_USE_HTML == 'true') {
1044
      $message->add_html($email_text, $text);
1045
    } else {
1046
      $message->add_text($text);
1047
    }
1048
1049
    // Send message
1050
    $message->build_message();
1051
    $message->send($to_name, $to_email_address, $from_email_name, $from_email_address, $email_subject);
1052
  }
1053
1054
////
1055
// Check if product has attributes