Skip to content

Commit

Permalink
Nits
Browse files Browse the repository at this point in the history
  • Loading branch information
kohler committed Nov 30, 2023
1 parent 64b0425 commit 74d9862
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions lib/mailer.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ class Mailer {
protected $adminupdate = false;
/** @var ?string */
protected $notes;
/** @var ?string */
public $capability_token;
/** @var bool */
protected $sensitive;
Expand All @@ -48,19 +49,22 @@ class Mailer {

/** @var array<string,true> */
private $_unexpanded = [];
/** @var list<string> */
protected $_errors_reported = [];
/** @var ?MessageSet */
private $_ms;

/** @param ?Contact $recipient */
/** @param ?Contact $recipient
* @param array{width?:int,censor?:0|1|2,reason?:string,change?:string,adminupdate?:bool,notes?:string,capability_token?:string,sensitive?:bool} $settings */
function __construct(Conf $conf, $recipient = null, $settings = []) {
$this->conf = $conf;
$this->eol = $conf->opt("postfixEOL") ?? "\r\n";
$this->flowed = !!$this->conf->opt("mailFormatFlowed");
$this->reset($recipient, $settings);
}

/** @param ?Contact $recipient */
/** @param ?Contact $recipient
* @param array{width?:int,censor?:0|1|2,reason?:string,change?:string,adminupdate?:bool,notes?:string,capability_token?:string,sensitive?:bool} $settings */
function reset($recipient = null, $settings = []) {
$this->recipient = $recipient;
$this->width = $settings["width"] ?? 72;
Expand Down
2 changes: 1 addition & 1 deletion src/updateschema.php
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ private function drop_keys_if_exist($table, $key) {
* @param string $column
* @return ?int */
private function check_column_exists($table, $column) {
return Dbl::fetch_ivalue($this->conf->dblink, "select exists (select * from information_schema.columns where table_schema=database() and `table_name`='$table' and `column_name`='$column') from dual");
return Dbl::fetch_ivalue($this->conf->dblink, "select exists (select * from information_schema.columns where table_schema=database() and `table_name`='{$table}' and `column_name`='{$column}') from dual");
}

private function v154_mimetype_extensions() {
Expand Down

0 comments on commit 74d9862

Please sign in to comment.