From 20ceaa73c6ef83dcaf7dd96257ce4479bf7b02f1 Mon Sep 17 00:00:00 2001 From: khuxkm Date: Tue, 8 Oct 2019 18:13:41 +0000 Subject: [PATCH] Move configuration of server name into client configuration file --- client/config.php | 3 +++ index.php | 7 +++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/client/config.php b/client/config.php index a39e49c..f0f3ce8 100644 --- a/client/config.php +++ b/client/config.php @@ -5,4 +5,7 @@ // Host and Port of BBJ instance define("BBJ_HOST","127.0.0.1"); define("BBJ_PORT",7099); + + // Name of BBJ instance + define("BBJ_NAME","tildeverse BBJ"); ?> diff --git a/index.php b/index.php index a4dc42a..990080a 100644 --- a/index.php +++ b/index.php @@ -2,21 +2,20 @@ include 'client/config.php'; include 'bbj.php'; $bbj = new BBJ(BBJ_HOST,BBJ_PORT); - $name = "tildeverse BBJ"; if (isset($_GET["thread_id"])) { $thread = $bbj->thread_load($_GET["thread_id"]); if ($thread["error"]!=null) { - $title = "Unknown Thread | ".$name; + $title = "Unknown Thread | ".BBJ_NAME; include 'client/header.php'; echo "\t\t

No such thread exists. Go home.

"; include 'client/footer.php'; die(); } else { - $title = $thread["data"]["title"]." by ".$thread["usermap"][$thread["data"]["author"]]["user_name"]." | ".$name; + $title = $thread["data"]["title"]." by ".$thread["usermap"][$thread["data"]["author"]]["user_name"]." | ".BBJ_NAME; } } else { - $title = $name; + $title = BBJ_NAME; } include 'client/header.php';