Go to the documentation of this file.
94 $actorQuery = $this->actorMigration->getJoin(
'img_user' );
95 $tables = [
'image' ] + $actorQuery[
'tables'];
96 $fields = [
'img_name',
'img_timestamp' ] + $actorQuery[
'fields'];
98 $jconds = $actorQuery[
'joins'];
101 if ( $user !==
'' ) {
102 $conds[] = $this->actorMigration
107 $groupsWithBotPermission = $this->permissionManager->getGroupsWithPermission(
'bot' );
109 if ( count( $groupsWithBotPermission ) ) {
110 $tables[] =
'user_groups';
111 $conds[] =
'ug_group IS NULL';
112 $jconds[
'user_groups'] = [
115 'ug_group' => $groupsWithBotPermission,
116 'ug_user = ' . $actorQuery[
'fields'][
'img_user'],
117 'ug_expiry IS NULL OR ug_expiry >= ' .
$dbr->addQuotes(
$dbr->timestamp() )
124 $tables[] =
'recentchanges';
125 $conds[
'rc_type'] =
RC_LOG;
126 $conds[
'rc_log_type'] =
'upload';
128 $conds[
'rc_namespace'] =
NS_FILE;
130 $jconds[
'recentchanges'] = [
133 'rc_title = img_name',
134 'rc_actor = ' . $actorQuery[
'fields'][
'img_actor'],
135 'rc_timestamp = img_timestamp'
145 if ( !$this->
getConfig()->
get(
'MiserMode' ) && $likeVal !==
'' ) {
147 if ( $likeObj instanceof
Title ) {
148 $like =
$dbr->buildLike(
150 strtolower( $likeObj->getDBkey() ),
153 $conds[] =
"LOWER(img_name) $like";
160 $options[] =
'STRAIGHT_JOIN';
165 'join_conds' => $jconds,
167 'options' => $options,
174 return 'img_timestamp';
178 if ( !$this->gallery ) {
180 $mode = $this->
getRequest()->getVal(
'gallerymode',
null );
183 }
catch ( Exception $e ) {
193 return $this->gallery->toHTML();
198 $this->mResult->seek( 0 );
199 foreach ( $this->mResult as $row ) {
200 $userIds[] = $row->img_user;
203 $this->userCache->doQuery( $userIds, [
'userpage' ], __METHOD__ );
207 $username = $this->userCache->getUserName( $row->img_user, $row->img_user_text );
210 $ul = htmlspecialchars( $username );
217 $time = $this->
getLanguage()->userTimeAndDate( $row->img_timestamp, $this->getUser() );
222 . htmlspecialchars( $time )
static newFromText( $text, $defaultNamespace=NS_MAIN)
Create a new Title from text, such as what one would find in a link.
getContext()
Get the base IContextSource object.
static newFromName( $name, $validate='valid')
This class handles the logic for the actor table migration and should always be used in lieu of direc...
static makeTitle( $ns, $title, $fragment='', $interwiki='')
Create a new Title from a namespace index and a DB key.
Interface for objects which can provide a MediaWiki context on request.
Represents a title within MediaWiki.
static factory( $mode=false, IContextSource $context=null)
Get a new image gallery.
static isExternal( $username)
Tells whether the username is external or not.
Represents a page (or page fragment) title within MediaWiki.