Skip to content

Instantly share code, notes, and snippets.

@arjan
Created January 24, 2012 19:59
Show Gist options
  • Save arjan/1672215 to your computer and use it in GitHub Desktop.
Save arjan/1672215 to your computer and use it in GitHub Desktop.
+ 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