Skip to content

Commit bb4b643

Browse files
committed
Minor logging improvement
Also cache the obj during lookup.
1 parent 063e0ac commit bb4b643

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

WebUI/OGoFoundation/OGoNavigation.m

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/*
22
Copyright (C) 2000-2006 SKYRIX Software AG
33
Copyright (C) 2006 Helge Hess
4+
Copyright (C) 2025 Helge Hess
45
56
This file is part of OpenGroupware.org.
67
@@ -236,14 +237,14 @@ - (BOOL)executePasteboardCommand:(NSString *)_command {
236237
}
237238
}
238239

240+
id obj = [self->session getTransferObject];
239241
for (i = 0; i < count; i++) {
240242
NGMimeType *type;
241243
WOComponent *component;
242244

243245
type = [types objectAtIndex:i];
244-
component =
245-
[self->session instantiateComponentForCommand:_command
246-
type:type object:[self->session getTransferObject]];
246+
component = [self->session instantiateComponentForCommand:_command
247+
type:type object:obj];
247248

248249
if (component != nil) {
249250
if (![component conformsToProtocol:@protocol(OGoContentPage)]) {
@@ -256,7 +257,7 @@ - (BOOL)executePasteboardCommand:(NSString *)_command {
256257
}
257258
}
258259
[self->session warnWithFormat:
259-
@"Could not execute command %@ for types %@", _command, [pb types]];
260+
@"Could not execute command '%@' for types %@", _command, [pb types]];
260261

261262
page = [self activePage];
262263
if ([[page errorString] isNotEmpty])

0 commit comments

Comments
 (0)