Skip to content

Commit

Permalink
Simplified filenames
Browse files Browse the repository at this point in the history
  • Loading branch information
ewels committed Sep 3, 2020
1 parent c2a4fee commit a76511a
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
hemnet_commuter_config.ini
config.ini
.DS_Store
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@ If one or more workplace addresses are saved, Hemnet Commuter does extra commute
This back-end data retrieval is done with PHP scripts, which save results to a MySQL database.
The front-end is built using AngularJS with Leaflet maps and Bootstrap CSS.

> Note that a previous version did basically the same thing, but with a lot less database and a lot more custom JQuery code
> I haven't deleted this from the repository yet, but will soon. You may see relics from this kicking around. Please ignore / let me know.
## How you can use it

### Requirements
Expand All @@ -66,7 +63,7 @@ Get your server running and create a new MySQL database using the `hemnet_commut
This can be imported into _phpMyAdmin_ / similar tools, or done on the command line and should create all of
the necessary database tables and structure.

Create a copy of `hemnet_commuter_config_example.ini` without the `_example` in the filename and save the
Create a copy of `config_example.ini` called `config.ini` in the filename and save the
database details and API keys there.

### First run
Expand Down
2 changes: 1 addition & 1 deletion api/_common_api.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
error_reporting(E_ALL);

// Get secrets from the config file
$ini_array = parse_ini_file("../hemnet_commuter_config.ini");
$ini_array = parse_ini_file("../config.ini");

// Connect to the database
$mysqli = new mysqli("localhost", $ini_array['db_user'], $ini_array['db_password'], $ini_array['db_name']);
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/chroma-js/2.1.0/chroma.min.js" integrity="sha512-yocoLferfPbcwpCMr8v/B0AB4SWpJlouBwgE0D3ZHaiP1nuu5djZclFEIj9znuqghaZ3tdCMRrreLoM8km+jIQ==" crossorigin="anonymous"></script>

<!-- Hemnet Commuter -->
<script src="hemnet-commuter-app.js"></script>
<script src="app.js"></script>
<link rel="stylesheet" href="styles.css">

</script>
Expand Down
8 changes: 4 additions & 4 deletions update.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);

$ini_array = parse_ini_file("hemnet_commuter_config.ini");
$ini_array = parse_ini_file("config.ini");

$mysqli = new mysqli("localhost", $ini_array['db_user'], $ini_array['db_password'], $ini_array['db_name']);
if ($mysqli->connect_errno) {
Expand Down Expand Up @@ -237,14 +237,14 @@
<body>

<?php
if(!file_exists("hemnet_commuter_config.ini")){
die('<div class="m-5 alert alert-danger">Error! Configuration file <code>hemnet_commuter_config.ini</code> not found!</div></body></html>');
if(!file_exists("config.ini")){
die('<div class="m-5 alert alert-danger">Error! Configuration file <code>config.ini</code> not found!</div></body></html>');
}
?>

<div class="container-fluid">

<img id="hemnet-logo" src="hemnet.svg">
<img src="hemnet.svg" class="float-right" style="width: 100px;">
<h1 class="display-4">Hemnet Commuter</h1>
<p class="lead text-muted mb-3">Update your search results.</p>

Expand Down

0 comments on commit a76511a

Please sign in to comment.