diff --git a/core/database_pdo.php b/core/database_pdo.php index 21c1285..0c7770c 100644 --- a/core/database_pdo.php +++ b/core/database_pdo.php @@ -72,7 +72,7 @@ class Database extends PDO return $sth->fetch(); } - private static function assignQuote($x, $y) + private function assignQuote($x, $y) { return $x . "=" . $this->quote($y); } @@ -92,7 +92,7 @@ class Database extends PDO function updateQuery($table, array $values, $cond) { return $this->query("UPDATE $table SET " . implode(",", - array_map(array('self', 'assignQuote'), array_keys($values), array_values($values))) . " WHERE $cond"); + array_map(array($this, 'assignQuote'), array_keys($values), array_values($values))) . " WHERE $cond"); } function getIdGenerator() { diff --git a/core/mail.php b/core/mail.php index 53fa161..3bd2ef1 100644 --- a/core/mail.php +++ b/core/mail.php @@ -17,6 +17,7 @@ class Mail protected $attachment = array (); protected $uniqid; + protected $type = "text/plain"; function __construct() { $this->setEncoding("UTF-8"); @@ -70,6 +71,11 @@ class Mail $this->content = $text; } + function setType($type) + { + $this->type = $type; + } + /** * Кодировка текста в письме */ @@ -134,7 +140,7 @@ class Mail function getMessage() { $message = "--".$this->uniqid . PHP_EOL; - $message .= $this->mimeTag("Content-Type", "text/plain", array ('charset' => $this->encoding)); + $message .= $this->mimeTag("Content-Type", $this->type, array ('charset' => $this->encoding)); $message .= $this->mimeTag("Content-Transfer-Encoding", "8bit"); $message .= PHP_EOL . $this->content . PHP_EOL . PHP_EOL;