Commit graph

83 commits

Author SHA1 Message Date
Zheng Zhu
9b826b9bf7 passing the language object in as parameter when initializing the message cache 2004-09-24 00:09:42 +00:00
Antoine Musso
be32b5b23f fix php notices about call-time by reference 2004-09-22 22:03:24 +00:00
Brion Vibber
36281e4c45 If $_SERVER['REMOTE_ADDR'] is not set, use 127.0.0.1 for $wgIP.
This avoids an E_NOTIFY-level warning and avoids having the empty
string set for the IP when running from CLI.
2004-09-22 11:39:30 +00:00
Zheng Zhu
ca7619c81c made some more wfMsg() to wfMsgForContent changes 2004-09-22 04:09:31 +00:00
Zheng Zhu
cc632696ba Adding a wgContLang object to handle message translation for the content of the site; wgLang should be used exclusively for UI messages. 2004-09-22 03:32:56 +00:00
Wil Mahan
b446574011 Bug 506: use $_SERVER[] instead of getenv() because the latter doesn't work
on IIS in ISAPI mode.
2004-09-20 21:53:21 +00:00
Antoine Musso
f8c9827902 Patch to only load $msgAllMessages instead of replacing the language object.
It's slow as the language object constructor is called twice.
See: http://bugzilla.wikipedia.org/show_bug.cgi?id=184
2004-09-08 13:32:13 +00:00
Brion Vibber
7c8905fa12 Add $wgUserLanguages array to specify which languages users are allowed
to select for the user interface. If this is left at the default empty
array the selection is disabled.

Currently the language selection is broken and will fail for many
cases, using bogus namespaces and probably corrupting your database
with bogus links, search index updates, and more.
2004-09-08 07:35:00 +00:00
Antoine Musso
f62712647b Registered user can set their own language for the interface. See http://bugzilla.wikipedia.org/show_bug.cgi?id=184 2004-09-08 03:39:32 +00:00
Tim Starling
a7e4f89cb4 Stub language file for zh-tw, changing Setup.php and Language.php to allow for languages with hyphens in their code 2004-09-05 06:17:37 +00:00
Antoine Musso
ba2afcd9fa Split files and classes in different packages for phpdocumentor. I probably changed some double quotes to single and used function foo () { shema 2004-09-03 23:00:01 +00:00
Antoine Musso
90155b8a97 Changing comments layout preparing for generated documentation with Phpdocumentor 2004-09-02 23:28:24 +00:00
Jens Frank
85bfd4f375 ENH#169: Provide plugin interface for skins. See also module "sampleskin" in extensions. 2004-08-27 05:23:52 +00:00
Antoine Musso
3d60242fb5 massive double to single quotes conversion. I have not noticed any bug after a lot of testing 2004-08-22 17:24:50 +00:00
Tim Starling
bcb4f2c046 New feature: Turck MMCache shared memory as a lightweight, windows-compatible replacement for memcached 2004-08-21 13:59:48 +00:00
Brion Vibber
2a09429bac Only load memcached-client.php if we're really using it. Saves about 120kb memory when off. 2004-08-21 10:04:30 +00:00
Brion Vibber
dde3967d28 Don't include SearchEngine.php when it's not used. Saves about 180k of memory at runtime. 2004-08-21 09:51:01 +00:00
Brion Vibber
d64197636f Don't load DifferenceEngine.php when not needed. This saves 200-300kb of ram. 2004-08-21 09:32:34 +00:00
Tim Starling
5698c6bcc7 Allowed post-parse link cache to be used for update as well as page view. This involves changes to Article::showArticle() and maintenance/refreshLinks.inc. Fixed various bugs that I noticed along the way. Added an option to recover the old 1.3.x behaviour, for profiling and debugging. 2004-08-14 13:34:57 +00:00
Tim Starling
cd2e8170d2 Ahh, so that's what that does 2004-08-12 06:54:58 +00:00
Brion Vibber
62e98ad47c Suppress some more warnings on separate execution of files. Shouldn't
be anything exploitable, it's just annoying.
2004-08-06 22:30:47 +00:00
Tim Starling
1773cd1e76 * Introducing bit field for database parameters
** Database constructor calling sequence, and Database::newFromParams()
** Including flags in the server initialisation structs
** Support for setting appropriate flags from legacy globals in Setup.php
** Moved some defines to Define.php so that they can be used in LocalSettings.php, most importantly the bit field constants

* Changes related to post-parse link colouring
** Turn the link cache back on when using it for updating the links table
** No longer need to call preFill() on page view

* Better synchronisation of slave servers
** Rearranged getConnection()
** System for beginning and committing transactions when multiple connections are open
** wfAbruptExit() commits transactions, wfErrorExit() does not. Various functions changed to use wfErrorAbort()

* Allowed reporting of database errors during deferred updates by moving them above output()
2004-07-24 07:24:04 +00:00
Tim Starling
ac549401d4 * Support for table name prefixes throughout the code. No support yet for converting static SQL, which also means no installation. But it has been tested by creating the tables in the ordinary way and then renaming them
* DB_WRITE now called DB_MASTER, DB_READ now called DB_SLAVE
* Converted to use SQL wrapper functions instead of direct SQL in various places
* Experimental method for preserving the chronological order of events when slave servers are used. Untested.
* Fixes to the new post-parse existence test feature
* Some.. other stuff
2004-07-18 08:48:43 +00:00
Tim Starling
b96b707efa OOP calling convention for database functions. DBMS abstraction implemented by means of functions instead of global variables, PostgreSQL object converted to a subclass instead of a drop-in replacement. Also the beginnings of a flexible table name feature. 2004-07-10 03:09:26 +00:00
Antoine Musso
232659747d removing useless comment 2004-06-17 16:52:54 +00:00
Antoine Musso
5928a9238b EXPERIMENTAL: Stop requiring skin classes we do not use. Save about 210KB memory for a monobook user, should save more when user use standard. 2004-06-17 16:31:57 +00:00
Tim Starling
b5ef8d221b Bringing the load balancer to the main branch. Still doesn't do much. I needed a DB connection cache for my Article.php alterations, which LoadBalancer provides. 2004-06-15 15:00:54 +00:00
Antoine Musso
16a74059bd recommiting specialpages loading fix as the BoardVote extension as now been fixed 2004-06-12 01:31:00 +00:00
Brion Vibber
e96217fc1c Undo change that stopped Wikipedia from running at all 2004-06-11 23:29:56 +00:00
Antoine Musso
82b207df94 do not instant Special* objects if user is not requesting a special page (save memory / cpu time) 2004-06-11 21:13:51 +00:00
Brion Vibber
9a78bae429 Converted remaining latin-1 localizations to UTF-8 (da/de/es/nl/sv).
For compatibility with existing installations, a latin-1 proxy language
module can be activated by setting $wgUseLatin1 = true; which will convert
messages to Latin-1 and use the Latin-1 support code as necessary.
2004-06-11 02:47:41 +00:00
Antoine Musso
c92a392572 double quotes to single quotes :o) 2004-06-09 01:25:31 +00:00
Antoine Musso
34efa448f5 possible performance enhancement 2004-06-08 02:32:56 +00:00
Tim Starling
876e7e5188 profiling correction 2004-06-06 14:05:07 +00:00
Tim Starling
74dc9fd67a More detail in profiling data 2004-06-04 02:44:58 +00:00
Tim Starling
1da9734e6c Fixed site notice for monobook, displayed site notice for board vote 2004-05-31 08:43:36 +00:00
Tim Starling
e3676a470c Introducing special page modular extensions, making the board vote special page the first of these.
* Moving common special page handling to SpecialPage.php
* Special page lists in the language classes are obsolete, replaced by the list in SpecialPage.php
* Special:Specialpages uses the standard page titles wfMsg(pagename) instead of the description list previously contained in the $wgSpecialPagesEn arrays
* Ability to add custom messages to the MessageCache. Overridable by the MediaWiki namespace.
* Moving board vote functionality from includes/SpecialBoardvote.php to extensions/BoardVote.php
2004-05-15 03:36:39 +00:00
Brion Vibber
762b8e9b47 Allow installing and running the wiki on a server where ini_set has been
disabled via disable_functions in php.ini (bug #928168)

The PHPTal skin doesn't function unless the PEAR bits are in include_path,
so it's disabled if ini_set can't be used. If the files are manually placed
or a real PEAR installation is available with the right stuff, one can
use $wgUsePHPTal = true;

There are likely other things that need to be taken into account for
restricted environments. Maintenance scripts haven't been tweaked for
such an environment yet either.
2004-05-09 10:37:00 +00:00
Brion Vibber
0c2fba0ac4 Add an objectcache table for limited caching when memcached isn't
available. Currently using for the message cache to avoid reading
every message separately. This now is only slightly slower than
memcached in my tests when $wgUseDatabaseMessages is enabled, so
it's a bit of a speedup for common hosts.
2004-05-09 05:12:55 +00:00
Tim Starling
8f22cb45b1 include_once -> require_once 2004-05-07 13:43:10 +00:00
Brion Vibber
eccdcc9b5f Don't load user session in command line mode; this can bork web-based
reinstalls in some circumstances (bug 941461)
2004-05-02 09:06:56 +00:00
Brion Vibber
58ac070b9a Fix unicode case conversion for English/UTF-8 2004-05-01 09:13:17 +00:00
Brion Vibber
020236a408 License selector for installation, to activate the metadata & footer info.
Can select no metadata, GNU FDL, or Creative Commons, which sends off
to the CC remote license engine to pick one.

Not fully tested. CC is returning the wrong icon URL except for public
domain right now. Going out to CC and back loses all other options from
the form.
2004-04-14 06:15:46 +00:00
Tim Starling
48dd60aa13 minor command line mode fixes 2004-03-23 10:15:26 +00:00
Tim Starling
2ca258fd03 * Changed inclusion syntax to allow e.g. {{stub}}
* Split MediaWiki namespace into MediaWiki and Template (requires changes to all language files)
* Purge links to on edit of Template namespace
* General refactoring of purging and cache invalidation code
2004-03-20 15:03:26 +00:00
Brion Vibber
623ca89c8b Save password cookie fixes 2004-03-10 05:21:58 +00:00
Gabriel Wicke
8882b85f4b support for second-tier squids in the ip parsing function 2004-03-08 18:44:20 +00:00
Brion Vibber
014093acc4 More globals and uninitialized variables fixes. Added WebRequest ($wgRequest)
object to encapsulate the handling of get/post variables:

The following grab something out of $_REQUEST. The first parameter is the
variable name and is required. The second is an optional default value:

  $wgRequest->getVal() - any type, returns NULL if no default given
  $wgRequest->getInt() - forced integer, 0 default
  $wgRequest->getText() - runs through $wgLang->recodeInput()
  $wgRequest->getBool() - return true/false
  $wgRequest->getCheck() - returns true if the var is set, even if to ""

$wgRequest strips slashes at initialization if necessary.

Also in this fine object:
  $wgRequest->wasPosted() - returns false if this wasn't a real form post,
    so we can protect against faked submissions in get urls.

There's still plenty of work to do, not everything uses the new functions
yet. To test the strict mode, do define('DEBUG_GLOBALS', 1);
2004-03-08 09:09:35 +00:00
Brion Vibber
9e53bfc81c Imported the register_globals hack from REL1_2. Also starting work on
elimination of the use of import_request_variables (which gives us all
the insecurity of register_globals). Uncomment the define of DEBUG_GLOBALS
in index.php to turn on extra error reporting and trace down use of
uninitialized variables and nassssty globals.

Also rearranged the magic_quotes fixing, may not yet cover everything...
2004-03-08 01:51:32 +00:00
Tim Starling
d48da59e31 Oops, left debug output in 2004-03-06 02:13:59 +00:00