Logging: improved grammar a little

This commit is contained in:
Marcin Kurczewski 2013-11-23 10:39:41 +01:00
parent 7fccbd5e02
commit 81017e18cb
2 changed files with 8 additions and 8 deletions

View file

@ -604,7 +604,7 @@ class PostController
$newSafety = $post->safety; $newSafety = $post->safety;
if ($oldSafety != $newSafety) if ($oldSafety != $newSafety)
LogHelper::log('{user} changed safety for {post} to {safety}', ['post' => TextHelper::reprPost($post), 'safety' => PostSafety::toString($post->safety)]); LogHelper::log('{user} changed safety of {post} to {safety}', ['post' => TextHelper::reprPost($post), 'safety' => PostSafety::toString($post->safety)]);
} }
/* tags */ /* tags */
@ -637,7 +637,7 @@ class PostController
$newSource = $post->source; $newSource = $post->source;
if ($oldSource != $newSource) if ($oldSource != $newSource)
LogHelper::log('{user} changed source for {post} to {source}', ['post' => TextHelper::reprPost($post), 'source' => $post->source]); LogHelper::log('{user} changed source of {post} to {source}', ['post' => TextHelper::reprPost($post), 'source' => $post->source]);
} }
/* relations */ /* relations */
@ -670,7 +670,7 @@ class PostController
$srcPath = $suppliedFile['tmp_name']; $srcPath = $suppliedFile['tmp_name'];
$post->setCustomThumbnailFromPath($srcPath); $post->setCustomThumbnailFromPath($srcPath);
LogHelper::log('{user} changed thumb for {post}', ['post' => TextHelper::reprPost($post)]); LogHelper::log('{user} changed thumb of {post}', ['post' => TextHelper::reprPost($post)]);
} }
} }
} }

View file

@ -226,7 +226,7 @@ class UserController
{ {
$user->staff_confirmed = true; $user->staff_confirmed = true;
Model_User::save($user); Model_User::save($user);
LogHelper::log('{user} confirmed account for {subject}', ['subject' => TextHelper::reprUser($user)]); LogHelper::log('{user} confirmed {subject}\'s account', ['subject' => TextHelper::reprUser($user)]);
StatusHelper::success(); StatusHelper::success();
} }
} }
@ -264,7 +264,7 @@ class UserController
AuthController::doLogOut(); AuthController::doLogOut();
\Chibi\UrlHelper::forward(\Chibi\UrlHelper::route('index', 'index')); \Chibi\UrlHelper::forward(\Chibi\UrlHelper::route('index', 'index'));
LogHelper::log('{user} removed account for {subject}', ['subject' => TextHelper::reprUser($name)]); LogHelper::log('{user} removed {subject}\'s account', ['subject' => TextHelper::reprUser($name)]);
StatusHelper::success(); StatusHelper::success();
} }
} }
@ -347,7 +347,7 @@ class UserController
throw new SimpleException('Specified passwords must be the same'); throw new SimpleException('Specified passwords must be the same');
$suppliedPassword = Model_User::validatePassword($suppliedPassword1); $suppliedPassword = Model_User::validatePassword($suppliedPassword1);
$user->pass_hash = Model_User::hashPassword($suppliedPassword, $user->pass_salt); $user->pass_hash = Model_User::hashPassword($suppliedPassword, $user->pass_salt);
LogHelper::log('{user} changed password for {subject}', ['subject' => TextHelper::reprUser($user)]); LogHelper::log('{user} changed {subject}\'s password', ['subject' => TextHelper::reprUser($user)]);
} }
if ($suppliedEmail != '' and $suppliedEmail != $user->email_confirmed) if ($suppliedEmail != '' and $suppliedEmail != $user->email_confirmed)
@ -365,7 +365,7 @@ class UserController
{ {
$user->email_unconfirmed = null; $user->email_unconfirmed = null;
$user->email_confirmed = $suppliedEmail; $user->email_confirmed = $suppliedEmail;
LogHelper::log('{user} changed e-mail for {subject} to {mail}', ['subject' => TextHelper::reprUser($user), 'mail' => $suppliedEmail]); LogHelper::log('{user} changed {subject}\'s e-mail to {mail}', ['subject' => TextHelper::reprUser($user), 'mail' => $suppliedEmail]);
} }
} }
@ -374,7 +374,7 @@ class UserController
PrivilegesHelper::confirmWithException(Privilege::ChangeUserAccessRank, PrivilegesHelper::getIdentitySubPrivilege($user)); PrivilegesHelper::confirmWithException(Privilege::ChangeUserAccessRank, PrivilegesHelper::getIdentitySubPrivilege($user));
$suppliedAccessRank = Model_User::validateAccessRank($suppliedAccessRank); $suppliedAccessRank = Model_User::validateAccessRank($suppliedAccessRank);
$user->access_rank = $suppliedAccessRank; $user->access_rank = $suppliedAccessRank;
LogHelper::log('{user} changed access rank for {subject} to {rank}', ['subject' => TextHelper::reprUser($user), 'rank' => AccessRank::toString($suppliedAccessRank)]); LogHelper::log('{user} changed {subject}\'s access rank to {rank}', ['subject' => TextHelper::reprUser($user), 'rank' => AccessRank::toString($suppliedAccessRank)]);
} }
if ($this->context->user->id == $user->id) if ($this->context->user->id == $user->id)