Skip to content

Commit 9482f9b

Browse files
authored
Fix: Remove unused functions (#585)
1 parent b76e223 commit 9482f9b

File tree

6 files changed

+0
-180
lines changed

6 files changed

+0
-180
lines changed

bin/createNewsEntry

-14
Original file line numberDiff line numberDiff line change
@@ -161,20 +161,6 @@ function getContent(): string {
161161
return $news;
162162
}
163163

164-
function updateArchiveXML(string $id, string $archiveFile): void {
165-
$arch = new DOMDocument("1.0", "utf-8");
166-
$arch->formatOutput = true;
167-
$arch->preserveWhiteSpace = false;
168-
$arch->load($archiveFile);
169-
170-
$first = $arch->createElementNs("http://www.w3.org/2001/XInclude", "xi:include");
171-
$first->setAttribute("href", "entries/{$id}.xml");
172-
173-
$second = $arch->getElementsByTagNameNs("http://www.w3.org/2001/XInclude", "include")->item(0);
174-
$arch->documentElement->insertBefore($first, $second);
175-
$arch->save($archiveFile);
176-
}
177-
178164
function parseOptions(): Entry {
179165
$opts = getopt('h', [
180166
'help',

include/layout.inc

-60
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,6 @@ function highlight_php_trimmed($code, $return = false)
4747
return null;
4848
}
4949

50-
// Stats pages still need this
51-
function commonHeader($title): void { site_header($title); }
52-
53-
// Stats pages still need this
54-
function commonFooter(): void { site_footer(); }
55-
5650
// Resize the image using the output of make_image()
5751
function resize_image($img, $width = 1, $height = 1)
5852
{
@@ -160,13 +154,6 @@ function make_popup_link($url, $linktext = false, $target = false, $windowprops
160154
);
161155
}
162156

163-
// print_popup_link()
164-
// print a hyperlink to something, within the site, that pops up a new window
165-
//
166-
function print_popup_link($url, $linktext = false, $windowprops = "", $target = false, $extras = false): void {
167-
echo make_popup_link($url, $linktext, $windowprops, $target, $extras);
168-
}
169-
170157
// Print a link for a downloadable file (including filesize)
171158
function download_link($file, $title): void
172159
{
@@ -204,20 +191,6 @@ function download_link($file, $title): void
204191
}
205192
}
206193

207-
function sect_to_file($string) {
208-
$string = strtolower($string);
209-
$string = str_replace([' ', '_'], '-', $string);
210-
$func = "function.$string.php";
211-
$chap = "ref.$string.php";
212-
$feat = "features.$string.php";
213-
$struct = "control-structures.$string.php";
214-
if (@is_file($func)) return $func;
215-
if (@is_file($chap)) return $chap;
216-
if (@is_file($feat)) return $feat;
217-
if (@is_file($struct)) return $struct;
218-
else return "$string.php";
219-
}
220-
221194
function clean($var) {
222195
return htmlspecialchars($var, ENT_QUOTES);
223196
}
@@ -511,39 +484,6 @@ function get_news_changes()
511484
return false;
512485
}
513486

514-
function news_toc($sections = null): void {
515-
include __DIR__ . "/pregen-news.inc";
516-
$items = [
517-
"news" => [
518-
"title" => "News",
519-
"link" => "/archive/",
520-
"children" => print_news($NEWS_ENTRIES, "frontpage", 3, null, true),
521-
],
522-
"conferences" => [
523-
"title" => "Conferences",
524-
"link" => "/conferences/",
525-
"children" => print_news($NEWS_ENTRIES, "conferences", 3, null, true),
526-
],
527-
"papers" => [
528-
"title" => "Call for Papers",
529-
"link" => "/conferences/",
530-
"children" => print_news($NEWS_ENTRIES, "cfp", 3, null, true),
531-
],
532-
];
533-
534-
foreach ($items as $section => $menu) {
535-
536-
// only print requested sections.
537-
if (is_array($sections) && !in_array($section, $sections, true)) {
538-
continue;
539-
}
540-
541-
echo "<dt><a href='{$menu["link"]}'>{$menu["title"]}</a></dt>\n";
542-
foreach ($menu["children"] as $child) {
543-
echo "<dd><a href='{$child["permlink"]}'>{$child["title"]}</a></dd>\n";
544-
}
545-
}
546-
}
547487
function doc_toc($lang): void {
548488
$file = __DIR__ . "/../manual/$lang/toc/index.inc";
549489
if (!file_exists($file)) {

include/results.inc

-95
This file was deleted.

include/site.inc

-9
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,6 @@ function default_language($site = false)
5959
return (isset($MIRRORS[$site]) ? $MIRRORS[$site][6] : false);
6060
}
6161

62-
// Returns true if the current (or specified) mirror
63-
// site is registered to have local search support
64-
function have_search($site = false)
65-
{
66-
global $MIRRORS, $MYSITE;
67-
if (!$site) { $site = $MYSITE; }
68-
return (isset($MIRRORS[$site]) ? $MIRRORS[$site][5] : false);
69-
}
70-
7162
// Returns the current (or specified)
7263
// mirror site's provider's name
7364
function mirror_provider($site = false)

quickref.php

-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
$_SERVER['BASE_PAGE'] = 'quickref.php';
1717
include_once __DIR__ . '/include/prepend.inc';
1818
include_once __DIR__ . '/include/errors.inc';
19-
include __DIR__ . '/include/results.inc';
2019

2120
if (empty($notfound)) {
2221
mirror_redirect("/search.php");

results.php

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
$_SERVER['BASE_PAGE'] = 'results.php';
44
include __DIR__ . '/include/prepend.inc';
5-
include __DIR__ . '/include/results.inc';
65

76
// HTTP status line is passed on, signifies an error
87
site_header(

0 commit comments

Comments
 (0)