Setting default user option using the content language rather than the UI language
[lhc/web/wiklou.git] / includes / ViewCountUpdate.php
1 <?php
2 /**
3 * See deferred.doc
4 * @version # $Id$
5 * @package MediaWiki
6 */
7
8 /**
9 *
10 * @version # $Id$
11 * @package MediaWiki
12 */
13 class ViewCountUpdate {
14
15 var $mPageID;
16
17 /**
18 *
19 */
20 function ViewCountUpdate( $pageid ) {
21 $this->mPageID = $pageid;
22 }
23
24 /**
25 *
26 */
27 function doUpdate() {
28 global $wgDisableCounters;
29 if ( $wgDisableCounters ) { return; }
30 $db =& wfGetDB( DB_MASTER );
31 $lowpri = $db->lowPriorityOption();
32 $sql = "UPDATE $lowpri cur SET cur_counter=(1+cur_counter)," .
33 "cur_timestamp=cur_timestamp WHERE cur_id={$this->mPageID}";
34 $res = $db->query( $sql, "ViewCountUpdate::doUpdate" );
35 }
36 }
37 ?>