system_update_6017

Хочешь помочь с переводом? Это очень просто и быстро. Лишь зарегистрируйся, и можешь тут же начать переводить.

modules/system/system.install, строка 1460

Версии
6
system_update_6017()

Rename settings related to user.module email notifications.

Связанные темы

Код

<?php
function system_update_6017() {
  $ret = array();
  // Maps old names to new ones.
  $var_names = array(
    'admin'    => 'register_admin_created',
    'approval' => 'register_pending_approval',
    'welcome'  => 'register_no_approval_required',
    'pass'     => 'password_reset',
  );
  foreach ($var_names as $old => $new) {
    foreach (array('_subject', '_body') as $suffix) {
      $old_name = 'user_mail_'. $old . $suffix;
      $new_name = 'user_mail_'. $new . $suffix;
      if ($old_val = variable_get($old_name, FALSE)) {
        variable_set($new_name, $old_val);
        variable_del($old_name);
        $ret[] = array('success' => TRUE, 'query' => "variable_set($new_name)");
        $ret[] = array('success' => TRUE, 'query' => "variable_del($old_name)");
        if ($old_name == 'user_mail_approval_body') {
          drupal_set_message('Saving an old value of the welcome message body for users that are pending administrator approval. However, you should consider modifying this text, since Drupal can now be configured to automatically notify users and send them their login information when their accounts are approved. See the <a href="'. url('admin/user/settings') .'">User settings</a> page for details.');
        }
      }
    }
  }
  return $ret;
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии

Вход в систему