Skip to content

Commit

Permalink
Fix Folder module bug
Browse files Browse the repository at this point in the history
  • Loading branch information
a-fung committed Oct 24, 2012
1 parent ed134d6 commit f938af9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion source/aspnetserver/Collection.cs
Expand Up @@ -216,7 +216,7 @@ public static Collection[] GetAccessible(AjaxBase ajax)
if (user != null)
{
where += " OR `id` IN (SELECT `cid` FROM `collectionuser` WHERE `uid`=" + Database.Quote(user.Id.ToString()) + " AND `access`='1')";
where = "(" + where + ") AND `cid` NOT IN (SELECT `cid` FROM `collectionuser` WHERE `uid`=" + Database.Quote(user.Id.ToString()) + " AND `access`='0')";
where = "(" + where + ") AND `id` NOT IN (SELECT `cid` FROM `collectionuser` WHERE `uid`=" + Database.Quote(user.Id.ToString()) + " AND `access`='0')";
}

Dictionary<string, object>[] resultSet = Database.Select("collection", where);
Expand Down
6 changes: 4 additions & 2 deletions source/aspnetserver/Settings.cs
Expand Up @@ -121,8 +121,9 @@ public static bool UsePdf

return (_usePdf = true).Value;
}
catch (Exception)
catch (Exception ex)
{
Utility.TryLogError(ex);
return (_usePdf = false).Value;
}
}
Expand Down Expand Up @@ -215,8 +216,9 @@ private static bool SevenZipConfigOk

_sevenZipConfigOk = true;
}
catch (Exception)
catch (Exception ex)
{
Utility.TryLogError(ex);
_sevenZipConfigOk = false;
}
}
Expand Down
2 changes: 1 addition & 1 deletion source/haxe/afung/mangaWeb3/server/Collection.hx
Expand Up @@ -194,7 +194,7 @@ class Collection
if (user != null)
{
where += " OR `id` IN (SELECT `cid` FROM `collectionuser` WHERE `uid`=" + Database.Quote(Std.string(user.Id)) + " AND `access`='1')";
where = "(" + where + ") AND `cid` NOT IN (SELECT `cid` FROM `collectionuser` WHERE `uid`=" + Database.Quote(Std.string(user.Id)) + " AND `access`='0')";
where = "(" + where + ") AND `id` NOT IN (SELECT `cid` FROM `collectionuser` WHERE `uid`=" + Database.Quote(Std.string(user.Id)) + " AND `access`='0')";
}

var resultSet:Array<Hash<Dynamic>> = Database.Select("collection", where);
Expand Down

0 comments on commit f938af9

Please sign in to comment.