-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #767 from openva/deploy
Sync deploy
- Loading branch information
Showing
110 changed files
with
909 additions
and
578 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<?php | ||
|
||
/* | ||
* Define file names | ||
*/ | ||
$template_file = 'htdocs/includes/templates/new.inc.php'; | ||
$legislator_menu_file = 'htdocs/includes/templates/legislators.html'; | ||
|
||
/* | ||
* Make sure the files exist | ||
*/ | ||
if (!file_exists($template_file)) | ||
{ | ||
echo 'Error: ' . $FILE_TO_EDIT . ' template is missing, cannot insert legislators menu.' . "\n"; | ||
exit(1); | ||
} | ||
elseif (!file_exists($legislator_menu_file)) | ||
{ | ||
echo 'Error: ' . $REPLACEMENT_FILE . ' is missing, cannot insert into template.' . "\n"; | ||
exit(1); | ||
} | ||
|
||
/* | ||
* Get the contents of both files | ||
*/ | ||
$legislator_menu = file_get_contents($legislator_menu_file); | ||
$template = file_get_contents($template_file); | ||
|
||
/* | ||
* Swap out the placeholder with the menu contents | ||
*/ | ||
$template = str_replace('<!--legislator_menu-->', $legislator_menu, $template); | ||
|
||
if (file_put_contents($template_file, $template) == false) | ||
{ | ||
echo 'Error: Failed in adding legislators listing to the menu.' . "\n"; | ||
exit(1); | ||
} | ||
|
||
echo 'Successfully inserted list of legislators into the site template.' . "\n"; |
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.