From 454b5c345c20ef68baf12c6f7d76b34e0812ad74 Mon Sep 17 00:00:00 2001 From: xzilla Date: Mon, 7 Aug 2006 18:11:15 +0000 Subject: [PATCH] re-arrange the top of this file to remove a duplicate if call, inspired by bill moran --- plugin_slony.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/plugin_slony.php b/plugin_slony.php index 192286f4..a71dbd7c 100755 --- a/plugin_slony.php +++ b/plugin_slony.php @@ -3,11 +3,17 @@ /** * Slony database tab plugin * - * $Id: plugin_slony.php,v 1.9 2006/06/17 12:57:36 xzilla Exp $ + * $Id: plugin_slony.php,v 1.10 2006/08/07 18:11:15 xzilla Exp $ */ + // Include application functions + include_once('./libraries/lib.inc.php'); + + $action = (isset($_REQUEST['action'])) ? $_REQUEST['action'] : ''; + $PHP_SELF = $_SERVER['PHP_SELF']; + // Avoid database connections whenever possible - switch (isset($_REQUEST['action']) ? $_REQUEST['action'] : '') { + switch ($action) { case 'clusters_top': case 'nodes_top': case 'sets_top': @@ -16,12 +22,6 @@ default: } - // Include application functions - include_once('./libraries/lib.inc.php'); - - $action = (isset($_REQUEST['action'])) ? $_REQUEST['action'] : ''; - $PHP_SELF = $_SERVER['PHP_SELF']; - // Include 'slony_cluster' in $misc->href if present if (isset($_REQUEST['slony_cluster'])) { $misc->href .= '&slony_cluster=' . urlencode($_REQUEST['slony_cluster']); -- 2.39.5