Created
January 24, 2012 19:59
-
-
Save arjan/1672215 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+ case DbDatabase of | |
+ undefined -> | |
+ % Use zotonic config and per host+node schema | |
+ DbDatabase1 = z_config:get(dbdatabase, "zotonic"), | |
+ DbSchema = atom_to_list(Host) ++ "+" ++ hd(string:tokens(atom_to_list(node()), "@")); | |
+ _ -> | |
+ DbDatabase1 = DbDatabase, | |
+ DbSchema = proplists:get_value(dbschema, SiteProps, z_config:get(dbschema)) | |
+ end, | |
kan toch ook: | |
DbSchema = proplists:get_value(dbschema, SiteProps, z_config:get(dbschema, atom_to_list(Host) ++ "+" ++ hd(string:tokens(atom_to_list(node()), "@"))) | |
DbDatabase1 = proplists:get_value(dbdatabase, SiteProps, z_config:get(dbdatabase, "zotonic"))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment