Commit graph

35 commits

Author SHA1 Message Date
Aryeh Gregor
a15c419b3d Remove ?>'s from files. They're pointless, and just asking for people to mess with the files and add trailing whitespace. (Yes, I looked over every one and reverted those that were bogus. Slash-enter a million times in less worked well enough, although it was a bit mind-numbing.) 2007-06-29 01:19:14 +00:00
Brion Vibber
73ef5a9d4a Revert r23197 -- while well-meaning, this would severely overrepresent minor content namespaces by selecting the namespaces with equal probability.
A better solution would be to modify the RandomPage class to allow passing pages of multiple namespaces, and giving it the complete list of content namespaces; then the selection would be properly proportional.
2007-06-22 14:25:23 +00:00
Daniel Cannon
cc7a0a8d9e Special:Randompage with no parameters now selects a random page from any namespace in $wgContentNamespaces, rather than just from NS_MAIN. 2007-06-22 06:23:02 +00:00
Nick Jenkins
f9619da3f0 Yet more doc tweaks:
* Add @addtogroup tags to various classes, to try and group conceptually-related classes together.
* Add brief descriptions to various Special pages, thanks to Phil Boswell.
* Moving some docs to be right above the classes they represent, so that they are picked up.
2007-04-20 08:55:14 +00:00
Ilmari Karonen
c4db61bcd8 actually, there's no need to make it so complicated after all... :/ 2007-04-19 10:54:48 +00:00
Ilmari Karonen
a5d5a6b5b8 make Special:Random retry (once, but more carefully) if the chosen random offset was too high, provide error message if there really are no pages to choose from rather than going to the main page. rewrite Special:Randomredirect to reuse code from Special:Random. 2007-04-19 10:19:27 +00:00
Nick Jenkins
f88c771756 The war on redundant ampersand usage!
* Convert "$dbw =& wfGetDB( DB_MASTER );" --> "$dbw = wfGetDB( DB_MASTER );"
* convert "$skin =& $wgUser->getSkin();" --> "$skin = $wgUser->getSkin();"

For the time being have not changed the function definitions of wfGetDB() or User::getSkin() [i.e. they are still both return-by-ref], so as to ensure the interface does not change for extensions [some of which may still be trying to run on PHP4 environments]. However presumably at some point this can be changed too.

Also includes tiny tweak to newlines in parserTests - will show 1 rather than 2 newlines between the "Reading tests from" strings when in quiet mode.
2007-01-22 23:50:42 +00:00
Antoine Musso
c771fc9c96 Use Doxygen @addtogroup instead of phpdoc @package && @subpackage 2007-01-20 15:09:52 +00:00
Ilmari Karonen
e0b9a317ed Use Title::newMainPage() in various places instead of calling
wfMsgForContent( 'mainpage' ) directly.  Also add release notes
for previous commit.
2006-12-03 00:22:14 +00:00
Nick Jenkins
ae8554c45b Completing code housekeeping stuff for rest of includes/ directory: removing unused local vars, removing unused globals, replacing extract() where simple to do, declaring output arrays before calling preg_match(), and so forth. 2006-11-29 11:43:58 +00:00
Magnus Manske
cc38d6d321 Fixed namespace handling (will now accept English namespace names in addition to localized ones) 2006-05-04 09:41:33 +00:00
Antoine Musso
69689725c1 Switching from phpdoc to doxygen (use less than 32MB of memory).
Run maintenance/mwdocgen.php to generate doc in ./docs/html/ .
2006-04-19 15:46:24 +00:00
Antoine Musso
2ca68a256d Clean up unused globals! 2005-12-04 18:27:59 +00:00
River Tarnell
b817c0c15f merge ORACLE_WORK. sorry, this may break some parts of MySQL, i did not test extensively. 2005-08-02 13:35:19 +00:00
Niklas Laxström
7d4a95ab53 No references here, caused ugly by php notice 2005-08-01 23:58:51 +00:00
Ævar Arnfjörð Bjarmason
fde3fdc9b7 * Clarified fuzzy if statement 2005-04-30 01:19:09 +00:00
Ævar Arnfjörð Bjarmason
fd57e62238 * Code cleanup 2005-04-29 19:15:50 +00:00
Ævar Arnfjörð Bjarmason
27f2fbb3c1 * (bug 510) added the ability to do Special:Randompage/Namespace to get a
random page from that namespace.
2005-04-16 23:51:42 +00:00
Antoine Musso
991f798587 * Remove some hardcoded 0 instead of NS_MAIN
* Note in define.php that people should NOT change the integer values for NS_* constants
2005-01-11 18:18:16 +00:00
Brion Vibber
64ac6b8e77 Merge SCHEMA_WORK into HEAD. Lots of changes, some things are probably broken:
* Page moves/overwrites are a little iffy
* Compression might not be working right
* Profit!
2004-12-19 08:00:50 +00:00
Evan Prodromou
4b42f18b66 Removed CVS keywords from files, to make merging between branches
easier. Interpolated keywords cause lots of conflicts and headaches at
merge time for older (<1.12.x) CVS versions.
2004-11-29 18:25:30 +00:00
Wil Mahan
2a03980093 Bug 589: make random selection slightly more random. PHP's
mt_rand() function has a maximum value of 2^31-1, which
is small enough that duplicate values can occur due to the
Birthday paradox, e.g. on the English Wikipedia. To fix
this, add a wfRandom() function that calls mt_rand()
twice to get the desired amount of randomness.
2004-10-11 17:34:39 +00:00
Brion Vibber
18c44865d2 Add comment about why we pick a random number in PHP and use it as a
literal constant instead of the RAND() function. Also removed wfLocalUrl().
2004-10-02 02:27:30 +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
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
Tim Starling
f0987b0523 exclude Rambot (or any other arbitrary SQL) from Special:Randompage 2004-07-10 01:25:42 +00:00
Domas Mituzas
ab975564db get rid of 'use index' for nonmysql 2004-06-09 16:19:24 +00:00
Tim Starling
68967f0f00 use of $wgRequest 2004-04-01 12:53:01 +00:00
Brion Vibber
0332f4c598 Fix for compatibility with short_open_tag = Off 2004-02-18 02:15:00 +00:00
Tim Starling
9b28aa9905 changing wfQuery to allow replication 2003-09-20 02:21:40 +00:00
Brion Vibber
5b559bbd84 Work around comma-in-string-form-of-random-index bug which appears when set to a locale with a comma as the decimal separator 2003-06-06 18:38:14 +00:00
Brion Vibber
5648184915 Tweak to use local random, don't trust mysql's; new seed 2003-06-03 21:27:06 +00:00
Lee Daniel Crocker
d82c14fb4f Initial revision 2003-04-14 23:10:40 +00:00