65 $fields = [
'img_name',
'img_timestamp' ] + $imgQuery[
'fields'];
67 $jconds = $imgQuery[
'joins'];
71 $conds[] = ActorMigration::newMigration()
78 $max =
$dbr->selectField(
'user',
'max(user_id)',
'', __METHOD__ );
79 $conds[] = $imgQuery[
'fields'][
'img_user'] .
' >' . (int)( $max - $max / 100 );
85 $conds[] =
'img_timestamp > ' .
92 if ( count( $groupsWithBotPermission ) ) {
95 $conds[] =
'ug_group IS NULL';
96 $jconds[
'user_groups'] = [
99 'ug_group' => $groupsWithBotPermission,
100 'ug_user = ' . $imgQuery[
'fields'][
'img_user'],
101 'ug_expiry IS NULL OR ug_expiry >= ' .
$dbr->addQuotes(
$dbr->timestamp() )
111 $conds[
'rc_type'] =
RC_LOG;
112 $conds[
'rc_log_type'] =
'upload';
113 $conds[
'rc_patrolled'] = RecentChange::PRC_UNPATROLLED;
114 $conds[
'rc_namespace'] =
NS_FILE;
117 $jcond =
'rc_actor = ' . $imgQuery[
'fields'][
'img_actor'];
119 $rcQuery = ActorMigration::newMigration()->getJoin(
'rc_user' );
121 $jconds += $rcQuery[
'joins'];
122 $jcond = $rcQuery[
'fields'][
'rc_user'] .
' = ' . $imgQuery[
'fields'][
'img_user'];
124 $jconds[
'recentchanges'] = [
127 'rc_title = img_name',
129 'rc_timestamp = img_timestamp'
143 if ( !$this->
getConfig()->
get(
'MiserMode' ) && $likeVal !==
'' ) {
145 $likeObj = Title::newFromText( $likeVal );
146 if ( $likeObj instanceof
Title ) {
147 $like =
$dbr->buildLike(
149 strtolower( $likeObj->getDBkey() ),
152 $conds[] =
"LOWER(img_name) $like";
159 'join_conds' => $jconds,
168 return 'img_timestamp';
172 if ( !$this->gallery ) {
174 $mode = $this->
getRequest()->getVal(
'gallerymode',
null );
177 }
catch ( Exception
$e ) {
187 return $this->gallery->toHTML();
191 $name = $row->img_name;
194 $title = Title::makeTitle(
NS_FILE, $name );
195 $ul = MediaWikiServices::getInstance()->getLinkRenderer()->makeLink(
196 $user->getUserPage(),
199 $time = $this->
getLanguage()->userTimeAndDate( $row->img_timestamp, $this->getUser() );
204 . htmlspecialchars(
$time )
int $wgActorTableSchemaMigrationStage
Actor table schema migration stage.
wfGetDB( $db, $groups=[], $wiki=false)
Get a Database object.
wfTimestamp( $outputtype=TS_UNIX, $ts=0)
Get a timestamp string in one of various formats.
static factory( $mode=false, IContextSource $context=null)
Get a new image gallery.
static getQueryInfo(array $options=[])
Return the tables, fields, and join conditions to be selected to create a new localfile object.
Represents a title within MediaWiki.
static newFromName( $name, $validate='valid')
Static factory method for creation from username.
static newFromId( $id)
Static factory method for creation from a given user ID.
static getGroupsWithPermission( $role)
Get all the groups who have a given permission.
see documentation in includes Linker php for Linker::makeImageLink & $time
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
do that in ParserLimitReportFormat instead use this to modify the parameters of the image all existing parser cache entries will be invalid To avoid you ll need to handle that somehow(e.g. with the RejectParserCacheValue hook) because MediaWiki won 't do it for you. & $defaults also a ContextSource after deleting those rows but within the same transaction you ll probably need to make sure the header is varied on and they can depend only on the ResourceLoaderContext $context
this hook is for auditing only 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
null for the local wiki Added should default to null in handler for backwards compatibility add a value to it if you want to add a cookie that have to vary cache options can modify $query
returning false will NOT prevent logging $e
const SCHEMA_COMPAT_READ_NEW
Interface for objects which can provide a MediaWiki context on request.