Skip to content

Commit

Permalink
Updated path for sample data schema
Browse files Browse the repository at this point in the history
  • Loading branch information
sherakama committed Jun 22, 2016
1 parent 0700895 commit 889cd9a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions stanford_capx.docs.inc
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ function stanford_capx_admin_config_data_browser_refresh_submit($form, &$form_st
function stanford_capx_admin_data_browser_schema_flush() {
$files = array(
'schema_file' => STANFORD_CAPX_FILE_PATH . "/" . STANFORD_CAPX_SCHEMA_FILE,
'sample_data_file' => STANFORD_CAPX_FILE_PATH . STANFORD_CAPX_SAMPLE_PROFILE,
'sample_data_file' => STANFORD_CAPX_FILE_PATH . "/" . STANFORD_CAPX_SAMPLE_PROFILE,
);

// Delete the cached files, which will be re-fetched on next page reload.
Expand Down Expand Up @@ -252,13 +252,13 @@ function stanford_capx_sample_data_render($sample_data) {
function stanford_capx_sample_data($selector) {
static $sample_profile;
static $json_parser;
$file = STANFORD_CAPX_FILE_PATH . STANFORD_CAPX_SAMPLE_PROFILE;
$file = STANFORD_CAPX_FILE_PATH . "/" . STANFORD_CAPX_SAMPLE_PROFILE;

// Load and static cache the sample data file.
if (!isset($sample_profile)) {
if (file_exists($file)) {
// Load sample data from the file cache.
$json = file_get_contents(STANFORD_CAPX_FILE_PATH . STANFORD_CAPX_SAMPLE_PROFILE);
$json = file_get_contents(STANFORD_CAPX_FILE_PATH . "/" . STANFORD_CAPX_SAMPLE_PROFILE);
}
else {
// Fetch the profile from CAP and save to file cache.
Expand Down

0 comments on commit 889cd9a

Please sign in to comment.