From 6494b0603b4b77cca28bfcb473244086926f1a93 Mon Sep 17 00:00:00 2001 From: Tom Laermans Date: Thu, 16 Feb 2012 23:18:49 +0000 Subject: [PATCH] allow sql update to be run from commandline, remove now-bogus comment from menubar git-svn-id: http://www.observium.org/svn/observer/trunk@2873 61d68cd4-352d-0410-923a-c4978735b2b8 --- html/includes/print-menubar.php | 2 +- includes/sql-schema/update.php | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/html/includes/print-menubar.php b/html/includes/print-menubar.php index 369e8172b..22e254be6 100644 --- a/html/includes/print-menubar.php +++ b/html/includes/print-menubar.php @@ -439,7 +439,7 @@ if ($_SESSION['userlevel'] >= '5' && ($routing_count['bgp']+$routing_count['ospf ## Do Alerts at the bottom if ($bgp_alerts) - { ## FIXME link below broken! + { echo('

  • Alerted BGP (' . $bgp_alerts . ')
  • diff --git a/includes/sql-schema/update.php b/includes/sql-schema/update.php index 20871c2d2..847797d6c 100644 --- a/includes/sql-schema/update.php +++ b/includes/sql-schema/update.php @@ -11,6 +11,24 @@ * See COPYING for more details. */ +if (!isset($debug)) +{ + # Not called from within discovery, let's load up the necessary stuff. + + include("config.php"); + include("includes/functions.php"); + + $options = getopt("d"); + if (isset($options['d'])) + { + $debug = TRUE; + } + else + { + $debug = FALSE; + } +} + if ($db_rev = @dbFetchCell("SELECT version FROM `dbSchema`")) {} else { $db_rev = 0;