◆ prepare()
◆ step_1()
      
        
          | ilMailDatabaseUpdateSteps::step_1  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 30 of file class.ilMailDatabaseUpdateSteps.php.
   32         if ($this->db->tableExists(
'mail') && $this->db->tableColumnExists(
'mail', 
'm_email')) {
    33             $this->db->dropTableColumn(
'mail', 
'm_email');
  
 
 
◆ step_10()
      
        
          | ilMailDatabaseUpdateSteps::step_10  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 157 of file class.ilMailDatabaseUpdateSteps.php.
  159         if (!$this->db->tableColumnExists(
'mail_options', 
'absence_ar_subject')) {
   160             $this->db->addTableColumn(
   162                 'absence_ar_subject',
  
 
 
◆ step_11()
      
        
          | ilMailDatabaseUpdateSteps::step_11  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 173 of file class.ilMailDatabaseUpdateSteps.php.
  175         if (!$this->db->tableExists(
'mail_auto_responder')) {
   176             $this->db->createTable(
   177                 'mail_auto_responder',
   190                         'type' => 
'timestamp',
   195             $this->db->addPrimaryKey(
'mail_auto_responder', [
'sender_id', 
'receiver_id']);
  
 
 
◆ step_12()
      
        
          | ilMailDatabaseUpdateSteps::step_12  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 199 of file class.ilMailDatabaseUpdateSteps.php.
References $res, and ilDBConstants\T_TEXT.
  202             'mail_system_sys_signature',
   203             'mail_system_usr_from_name',
   206         foreach ($settings as $keyword) {
   207             $res = $this->db->queryF(
   208                 "SELECT value FROM settings WHERE keyword = %s AND value IS NOT NULL AND value != ''",
   212             if ($this->db->numRows(
$res) === 1) {
   213                 $value = $this->db->fetchAssoc(
$res)[
'value'] ?? 
'';
   218                 $value = preg_replace(
   224                 $this->db->manipulateF(
   225                     'UPDATE settings SET value = %s WHERE keyword = %s',
 
 
 
 
◆ step_13()
      
        
          | ilMailDatabaseUpdateSteps::step_13  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 233 of file class.ilMailDatabaseUpdateSteps.php.
  235         if ($this->db->tableExists(
"mail_tpl_ctx")) {
   236             $query = 
"UPDATE mail_tpl_ctx SET " . PHP_EOL
   237                 . 
" component = REPLACE(component, 'Modules', 'components/ILIAS') " . PHP_EOL
   238                 . 
" WHERE component LIKE ('Modules/%')";
   240             $this->db->manipulate($query);
  
 
 
◆ step_14()
      
        
          | ilMailDatabaseUpdateSteps::step_14  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 244 of file class.ilMailDatabaseUpdateSteps.php.
  246         if ($this->db->tableExists(
"mail_tpl_ctx")) {
   247             $query = 
"UPDATE mail_tpl_ctx SET " . PHP_EOL
   248                 . 
" path = REPLACE(path, 'Modules', 'components/ILIAS') " . PHP_EOL
   249                 . 
" WHERE component LIKE ('Modules/%')" . PHP_EOL
   250                 . 
" AND path IS NOT NULL";
   252             $this->db->manipulate($query);
  
 
 
◆ step_15()
      
        
          | ilMailDatabaseUpdateSteps::step_15  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 256 of file class.ilMailDatabaseUpdateSteps.php.
References $res, and ilDBConstants\T_TEXT.
  258         $res = $this->db->queryF(
   259             "SELECT value FROM settings WHERE keyword = %s AND value IS NOT NULL AND value != ''",
   261             [
'mail_system_sys_signature']
   263         if ($this->db->numRows(
$res) === 1) {
   264             $value = $this->db->fetchAssoc(
$res)[
'value'] ?? 
'';
   265             $sys_general_signature = preg_replace(
'/(\s?\*\s?){2,}/', 
"\n\n-- \n", $value);
   267             $sys_general_signature = preg_replace(
'/\[([A-Z_]+?)\]/', 
'{{$1}}', $sys_general_signature);
   268             $sys_general_signature = str_replace(
   269                 [
'CLIENT_URL', 
'CLIENT'],
   270                 [
'ILIAS_URL', 
'INSTALLATION'],
   271                 $sys_general_signature
   273             $this->db->manipulateF(
   274                 'DELETE FROM settings WHERE keyword = %s',
   276                 [
'mail_system_sys_signature']
   279         $this->db->insert(
'settings', [
   280             'module' => [
'text', 
'common'],
   281             'keyword' => [
'text', 
'mail_system_sys_general_signature'],
   284                 $sys_general_signature ?? 
"\n\n-- \n{{INSTALLATION_NAME}}\n{{INSTALLATION_DESC}}\n{{ILIAS_URL}}\n"   287         $this->db->insert(
'settings', [
   288             'module' => [
'text', 
'common'],
   289             'keyword' => [
'text', 
'mail_system_usr_general_signature'],
   290             'value' => [
'text', 
"\n\n-- \nThis mail was sent by {{USER_FULLNAME}} from {{INSTALLATION_NAME}}\n"],
 
 
 
 
◆ step_2()
      
        
          | ilMailDatabaseUpdateSteps::step_2  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 37 of file class.ilMailDatabaseUpdateSteps.php.
   39         $result = $this->db->queryF(
'SELECT value FROM settings WHERE module = %s AND keyword = %s', [
'text', 
'text'], [
'common', 
'mail_system_sys_signature']);
    40         $row = $this->db->fetchAssoc($result);
    41         if (isset($row[
'value']) && $row[
'value'] !== 
'') {
    42             $new_value = str_replace([
'[CLIENT_NAME]', 
'[CLIENT_DESC]', 
'[CLIENT_URL]'], [
'[INSTALLATION_NAME]', 
'[INSTALLATION_DESC]', 
'[ILIAS_URL]'], $row[
'value']);
    43             if ($new_value !== $row[
'value']) {
    44                 $this->db->manipulateF(
    45                     'UPDATE settings SET value = %s WHERE module = %s AND keyword = %s',
    46                     [
'text', 
'text', 
'text'],
    47                     [$new_value, 
'common', 
'mail_system_sys_signature']
  
 
 
◆ step_3()
      
        
          | ilMailDatabaseUpdateSteps::step_3  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 53 of file class.ilMailDatabaseUpdateSteps.php.
   55         $result = $this->db->query(
"SELECT tpl_id, m_message FROM mail_man_tpl WHERE m_message LIKE '%[CLIENT_NAME]%'");
    56         while ($row = $this->db->fetchAssoc($result)) {
    57             if (isset($row[
'm_message'], $row[
'tpl_id']) && $row[
'm_message'] !== 
'' && $row[
'tpl_id'] !== 
'') {
    58                 $new_value = str_replace(
'[CLIENT_NAME]', 
'[INSTALLATION_NAME]', $row[
'm_message']);
    59                 if ($new_value !== $row[
'm_message']) {
    60                     $this->db->manipulateF(
    61                         'UPDATE mail_man_tpl SET m_message = %s WHERE tpl_id = %s',
    63                         [$new_value, $row[
'tpl_id']]
  
 
 
◆ step_4()
      
        
          | ilMailDatabaseUpdateSteps::step_4  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 70 of file class.ilMailDatabaseUpdateSteps.php.
   72         $result = $this->db->query(
"SELECT lang, type, body FROM mail_template WHERE body LIKE '%[CLIENT_NAME]%'");
    73         while ($row = $this->db->fetchAssoc($result)) {
    74             if (isset($row[
'lang'], $row[
'type'], $row[
'body']) && $row[
'body'] !== 
'') {
    75                 $new_value = str_replace(
'[CLIENT_NAME]', 
'[INSTALLATION_NAME]', $row[
'body']);
    76                 if ($new_value !== $row[
'body']) {
    77                     $this->db->manipulateF(
    78                         'UPDATE mail_template SET body = %s WHERE lang = %s AND type = %s',
    79                         [
'text', 
'text', 
'text'],
    80                         [$new_value, $row[
'lang'], $row[
'type']]
  
 
 
◆ step_5()
      
        
          | ilMailDatabaseUpdateSteps::step_5  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 87 of file class.ilMailDatabaseUpdateSteps.php.
   89         if ($this->db->tableExists(
'mail_options') && $this->db->tableColumnExists(
'mail_options', 
'linebreak')) {
    90             $this->db->dropTableColumn(
'mail_options', 
'linebreak');
  
 
 
◆ step_6()
      
        
          | ilMailDatabaseUpdateSteps::step_6  | 
          ( | 
           | ) | 
           | 
        
      
 
 
◆ step_7()
      
        
          | ilMailDatabaseUpdateSteps::step_7  | 
          ( | 
           | ) | 
           | 
        
      
 
 
◆ step_8()
      
        
          | ilMailDatabaseUpdateSteps::step_8  | 
          ( | 
           | ) | 
           | 
        
      
 
 
◆ step_9()
      
        
          | ilMailDatabaseUpdateSteps::step_9  | 
          ( | 
           | ) | 
           | 
        
      
 
 
◆ $db
The documentation for this class was generated from the following file: