Skip to content

Commit

Permalink
Deduplicating definitions: More variables in config.inc.php
Browse files Browse the repository at this point in the history
  • Loading branch information
PipoCanaja committed Jul 11, 2018
1 parent 212f05d commit 794df10
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
Empty file modified check.php
100644 → 100755
Empty file.
8 changes: 7 additions & 1 deletion config.inc.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<?php

// sensible defaults
$mapdir=dirname(__FILE__)."/configs/";

$conf_dir = 'configs/';
$mapdir=dirname(__FILE__)."/". $conf_dir;

$librenms_base = '../../../';
$librenms_url = '/';
Expand All @@ -15,3 +17,7 @@
$use_relative_overlay = FALSE; // set to TRUE to enable experimental overlay showing relative-positioning
$grid_snap_value = 0; // set non-zero to snap to a grid of that spacing


$basehref='/plugins/Weathermap/';


5 changes: 2 additions & 3 deletions map-poller.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
**/


// Set variables for map-poller.php
$basehref='/plugins/Weathermap/';
// Import the config.inc.php file for variables
include_once 'config.inc.php';

if (php_sapi_name() != 'cli') {
echo "ERROR: map-poller.php should ONLY be run as a CGI script!\n";
Expand Down Expand Up @@ -56,7 +56,6 @@
// and fix for includes being set incorrectly and changing map-poller to chdir from
// where it's run.
chdir(dirname($argv[0]));
$conf_dir = 'configs/';

if (is_dir($conf_dir)) {
if ($dh = opendir($conf_dir)) {
Expand Down

0 comments on commit 794df10

Please sign in to comment.