Commit graph

19 commits

Author SHA1 Message Date
Kunal Mehta
e5bc3400e4 Add UserArray::newFromNames()
Change-Id: I91bb8349dd846e982be9294c7f4f3858995ad2eb
2015-02-26 19:18:35 +00:00
Aaron Schulz
e369f66d00 Replace wfRunHooks calls with direct Hooks::run calls
* This avoids the overhead of an extra function call

Change-Id: I8ee996f237fd111873ab51965bded3d91e61e4dd
2014-12-10 12:26:59 -08:00
umherirrender
829886b10a Fixed some @params documentation
Swapped some "$var type" to "type $var" or added missing types
before the $var. Changed some other types to match the more common
spelling. Makes beginning of some text in captial.

Change-Id: I64e8cfe478cb0ba438f40b0631d6e9049cdab567
2014-04-14 12:59:19 +00:00
umherirrender
2000672ac3 Fixed spacing
- Added spaces after if/foreach/catch
- Added new line before end of file
- Added or removed spaces before/after parenthesis, comma
- Added spaces around string concat

Change-Id: I0590070f1b3542108e242730e8d9a3ba9831e94f
2014-03-20 20:37:30 +00:00
addshore
e3c0ab20bf Split Title and User ArrayFromResult classes to own files
Change-Id: I8744627330eb9c8f183a8d418d6eb168e6c5407b
2014-01-26 18:32:43 +00:00
umherirrender
0e268404d5 UserArray: Avoid * and double keys in select
Use User::selectFields to get all fields instead of *,
also use array_unqiue to make the sql nicer by having only single value
in the IN statement.

Change-Id: I0a4888be20f84f2955e82ced621aed526cc83f20
2013-12-14 14:51:42 +00:00
Niklas Laxström
1a3f73dd8c Make (Title|User)Array implements Countable
count( $results ) always returned 1, now expected number

Bug: 58377
Change-Id: I7d6b3bc1b09b46fe60cb5a74c25f9b28fffa5b73
2013-12-12 09:19:19 +00:00
umherirrender
6c278b6d7e fix some spacing
* Removed spaces around array index
* Removed double spaces or added spaces to begin or end of function
  calls, method signature, conditions or foreachs
* Added braces to one-line ifs
* Changed multi line conditions to one line conditions
* Realigned some arrays

Change-Id: Ia04d2a99d663b07101013c2d53b3b2e872fd9cc3
2013-03-25 22:22:46 +00:00
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
Aaron Schulz
5a6559d8b1 Reverted r108743 per CR comment. This should at least be discussed first. 2012-01-12 19:41:18 +00:00
Sam Reed
a5c200a25b Kill "* @return void" 2012-01-12 19:12:24 +00:00
Happy-melon
a73791be74 Documentation and type hinting. 2011-10-06 13:22:53 +00:00
Sam Reed
ba0cbdeeff More parameter documentation!! 2011-05-28 15:59:57 +00:00
Sam Reed
85a15bea84 More comment updates, addition of some braces also 2011-05-21 19:36:03 +00:00
Roan Kattouw
3241ebcbcc (bug 10172) Move setting the "changed since last visit" flags out of the job queue:
* Move up the UPDATE query on wl_notificationtimestamp up to before scheduling the EnotifyNotifyJob
* Move up the SELECT query fetching the users to be notified to before the UPDATE, and use its result for a more efficient UPDATE
* Pass actuallyNotifyOnPageChange() and the EnotifyNotifyJob an array of user IDs
* Add UserArray::newFromIDs()
2009-03-02 12:15:28 +00:00
Aryeh Gregor
a42e23da22 Revert r38165 for now, breaks CentralAuth and I don't have that installed anywhere to debug. 2008-07-29 14:53:10 +00:00
Aryeh Gregor
c51f8ce69d Merge TitleArray and UserArray into one unified class, ObjectArray. Adding support for a new type of object will now just take a few lines. 2008-07-29 00:51:08 +00:00
Aryeh Gregor
7452677213 * Add count() method to TitleArray and UserArray.
* Change PageHistory::fetchRevisions() to return a result object instead of an array of rows.
* Stylistic issues: use foreach( $res as $row ) instead of while( $row = $dbr->fetchObject( $res ) ), change a couple of variable names, use __METHOD__.

There should be no functional changes.
2008-07-27 18:59:46 +00:00
Tim Starling
41d4882681 In User:
* Defer load of groups data
* Introduce newFromRow()/loadFromRow() to allow bulk loading of user objects from a result set
* Hook email and email authentication save/load to allow CentralAuth to provide a global email address
* Defer save of user data after confirmEmail() and invalidateEmail(). Caller must now also call saveSettings(). This reduces the master query count in some code paths.

Elsewhere:
* Introduce UserArray class, for bulk loading of user objects. Immediately useful in email notification, potentially useful for proposed user alias feature.
* In Special:Confirmemail, remove useless handling for impossible false return from confirmEmail()/invalidateEmail().
2008-04-15 09:04:45 +00:00