Skip to content

Commit

Permalink
Enable Indonesian Member Cloud option
Browse files Browse the repository at this point in the history
  • Loading branch information
teusbenschop committed Mar 18, 2023
1 parent d3fe5b2 commit fecb7e7
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
21 changes: 21 additions & 0 deletions config/logic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -286,9 +286,30 @@ bool indonesian_cloud_free_individual ()
}


// Whether the Indonesian Member Cloud is enabled.
bool indonesian_member_cloud ()
{
// This is to speed up things.
static bool read {false};
static bool status {false};
if (read) return status;

// Read the status from disk and cache it.
string path = filter_url_create_root_path ({config::logic::config_folder (), "indonesianmembercloud"});
status = file_or_dir_exists (path);
read = true;

// Done.
return status;
}


// Whether the default Bibledit configuration is enabled.
bool default_bibledit_configuration ()
{
// If any other configuration is active, then the default Bibledit configuration is not active.
if (indonesian_member_cloud ()) return false;
// No other configuration is active: Default Bibledit config is active.
return true;
}

Expand Down
1 change: 1 addition & 0 deletions config/logic.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ void swipe_enabled (void * webserver_request, std::string & script);
bool indonesian_cloud_free ();
bool indonesian_cloud_free_simple ();
bool indonesian_cloud_free_individual ();
bool indonesian_member_cloud ();
bool default_bibledit_configuration ();
std::string google_translate_json_key_path ();

Expand Down

0 comments on commit fecb7e7

Please sign in to comment.