Skip to content

Commit 046cc3e

Browse files
committed
Fix: Run 'make coding-standards'
1 parent 4e10ef6 commit 046cc3e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+418
-62
lines changed

archive/index.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
<?php
2+
3+
/**
4+
* Any ideas?
5+
*
6+
* @see https://github.com/php/web-php
7+
*/
8+
29
include_once __DIR__ . '/../include/prepend.inc';
310
$i = 0;
411
do {

autoload.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
<?php
22

33
/**
4-
* @see https://github.com/php-fig/fig-standards/blob/a1a0674a742c9d07c5dd450209fb33b115ee7b40/accepted/PSR-4-autoloader-examples.md#closure-example
4+
* Any ideas?
5+
*
6+
* @see https://github.com/php/web-php
57
*/
8+
69
spl_autoload_register(static function (string $class): void {
710
$prefix = 'phpweb\\';
811
$directory = __DIR__ . '/src/';

backend/index.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
<?php
2-
// Simulate a /backend shortcut call (which will lead to a manual page)
2+
3+
/**
4+
* Any ideas?
5+
*
6+
* @see https://github.com/php/web-php
7+
*/
8+
39
$_SERVER['REQUEST_URI'] = '/backend';
410
include_once __DIR__ . '/../include/prepend.inc';
511
include_once __DIR__ . '/../error.php';

bin/index.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
<?php
2-
// Simulate a /bin shortcut call (which will lead to a manual page)
2+
3+
/**
4+
* Any ideas?
5+
*
6+
* @see https://github.com/php/web-php
7+
*/
8+
39
$_SERVER['REQUEST_URI'] = '/bin';
410
include_once __DIR__ . '/../include/prepend.inc';
511
include_once __DIR__ . '/../error.php';

cached.php

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
11
<?php
2-
/*
3-
Yes, we know this can be used to view the source for any file
4-
in the docroot directory. This is intentional and not an LFI
5-
vulnerability. The source code for everything in the docroot
6-
is publicly available at
72

8-
https://github.com/php/web-php
3+
/**
4+
* Any ideas?
5+
*
6+
* @see https://github.com/php/web-php
7+
*/
98

10-
so there is no vulnerability here. You can't use this to view
11-
anything that is private.
12-
*/
139
$_SERVER['BASE_PAGE'] = 'cached.php';
1410
include_once 'include/prepend.inc';
1511

conferences/index.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
<?php
2+
3+
/**
4+
* Any ideas?
5+
*
6+
* @see https://github.com/php/web-php
7+
*/
8+
29
$_SERVER['BASE_PAGE'] = 'conferences/index.php';
310
include_once __DIR__ . '/../include/prepend.inc';
411
include_once __DIR__ . '/../include/pregen-news.inc';

credits.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
<?php
2+
3+
/**
4+
* Any ideas?
5+
*
6+
* @see https://github.com/php/web-php
7+
*/
8+
29
$_SERVER['BASE_PAGE'] = 'credits.php';
310
include_once __DIR__ . '/include/prepend.inc';
411

error.php

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
<?php
2-
/*
3-
4-
This script handles all 401, 403 and 404 error redirects,
5-
and some directory requests (like /images). Uses the
6-
preferred language setting and the REQUEST_URI to guess what
7-
page should be displayed. In case there is no page that can
8-
be displayed, the user is redirected to a search page.
92

10-
*/
3+
/**
4+
* Any ideas?
5+
*
6+
* @see https://github.com/php/web-php
7+
*/
118

129
// Ensure that our environment is set up
1310
include_once __DIR__ . '/include/prepend.inc';

images/elephpants.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
<?php
2+
3+
/**
4+
* Any ideas?
5+
*
6+
* @see https://github.com/php/web-php
7+
*/
8+
29
include_once __DIR__ . '/../include/prepend.inc';
310

411
$now = $_SERVER["REQUEST_TIME"];

images/index.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
<?php
2-
// Simulate a /images shortcut call (which will lead to a manual page)
2+
3+
/**
4+
* Any ideas?
5+
*
6+
* @see https://github.com/php/web-php
7+
*/
8+
39
$_SERVER['REQUEST_URI'] = '/images';
410
include_once __DIR__ . '/../include/prepend.inc';
511
include_once __DIR__ . '/../error.php';

images/logo.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
<?php
22

3+
/**
4+
* Any ideas?
5+
*
6+
* @see https://github.com/php/web-php
7+
*/
8+
39
$refresh = isset($_GET['refresh']);
410

511
// Be 100% sure the timezone is set

include/branches.inc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
<?php
2+
3+
/**
4+
* Any ideas?
5+
*
6+
* @see https://github.com/php/web-php
7+
*/
8+
29
include_once __DIR__ . '/releases.inc';
310
include_once __DIR__ . '/version.inc';
411

include/changelogs.inc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
<?php
2+
3+
/**
4+
* Any ideas?
5+
*
6+
* @see https://github.com/php/web-php
7+
*/
8+
29
function bugfix($number) {
310
echo "Fixed bug "; bugl($number);
411
}

include/countries.inc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
<?php
2+
3+
/**
4+
* Any ideas?
5+
*
6+
* @see https://github.com/php/web-php
7+
*/
8+
29
return array(
310
'AFG' => 'Afghanistan',
411
'ALB' => 'Albania',

include/do-download.inc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<?php
22

3-
/*
4-
This code redirects the user to the exact file to
5-
download, and logs the download if it's something
6-
we would like to know about (PHP binary or source).
7-
*/
3+
/**
4+
* Any ideas?
5+
*
6+
* @see https://github.com/php/web-php
7+
*/
88

99
function get_actual_download_file($file)
1010
{

include/email-validation.inc

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
<?php
22

3-
// Try to remove anti-SPAM bits
3+
/**
4+
* Any ideas?
5+
*
6+
* @see https://github.com/php/web-php
7+
*/
8+
49
function clean_AntiSPAM($email)
510
{
611
$remove_spam = "![-_]?(NO|I[-_]?HATE|DELETE|REMOVE)[-_]?(THIS)?(ME|SPAM)?[-_]?!i";

include/errors.inc

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
<?php
2-
/*
3-
This script provides functions to print out
4-
error messages for users in case something is
5-
not available.
6-
*/
2+
3+
/**
4+
* Any ideas?
5+
*
6+
* @see https://github.com/php/web-php
7+
*/
78

89
// A 'good looking' 404 error message page
910
function error_404()

include/historical_mirrors.inc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
<?php
2+
3+
/**
4+
* Any ideas?
5+
*
6+
* @see https://github.com/php/web-php
7+
*/
8+
29
$historical_mirrors = array(
310
array("ARG", "ar2.php.net", "XMundo Hosting Solutions", "http://www.xmundo.net"),
411
array("ARM", "am1.php.net", "ARMINCO Global Telecommunications", "http://www.arminco.com/"),

include/index.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
<?php
2-
// Simulate a /include shortcut call (which will lead to a manual page)
2+
3+
/**
4+
* Any ideas?
5+
*
6+
* @see https://github.com/php/web-php
7+
*/
8+
39
$_SERVER['REQUEST_URI'] = '/include';
410
include_once __DIR__ . '/prepend.inc';
511
include_once __DIR__ . '/../error.php';

include/ip-to-country.inc

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
<?php // -*- C++ -*-
1+
<?php
2+
3+
/**
4+
* Any ideas?
5+
*
6+
* @see https://github.com/php/web-php
7+
*/
28

39
/*
410

include/langchooser.inc

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
<?php // -*- C++ -*-
1+
<?php
2+
3+
/**
4+
* Any ideas?
5+
*
6+
* @see https://github.com/php/web-php
7+
*/
28

39
/*
410

include/languages.inc

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
<?php // -*- C++ -*-
1+
<?php
2+
3+
/**
4+
* Any ideas?
5+
*
6+
* @see https://github.com/php/web-php
7+
*/
28

39
/*
410
This is a list of all manual languages hosted

include/manual-lookup.inc

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
<?php // -*- C++ -*-
1+
<?php
2+
3+
/**
4+
* Any ideas?
5+
*
6+
* @see https://github.com/php/web-php
7+
*/
28

39
// We need this for error reporting
410
include_once __DIR__ . '/errors.inc';

include/posttohost.inc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<?php
22

3-
/*
4-
This code is used to post data to the central server which
5-
can store the data in database and/or mail notices or requests
6-
to PHP.net stuff and servers
7-
*/
3+
/**
4+
* Any ideas?
5+
*
6+
* @see https://github.com/php/web-php
7+
*/
88

99
function posttohost($url, $data)
1010
{

include/releases.inc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
<?php
2+
3+
/**
4+
* Any ideas?
5+
*
6+
* @see https://github.com/php/web-php
7+
*/
8+
29
$OLDRELEASES = array (
310
8 =>
411
array (

include/results.inc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
<?php
2+
3+
/**
4+
* Any ideas?
5+
*
6+
* @see https://github.com/php/web-php
7+
*/
8+
29
function search_results($res, $q, $profile='all', $per_page=10, $s=0, $l='en', $show_title=true, $show_foot=true, $show_attrib=true) {
310
$start_result = $s;
411
$end_result = $s + $res['ResultSet']['totalResultsReturned'] -1;

include/shared-manual.inc

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
<?php // -*- C++ -*-
1+
<?php
2+
3+
/**
4+
* Any ideas?
5+
*
6+
* @see https://github.com/php/web-php
7+
*/
28

39
/*
410

include/site.inc

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
<?php // -*- C++ -*-
1+
<?php
2+
3+
/**
4+
* Any ideas?
5+
*
6+
* @see https://github.com/php/web-php
7+
*/
28

39
// Define some constants, and $MIRRORS array
410
// Mirror type constants

include/version.inc

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
1-
<?php // vim: et
1+
<?php
2+
3+
/**
4+
* Any ideas?
5+
*
6+
* @see https://github.com/php/web-php
7+
*/
8+
29
/* The format is:
310
* array(
411
* "major release number" => array(

index.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
1-
<?php // vim: et
1+
<?php
2+
3+
/**
4+
* Any ideas?
5+
*
6+
* @see https://github.com/php/web-php
7+
*/
8+
29
(function ($uri): void {
310
// Special redirect cases not able to be captured in error.php
411
$shortcuts = [

0 commit comments

Comments
 (0)