Go to the documentation of this file.
33 protected $wiki =
false;
42 parent::__construct( $config );
44 $this->
wiki = $config[
'wiki'];
59 $status->fatal(
'filejournal-fail-dbconnect', $this->backend );
67 foreach ( $entries
as $entry ) {
69 'fj_batch_uuid' => $batchId,
70 'fj_backend' => $this->backend,
71 'fj_op' => $entry[
'op'],
72 'fj_path' => $entry[
'path'],
73 'fj_new_sha1' => $entry[
'newSha1'],
79 $dbw->
insert(
'filejournal', $data, __METHOD__ );
80 if ( mt_rand( 0, 99 ) == 0 ) {
84 $status->fatal(
'filejournal-fail-dbquery', $this->backend );
100 array(
'fj_backend' => $this->backend ),
116 array(
'fj_backend' => $this->backend,
"fj_timestamp <= $encTimestamp" ),
118 array(
'ORDER BY' =>
'fj_timestamp DESC' )
133 'fj_backend' => $this->backend,
136 array_merge(
array(
'ORDER BY' =>
'fj_id ASC' ),
141 foreach (
$res as $row ) {
144 $item[substr( $key, 3 )] =
$value;
159 if ( $this->ttlDays <= 0 ) {
164 $dbCutoff =
$dbw->
timestamp( time() - 86400 * $this->ttlDays );
185 $this->dbw->clearFlag(
DBO_TRX );
see documentation in includes Linker php for Linker::makeImageLink & $time
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
Version of FileJournal that logs to a DB table.
wfTimestamp( $outputtype=TS_UNIX, $ts=0)
Get a timestamp string in one of various formats.
Prior to maintenance scripts were a hodgepodge of code that had no cohesion or formal method of action Beginning maintenance scripts have been cleaned up to use a unified class Directory structure How to run a script How to write your own DIRECTORY STRUCTURE The maintenance directory of a MediaWiki installation contains several all of which have unique purposes HOW TO RUN A SCRIPT Ridiculously just call php someScript php that s in the top level maintenance directory if not default wiki
doLogChangeBatch(array $entries, $batchId)
static newGood( $value=null)
Factory function for good results.
getMasterDB()
Get a master connection to the logging DB.
timestamp( $ts=0)
Convert a timestamp in one of the formats accepted by wfTimestamp() to the format used for inserting ...
__construct(array $config)
Construct a new instance from configuration.
if( $wgAPIRequestLog) $lb
addQuotes( $s)
Adds quotes and backslashes.
selectField( $table, $var, $cond='', $fname=__METHOD__, $options=array())
A SELECT wrapper which returns a single field from a single result row.
select( $table, $vars, $conds='', $fname=__METHOD__, $options=array(), $join_conds=array())
Execute a SELECT query constructed using the various parameters provided.
Class for handling file operation journaling.
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
Database error base class.
doGetChangeEntries( $start, $limit)
Database abstraction object.
purgeOldLogs()
Purge any old log entries.
& wfGetLBFactory()
Get the load balancer factory object.
doGetPositionAtTime( $time)
delete( $table, $conds, $fname=__METHOD__)
DELETE query wrapper.
const TS_UNIX
Unix time - the number of seconds since 1970-01-01 00:00:00 UTC.
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
insert( $table, $a, $fname=__METHOD__, $options=array())
INSERT wrapper, inserts an array into a table.