MediaWiki REL1_30
RevDelArchiveList.php
Go to the documentation of this file.
1<?php
23
28 public function getType() {
29 return 'archive';
30 }
31
32 public static function getRelationType() {
33 return 'ar_timestamp';
34 }
35
40 public function doQuery( $db ) {
41 $timestamps = [];
42 foreach ( $this->ids as $id ) {
43 $timestamps[] = $db->timestamp( $id );
44 }
45
46 $tables = [ 'archive' ];
48 $conds = [
49 'ar_namespace' => $this->title->getNamespace(),
50 'ar_title' => $this->title->getDBkey(),
51 'ar_timestamp' => $timestamps,
52 ];
53 $join_conds = [];
54 $options = [ 'ORDER BY' => 'ar_timestamp DESC' ];
55
57 $tables,
58 $fields,
59 $conds,
60 $join_conds,
62 ''
63 );
64
65 return $db->select( $tables,
66 $fields,
67 $conds,
68 __METHOD__,
70 $join_conds
71 );
72 }
73
74 public function newItem( $row ) {
75 return new RevDelArchiveItem( $this, $row );
76 }
77
78 public function doPreCommitUpdates() {
79 return Status::newGood();
80 }
81
82 public function doPostCommitUpdates( array $visibilityChangeMap ) {
83 return Status::newGood();
84 }
85}
static modifyDisplayQuery(&$tables, &$fields, &$conds, &$join_conds, &$options, $filter_tag='')
Applies all tags-related changes to a query.
Item class for a archive table row.
List for archive table items, i.e.
doPreCommitUpdates()
A hook for setVisibility(): do batch updates pre-commit.
newItem( $row)
Create an item object from a DB result row.
static getRelationType()
Get the DB field name associated with the ID list.
doPostCommitUpdates(array $visibilityChangeMap)
A hook for setVisibility(): do any necessary updates post-commit.
getType()
Get the internal type name of this list.
List for revision table items.
static selectArchiveFields()
Return the list of revision fields that should be selected to create a new revision from an archive r...
Definition Revision.php:486
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:1013
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:1971
Basic database interface for live and lazy-loaded relation database handles.
Definition IDatabase.php:40