1
0
mirror of https://github.com/php/web-php.git synced 2026-03-31 19:52:29 +02:00
Commit Graph

885 Commits

Author SHA1 Message Date
Derick Rethans
8a3dc36b34 - Make it global too :) 2003-06-02 09:49:46 +00:00
Derick Rethans
40849db79b - Remove inactive languages from this list too 2003-06-02 08:40:18 +00:00
Derick Rethans
6751cf78ab - Make it possible to disable languages that should not show up as available
language online.
2003-06-02 08:36:54 +00:00
Rasmus Lerdorf
edbe4e40bf New categorized look for the calendar sidebar
Might take a couple of hours for the backend data and this new frontend
ui to get in synch.
2003-06-01 19:16:54 +00:00
Rasmus Lerdorf
ddc3732b3b More work on the event categorization 2003-06-01 15:52:37 +00:00
Gabor Hojtsy
0bc109e0c6 Use $_SERVER['DOCUMENT_ROOT'] instead of $DOCUMENT_ROOT in the slow lookup function
Also use this for loading the sqlite DB, instead of a
relative path value

Reformat the sqlite lookup function to be indented
with spaces instead of tabs

Add many comments to this part

Add prefix detection code, so /function.echo type of
lookups will work with the sqlite lookup method too. This
hopefully fixes #23652.

Remove ending ?> for consistency

Changes tested on my local mirror with sqlite and without it
2003-05-29 18:01:30 +00:00
Gabor Hojtsy
af04d4d2a8 Fix the manual page check on the dropdown to check with
an absolute path and not a relative (it can also be included
in a shortcut call)

Also comment it out the same time, as discussed with the
php-mirrors list, for performance reasons [other language
listings are also done without checks on docs.php for
example] This eliminates approx. 24 stat() calls per
manual page display
2003-05-27 16:48:36 +00:00
Gabor Hojtsy
bc78f8032c 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
2003-05-27 16:40:05 +00:00
Gabor Hojtsy
52702cdd65 This search in the index was causing most of the IPs
to be hidden in the db since I have added the speed
increase fix. The previous ranges were checked for IPs
instead of the actual range where the IP was [because ==
was true for the upper part of the region].

Now we search in one region up, and that makes this
whole code work again without any more resource needs.

Plus it also finds Rasmus' home IP finally ;))
2003-05-26 18:44:19 +00:00
Gabor Hojtsy
55513d6ab8 Drop out ugly workaround to make the country lookup work
The database has errors, so we need to wait for that to be
fixed...

Some speed fixes:

 - do not search in the DB if we were unable to find any
   helpful data in the index. A full DB search is something
   we should not do because of performance reasons

 - return a two element array in the index lookup specifying
   a range where the IP should be in the DB (if it is correct).
   If we pass that range, we were unable to find the IP.
   This reduces the number of compared records significantly

Note that this is not a fix for Rasmus' and others'
lookup problems. That is caued by the DB containing
overlapping IP ranges, which are not OK for our indexer,
and would even not return valid results in an SQL
'BETWEEN' search [which is the recommended search
method on ip-to-country.com].
2003-05-25 12:39:26 +00:00
Jacques Marneweck
0883c55d3a - Another better fix seeing that it does not process more of the
ip-to-country database file than necessary as well as adding a failsafe
  so we only do a max of 3 lookups and move the index down each time by
  one.
2003-05-24 20:51:41 +00:00
Andrew Lindeman
a53dea92ac this is a better way to do that 2003-05-24 20:32:44 +00:00
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