ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
class.ilMailGlobalAddressSettingsChangedCommand.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
26 {
27  private ilDBInterface $db;
28  private int $option;
29 
30  public function __construct(ilDBInterface $db, int $option)
31  {
32  $this->db = $db;
33  $this->option = $option;
34  }
35 
36  public function execute(): void
37  {
38  $this->db->manipulateF(
39  "UPDATE settings SET value = %s WHERE module = 'common' AND keyword = 'mail_address_option'",
40  ["integer"],
41  [$this->option]
42  );
43  $this->db->manipulateF(
44  "UPDATE mail_options SET mail_address_option = %s",
45  ["integer"],
46  [$this->option]
47  );
48  }
49 }