History log of /web-php/include/langchooser.inc (Results 1 – 25 of 50)
Revision Date Author Comments
# 00342c40 07-Dec-2023 Andreas Möller

Fix: Remove vim instruction (#880)


# 45d49c7e 07-Dec-2023 Andreas Möller

Fix: Remove emacs instruction (#876)


# c093fb53 06-Dec-2023 Andreas Möller

Enhancement: Enable `trailing_comma_in_multiline` fixer (#647)

* Enhancement: Enable and configure trailing_comma_in_multiline fixer

* Fix: Run 'make coding-standards'


# 1ebc2c49 22-Aug-2022 Andreas Möller

Enhancement: Enable `binary_operator_spaces` fixer

Closes GH-667.


# d9bcfed4 22-Aug-2022 Andreas Möller

Enhancement: Enable `array_syntax` fixer

Co-authored-by: MathiasReker <mathias@reker.dk>

Closes GH-659.


# cdb83249 22-Aug-2022 Andreas Möller

Enhancement: Enable `switch_case_space` fixer

Closes GH-669.


# f127de5d 15-Jul-2022 Andreas Möller

Enhancement: Enable `strict_param` fixer

We set strict param to false to ensure current behavior,
except for two cases where it is safe to go with true.

Closes GH-658.


# b575ebd4 15-Jul-2022 Andreas Möller

Enhancement: Include `*.inc` files (with exceptions)

Closes GH-662.


# 1b83fd7a 03-Jul-2022 Ayesh Karunaratne

Multiple micro-optimizations

* Replace `ob_get_contents();ob_clean()` with `ob_get_clean()`

`ob_get_clean()` is equivalent to `ob_get_contents()` followed by `ob_clean()`.

Multiple micro-optimizations

* Replace `ob_get_contents();ob_clean()` with `ob_get_clean()`

`ob_get_clean()` is equivalent to `ob_get_contents()` followed by `ob_clean()`.

* Replace `intval()` calls with `(int)` type cast

This is a micro-optimization because `intval()` is a function call, and the type cast is about 6 times fast.

* Replace `preg_replace` call that could be done with an `rtrim()` call

In `./error.php`, there is a `preg_replace('!/+$!', '', $URI);` call that essentially is equivalent to `rtrim()`, that both calls removing trailing slash characters in `$URI`.
The `rtim()` call is more legible and faster.

* Combine consecutive `str_replace` calls to a single `str_replace` call

* Use short ternary operator where possible

Improves code readability.

* Cascade various `else` statements where possible

Cleans up the code by removing unnecessary `else` blocks and moving the code to the parent context if the previous `if` block exits the function by either terminating the script, or with a `return` statement.

* Combine multiple `isset()` calls to a single `isset()`

`isset()` accepts multiple parameters and returns `true` only if all of the parameters are `isset`. It makes sense to combine multiple individual `isset` calls to a single call for better readability.

* Replace `for` loop with a `foreach` loop

* Remove unnecessary character escapes in regular expressions

Regular expression special characters are context-sensitive. For example, special characters such as `.` are not considered special within square braces (`[]`).
This removes several of such instances that certain characters are escaped, but it is not strictly necessary within the context. This improves the readability of the expression.

See more information at [PHP.Watch: Writing better Regular Expressions in PHP](https://php.watch/articles/php-regex-readability#reduce-escape)

* Remove unnecessary break statement

* Remove unnecessary PHP close tags

* Remove redundant JSON_ERROR_NONE check

Remove unnecessary `json_last_error() == JSON_ERROR_NONE` where the decoded object is inspected already.

Closes GH-603.

show more ...


# 7691b440 04-May-2020 Sherif Ramadan

Fix Bug #79524

Ignore LAST_LANG cookie from now on, because it's stupid. Honor Accept-Language
headers instead.


# cfc6b38e 10-Jul-2019 Sara Golemon

Goodbye Magic Quotes


# e235f794 17-Oct-2018 Peter Kokot

Trim trailing whitespace

This patch cleans all redundant trailing whitespace across the
repository except for the icalendar files.


# 0f95b8c7 30-Jun-2018 Peter Kokot

Remove unused Git attributes ident

The $Id$ keywords were used in Subversion where they can be substituted
with filename, last revision number change, last changed date, and last
use

Remove unused Git attributes ident

The $Id$ keywords were used in Subversion where they can be substituted
with filename, last revision number change, last changed date, and last
user who changed it.

In Git this functionality is different and can be done with Git attribute
ident. These need to be defined manually for each file in the
.gitattributes file and are afterwards replaced with 40-character
hexadecimal blob object name which is based only on the particular file
contents.

This patch simplifies handling of $Id$ keywords by removing them since
they are not used anymore.

show more ...


# ee6c0e89 17-Apr-2012 Peter Cowburn

make sure params are strings for manual-lookup.php (bug #61756)


# 5a93445f 21-Jan-2011 Rasmus Lerdorf

Fix xss problems


# 21efa66a 24-Feb-2008 Hannes Magnusson

Add support for PHP 5.3 and 6 *sigh*


# 6c3b9a71 12-May-2007 Hannes Magnusson

Fixed bug#41376 (a xss bug on php.net website)
# Found by André moulu


# 9cc1cf71 08-Aug-2003 Gabor Hojtsy

Wups, this needs to be global...


# e09380cb 08-Aug-2003 Gabor Hojtsy

Do not allow non-online languages as user preferred ones


# 18df8ff1 25-Jul-2003 Gabor Hojtsy

Fix a bug, which made language specifying shortcuts
(eg. /it/books) not work.


# 98679b4e 04-Jun-2003 Gabor Hojtsy

Only use a non-empty requested language


# 7eca1945 04-Jun-2003 Gabor Hojtsy

Also set the explicit lang if it was specified in a shortcut
(eg. /hu/echo) as we include the page now, and don't
redirect


# bc78f803 27-May-2003 Gabor Hojtsy

Remove PHP < 4.1.0 BC code
- the creation of $_.. vars
- global-ing them before usage

These are not needed anymore, we have all mirrors with
PHP > 4.1.0, and those having old v

Remove PHP < 4.1.0 BC code
- the creation of $_.. vars
- global-ing them before usage

These are not needed anymore, we have all mirrors with
PHP > 4.1.0, and those having old versions are disabled

show more ...


# eab7a75a 24-May-2003 Gabor Hojtsy

Comment the BC code for pre 4.1.0 mirrors as we have
them disabled now, so autoglobal vars should work on
all mirrors without special preparation

Use $_SERVER['DOCUMENT_ROOT'] for in

Comment the BC code for pre 4.1.0 mirrors as we have
them disabled now, so autoglobal vars should work on
all mirrors without special preparation

Use $_SERVER['DOCUMENT_ROOT'] for includes
instead of a user defined constant, as the docroot
value is always available [even before prepend.inc]
This ensures consistency and causes no stat() calls

Add myphpnet_...() functions to load, get/set and save
the user preferences, and use them everywhere. This
enables us to easily add new preferences to the same
cookie. Every preference will last for a year this way,
and the cookie will only be set again, if someone
modifies his data on my.php

If this works nicely, then we can easily add a preferred
mirror site setting (and more)

[These changes seem to work on my local mirror]

show more ...


# e3da0857 17-May-2003 Gabor Hojtsy

Tab => spaces


12