+2004-07-16 Helge Hess <helge.hess@skyrix.com>
+
+ * improved error handling in various files
+
2004-07-02 Helge Hess <helge.hess@opengroupware.org>
* OCSChannelManager.m: added garbage collector for channel pools
;
else if (![channel openChannel]) {
[self logWithFormat:@"could not open channel %@ for URL: %@",
- channel, _url];
+ channel, [_url absoluteString]];
return nil;
}
@implementation OCSFolder
-static BOOL debugOn = YES;
-static BOOL doLogStore = YES;
+static BOOL debugOn = NO;
+static BOOL doLogStore = NO;
+ (void)initialize {
NSUserDefaults *ud = [NSUserDefaults standardUserDefaults];
NSString *sql;
if ((channel = [self acquireStoreChannel]) == nil) {
- [self logWithFormat:@"ERROR(%s): could not open storage channel!"];
+ [self logWithFormat:@"ERROR(%s): could not open storage channel!",
+ __PRETTY_FUNCTION__];
return nil;
}
/* accessors */
- (NSURL *)folderInfoLocation;
+- (NSString *)folderInfoTableName;
/* connection */
}
if ((fm = [[self alloc] initWithFolderInfoLocation:url]) == nil) {
NSLog(@"ERROR(%s): could not create folder manager with URL: '%@'",
- __PRETTY_FUNCTION__, url);
+ __PRETTY_FUNCTION__, [url absoluteString]);
return nil;
}
self->channelManager = [[OCSChannelManager defaultChannelManager] retain];
self->folderInfoLocation = [_url retain];
+
+ if ([[self folderInfoTableName] length] == 0) {
+ [self logWithFormat:@"ERROR(%s): missing tablename in URL: %@",
+ __PRETTY_FUNCTION__, [_url absoluteString]];
+ [self release];
+ return nil;
+ }
cal = [[OCSFolderType alloc] initWithFolderTypeName:@"appointment"];
self->nameToType =
if ((name = [self internalNameFromPath:_path]) == nil) return nil;
for (i = 0, count = [_records count]; i < count; i++) {
- NSString *recName;
+ NSDictionary *record;
+ NSString *recName;
- recName = [[_records objectAtIndex:i] objectForKey:OCSPathRecordName];
+ record = [_records objectAtIndex:i];
+ recName = [record objectForKey:OCSPathRecordName];
#if 0
[self logWithFormat:@"check '%@' vs '%@' (%@)...",
name, recName,[_records objectAtIndex:i]];
fname = [self internalNameFromPath:_path];
if (count == 1) {
+ NSDictionary *record;
NSString *sname;
- sname = [[records objectAtIndex:0] objectForKey:OCSPathRecordName];
+ record = [records objectAtIndex:0];
+ sname = [record objectForKey:OCSPathRecordName];
return [fname isEqualToString:sname];
}
fname = [self internalNameFromPath:_path];
fname = [fname stringByAppendingString:@"/"]; /* add slash */
for (i = 0; i < count; i++) {
+ NSDictionary *record;
NSString *sname, *spath;
- sname = [[records objectAtIndex:0] objectForKey:OCSPathRecordName];
+ record = [records objectAtIndex:0];
+ sname = [record objectForKey:OCSPathRecordName];
if (![sname hasPrefix:fname]) /* does not match at all ... */
continue;
NULL,
NULL,
'Users',
- 'http://OGo:OGo@localhost/test/SOGo_user_folder',
- 'http://OGo:OGo@localhost/test/SOGo_user_folder_quick',
+ 'http://OGo:OGo@localhost:5432/OGo/SOGo_user_folder',
+ 'http://OGo:OGo@localhost:5432/OGo/SOGo_user_folder_quick',
'Container' );
INSERT INTO SOGo_folder_info
NULL,
NULL,
'helge',
- 'http://OGo:OGo@localhost/test/SOGo_user_folder',
- 'http://OGo:OGo@localhost/test/SOGo_user_folder_quick',
+ 'http://OGo:OGo@localhost:5432/OGo/SOGo_user_folder',
+ 'http://OGo:OGo@localhost:5432/OGo/SOGo_user_folder_quick',
'Container' );
INSERT INTO SOGo_folder_info
'Calendar',
NULL,
'Calendar',
- 'http://OGo:OGo@localhost/test/SOGo_helge_privcal',
- 'http://OGo:OGo@localhost/test/SOGo_helge_privcal_quick',
+ 'http://OGo:OGo@localhost:5432/OGo/SOGo_helge_privcal',
+ 'http://OGo:OGo@localhost:5432/OGo/SOGo_helge_privcal_quick',
'Appointment' );
2004-07-16 Helge Hess <helge.hess@skyrix.com>
+ * UIxAppNavView.m: some fixes to navigation URLs
+
+ * UIxAppNavView.wox: fixed indention
+
* product.plist: properly export uix.css as a public resource
2004-07-01 Helge Hess <helge.hess@opengroupware.org>
/*
- Copyright (C) 2000-2004 SKYRIX Software AG
+ Copyright (C) 2004 SKYRIX Software AG
- This file is part of OGo
+ This file is part of OpenGroupware.org.
OGo 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
*/
// $Id$
-
-#import <NGObjWeb/NGObjWeb.h>
-#import <NGObjWeb/SoObject+SoDAV.h>
-#import <NGObjWeb/WOContext+SoObjects.h>
-#import <Foundation/Foundation.h>
-
+#include <NGObjWeb/WOComponent.h>
@interface UIxAppNavView : WOComponent
{
@end
+#include <NGObjWeb/NGObjWeb.h>
+#include <NGObjWeb/SoObject+SoDAV.h>
+#include <NGObjWeb/WOContext+SoObjects.h>
+#include "common.h"
@implementation UIxAppNavView
- (void)dealloc {
- [self->element release];
- [self->lastElement release];
- [super dealloc];
+ [self->element release];
+ [self->lastElement release];
+ [super dealloc];
}
- (void)setElement:(id)_element {
- ASSIGN(self->element, _element);
+ ASSIGN(self->element, _element);
}
-
- (id)element {
- return self->element;
+ return self->element;
}
- (void)setLastElement:(id)_element {
- ASSIGN(self->lastElement, _element);
+ ASSIGN(self->lastElement, _element);
}
-
- (id)lastElement {
- return self->lastElement;
+ return self->lastElement;
}
- (NSArray *)navPathElements {
- NSArray *traversalObjects;
- NSMutableArray *navPathComponents;
- NSMutableString *navURL;
- unsigned int i, count;
-
- traversalObjects = [[self context] objectTraversalStack];
- count = ([traversalObjects count] - 1); /* remove SoPageInvocation */
- navPathComponents = [[NSMutableArray alloc] initWithCapacity:count];
- navURL = [[NSMutableString alloc] initWithString:@"/"];
-
- for(i = 0; i < count; i++) {
- NSString *name, *url;
- id obj;
+ NSArray *traversalObjects;
+ NSMutableArray *navPathComponents;
+ unsigned int i, count;
+
+ traversalObjects = [[self context] objectTraversalStack];
+ count = ([traversalObjects count] - 1); /* remove SoPageInvocation */
+
+ navPathComponents = [[NSMutableArray alloc] initWithCapacity:count];
+ for (i = 0; i < count; i++) {
+ NSString *name;
+ id obj;
- obj = [traversalObjects objectAtIndex:i];
-
- name = [obj davDisplayName];
- if(!name)
- name = NSStringFromClass([obj class]);
-
- [navURL appendString:name];
- [navURL appendString:@"/"];
-
- if(! [name hasPrefix:@"ZideStore"]) {
- NSMutableDictionary *c;
-
- c = [[NSMutableDictionary alloc] initWithCapacity:2];
- [c setObject:name forKey:@"name"];
- url = [navURL copy];
- [c setObject:url forKey:@"url"];
- [url release];
- [navPathComponents addObject:c];
- [c release];
- }
+ obj = [traversalObjects objectAtIndex:i];
+
+ name = [obj davDisplayName];
+ if ([name length] == 0)
+ name = NSStringFromClass([obj class]);
+
+ if (![name hasPrefix:@"sogod"]) {
+ NSMutableDictionary *c;
+
+ c = [[NSMutableDictionary alloc] initWithCapacity:2];
+ [c setObject:name forKey:@"name"];
+ [c setObject:[obj baseURLInContext:[self context]] forKey:@"url"];
+ [navPathComponents addObject:c];
+ [c release];
}
+ }
- [self setLastElement:[navPathComponents lastObject]];
- return [navPathComponents autorelease];
+ [self setLastElement:[navPathComponents lastObject]];
+ return [navPathComponents autorelease];
}
-@end
+@end /* UIxAppNavView */
<?xml version='1.0' standalone='yes'?>
-
<font xmlns="http://www.w3.org/1999/xhtml"
xmlns:var="http://www.skyrix.com/od/binding"
xmlns:const="http://www.skyrix.com/od/constant"
xmlns:rsrc="OGo:url"
class="defaultfont"
>
-<b>You are here:</b><var:entity const:name="nbsp" /><var:foreach list="navPathElements" item="element"><var:if condition="element" value="lastElement" const:negate="YES"><a var:href="element.url"><var:string value="element.name" /></a><var:entity const:name="nbsp" />/<var:entity const:name="nbsp" /></var:if><var:if condition="element" value="lastElement"><var:string value="element.name" /></var:if></var:foreach>
-</font>
\ No newline at end of file
+ <b>You are here:</b><var:entity const:name="nbsp" />
+ <var:foreach list="navPathElements" item="element">
+ <var:if condition="element" value="lastElement" const:negate="YES">
+ <a var:href="element.url"><var:string value="element.name" /></a>
+ /
+ </var:if>
+ <var:if condition="element" value="lastElement">
+ <var:string value="element.name" />
+ </var:if>
+ </var:foreach>
+</font>