Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

reword and standardise log messages

  • Loading branch information...
commit 68d44fe0d499848832c52c5eaa7d878d0ff9bcbd 1 parent a70f8d4
Adrian Oldham adrianoldham authored committed
8 site/cgi-bin/modules/BSE/AdminLogon.pm
View
@@ -4,7 +4,7 @@ use BSE::Util::Tags qw(tag_error_img);
use BSE::Util::HTML;
use BSE::CfgInfo 'admin_base_url';
-our $VERSION = "1.006";
+our $VERSION = "1.007";
my %actions =
(
@@ -145,7 +145,7 @@ sub req_logon {
(
component => "adminlogon:logon:invalid",
level => "warning",
- msg => "Failed logon attempt",
+ msg => "Admin User logon attempt failed",
actor => "U",
object => $user,
dump => "Logon: $logon",
@@ -163,7 +163,7 @@ sub req_logon {
(
component => "adminlogon:logon:success",
level => "info",
- msg => "User '" . $user->logon . "' successfully logged in",
+ msg => "Admin User '" . $user->logon . "' logged on",
actor => $user,
object => $user,
);
@@ -206,7 +206,7 @@ sub req_logoff {
component => "adminlogon:logoff:success",
object => $req->user,
actor => $req->user,
- msg => "User '" . $user->logon . "' logged off",
+ msg => "Admin User '" . $user->logon . "' logged off",
level => "info",
);
$req->flash("msg:bse/admin/logon/logoff", [ $user->logon ]);
6 site/cgi-bin/modules/BSE/AdminSiteUsers.pm
View
@@ -13,7 +13,7 @@ use constant SITEUSER_GROUP_SECT => 'BSE Siteuser groups validation';
use BSE::Template;
use DevHelp::Date qw(dh_parse_date_sql dh_parse_time_sql);
-our $VERSION = "1.011";
+our $VERSION = "1.012";
my %actions =
(
@@ -573,7 +573,7 @@ sub req_delete {
component => "members::delete",
object => $user,
level => "notice",
- msg => "Member " . $user->userId . " (" . $user->id . ") deleted",
+ msg => "Site User '" . $user->userId . "' deleted",
);
my $logon = $user->userId;
@@ -758,7 +758,7 @@ sub req_add {
actor => $req->user || "U",
object => $user,
component => "members::add",
- msg => "New user created",
+ msg => "Site User '" . $user->userId . "' created",
level => "notice",
);
6 site/cgi-bin/modules/BSE/ChangePW.pm
View
@@ -4,7 +4,7 @@ use BSE::Util::Tags qw(tag_error_img);
use BSE::Util::HTML;
use base 'BSE::UI::AdminDispatch';
-our $VERSION = "1.005";
+our $VERSION = "1.006";
my %actions =
(
@@ -60,7 +60,7 @@ sub req_change {
$req->audit
(
component => "adminchangepw:changepw:badpassword",
- msg => "User '".$user->logon."' supplied an incorrect old password when changing their password",
+ msg => "Admin User '".$user->logon."' supplied an incorrect old password when changing their password",
object => $user,
actor => $user,
level => "error",
@@ -101,7 +101,7 @@ sub req_change {
$req->audit
(
component => "adminchangepw:changepw:success",
- msg => "User '".$user->logon."' successfully changed their password",
+ msg => "Admin User '".$user->logon."' changed their password",
object => $user,
actor => $user,
level => "notice",
8 site/cgi-bin/modules/BSE/PayPal.pm
View
@@ -5,7 +5,7 @@ use BSE::Util::HTML;
use BSE::Shop::Util qw(:payment);
use Carp qw(confess);
-our $VERSION = "1.003";
+our $VERSION = "1.004";
use constant DEF_TEST_WS_URL => "https://api-3t.sandbox.paypal.com/nvp";
use constant DEF_TEST_REFRESH_URL => "https://www.sandbox.paypal.com/webscr";
@@ -196,7 +196,7 @@ sub pay_order {
level => "notice",
object => $order,
actor => scalar($req->siteuser) || "U",
- msg => "Order paid via Paypal, transaction ".$order->paypal_tran_id,
+ msg => "Apply PayPal payment to Order No. " . $order->id . ", transaction ".$order->paypal_tran_id,
);
return 1;
@@ -213,7 +213,7 @@ sub refund_order {
or confess "Missing req";
unless ($order->paymentType eq PAYMENT_PAYPAL) {
- $$rmsg = "This order was not paid by paypal";
+ $$rmsg = "This order was not paid by PayPal";
return;
}
@@ -230,7 +230,7 @@ sub refund_order {
level => "notice",
object => $order,
actor => scalar($req->user) || "U",
- msg => "PayPal payment refunded, transaction $info{REFUNDTRANSACTIONID}",
+ msg => "Refund PayPal payment on Order No. " . $order->id . ", transaction $info{REFUNDTRANSACTIONID}",
);
return 1;
6 site/cgi-bin/modules/BSE/TB/Order.pm
View
@@ -7,7 +7,7 @@ use vars qw/@ISA/;
use Carp 'confess';
use BSE::Shop::PaymentTypes;
-our $VERSION = "1.017";
+our $VERSION = "1.018";
sub columns {
return qw/id
@@ -607,7 +607,7 @@ sub send_shipped_email {
subject => "Your order has shipped",
template => "email/ordershipped",
acts => \%acts,
- log_msg => "Notify customer order has shipped",
+ log_msg => "Notify customer that Order No. " . $self->id . " has shipped",
log_object => $self,
log_component => "shopadmin:orders:saveorder",
);
@@ -628,7 +628,7 @@ sub new_stage {
}
my $old_stage = $self->stage;
- my $msg = "Set to stage '$stage'";
+ my $msg = "Set Order No. ". $self->id . " stage to '$stage'";
if (defined $stage_note && $stage_note =~ /\S/) {
$msg .= ": $stage_note";
}
10 site/cgi-bin/modules/BSE/UI/AdminShop.pm
View
@@ -19,7 +19,7 @@ use BSE::Arrows;
use BSE::Shop::Util qw(:payment order_item_opts nice_options payment_types);
use BSE::CfgInfo qw(cfg_dist_image_uri);
-our $VERSION = "1.018";
+our $VERSION = "1.019";
my %actions =
(
@@ -953,7 +953,7 @@ sub _set_order_paid {
component => "shopadmin:order:paid",
level => "notice",
object => $order,
- msg => "Order " . $order->id . " marked paid",
+ msg => "Mark Order No. " . $order->id . " as Paid",
);
}
else {
@@ -962,7 +962,7 @@ sub _set_order_paid {
component => "shopadmin:order:unpaid",
level => "notice",
object => $order,
- msg => "Order " . $order->id . " marked unpaid",
+ msg => "Mark Order No. " . $order->id . " as Unpaid",
);
}
$order->save();
@@ -1096,7 +1096,7 @@ sub req_order_save {
(
component => "shopadmin:orders:saveorder",
object => $order,
- msg => "New freight tracking code set: '" . $order->freight_tracking . "'",
+ msg => "Set Order No. " . $order->id . " freight tracking code to '" . $order->freight_tracking . "'",
level => "notice",
);
}
@@ -1105,7 +1105,7 @@ sub req_order_save {
(
component => "shopadmin:orders:saveorder",
object => $order,
- msg => "New shippping method set: '" . $order->shipping_name . "/" . $order->shipping_method . "'",
+ msg => "Set Order No. " . $order->id . " shippping method to '" . $order->shipping_name . "/" . $order->shipping_method . "'",
level => "notice",
);
}
6 site/cgi-bin/modules/BSE/UI/Shop.pm
View
@@ -17,7 +17,7 @@ use BSE::Shipping;
use BSE::Countries qw(bse_country_code);
use BSE::Util::Secure qw(make_secret);
-our $VERSION = "1.036";
+our $VERSION = "1.037";
use constant MSG_SHOP_CART_FULL => 'Your shopping cart is full, please remove an item and try adding an item again';
@@ -1582,7 +1582,7 @@ sub _send_order {
template => "mailorder",
log_component => "shop:sendorder:mailowner",
log_object => $order,
- log_msg => "Order $order->{id} sent to site owner",
+ log_msg => "Send Order No. $order->{id} to admin",
);
unless ($noencrypt) {
@@ -1616,7 +1616,7 @@ sub _send_order {
acts => \%acts,
log_component => "shop:sendorder:mailbuyer",
log_object => $order,
- log_msg => "Order $order->{id} sent to purchaser $to_email",
+ log_msg => "Send Order No. $order->{id} to customer ($to_email)",
);
my $bcc_order = $cfg->entry("shop", "bcc_email");
if ($bcc_order) {
12 site/cgi-bin/modules/BSE/UserReg.pm
View
@@ -18,7 +18,7 @@ use BSE::Util::Iterate;
use base 'BSE::UI::UserCommon';
use Carp qw(confess);
-our $VERSION = "1.027";
+our $VERSION = "1.028";
use constant MAX_UNACKED_CONF_MSGS => 3;
use constant MIN_UNACKED_CONF_GAP => 2 * 24 * 60 * 60;
@@ -248,7 +248,7 @@ sub req_logon {
component => "siteuser:logon:invalid",
actor => "S",
level => "warning",
- msg => "Invalid username or password",
+ msg => "Site User logon attempt failed",
);
SiteUser->check_lockouts
(
@@ -306,8 +306,8 @@ sub req_logon {
object => $user,
component => "siteuser:logon:success",
actor => "S",
- level => "warning",
- msg => "Invalid username or password",
+ level => "info",
+ msg => "Site User '" . $user->userId . "' logged on",
);
if ($custom->can('siteuser_login')) {
@@ -755,7 +755,7 @@ sub req_register {
actor => $user,
object => $user,
component => "member:register:created",
- msg => "New user created",
+ msg => "Site User '" . $user->userId . "' created",
level => "notice",
);
@@ -2471,7 +2471,7 @@ sub _notify_registration {
from => $email,
subject => $subject,
log_object => $user,
- log_msg => "Notify admin of user registration to $email",
+ log_msg => "Notify admin that a Site User registered ($email)",
log_component => "member:register:notifyadmin");
}
8 site/cgi-bin/modules/BSE/Util/Lockouts.pm
View
@@ -5,7 +5,7 @@ use BSE::TB::AuditLog;
use Scalar::Util qw(blessed);
use POSIX qw(strftime);
-our $VERSION = "1.003";
+our $VERSION = "1.004";
sub check_lockouts {
my ($class, %opts) = @_;
@@ -112,7 +112,7 @@ sub check_lockouts {
function => "lockout",
level => "error",
actor => "S",
- msg => "IP address " . $req->ip_address . " ${lock}locked out until $end",
+ msg => "IP address '" . $req->ip_address . "' ${lock}locked out until $end",
object => $user,
ip_address => $req->ip_address,
);
@@ -149,8 +149,8 @@ sub unlock_user {
my %types =
(
- "S" => "Site users",
- "A" => "Admin users",
+ "S" => "Site Users",
+ "A" => "Admin Users",
);
sub unlock_ip_address {
8 site/cgi-bin/modules/SiteUser.pm
View
@@ -18,7 +18,7 @@ SiteUser - represent a site user (or member)
=cut
-our $VERSION = "1.010";
+our $VERSION = "1.011";
use constant MAX_UNACKED_CONF_MSGS => 3;
use constant MIN_UNACKED_CONF_GAP => 2 * 24 * 60 * 60;
@@ -838,7 +838,7 @@ sub send_registration_notify {
host => $opts{remote_addr},
user => [ \&BSE::Util::Tags::tag_hash_plain, $self ],
},
- log_msg => "Registration email to " . $self->email,
+ log_msg => "Send registration email to Site User (" . $self->email .")",
log_component => "member:register:notifyuser",
);
}
@@ -860,7 +860,7 @@ sub changepw {
object => $self,
actor => $who,
level => "notice",
- msg => "Change password",
+ msg => "Site User '" . $self->userId . "' changed their password",
%log,
);
@@ -937,7 +937,7 @@ sub lost_password {
from=>$from,
to => $to,
subject=>$subject,
- log_msg => "Sending lost password recovery email",
+ log_msg => "Send password recovery email to Site User (" . $self->email . ")",
log_component => "siteusers:lost:send",
log_object => $self,
)) {
6 site/cgi-bin/modules/SiteUsers.pm
View
@@ -5,7 +5,7 @@ use vars qw(@ISA $VERSION);
@ISA = qw(Squirrel::Table);
use SiteUser;
-our $VERSION = "1.003";
+our $VERSION = "1.004";
sub rowClass {
return 'SiteUser';
@@ -76,7 +76,7 @@ sub lost_password_save {
$user->changepw($password, $user,
component => "siteusers:lost:changepw",
- msg => "Account recovered");
+ msg => "Site User '" . $user->userId . "' password changed");
$user->set_lost_id("");
$user->set_lockout_end(undef);
BSE::TB::AuditLog->log
@@ -85,7 +85,7 @@ sub lost_password_save {
component => "siteuser:logon:recover",
actor => "S",
level => "notice",
- msg => "Account recovered",
+ msg => "Site User '" . $user->userId . "' account recovered",
);
$user->save;
Please sign in to comment.
Something went wrong with that request. Please try again.