From 84db72c16aa80b74b73721bfc581fa469970a509 Mon Sep 17 00:00:00 2001
Date: Thu, 6 Aug 2020 09:46:56 +0200
Subject: [PATCH] Port added in directory.php
---
directory.php | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/directory.php b/directory.php
index 364fb14..722c84c 100644
--- a/directory.php
+++ b/directory.php
@@ -212,7 +212,7 @@ if((!isset($_GET["book"]) && ($show_BookSelection)) or (!$has_books))
$name = $attributes["name"] . " (" . PB_NAME_GENERAL . ")";
$get = $_GET;
unset($get['refresh']);
- $url = "http://" . $_SERVER["SERVER_NAME"] . $_SERVER["PHP_SELF"] . '?' . http_build_query(array_merge($get,array("book"=>$book)));
+ $url = "http://" . $_SERVER["SERVER_NAME"] . ':' . $_SERVER["SERVER_PORT"] . $_SERVER["PHP_SELF"] . '?' . http_build_query(array_merge($get,array("book"=>$book)));
$menu->addMenuItem(new MenuItem($name, $url));
}
}
@@ -286,24 +286,24 @@ if((!isset($_GET["book"]) && ($show_BookSelection)) or (!$has_books))
$name = $xml->phonebook->contact[$i]->person->realName;
$get = $_GET;
unset($get['refresh']);
- $url = "http://" . $_SERVER["SERVER_NAME"] . $_SERVER["PHP_SELF"] . '?' . http_build_query($get) . "&id=" . $i;
+ $url = "http://" . $_SERVER["SERVER_NAME"] . ':' . $_SERVER["SERVER_PORT"] . $_SERVER["PHP_SELF"] . '?' . http_build_query($get) . "&id=" . $i;
$menu->addMenuItem(new MenuItem($name, $url));
}
$menu->addSoftKeyItem(new SoftKeyItem(PB_BUTTON_SELECT, 1, 'SoftKey:Select'));
if ($show_BookSelection) {
- $url = "http://" . $_SERVER["SERVER_NAME"] . $_SERVER["PHP_SELF"];
+ $url = "http://" . $_SERVER["SERVER_NAME"] . ':' . $_SERVER["SERVER_PORT"] . $_SERVER["PHP_SELF"];
$menu->addSoftKeyItem(new SoftKeyItem(PB_BUTTON_BACK, 3, $url));
} else {
$menu->addSoftKeyItem(new SoftKeyItem(PB_BUTTON_EXIT, 3, 'Init:Directories'));
}
$get = $_GET;
unset($get['refresh']);
- $url = "http://" . $_SERVER["SERVER_NAME"] . $_SERVER["PHP_SELF"] . '?' . http_build_query(array_merge($get,array("search"=>true)));
+ $url = "http://" . $_SERVER["SERVER_NAME"] . ':' . $_SERVER["SERVER_PORT"] . $_SERVER["PHP_SELF"] . '?' . http_build_query(array_merge($get,array("search"=>true)));
$menu->addSoftKeyItem(new SoftKeyItem(PB_BUTTON_SEARCH, 2, $url));
unset($get['offset']);
- $tmp_url = "http://" . $_SERVER["SERVER_NAME"] . $_SERVER["PHP_SELF"] . '?' . http_build_query($get);
+ $tmp_url = "http://" . $_SERVER["SERVER_NAME"] . ':' . $_SERVER["SERVER_PORT"] . $_SERVER["PHP_SELF"] . '?' . http_build_query($get);
if($offset>0){
$newoffset = $offset-30;
@@ -335,7 +335,7 @@ if((!isset($_GET["book"]) && ($show_BookSelection)) or (!$has_books))
unset($get['search']);
unset($get['queryname']);
unset($get['querynumber']);
- $url = "http://" . $_SERVER["SERVER_NAME"] . $_SERVER["PHP_SELF"] . '?' . http_build_query($get);
+ $url = "http://" . $_SERVER["SERVER_NAME"] . ':' . $_SERVER["SERVER_PORT"] . $_SERVER["PHP_SELF"] . '?' . http_build_query($get);
$menu = new CiscoIpPhoneInput(PB_NAME_GENERAL . ' ' . PB_PHONEBOOK, PB_INPUT_QUERY, $url);
if(isset($_GET['queryname'])){
$queryname = $_GET['queryname'];
@@ -378,10 +378,10 @@ if((!isset($_GET["book"]) && ($show_BookSelection)) or (!$has_books))
$menu->addSoftKeyItem(new SoftKeyItem(PB_BUTTON_DIAL, 1, 'SoftKey:Dial'));
$get = $_GET;
unset($get['refresh']);
- $url = "http://" . $_SERVER["SERVER_NAME"] . $_SERVER["PHP_SELF"] . '?' . http_build_query($get) . "&details";
+ $url = "http://" . $_SERVER["SERVER_NAME"] . ':' . $_SERVER["SERVER_PORT"] . $_SERVER["PHP_SELF"] . '?' . http_build_query($get) . "&details";
$menu->addSoftKeyItem(new SoftKeyItem(PB_BUTTON_DETAILS, 4, $url));
unset($get['id']);
- $url = "http://" . $_SERVER["SERVER_NAME"] . $_SERVER["PHP_SELF"] . '?' . http_build_query($get);
+ $url = "http://" . $_SERVER["SERVER_NAME"] . ':' . $_SERVER["SERVER_PORT"] . $_SERVER["PHP_SELF"] . '?' . http_build_query($get);
$menu->addSoftKeyItem(new SoftKeyItem(PB_BUTTON_BACK, 3, $url));
}
@@ -407,7 +407,7 @@ if((!isset($_GET["book"]) && ($show_BookSelection)) or (!$has_books))
$get = $_GET;
unset($get['refresh']);
unset($get['details']);
- // $url = "http://" . $_SERVER["SERVER_NAME"] . $_SERVER["PHP_SELF"] . '?' . http_build_query($get);
+ // $url = "http://" . $_SERVER["SERVER_NAME"] . ':' . $_SERVER["SERVER_PORT"] . $_SERVER["PHP_SELF"] . '?' . http_build_query($get);
$menu->addSoftKeyItem(new SoftKeyItem(PB_BUTTON_BACK, 3, 'SoftKey:Exit'));
}
}
--
2.25.1