(fix) avoid showing debug info when not needed (fixes #3726)
parent
4a74f00adb
commit
bd75eaf878
|
@ -136,7 +136,7 @@ static BOOL debugLeaks;
|
|||
[$(@"SOGoFolder") soClass];
|
||||
|
||||
/* load products */
|
||||
[[SOGoProductLoader productLoader] loadAllProducts];
|
||||
[[SOGoProductLoader productLoader] loadAllProducts: YES];
|
||||
}
|
||||
|
||||
- (id) init
|
||||
|
|
|
@ -1,14 +1,15 @@
|
|||
/*
|
||||
Copyright (C) 2004 SKYRIX Software AG
|
||||
Copyright (C) 2005-2016 Inverse inc.
|
||||
|
||||
This file is part of OpenGroupware.org.
|
||||
This file is part of SOGo
|
||||
|
||||
OGo is free software; you can redistribute it and/or modify it under
|
||||
SOGo is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU Lesser General Public License as published by the
|
||||
Free Software Foundation; either version 2, or (at your option) any
|
||||
later version.
|
||||
|
||||
OGo is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
SOGo is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||
License for more details.
|
||||
|
@ -18,7 +19,6 @@
|
|||
Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
|
||||
02111-1307, USA.
|
||||
*/
|
||||
// $Id: SOGoProductLoader.h 540 2005-02-10 16:22:38Z helge $
|
||||
|
||||
#ifndef __Main_SOGoProductLoader_H__
|
||||
#define __Main_SOGoProductLoader_H__
|
||||
|
@ -35,7 +35,7 @@
|
|||
|
||||
/* operations */
|
||||
|
||||
- (void) loadAllProducts;
|
||||
- (void) loadAllProducts: (BOOL) verbose;
|
||||
- (void) loadProducts: (NSArray *) products;
|
||||
|
||||
@end
|
||||
|
|
|
@ -1,14 +1,15 @@
|
|||
/*
|
||||
Copyright (C) 2004-2005 SKYRIX Software AG
|
||||
Copyright (C) 2004 SKYRIX Software AG
|
||||
Copyright (C) 2005-2016 Inverse inc.
|
||||
|
||||
This file is part of OpenGroupware.org.
|
||||
This file is part of SOGo
|
||||
|
||||
OGo is free software; you can redistribute it and/or modify it under
|
||||
SOGo is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU Lesser General Public License as published by the
|
||||
Free Software Foundation; either version 2, or (at your option) any
|
||||
later version.
|
||||
|
||||
OGo is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
SOGo is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||
License for more details.
|
||||
|
@ -101,7 +102,7 @@ static NSString *productDirectoryName = @"SOGo";
|
|||
return searchPathes;
|
||||
}
|
||||
|
||||
- (void) loadAllProducts
|
||||
- (void) loadAllProducts: (BOOL) verbose
|
||||
{
|
||||
SoProductRegistry *registry = nil;
|
||||
NSFileManager *fm;
|
||||
|
@ -134,14 +135,17 @@ static NSString *productDirectoryName = @"SOGo";
|
|||
}
|
||||
if ([loadedProducts count])
|
||||
{
|
||||
[self logWithFormat: @"SOGo products loaded from '%@':", lpath];
|
||||
[self logWithFormat: @" %@",
|
||||
[loadedProducts componentsJoinedByString: @", "]];
|
||||
if (verbose)
|
||||
{
|
||||
[self logWithFormat: @"SOGo products loaded from '%@':", lpath];
|
||||
[self logWithFormat: @" %@",
|
||||
[loadedProducts componentsJoinedByString: @", "]];
|
||||
}
|
||||
[loadedProducts removeAllObjects];
|
||||
}
|
||||
}
|
||||
|
||||
if (![registry loadAllProducts])
|
||||
if (![registry loadAllProducts] && verbose)
|
||||
[self warnWithFormat: @"could not load all products !"];
|
||||
[pool release];
|
||||
}
|
||||
|
|
|
@ -244,7 +244,7 @@ main (int argc, char **argv, char **env)
|
|||
pool = [NSAutoreleasePool new];
|
||||
|
||||
/* load products */
|
||||
[[SOGoProductLoader productLoader] loadAllProducts];
|
||||
[[SOGoProductLoader productLoader] loadAllProducts: NO];
|
||||
|
||||
[SOGoSystemDefaults sharedSystemDefaults];
|
||||
setupUserDefaults ();
|
||||
|
|
Loading…
Reference in New Issue