1
0
mirror of https://github.com/php/web-php.git synced 2026-04-27 17:03:25 +02:00
Commit Graph

873 Commits

Author SHA1 Message Date
Jacques Marneweck ea491396ff - Quickfix to get rasmus IP to lookup. 2003-05-24 20:01:56 +00:00
Gabor Hojtsy eab7a75a1b 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]
2003-05-24 19:50:37 +00:00
Gabor Hojtsy c0c7276f29 This base seems to be correct to me on mirror
sites too, so enable it
2003-05-24 11:10:51 +00:00
Gabor Hojtsy bc55d94455 Add $BASE_FOR_MANPAGE which will always contain
the correct URI of a manual page which is currently served.

The code uses no external calls, it is based on config params
provided by sendmanualheaders() and manualheaders(), which
are always properly parameterized on all manpages and are
always called.

The <base> printout is added with a comment now,
so we can see if it works correcly. If yes, that the
comment signs can be removed, making that effective.

Then all the manual shortcuts can be changed to include()
manual pages instead of redirecting to them. Relative
links will work.
2003-05-23 20:45:39 +00:00
Gabor Hojtsy 6cc5946b04 Add a language code conversion function, which
will be used on manual pages
2003-05-23 20:32:16 +00:00
Ilia Alshanetsky 19d6196627 Optimized include logic.
# 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.
2003-05-23 13:35:56 +00:00
Wez Furlong b7c0ecfb61 deprecate ht://dig in favour of alltheweb.
alltheweb has better results than ht://dig and allows us to utilize all mirrors
equally for load balancing.
2003-05-23 01:30:20 +00:00
Wez Furlong 1842aa7aee fix an issue for people in the US... 2003-05-23 00:27:55 +00:00
Wez Furlong a11ee2424b avoid function calls and hash-lookups here when we already have the details. 2003-05-23 00:04:59 +00:00
Wez Furlong 1e5cc0ae4d Panic at really high load 2003-05-22 23:30:58 +00:00
Wez Furlong d60b8e2b54 When multiple mirrors are search capable, randomly pick one. 2003-05-22 23:00:08 +00:00
Wez Furlong 1d9cdd7e2e Unconditionally dump manual searches onto mirrors (that are search capable). 2003-05-22 21:40:04 +00:00
Wez Furlong cc1a4ab4aa Don't suggest www.php.net, and avoid buildup a bunch of '/' on the URI. 2003-05-22 18:33:22 +00:00
Wez Furlong 032a075a09 Add primitive load balancing. 2003-05-22 17:31:44 +00:00
Gabor Hojtsy bdc3c24967 Doh, $www_static_root was even not global-ed here... 2003-05-21 08:51:24 +00:00
Gabor Hojtsy c2a0f9209d Fix another image... 2003-05-21 08:49:38 +00:00
Jacques Marneweck 979269e7f1 - Fixed $www_static_root not being echo'ed which caused stylesheet and a
couple of graphics to not load.
2003-05-20 22:08:51 +00:00
Jacques Marneweck 5997e36ffd - Fixed parse error with the } on line 5.
--jm
2003-05-20 22:03:34 +00:00
Sascha Schumann 0c04ec780b More work on moving accesses to static resources 2003-05-20 21:49:38 +00:00
Sascha Schumann f9644502ad Refactor code, use static.php.net and load style.css, favicon.ico,
and userprefs.js from there.

For the latter, cookies need to be set to "domain = .php.net"!
2003-05-20 21:45:24 +00:00
Gabor Hojtsy 8e67ef9f42 Don't have the same code twice, use a snippet
instead to print out the '[+] add a note' part at the
top and the bottom of user notes

Also use a small font to be like the text around

Remove ending ?> for include header() safetly reasons
2003-05-18 14:25:25 +00:00
Andrew Lindeman c5f9ddbde4 I must have been looking at the wrong function, as I put too many
arguments.  This should make it work now
2003-05-18 01:24:23 +00:00
Andrew Lindeman a897bffb31 make link black, to fit the layout 2003-05-17 22:01:29 +00:00
Andrew Lindeman b68874f3c5 modifying per goba's suggestion 2003-05-17 20:10:55 +00:00
Andrew Lindeman e044ce46b1 make it more obvious how to add a note 2003-05-17 19:19:43 +00:00
Gabor Hojtsy d6a39c138b Fix text in comment 2003-05-17 13:57:32 +00:00
Gabor Hojtsy bfee72a3fd Move do-download code to the include dir, as we
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
2003-05-17 13:54:59 +00:00
Gabor Hojtsy 81aba11784 Move real ip identification code to a new
function, i2c_realip(), as we need to call it
from elsewhere too...
2003-05-17 13:49:12 +00:00
Gabor Hojtsy 0259bf27a9 A country should only be valid, if we have a name
to display for it (we don't have a name for XEU for
example, which is not a country)
2003-05-17 12:54:36 +00:00
Gabor Hojtsy e3da085740 Tab => spaces 2003-05-17 12:46:44 +00:00
Gabor Hojtsy 661cd64838 Add new mirror_setcookie() function to set
a cookie for all mirror sites, and use it for
country and last language cookies set by our
code

Also add code to remember the last search term
and selected search option in a cookie (JS code
will come to handle this on the client side)
2003-05-17 12:45:51 +00:00
Gabor Hojtsy 485e1761e1 $COUNTRY is not needed here... 2003-05-17 09:16:21 +00:00
Gabor Hojtsy c9265def2c Use spaces not tabs 2003-05-17 09:14:42 +00:00
Gabor Hojtsy 48ff88618d Fix the inconsistencies introduced by the last two
fixes. We use $languages and not $lang here...
2003-05-17 09:13:03 +00:00
Wez Furlong 22edf51246 Use new priority field 2003-05-16 19:35:16 +00:00
Jacques Marneweck 4575c1b183 * Don't process country "xx" because it does not exist and on misconfigured
servers (i.e. not in the active mirrors list) with E_NOTICE spews a
   warning.

--jm
2003-05-15 21:35:58 +00:00
Jacques Marneweck 37a267d343 * More of the E_NOTICE fixes. Also make the spacer.gif pull from the
seperate images server if www.php.net

--jm
2003-05-15 21:16:21 +00:00
Wez Furlong c00483cbec Less stat() calls. 2003-05-15 17:05:17 +00:00
Wez Furlong 6ea5f27387 Route images via thttpd for www.php.net site itself.
# phpweb guys: please make it a point to try and use make_image() function
# for generating images where you can.  It allows us to manage the load
# a little easier
2003-05-15 16:36:04 +00:00
Gabor Hojtsy ec5a78f5e9 Adding client side JS to make events in the user's
country bold. This JS file will be expanded in the future
to add features like last search keyword / last selected
search option remembering

This JS was tested in Mozilla, Galeon and Konqueror
with success and the code was human checked against
MSDN for Internet Explorer questions. It also includes
a BC check for browsers without DOM support.
2003-05-15 13:27:40 +00:00
Gabor Hojtsy 24137bf133 Ugh... 2003-05-14 20:21:14 +00:00
Gabor Hojtsy ec1b4d6414 Make the horizontal bars look similar in Mozilla
then in Internet Explorer (black, one pixel high).
Also have hdelim()s in the same color all the time
2003-05-14 19:20:41 +00:00
Jacques Marneweck ea19670277 * Busy fixing all the errors that appears when E_NOTICE is set on php.net
as reported by James Cox in his e-mail with message id
   <MMEPJPGPACDMPGEEKFMKIECLLCAA.james@imajes.info>

--jm
2003-05-14 01:43:47 +00:00
Jacques Marneweck 4fe45890c8 * Busy fixing all the errors that appears when E_NOTICE is set on php.net
as reported by James Cox in his e-mail with message id
   <MMEPJPGPACDMPGEEKFMKIECLLCAA.james@imajes.info>

--jm
2003-05-14 00:50:53 +00:00
Jacques Marneweck 946622b061 * Busy fixing all the errors that appears when E_NOTICE is set on php.net
as reported by James Cox in his e-mail with message id
   <MMEPJPGPACDMPGEEKFMKIECLLCAA.james@imajes.info>

--jm
2003-05-14 00:21:41 +00:00
Wez Furlong ea7d904f20 Adjust for the official path to rsync'd database 2003-05-13 23:34:43 +00:00
Wez Furlong 04323a51b8 Fully qualified path... as this is included from more than one place... 2003-05-13 21:41:43 +00:00
James Cox a7423ced2a ok, so actually we get even more of a gain by removing the /user/css.php stuff.
Flame me later, but this is going to stay.. we can't afford the apache hit this causes on every page load.
2003-05-13 21:16:38 +00:00
Wez Furlong fb5ea26c6d Some performance tweaks from Ilia, slightly modified. 2003-05-13 21:10:30 +00:00
Wez Furlong aec0be0a39 Officially check-in support for a simple sqlite database to hold manual
information.
The effectively eliminates a whole bunch of stat() calls.
# It requires a database generated by a script on the server, which is
# not yet in CVS.
2003-05-13 19:10:33 +00:00