aboutsummaryrefslogtreecommitdiffstats
path: root/Source/TableDocument.m
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2009-08-07 22:38:47 +0000
committerrowanbeentje <rowan@beent.je>2009-08-07 22:38:47 +0000
commitdfbd00fda00bc0cbb9cc7bf3866d98165244c0d3 (patch)
tree1255df377be26a394cdc682feb2a3893ec11c13b /Source/TableDocument.m
parent31631781e5c9440ff3d9f75c8455b65662695e4e (diff)
downloadsequelpro-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.m4
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]:@""];
}
/**