Skip to content

Enhancement: Include *.inc files (with exceptions) #662

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .php-cs-fixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@
->ignoreDotFiles(false)
->in(__DIR__)
->exclude('manual/en/')
->name('*.inc')
->name(__FILE__)
->notPath('include/last_updated.inc')
->notPath('include/pregen-confs.inc')
->notPath('include/pregen-news.inc')
->notPath('tests/run-tests.php');

$config->setRules([
Expand Down
Empty file modified include/branches.inc
Whitespace-only changes.
Empty file modified include/changelogs.inc
Whitespace-only changes.
Empty file modified include/countries.inc
Whitespace-only changes.
Empty file modified include/email-validation.inc
Whitespace-only changes.
Empty file modified include/errors.inc
Whitespace-only changes.
Empty file modified include/gpg-keys.inc
Whitespace-only changes.
1 change: 0 additions & 1 deletion include/header.inc
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ foreach($css_files as $filename) {
$CSS[$filename] = @filemtime($path);
}


if (isset($shortname) && $shortname) {
header("Link: <$shorturl>; rel=shorturl");
}
Expand Down
Empty file modified include/historical_mirrors.inc
Whitespace-only changes.
Empty file modified include/ip-to-country.inc
Whitespace-only changes.
1 change: 0 additions & 1 deletion include/langchooser.inc
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,6 @@ function language_choose_code()
return array($selected, $explicitly_specified, $parsed_langs);
}


// Add a language to the possible languages' list
function language_add($langcode, &$langs)
{
Expand Down
Empty file modified include/languages.inc
Whitespace-only changes.
6 changes: 0 additions & 6 deletions include/layout.inc
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ function highlight_php_trimmed($code, $return = false)
// Stats pages still need this
function commonHeader($title) { site_header($title); }


// Stats pages still need this
function commonFooter() { site_footer(); }

Expand Down Expand Up @@ -471,9 +470,6 @@ EOT;
return $retval;
}




function site_header($title = '', $config = array())
{
global $MYSITE;
Expand All @@ -488,10 +484,8 @@ function site_header($title = '', $config = array())
"headsup" => "",
);


$config = array_merge($defaults, $config);


$config["headsup"] = get_news_changes();

$lang = language_convert($config["lang"]);
Expand Down
1 change: 0 additions & 1 deletion include/manual-lookup.inc
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,6 @@ function find_manual_page($lang, $keyword)
continue;
}


// Match found
// But does the file really exist?
// @todo consider redirecting here, instead of including content within the 404
Expand Down
1 change: 0 additions & 1 deletion include/prepend.inc
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ if (ini_get("date.timezone") === "" && function_exists("date_default_timezone_se
date_default_timezone_set("UTC");
}


/* Compatibility with the PHP webserver.. */
if (!isset($_SERVER["SERVER_ADDR"])) {
$_SERVER["SERVER_ADDR"] = "127.0.0.1";
Expand Down
Empty file modified include/releases.inc
Whitespace-only changes.
Empty file modified include/results.inc
Whitespace-only changes.
2 changes: 0 additions & 2 deletions include/shared-manual.inc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ include_once __DIR__ . '/prepend.inc';
// Set variable defaults
$PGI = array(); $SIDEBAR_DATA = '';


// =============================================================================
// User note display functions
// =============================================================================
Expand Down Expand Up @@ -197,7 +196,6 @@ USER_NOTE_TEXT;

}


function manual_navigation_breadcrumbs(array $setup) {
$menu = array();
foreach (array_reverse($setup["parents"]) as $parent) {
Expand Down
1 change: 0 additions & 1 deletion include/site.inc
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,6 @@ if($_SERVER["SERVER_PORT"] != '80' && $_SERVER["SERVER_PORT"] != 443) {
$msite = 'https://' . $_SERVER["SERVER_NAME"] . '/';
}


// If the mirror is not registered with this name, provide defaults
// (no country code, no search, no stats, English default language ...)
if (!isset($MIRRORS[$MYSITE])) {
Expand Down
Empty file modified include/version.inc
Whitespace-only changes.