diff options
author | rowanbeentje <rowan@beent.je> | 2009-08-07 22:38:47 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2009-08-07 22:38:47 +0000 |
commit | dfbd00fda00bc0cbb9cc7bf3866d98165244c0d3 (patch) | |
tree | 1255df377be26a394cdc682feb2a3893ec11c13b /Source/TableDocument.m | |
parent | 31631781e5c9440ff3d9f75c8455b65662695e4e (diff) | |
download | sequelpro-dfbd00fda00bc0cbb9cc7bf3866d98165244c0d3.tar.gz sequelpro-dfbd00fda00bc0cbb9cc7bf3866d98165244c0d3.tar.bz2 sequelpro-dfbd00fda00bc0cbb9cc7bf3866d98165244c0d3.zip |
- Fix "Add to favorites" behaviour when the user has no favourites (This addresses Issue #354)
- Improve favorites saving including names with anonymous users
Diffstat (limited to 'Source/TableDocument.m')
-rw-r--r-- | Source/TableDocument.m | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/TableDocument.m b/Source/TableDocument.m index 1063070b..1057be90 100644 --- a/Source/TableDocument.m +++ b/Source/TableDocument.m @@ -1445,9 +1445,9 @@ return [connectionController name]; } if ([connectionController type] == SP_CONNECTION_SOCKET) { - return [NSString stringWithFormat:@"%@@localhost", [connectionController user]?[connectionController user]:@""]; + return [NSString stringWithFormat:@"%@@localhost", ([connectionController user] && [[connectionController user] length])?[connectionController user]:@"anonymous"]; } - return [NSString stringWithFormat:@"%@@%@", [connectionController user]?[connectionController user]:@"", [connectionController host]?[connectionController host]:@""]; + return [NSString stringWithFormat:@"%@@%@", ([connectionController user] && [[connectionController user] length])?[connectionController user]:@"anonymous", [connectionController host]?[connectionController host]:@""]; } /** |