MediaWiki  REL1_31
Go to the documentation of this file.
1 <?php
28  public function getType() {
29  return 'archive';
30  }
32  public static function getRelationType() {
33  return 'ar_timestamp';
34  }
40  public function doQuery( $db ) {
41  $timestamps = [];
42  foreach ( $this->ids as $id ) {
43  $timestamps[] = $db->timestamp( $id );
44  }
46  $arQuery = Revision::getArchiveQueryInfo();
47  $tables = $arQuery['tables'];
48  $fields = $arQuery['fields'];
49  $conds = [
50  'ar_namespace' => $this->title->getNamespace(),
51  'ar_title' => $this->title->getDBkey(),
52  'ar_timestamp' => $timestamps,
53  ];
54  $join_conds = $arQuery['joins'];
55  $options = [ 'ORDER BY' => 'ar_timestamp DESC' ];
58  $tables,
59  $fields,
60  $conds,
61  $join_conds,
62  $options,
63  ''
64  );
66  return $db->select( $tables,
67  $fields,
68  $conds,
69  __METHOD__,
70  $options,
71  $join_conds
72  );
73  }
75  public function newItem( $row ) {
76  return new RevDelArchiveItem( $this, $row );
77  }
79  public function doPreCommitUpdates() {
80  return Status::newGood();
81  }
83  public function doPostCommitUpdates( array $visibilityChangeMap ) {
84  return Status::newGood();
85  }
86 }
Apache License January AND DISTRIBUTION Definitions License shall mean the terms and conditions for use
Definition: APACHE-LICENSE-2.0.txt:10
the array() calling protocol came about after MediaWiki 1.4rc1.
static getArchiveQueryInfo()
Return the tables, fields, and join conditions to be selected to create a new archived revision objec...
Definition: Revision.php:506
List for archive table items, i.e.
Definition: RevDelArchiveList.php:27
injection txt This is an overview of how MediaWiki makes use of dependency injection The design described here grew from the discussion of RFC T384 The term dependency this means that anything an object needs to operate should be injected from the the object itself should only know narrow no concrete implementation of the logic it relies on The requirement to inject everything typically results in an architecture that based on two main types of and essentially stateless service objects that use other service objects to operate on the value objects As of the beginning MediaWiki is only starting to use the DI approach Much of the code still relies on global state or direct resulting in a highly cyclical dependency which acts as the top level factory for services in MediaWiki which can be used to gain access to default instances of various services MediaWikiServices however also allows new services to be defined and default services to be redefined Services are defined or redefined by providing a callback the instantiator that will return a new instance of the service When it will create an instance of MediaWikiServices and populate it with the services defined in the files listed by thereby bootstrapping the DI framework Per $wgServiceWiringFiles lists includes ServiceWiring php
Definition: injection.txt:37
Basic database interface for live and lazy-loaded relation database handles.
Definition: IDatabase.php:38
static modifyDisplayQuery(&$tables, &$fields, &$conds, &$join_conds, &$options, $filter_tag='')
Applies all tags-related changes to a query.
Definition: ChangeTags.php:723
List for revision table items.
Definition: RevDelRevisionList.php:34
Definition: parserTests.txt:219
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped & $options
Definition: hooks.txt:2001
doPostCommitUpdates(array $visibilityChangeMap)
A hook for setVisibility(): do any necessary updates post-commit.
Definition: RevDelArchiveList.php:83
doQuery( $db)
Definition: RevDelArchiveList.php:40
Item class for a archive table row.
Definition: RevDelArchiveItem.php:25
newItem( $row)
Create an item object from a DB result row.
Definition: RevDelArchiveList.php:75
static getRelationType()
Get the DB field name associated with the ID list.
Definition: RevDelArchiveList.php:32
static newGood( $value=null)
Factory function for good results.
Definition: StatusValue.php:81
this hook is for auditing only RecentChangesLinked and Watchlist RecentChangesLinked and Watchlist Do not use this to implement individual filters if they are compatible with the ChangesListFilter and ChangesListFilterGroup structure use sub classes of those in conjunction with the ChangesListSpecialPageStructuredFilters hook This hook can be used to implement filters that do not implement that or custom behavior that is not an individual filter e g Watchlist & $tables
Definition: hooks.txt:1015
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
Definition: distributors.txt:22
A hook for setVisibility(): do batch updates pre-commit.
Definition: RevDelArchiveList.php:79
Get the internal type name of this list.
Definition: RevDelArchiveList.php:28