OR pledge status of generic survey and community survey.
This commit is contained in:
@@ -33,6 +33,12 @@ function parse_pledge_data($candidates_files, $default_image) {
|
||||
foreach ($headers as $key => $value) {
|
||||
$candidate[$value] = $data[$key];
|
||||
}
|
||||
$name_slug = trim_sluggify($candidate['Candidate Name']);
|
||||
if (array_key_exists($name_slug, $candidate_data)) {
|
||||
if ($candidate_data[$name_slug]['Pledge'] === 'y') {
|
||||
$candidate['Pledge'] = 'y';
|
||||
}
|
||||
}
|
||||
$candidate['Council'] = $config['councilName'];
|
||||
$candidate['Path'] = dirname($file);
|
||||
$media_desc = $candidate['Path']."/".
|
||||
@@ -49,7 +55,7 @@ function parse_pledge_data($candidates_files, $default_image) {
|
||||
$candidate['image_url'] = $media['url'];
|
||||
$candidate['image_id'] = $media['id'];
|
||||
}
|
||||
$candidate_data[trim_sluggify($candidate['Candidate Name'])] = $candidate;
|
||||
$candidate_data[$name_slug] = $candidate;
|
||||
}
|
||||
fclose($handle);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user