Commit graph

48 commits

Author SHA1 Message Date
Alexandre Emsenhuber
2040d1337e Added missing GPLv2 headers in some places.
Also made file/class documentation more consistent.

Change-Id: Ib46e50da4ec649a6a06cbeed00752effb79ed06e
2012-05-09 20:11:36 +02:00
Alexandre Emsenhuber
e6441b8f6c * Don't issue a write query to the database if the wl_notificationtimestamp is already null, so we don't to do at COMMIT et al. on every view request on an user watching the page
* Made WatchedItem select wl_notificationtimestamp instead of "1"
* Added loading mechanism, accessor to wl_notificationtimestamp and method to reset that timestamp
2012-02-10 19:35:14 +00:00
Sam Reed
b15737fa83 And even more documentation, the last of this batch 2011-05-28 19:00:01 +00:00
Sam Reed
912ec3aef6 Add profiling to removeWatch 2011-02-13 19:12:24 +00:00
Sam Reed
a2589ff8c6 Assignment in loop conditions suck
while ( $row = $dbw->fetchObject( $res ) ) { to foreach ( $res as $row ) in includes

Add some braces
2010-10-13 23:11:40 +00:00
Chad Horohoe
4c74490bb8 Big commit: kill almost every freeResult() call as useless 2010-08-08 12:27:48 +00:00
Chad Horohoe
a4e5e935b6 Mass convert NULL -> null. Left strings and comments alone, obviously. 2009-12-11 21:07:27 +00:00
Roan Kattouw
ba484965ed Clean up WatchedItem.php a bit: use __METHOD__ rather than $fname and use MWNamespace::getSubject() and getTalk() 2009-02-26 12:52:21 +00:00
Alexandre Emsenhuber
a1ce0224ad fix some doxygen warnings 2008-09-17 14:26:43 +00:00
Chad Horohoe
d153006396 Minor cleanup (docs, visibilities, formatting) 2008-09-15 17:40:12 +00:00
Alexandre Emsenhuber
73ad562b8d Fix some doxygen warnings 2008-05-22 19:48:26 +00:00
Brion Vibber
a4ffac4063 Revert r35178 and normalize User's getID() and setID() methods to prettier getId() and setId()
This doesn't accomplish anything, of course, but if you're going to run around changing them, at least make em prettier eh? :)
2008-05-22 16:39:43 +00:00
Aaron Schulz
ae54dbbb3d *The function is User::getID() not getId() 2008-05-22 14:57:07 +00:00
Alexandre Emsenhuber
087a9f70c5 WARNING: HUGE COMMIT
Doxygen documentation update:
* Changed alls @addtogroup to @ingroup. @addtogroup adds the comment to the group description, but doesn't add the file, class, function, ... to the group like @ingroup does. See for example http://svn.wikimedia.org/doc/group__SpecialPage.html where it's impossible to see related files, classes, ... that should belong to that group.
* Added @file to file description, it seems that it should be explicitely decalred for file descriptions, otherwise doxygen will think that the comment document the first class, variabled, function, ... that is in that file.
* Removed some empty comments
* Removed some ?>

Added following groups:
* ExternalStorage
* JobQueue
* MaintenanceLanguage

One more thing: there are still a lot of warnings when generating the doc.
2008-05-20 17:13:28 +00:00
Siebrand Mazeland
79d5225c0e * remove end of line whitespace
* remove empty lines at end of file
* remove "?>" where still present
2008-04-14 07:45:50 +00:00
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
f1bb5a385e E_STRICT fixlets: properly mark some static methods as static
Also removed a few obsolete object references
2007-05-02 15:36:17 +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
Domas Mituzas
15d1e1ec7e Wipe out memcached code from WatchedItem: does not make sense to cache (user,page), when hitrate is just 50% (and we lived without this cache forever) 2007-01-12 12:50:37 +00:00
Domas Mituzas
03d97f003a PHP and types ;-) mcaccess--, dbaccess-- 2007-01-12 00:34:42 +00:00
Tim Starling
e174a4ddfb Abolished $wgDBname as a unique wiki identifier, it doesn't work with the new-fangled feature we call "table prefixes". Instead use wfWikiID() for an identifier containing the DB name and the prefix if there is one, and wfMemcKey() for cache key construction.
Caches for wikis with table prefixes will be lost on upgrade, caches for wikis without table prefixes will be preserved. Custom cache keys in extensions can be migrated at leisure. Extensions which write to core cache keys should be migrated ASAP, as I have done with Special:Makesysop.
2006-10-04 09:06:18 +00:00
Antoine Musso
7ebdb6de89 Revert to r14165 . Did too many changes, didnt even run parserTests (i am bad) 2006-05-11 22:40:38 +00:00
Antoine Musso
bc14eb8045 Replacing var keyword with private / public as we now require PHP5. 2006-05-11 19:10:41 +00:00
Lupin
11337038b3 removing unused globals and some whitespace cleaning 2006-03-07 01:10:39 +00:00
Ævar Arnfjörð Bjarmason
a26d5a49d7 * s~\t+$~~ 2006-01-07 13:31:29 +00:00
Ævar Arnfjörð Bjarmason
d8e90514ab * Documentation: @private => @access private 2006-01-07 12:48:44 +00:00
Brion Vibber
1c9c38d38c Cleanup...
* Move template / squid purging back to onArticleEdit() out of updateArticle()
* Move email notifications from showArticle() to RecentChange::save(), next to the IRC updates
* Use INSERT IGNORE instead of REPLACE for WatchedItem::watch(), avoids breaking notification timestamps for the auto-add on the user talk
2005-12-08 01:36:33 +00:00
Antoine Musso
027030d181 useless call 2005-12-04 19:58:20 +00:00
Brion Vibber
4e3d724dfa * (bug 3065) Update both watched namespaces when renaming pages 2005-11-26 00:54:07 +00:00
Brion Vibber
cc1fd0263a * MySQL 5.0 strict mode fix for moving unwatched pages
It was doing an empty REPLACE, which apparently is unpopular.
2005-10-28 06:26:16 +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
Tim Starling
554bbccf31 Attempting to get enotif into working order. Many aesthetic changes, a fair number of bug fixes too. There's also a couple of non-enotif bug fixes in this commit somewhere. 2005-05-14 17:55:04 +00:00
Antoine Musso
a30990c655 phpdoc comment / code formatting 2005-01-27 17:56:04 +00:00
Brion Vibber
798270581d (bug 454) Merge e-notif 2.00
From http://bugzilla.wikipedia.org/attachment.cgi?id=171&action=view
and extra files from http://www.tgries.de/mw/cvs15+enea200-minus-cvs.tgz

Undid a couple minor bits like the broken changing of minoreditletter.
Have not yet made general corrections/reworkings. Since this changes
the user and watchlist tables, you must run the updaters (installer or
update.php) on an existing database.
2004-12-18 03:47:11 +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
bd36b16651 missing fname 2004-07-24 07:27:48 +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
Domas Mituzas
7b8efba71b de-mysql: remove REPLACE INTO and DELETE .. LIMIT for nonmysql 2004-06-11 15:54:29 +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
0332f4c598 Fix for compatibility with short_open_tag = Off 2004-02-18 02:15:00 +00:00
Mr. E23
59fc101580 Fixed bug potentially causing problems if memcached fails for some reason (that is, returning FALSE) 2004-01-31 01:53:01 +00:00
Mr. E23
5462b899b1 new memcached client returns integers as strings 2004-01-24 22:52:06 +00:00
Mr. E23
6bf06ffe02 compatibility modifications in preparation for the new memcached client 2004-01-24 20:58:13 +00:00
Brion Vibber
6d42890bd6 Fix rename page escaping bug 2003-11-23 05:21:23 +00:00
Tim Starling
46787701ce Nov. branch merge. Various features backported from stable, various bug fixes. 2003-11-09 11:45:12 +00:00