MobileFrontend
MobileoptimisedfrontendforMediaWiki
SpecialMobileHistory Class Reference

Mobile formatted history of of a page. More...

+ Inheritance diagram for SpecialMobileHistory:
+ Collaboration diagram for SpecialMobileHistory:

Public Member Functions

 executeWhenAvailable ( $par='')
 Render the special page. More...
 
 getDesktopUrl ( $subPage)
 Returns desktop URL for this special page. More...
 
- Public Member Functions inherited from MobileSpecialPageFeed
 execute ( $par)
 Render the special page content. More...
 
- Public Member Functions inherited from MobileSpecialPage
 __construct ( $page)
 
 setHeaders ()
 Add modules to headers and wrap content in div.content if unstyledContent = true.
 
 isListed ()
 Returns if this page is listed on Special:SpecialPages. More...
 

Static Public Member Functions

static shouldUseSpecialHistory (Title $title, User $user)
 Checks, if the given title supports the use of SpecialMobileHistory. More...
 

Public Attributes

const LIMIT = 50
 
const DB_REVISIONS_TABLE = 'revision'
 

Protected Member Functions

 getQueryConditions ()
 Returns a list of query conditions that should be run against the revision table. More...
 
 getHeaderBarLink ( $title)
 Gets HTML to place in the header bar. More...
 
 renderHeaderBar (Title $title)
 Adds HTML to render a header at the top of the feed. More...
 
 doQuery ()
 Executes the database query and returns the result. More...
 
 showRow (Revision $rev, $prev)
 Show a row in history, including: time of edit changed bytes name of editor comment of edit. More...
 
 getMoreButton ( $ts)
 Get a button to show more entries of history. More...
 
 showHistory (IResultWrapper $res)
 Render the history list. More...
 
- Protected Member Functions inherited from MobileSpecialPageFeed
 formatComment ( $comment, $title)
 Formats an edit comment. More...
 
 renderListHeaderWhereNeeded ( $date)
 Renders a date header when necessary. More...
 
 getRevisionCommentHTML ( $rev, $user, $unhide)
 Generates revision text based on user's rights and preference. More...
 
 getUsernameText ( $rev, $user, $unhide)
 Generates username text based on user's rights and preference. More...
 
 renderFeedItemHtml ( $ts, $diffLink='', $username='', $comment='', $title=null, $isAnon=false, $bytes=0, $isMinor=false)
 Renders an item in the feed. More...
 
- Protected Member Functions inherited from MobileSpecialPage
 renderUnavailableBanner ( $msg)
 Renders a banner telling the user the page is unavailable. More...
 
 addModules ()
 Add mobile special page specific modules (styles and scripts)
 
 showPageNotFound ()
 Render mobile specific error page, when special page can not be found.
 

Protected Attributes

 $hasDesktopVersion = true
 
 $offset
 
 $specialPageName = 'History'
 
 $title
 
 $errorNotFoundTitleMsg = 'mobile-frontend-history-404-title'
 
 $errorNotFoundDescriptionMsg = 'mobile-frontend-history-404-desc'
 
- Protected Attributes inherited from MobileSpecialPageFeed
 $showUsername = true
 
 $lastDate
 
 $title
 
- Protected Attributes inherited from MobileSpecialPage
 $hasDesktopVersion = false
 
 $mode = 'stable'
 
 $listed = false
 
 $unstyledContent = true
 
 $config = null
 
 $errorNotFoundTitleMsg = 'mobile-frontend-generic-404-title'
 
 $errorNotFoundDescriptionMsg = 'mobile-frontend-generic-404-desc'
 
 $mobileContext
 

Detailed Description

Mobile formatted history of of a page.

Member Function Documentation

◆ doQuery()

SpecialMobileHistory::doQuery ( )
protected

Executes the database query and returns the result.

See also
getQueryConditions()
Returns
IResultWrapper

◆ executeWhenAvailable()

SpecialMobileHistory::executeWhenAvailable (   $par = '')

Render the special page.

Parameters
string | null$parparameter as subpage of specialpage

Reimplemented from MobileSpecialPage.

Reimplemented in SpecialMobileContributions.

◆ getDesktopUrl()

SpecialMobileHistory::getDesktopUrl (   $subPage)

Returns desktop URL for this special page.

Parameters
string | null$subPageSubpage passed in URL
Returns
string

Reimplemented from MobileSpecialPage.

Reimplemented in SpecialMobileContributions.

◆ getHeaderBarLink()

SpecialMobileHistory::getHeaderBarLink (   $title)
protected

Gets HTML to place in the header bar.

Parameters
Title$titleThe page to link to
Returns
string HTML representing the link in the header bar

Reimplemented in SpecialMobileContributions.

◆ getMoreButton()

SpecialMobileHistory::getMoreButton (   $ts)
protected

Get a button to show more entries of history.

Parameters
int$tsThe offset to start the history list from
Returns
string

◆ getQueryConditions()

SpecialMobileHistory::getQueryConditions ( )
protected

Returns a list of query conditions that should be run against the revision table.

Returns
array List of conditions

◆ renderHeaderBar()

SpecialMobileHistory::renderHeaderBar ( Title  $title)
protected

Adds HTML to render a header at the top of the feed.

Parameters
Title$titleThe page to link to

◆ shouldUseSpecialHistory()

static SpecialMobileHistory::shouldUseSpecialHistory ( Title  $title,
User  $user 
)
static

Checks, if the given title supports the use of SpecialMobileHistory.

Parameters
Title$titleThe title to check
User$userthe user to check
Returns
bool True, if SpecialMobileHistory can be used, false otherwise

◆ showHistory()

SpecialMobileHistory::showHistory ( IResultWrapper  $res)
protected

Render the history list.

See also
showRow()
doQuery()
Parameters
IResultWrapper$resThe result of doQuery

◆ showRow()

SpecialMobileHistory::showRow ( Revision  $rev,
  $prev 
)
protected

Show a row in history, including: time of edit changed bytes name of editor comment of edit.

Parameters
Revision$revRevision id of the row wants to show
Revision | null$prevRevision id of previous Revision to display the difference

The documentation for this class was generated from the following file: