Commit d5a88625 authored by ergonlogic's avatar ergonlogic

Issue #2037045 by helmo, ergonlogic: Change some log statuses to better match Drush's log styling.

parent 2bc00612
......@@ -40,7 +40,7 @@ class Provision_ChainedState {
*/
function succeed($message) {
if ($this->last_status === TRUE) {
drush_log(dt($message, $this->tokens), 'message');
drush_log(dt($message, $this->tokens), 'success');
}
return $this;
......
......@@ -32,13 +32,13 @@ class Provision_Service_db extends Provision_Service {
function verify_server_cmd() {
if ($this->connect()) {
if ($this->can_create_database()) {
drush_log(dt('Provision can create new databases.'), 'message');
drush_log(dt('Provision can create new databases.'), 'success');
}
else {
drush_set_error('PROVISION_CREATE_DB_FAILED');
}
if ($this->can_grant_privileges()) {
drush_log(dt('Provision can grant privileges on database users.'), 'message');;
drush_log(dt('Provision can grant privileges on database users.'), 'success');;
}
else {
drush_set_error('PROVISION_GRANT_DB_USER_FAILED');
......
......@@ -100,10 +100,10 @@ function install_send_welcome_mail($url, $account, $profile, $language, $client_
$mail_success = drupal_mail($mailkey, $client_email, $subject, $body, $from);
if ($mail_success) {
drush_log(t('Sent welcome mail to @client', array('@client' => $client_email)), 'message');
drush_log(t('Sent welcome mail to @client', array('@client' => $client_email)), 'success');
}
else {
drush_log(t('Could not send welcome mail to @client', array('@client' => $client_email)));
drush_log(t('Could not send welcome mail to @client', array('@client' => $client_email)), 'warning');
}
}
......@@ -193,7 +193,7 @@ function install_main() {
$onetime = user_pass_reset_url($account);
// Store the one time login link in an option so the front end can direct the user to their new site.
drush_set_option('login_link', $onetime . '/login');
drush_log(t('Login url: !onetime', array('!onetime' => $onetime . '/login')), 'message');
drush_log(t('Login url: !onetime', array('!onetime' => $onetime . '/login')), 'success');
if ($client_email) {
install_send_welcome_mail($url, $account, $profile, $install_locale, $client_email, $onetime);
......
......@@ -78,10 +78,10 @@ function install_send_welcome_mail($url, $account, $profile, $language, $client_
$mail_success = drupal_mail('install', 'welcome-admin', $client_email, user_preferred_language($account), $mail_params, $from, TRUE);
if ($mail_success) {
drush_log(t('Sent welcome mail to @client', array('@client' => $client_email)), 'message');
drush_log(t('Sent welcome mail to @client', array('@client' => $client_email)), 'success');
}
else {
drush_log(t('Could not send welcome mail to @client', array('@client' => $client_email)));
drush_log(t('Could not send welcome mail to @client', array('@client' => $client_email)), 'warning');
}
}
......@@ -354,7 +354,7 @@ function install_main() {
$onetime = user_pass_reset_url($account);
// Store the one time login link in an option so the front end can direct the user to their new site.
drush_set_option('login_link', $onetime . '/login');
drush_log(t('Login url: !onetime', array('!onetime' => $onetime . '/login')), 'message');
drush_log(t('Login url: !onetime', array('!onetime' => $onetime . '/login')), 'success');
if ($client_email) {
install_send_welcome_mail($url, $account, $profile, $install_locale, $client_email, $onetime);
......
......@@ -25,10 +25,10 @@ function install_send_welcome_mail($url, $account, $language, $client_email, $on
$mail_success = drupal_mail('install', 'welcome-admin', $account->mail, user_preferred_language($account), $mail_params, $from, TRUE);
if ($mail_success) {
drush_log(t('Sent welcome mail to @client', array('@client' => $client_email)), 'message');
drush_log(t('Sent welcome mail to @client', array('@client' => $client_email)), 'success');
}
else {
drush_log(t('Could not send welcome mail to @client', array('@client' => $client_email)));
drush_log(t('Could not send welcome mail to @client', array('@client' => $client_email)), 'warning');
}
}
}
......@@ -158,7 +158,7 @@ function install_main() {
$onetime = user_pass_reset_url($account);
// Store the one time login link in an option so the front end can direct the user to their new site.
drush_set_option('login_link', $onetime . '/login');
drush_log(t('Login url: !onetime', array('!onetime' => $onetime . '/login')), 'message');
drush_log(t('Login url: !onetime', array('!onetime' => $onetime . '/login')), 'success');
if ($client_email) {
install_send_welcome_mail($url, $account, $install_locale, $client_email, $onetime);
......
......@@ -29,7 +29,7 @@ function drush_provision_drupal_provision_login_reset() {
$onetime = user_pass_reset_url($account) . '/login';
// pass the login link to the front end
drush_set_option('login_link', $onetime);
drush_log(t('Login url: !onetime', array('!onetime' => $onetime)), 'message');
drush_log(t('Login url: !onetime', array('!onetime' => $onetime)), 'success');
if (drush_drupal_major_version() >= 7) {
drupal_session_destroy_uid(1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment