'LoadExtensionSchemaUpdates': called by maintenance/updaters.inc when upgrading database schema
+'LocalFile::getHistory': called before file history query performed
+$file: the file
+$tables: tables
+$fields: select fields
+$conds: conditions
+$opts: query options
+$join_conds: JOIN conditions
+
'LoginAuthenticateAudit': a login attempt for a valid user account either succeeded or failed.
No return data is accepted; this hook is for auditing only.
$user: the User object being authenticated against
function getHistory($limit = null, $start = null, $end = null) {
$dbr = $this->repo->getSlaveDB();
+ $tables = array('oldimage');
+ $join_conds = array();
+ $fields = OldLocalFile::selectFields();
$conds = $opts = array();
$conds[] = "oi_name = " . $dbr->addQuotes( $this->title->getDBKey() );
if( $start !== null ) {
$opts['LIMIT'] = $limit;
}
$opts['ORDER BY'] = 'oi_timestamp DESC';
- $res = $dbr->select('oldimage', '*', $conds, __METHOD__, $opts);
+
+ wfRunHooks( 'LocalFile::getHistory', array( &$this, &$tables, &$fields, &$conds, &$opts, &$join_conds ) );
+
+ $res = $dbr->select( $tables, $fields, $conds, __METHOD__, $opts, $join_conds );
$r = array();
while( $row = $dbr->fetchObject($res) ) {
$r[] = OldLocalFile::newFromRow($row, $this->repo);