the function list search (so users won't get redirected to
google). Also provide the option to force the site to redirect
to do a documentation seach (on google currently) in case
a user is used to this
Note that it's currently impossible to link to the newest file in a branch with
CHORA, only for HEAD, so php4news now links to the 4_3 revision list for NEWS.
to set r->status, so we have to pass it in now. Without this change were
were sending both a 404 and a 200 on the same response which caused all
sorts of weirdness. Hopefully this won't break too many mirrors.
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]
My local test showed that it works perfectly.
Note that it is important that a 200 OK status is returned,
and that the possible multiple includes are handled with
include_once (in shared-manual.inc too!)
# As it now stands phpweb uses EXTREMELY inefficient way of including files
# by relying on the include_path parameter. Which causes at least 2 useless
# stat() calls for every include. By prefixing all includes & requires for
# files from include/ with the __PHPWEB_INC_PATH__ constants this is avoided.
have no official direct interface for direct downloads,
and it would be painfull to maintain one
Also make the download code much more modern using
$_SERVER and $_REQUEST vars, instead of globals,
also use i2c_realip() for more accurate() IP detection
=> use $LANG as the preferred language
=> use $_SERVER['STRIPPED_URI'] to handle the request
Also remove the download/from/mirror link handler, as it is not
applicapble anymore (/from/a/mirror is used now).
that they are actually downloading a zip/exe file, expected after the
extension. Some browsers just does not seem to honor HTTP, and interpret
responses they way they like to...
it with $REDIRECT_REDIRECT_ERROR_NOTES, and stuff. $REQUEST_URI
contains all the URI data we need.
Use pregs in all the checks...
Move dochowto link a bit up to it's right place...
Made manual move BC check a bit more intelligent, and redirect to the
right place for printer friendly pages for the first time...
Use $MYSITE instead of $SERVER_NAME for local redirects. It's always the
"best name" for the mirror, most probably the mirrors real mirror name if
it's found.
Use this new function to greatly simplify redirects in the URL handler script.
Also use a switch instead of multiple IFs to react to some special shortcuts.
Still more to come...
the 90% of redirects, so let's support only port 80 in 100%.
I am going to simplify those redirects, so please hold on ;)
Simplify some BC redirects, do not print a HTML page anymore, as
all common browsers and tools handle redirects...
Use absolute path in file_exists() checks, and includes, as all other
places use that (for consistency).