Go to the documentation of this file.
53 public function __construct( $withTransaction =
true ) {
56 parent::__construct();
59 $this->mOptions =
array();
61 $this->mOptions =
array(
'FOR UPDATE' );
68 $this->mWithTransaction = $withTransaction;
69 $this->mHasTransaction =
false;
81 if ( !$this->mWithTransaction ) {
86 if ( $this->mDb->trxLevel() === 0 ) {
87 $this->mDb->begin( get_class( $this ) .
'::beginTransaction' );
88 $this->mHasTransaction =
true;
96 if ( $this->mHasTransaction ) {
97 $this->mDb->commit( get_class( $this ) .
'::commitTransaction' );
98 $this->mHasTransaction =
false;
106 if ( $this->mHasTransaction ) {
107 $this->mDb->rollback( get_class( $this ) .
'::abortTransaction' );
108 $this->mHasTransaction =
false;
120 if ( $dbkeys ===
array() ) {
129 $now = $this->mDb->timestamp();
131 $res = $this->mDb->select(
'page',
array(
'page_id' ),
133 'page_namespace' => $namespace,
134 'page_title' => $dbkeys,
135 'page_touched < ' . $this->mDb->addQuotes( $now )
139 foreach (
$res as $row ) {
140 $ids[] = $row->page_id;
143 if ( $ids ===
array() ) {
152 $this->mDb->update(
'page',
array(
'page_touched' => $now ),
155 'page_touched < ' . $this->mDb->addQuotes( $now )
bool $mUseTransaction
Whether this update should be wrapped in a transaction *.
array $mOptions
SELECT options to be used (array) *.
__construct( $withTransaction=true)
Constructor.
skin txt MediaWiki includes four core it has been set as the default in MediaWiki since the replacing Monobook it had been been the default skin since before being replaced by Vector largely rewritten in while keeping its appearance Several legacy skins were removed in the as the burden of supporting them became too heavy to bear Those in etc for skin dependent CSS etc for skin dependent JavaScript These can also be customised on a per user by etc This feature has led to a wide variety of user styles becoming that gallery is a good place to ending in php
& wfGetDB( $db, $groups=array(), $wiki=false)
Get a Database object.
invalidatePages( $namespace, array $dbkeys)
Invalidate the cache of a list of pages from a single namespace.
commitTransaction()
Commit the database transaction started via beginTransaction (if any).
beginTransaction()
Begin a database transaction, if $withTransaction was given as true in the constructor for this SqlDa...
Abstract base class for update jobs that do something with some secondary data extracted from article...
DatabaseBase $mDb
Database connection reference *.
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
when a variable name is used in a it is silently declared as a new masking the global
bool $mHasTransaction
Whether a transaction is open on this object (internal use only!) *.
Database abstraction object.
Abstract base class for update jobs that put some secondary data extracted from article content into ...
abortTransaction()
Abort the database transaction started via beginTransaction (if any).
__construct()
Constructor.
This document is intended to provide useful advice for parties seeking to redistribute MediaWiki to end users It s targeted particularly at maintainers for Linux since it s been observed that distribution packages of MediaWiki often break We ve consistently had to recommend that users seeking support use official tarballs instead of their distribution s and this often solves whatever problem the user is having It would be nice if this could such as