protected $watchlist = false;
protected $message;
-
+
/**
* Changeslist contructor
* @param $skin Skin
return $list;
}
}
-
+
/**
* Sets the list to use a <li class="watchlist-(namespace)-(page)"> tag
* @param $value Boolean
public static function flag( $flag ) {
static $messages = null;
if ( is_null( $messages ) ) {
- $messages = array(
+ $messages = array(
'newpage' => array( 'newpageletter', 'recentchanges-label-newpage' ),
'minoredit' => array( 'minoreditletter', 'recentchanges-label-minor' ),
'botedit' => array( 'boteditletter', 'recentchanges-label-bot' ),
- 'unpatrolled' => array( 'unpatrolledletter', 'recentchanges-label-unpatrolled' ),
+ 'unpatrolled' => array( 'unpatrolledletter', 'recentchanges-label-unpatrolled' ),
);
foreach( $messages as &$value ) {
$value[0] = wfMsgExt( $value[0], 'escapenoentities' );
$this->rclistOpen = false;
return '';
}
-
+
/**
* Show formatted char difference
* @param $old Integer: bytes
if ( !isset($fastCharDiff[$code]) ) {
$fastCharDiff[$code] = $wgMiserMode || wfMsgNoTrans( 'rc-change-size' ) === '$1';
}
-
+
$formatedSize = $wgLang->formatNum($szdiff);
if ( !$fastCharDiff[$code] ) {
$formatedSize = wfMsgExt( 'rc-change-size', array( 'parsemag', 'escape' ), $formatedSize );
}
-
+
if( abs( $szdiff ) > abs( $wgRCChangedSizeThreshold ) ) {
$tag = 'strong';
} else {
- $tag = 'span';
+ $tag = 'span';
}
if( $szdiff === 0 ) {
return "<$tag class='mw-plusminus-null'>($formatedSize)</$tag>";
} elseif( $szdiff > 0 ) {
return "<$tag class='mw-plusminus-pos'>(+$formatedSize)</$tag>";
- } else {
+ } else {
return "<$tag class='mw-plusminus-neg'>($formatedSize)</$tag>";
}
}
/**
- * Returns text for the end of RC
+ * Returns text for the end of RC
* @return String
*/
public function endRecentChangesList() {
*/
public function insertTimestamp( &$s, $rc ) {
global $wgLang;
- $s .= $this->message['semicolon-separator'] .
+ $s .= $this->message['semicolon-separator'] .
$wgLang->time( $rc->mAttribs['rc_timestamp'], true, true ) . ' . . ';
}
return '<span class="mw-rc-unwatched">' . $link . '</span>';
}
}
-
+
/** Inserts a rollback link
*
* @param $s
public function insertTags( &$s, &$rc, &$classes ) {
if ( empty($rc->mAttribs['ts_tags']) )
return;
-
+
list($tagSummary, $newClasses) = ChangeTags::formatSummaryRow( $rc->mAttribs['ts_tags'], 'changeslist' );
$classes = array_merge( $classes, $newClasses );
$s .= ' ' . $tagSummary;
} else {
$this->insertDiffHist( $s, $rc, $unpatrolled );
# M, N, b and ! (minor, new, bot and unpatrolled)
- $s .= $this->recentChangesFlags(
+ $s .= $this->recentChangesFlags(
array(
'newpage' => $rc->mAttribs['rc_new'],
'minor' => $rc->mAttribs['rc_minor'],
- 'unpatrolled' => $unpatrolled,
+ 'unpatrolled' => $unpatrolled,
'bot' => $rc->mAttribs['rc_bot']
),
''
$this->insertRollback( $s, $rc );
# For subclasses
$this->insertExtra( $s, $rc, $classes );
-
+
# How many users watch this page
if( $rc->numberofWatchingusers > 0 ) {
- $s .= ' ' . wfMsgExt( 'number_of_watching_users_RCview',
+ $s .= ' ' . wfMsgExt( 'number_of_watching_users_RCview',
array( 'parsemag', 'escape' ), $wgLang->formatNum( $rc->numberofWatchingusers ) );
}
-
+
if( $this->watchlist ) {
$classes[] = Sanitizer::escapeClass( 'watchlist-'.$rc->mAttribs['rc_namespace'].'-'.$rc->mAttribs['rc_title'] );
}
-
+
wfRunHooks( 'OldChangesListRecentChangesLine', array(&$this, &$s, $rc) );
wfProfileOut( __METHOD__ );
*/
public function recentChangesLine( &$baseRC, $watched = false ) {
global $wgLang, $wgUser;
-
+
wfProfileIn( __METHOD__ );
# Create a specialised object
# Should patrol-related stuff be shown?
if( $wgUser->useRCPatrol() ) {
- $rc->unpatrolled = !$rc->mAttribs['rc_patrolled'];
+ $rc->unpatrolled = !$rc->mAttribs['rc_patrolled'];
} else {
$rc->unpatrolled = false;
}
} else if( $type == RC_LOG ) {
if( $logType ) {
$logtitle = SpecialPage::getTitleFor( 'Log', $logType );
- $clink = '(' . $this->skin->linkKnown( $logtitle,
+ $clink = '(' . $this->skin->linkKnown( $logtitle,
LogPage::logName( $logType ) ) . ')';
} else {
$clink = $this->skin->link( $rc->getTitle() );
array_push( $users, $text );
}
- $users = ' <span class="changedby">[' .
+ $users = ' <span class="changedby">[' .
implode( $this->message['semicolon-separator'], $users ) . ']</span>';
# Title for <a> tags
$r .= '<td class="mw-enhanced-rc">' . $this->recentChangesFlags( array(
'newpage' => $isnew,
'minor' => false,
- 'unpatrolled' => $unpatrolled,
+ 'unpatrolled' => $unpatrolled,
'bot' => $bot ,
) );
$params = $queryParams;
$params['diff'] = $currentRevision;
$params['oldid'] = $oldid;
-
+
$r .= $this->skin->link(
$block[0]->getTitle(),
$nchanges[$n],
$r .= $this->recentChangesFlags( array(
'newpage' => $rcObj->mAttribs['rc_new'],
'minor' => $rcObj->mAttribs['rc_minor'],
- 'unpatrolled' => $rcObj->unpatrolled,
+ 'unpatrolled' => $rcObj->unpatrolled,
'bot' => $rcObj->mAttribs['rc_bot'],
) );
$r .= ' </td><td class="mw-enhanced-rc-nested"><span class="mw-enhanced-rc-time">';
$r .= $this->recentChangesFlags( array(
'newpage' => $type == RC_NEW,
'mino' => $rcObj->mAttribs['rc_minor'],
- 'unpatrolled' => $rcObj->unpatrolled,
+ 'unpatrolled' => $rcObj->unpatrolled,
'bot' => $rcObj->mAttribs['rc_bot'],
) );
}
}
/**
- * Returns text for the end of RC
+ * Returns text for the end of RC
* If enhanced RC is in use, returns pretty much all the text
*/
public function endRecentChangesList() {
# additionially, for requests made directly to an IPv6 address we have
# to make sure the server enclose it in either [] or nothing at all
&& (strpos($_SERVER['SERVER_NAME'], '[')
- xor strpos( $_SERVER['SERVER_NAME'], ']'))
+ xor strpos( $_SERVER['SERVER_NAME'], ']'))
) {
$serverName = $_SERVER['SERVER_NAME'];
} elseif( isset( $_SERVER['HOSTNAME'] ) ) {
/**
* Allow Java archive uploads.
- * This is not recommended for public wikis since a maliciously-constructed
- * applet running on the same domain as the wiki can steal the user's cookies.
+ * This is not recommended for public wikis since a maliciously-constructed
+ * applet running on the same domain as the wiki can steal the user's cookies.
*/
$wgAllowJavaUploads = false;
$wgSVGMaxSize = 2048;
/** Don't read SVG metadata beyond this point.
* Default is 1024*256 bytes */
-$wgSVGMetadataCutoff = 262144;
+$wgSVGMetadataCutoff = 262144;
/**
* MediaWiki will reject HTMLesque tags in uploaded files due to idiotic browsers which can't
* - CACHE_DBA: Use PHP's DBA extension to store in a DBM-style
* database. This is slow, and is not recommended for
* anything other than debugging.
- * - (other): A string may be used which identifies a cache
+ * - (other): A string may be used which identifies a cache
* configuration in $wgObjectCaches.
*
* @see $wgMessageCacheType, $wgParserCacheType
/**
* Advanced object cache configuration.
*
- * Use this to define the class names and constructor parameters which are used
- * for the various cache types. Custom cache types may be defined here and
+ * Use this to define the class names and constructor parameters which are used
+ * for the various cache types. Custom cache types may be defined here and
* referenced from $wgMainCacheType, $wgMessageCacheType or $wgParserCacheType.
*
- * The format is an associative array where the key is a cache identifier, and
+ * The format is an associative array where the key is a cache identifier, and
* the value is an associative array of parameters. The "class" parameter is the
- * class name which will be used. Alternatively, a "factory" parameter may be
+ * class name which will be used. Alternatively, a "factory" parameter may be
* given, giving a callable function which will generate a suitable cache object.
*
* The other parameters are dependent on the class used.
$wgStatsMethod = 'cache';
/**
- * When $wgStatsMethod is 'udp', setting this to a string allows statistics to
+ * When $wgStatsMethod is 'udp', setting this to a string allows statistics to
* be aggregated over more than one wiki. The string will be used in place of
* the DB name in outgoing UDP packets. If this is set to false, the DB name
* will be used.
);
/**
- * Extensions of "thumbnails" that are very expensive to regenerate and should be
- * excluded from normal action=purge thumbnail removal.
+ * Extensions of "thumbnails" that are very expensive to regenerate and should be
+ * excluded from normal action=purge thumbnail removal.
*/
$wgExcludeFromThumbnailPurge = array();
/**
* Jobs that must be explicitly requested, i.e. aren't run by job runners unless special flags are set.
- *
+ *
* These can be:
* - Very long-running jobs.
* - Jobs that you would never want to run as part of a page rendering request.
* Add header text, inside the form.
* @param $msg String complete text of message to display
*/
- function addHeaderText( $msg, $section = null ) {
+ function addHeaderText( $msg, $section = null ) {
if ( is_null( $section ) ) {
- $this->mHeader .= $msg;
+ $this->mHeader .= $msg;
} else {
if ( !isset( $this->mSectionHeaders[$section] ) ) {
$this->mSectionHeaders[$section] = '';
* Add footer text, inside the form.
* @param $msg String complete text of message to display
*/
- function addFooterText( $msg, $section = null ) {
+ function addFooterText( $msg, $section = null ) {
if ( is_null( $section ) ) {
- $this->mFooter .= $msg;
+ $this->mFooter .= $msg;
} else {
if ( !isset( $this->mSectionFooters[$section] ) ) {
$this->mSectionFooters[$section] = '';
}
- $this->mSectionFooters[$section] .= $msg;
+ $this->mSectionFooters[$section] .= $msg;
}
}
$legend = $this->getLegend( $key );
if ( isset( $this->mSectionHeaders[$key] ) ) {
$section = $this->mSectionHeaders[$key] . $section;
- }
+ }
if ( isset( $this->mSectionFooters[$key] ) ) {
$section .= $this->mSectionFooters[$key];
}
- $subsectionHtml .= Xml::fieldset( $legend, $section ) . "\n";
+ $subsectionHtml .= Xml::fieldset( $legend, $section ) . "\n";
}
}
}
}
$msg->inContentLanguage();
-
-
+
+
return '<tr><td></td><td class="mw-input">'
. '<div class="mw-editTools">'
. $msg->parseAsBlock()
$class .= " {$attribs['class']}";
}
$attribs['class'] = $class;
-
+
if ( $escape ) {
$text = htmlspecialchars( $text );
}
$formatted = self::formatComment( $comment, $title, $local );
if ( $embraced ) {
$formatted = wfMessage( 'parentheses' )->rawParams( $formatted )->escaped();
- }
+ }
return Html::rawElement( 'span', array( 'class' => 'comment' ), $formatted );
}
}
$query['bot'] = '1';
$query['hidediff'] = '1'; // bug 15999
}
- return self::link(
- $title,
+ return self::link(
+ $title,
wfMsgHtml( 'rollbacklink' ),
array( 'title' => wfMsg( 'tooltip-rollback' ) ),
- $query,
- array( 'known', 'noclasses' )
+ $query,
+ array( 'known', 'noclasses' )
);
}
}
class DummyLinker {
-
+
/**
* Use PHP's magic __call handler to transform instance calls to a dummy instance
* into static calls to the new Linker for backwards compatibility.
public static function newFromId( $id ) {
return Revision::newFromConds(
array( 'page_id=rev_page',
- 'rev_id' => intval( $id ) ) );
+ 'rev_id' => intval( $id ) ) );
}
/**
* @return Revision or null
*/
public static function newFromTitle( $title, $id = 0 ) {
- $conds = array(
- 'page_namespace' => $title->getNamespace(),
+ $conds = array(
+ 'page_namespace' => $title->getNamespace(),
'page_title' => $title->getDBkey()
);
if ( $id ) {
public static function loadFromId( $db, $id ) {
return Revision::loadFromConds( $db,
array( 'page_id=rev_page',
- 'rev_id' => intval( $id ) ) );
+ 'rev_id' => intval( $id ) ) );
}
/**
return Revision::loadFromConds(
$db,
array( "rev_id=$matchId",
- 'page_id=rev_page',
- 'page_namespace' => $title->getNamespace(),
- 'page_title' => $title->getDBkey() ) );
+ 'page_id=rev_page',
+ 'page_namespace' => $title->getNamespace(),
+ 'page_title' => $title->getDBkey() ) );
}
/**
return Revision::loadFromConds(
$db,
array( 'rev_timestamp' => $db->timestamp( $timestamp ),
- 'page_id=rev_page',
- 'page_namespace' => $title->getNamespace(),
- 'page_title' => $title->getDBkey() ) );
+ 'page_id=rev_page',
+ 'page_namespace' => $title->getNamespace(),
+ 'page_title' => $title->getDBkey() ) );
}
/**
return Revision::fetchFromConds(
wfGetDB( DB_SLAVE ),
array( 'rev_id=page_latest',
- 'page_namespace' => $title->getNamespace(),
- 'page_title' => $title->getDBkey(),
- 'page_id=rev_page' ) );
+ 'page_namespace' => $title->getNamespace(),
+ 'page_title' => $title->getDBkey(),
+ 'page_id=rev_page' ) );
}
/**
'rev_parent_id'
);
}
-
+
/**
- * Return the list of text fields that should be selected to read the
+ * Return the list of text fields that should be selected to read the
* revision text
*/
static function selectTextFields() {
array( 'page', 'revision' ),
array( 'page_namespace', 'page_title' ),
array( 'page_id=rev_page',
- 'rev_id' => $this->mId ),
+ 'rev_id' => $this->mId ),
'Revision::getTitle' );
if( $row ) {
$this->mTitle = Title::makeTitle( $row->page_namespace,
- $row->page_title );
+ $row->page_title );
}
return $this->mTitle;
}
/**
* Fetch revision's user id if it's available to the specified audience.
- * If the specified audience does not have access to it, zero will be
+ * If the specified audience does not have access to it, zero will be
* returned.
*
* @param $audience Integer: one of:
/**
* Fetch revision's username if it's available to the specified audience.
- * If the specified audience does not have access to the username, an
+ * If the specified audience does not have access to the username, an
* empty string will be returned.
*
* @param $audience Integer: one of:
/**
* Fetch revision comment if it's available to the specified audience.
- * If the specified audience does not have access to the comment, an
+ * If the specified audience does not have access to the comment, an
* empty string will be returned.
*
* @param $audience Integer: one of:
public function isMinor() {
return (bool)$this->mMinorEdit;
}
-
+
/**
* @return Integer rcid of the unpatrolled row, zero if there isn't one
*/
/**
* Fetch revision text if it's available to the specified audience.
- * If the specified audience does not have the ability to view this
+ * If the specified audience does not have the ability to view this
* revision, an empty string will be returned.
*
* @param $audience Integer: one of:
}
global $wgLegacyEncoding;
- if( $text !== false && $wgLegacyEncoding
- && !in_array( 'utf-8', $flags ) && !in_array( 'utf8', $flags ) )
+ if( $text !== false && $wgLegacyEncoding
+ && !in_array( 'utf-8', $flags ) && !in_array( 'utf8', $flags ) )
{
# Old revisions kept around in a legacy encoding?
# Upconvert on demand.
function getTitle( $subpage = false ) {
return self::getTitleFor( $this->mName, $subpage );
}
-
+
/**
* Sets the context this SpecialPage is executed in
- *
+ *
* @param $context RequestContext
* @since 1.18
*/
/**
* Gets the context this SpecialPage is executed in
- *
+ *
* @return RequestContext
* @since 1.18
*/
/**
* Wrapper around wfMessage that sets the current context. Currently this
* is only the title.
- *
+ *
* @see wfMessage
*/
public function msg( /* $args */ ) {
// Query parameteres added by redirects
protected $mAddedRedirectParams = array();
-
+
public function execute( $par ){
$redirect = $this->getRedirect( $par );
$query = $this->getRedirectQuery();
$filename = "$wgCacheDirectory/messages-" . wfWikiID() . "-$code";
$tempFilename = $filename . '.tmp';
- wfMkdirParents( $wgCacheDirectory ); // might fail
+ wfMkdirParents( $wgCacheDirectory ); // might fail
wfSuppressWarnings();
$file = fopen( $tempFilename, 'w' );
* @return Title
*/
public function getTitle() { return $this->title; }
-
+
/**
* Return the title used to find this file
*/
}
/**
- * Return true if the file is vectorized
- */
+ * Return true if the file is vectorized
+ */
public function isVectorized() {
$handler = $this->getHandler();
if ( $handler ) {
$handler = $this->getHandler();
if ( !is_array( $metadata ) ) {
//just to make the return type consistant
- $metadata = unserialize( $metadata );
+ $metadata = unserialize( $metadata );
}
if ( $handler ) {
return $handler->convertMetadataVersion( $metadata, $version );
function thumbName( $params ) {
return $this->generateThumbName( $this->getName(), $params );
}
-
+
/**
* Generate a thumbnail file name from a name and specified parameters
*
if ( file_exists( $thumbPath )) {
$thumbTime = filemtime( $thumbPath );
if ( $thumbTime !== FALSE &&
- gmdate( 'YmdHis', $thumbTime ) >= $wgThumbnailEpoch ) {
-
+ gmdate( 'YmdHis', $thumbTime ) >= $wgThumbnailEpoch ) {
+
$thumb = $this->handler->getTransform( $this, $thumbPath, $thumbUrl, $params );
break;
}
$thumb = $this->handler->getTransform( $this, $thumbPath, $thumbUrl, $params );
}
}
-
- // Purge. Useful in the event of Core -> Squid connection failure or squid
- // purge collisions from elsewhere during failure. Don't keep triggering for
+
+ // Purge. Useful in the event of Core -> Squid connection failure or squid
+ // purge collisions from elsewhere during failure. Don't keep triggering for
// "thumbs" which have the main image URL though (bug 13776)
if ( $wgUseSquid && ( !$thumb || $thumb->isError() || $thumb->getUrl() != $this->getURL()) ) {
SquidUpdate::purge( array( $thumbUrl ) );
function isDeleted( $field ) {
return false;
}
-
+
/**
* Return the deletion bitfield
* STUB
- */
+ */
function getVisibility() {
return 0;
}
}
/**
- * Returns 'true' if this file is a type which supports multiple pages,
- * e.g. DJVU or PDF. Note that this may be true even if the file in
+ * Returns 'true' if this file is a type which supports multiple pages,
+ * e.g. DJVU or PDF. Note that this may be true even if the file in
* question only has a single page.
*
* @return Bool
if ( $renderUrl ) {
if ( $this->repo->descriptionCacheExpiry > 0 ) {
wfDebug("Attempting to get the description from cache...");
- $key = $this->repo->getLocalCacheKey( 'RemoteFileDescription', 'url', $wgLang->getCode(),
+ $key = $this->repo->getLocalCacheKey( 'RemoteFileDescription', 'url', $wgLang->getCode(),
$this->getName() );
$obj = $wgMemc->get($key);
if ($obj) {
}
$ext = $this->getExtension();
$dotExt = $ext === '' ? '' : ".$ext";
- return $hash . $dotExt;
+ return $hash . $dotExt;
}
/**
function getRedirected() {
return $this->redirected;
}
-
+
function getRedirectedTitle() {
if ( $this->redirected ) {
if ( !$this->redirectTitle ) {
# empty line, go to next line,
# but only append \n if outside of table
- if ( $line === '') {
+ if ( $line === '') {
$output .= $outLine . "\n";
continue;
}
// a table caption, but only proceed if there isn't one already
if ( !isset ( $table['caption'] ) ) {
$line = substr ( $line , 2 );
-
+
$c = $this->getCellAttr( $line , 'caption' );
$table['caption'] = array();
$table['caption']['content'] = $c[0];
/**
* Helper function for doTableStuff() separating the contents of cells from
- * attributes. Particularly useful as there's a possible bug and this action
+ * attributes. Particularly useful as there's a possible bug and this action
* is repeated twice.
*
* @private
# Register the file as a dependency...
$this->mOutput->addImage( $title->getDBkey(), $time, $sha1 );
if ( $file && !$title->equals( $file->getTitle() ) ) {
- # Update fetched file title
+ # Update fetched file title
$title = $file->getTitle();
}
return array( $file, $title );
# Bogus title. Ignore these so we don't bomb out later.
continue;
}
-
+
$label = '';
$alt = '';
if ( isset( $matches[3] ) ) {
// look for an |alt= definition while trying not to break existing
// captions with multiple pipes (|) in it, until a more sensible grammar
// is defined for images in galleries
-
+
$matches[3] = $this->recursiveTagParse( trim( $matches[3] ) );
$altmatches = StringUtils::explode('|', $matches[3]);
$magicWordAlt = MagicWord::get( 'img_alt' );
public function getCurrent() {
if ( is_null( $this->currentRevId ) ) {
$dbw = wfGetDB( DB_MASTER );
- $this->currentRevId = $dbw->selectField(
+ $this->currentRevId = $dbw->selectField(
'page', 'page_latest', $this->title->pageCond(), __METHOD__ );
}
return $this->currentRevId;
public function canView() {
return $this->revision->userCan( Revision::DELETED_RESTRICTED );
}
-
+
public function canViewContent() {
return $this->revision->userCan( Revision::DELETED_TEXT );
}
// Update revision table
$dbw->update( 'revision',
array( 'rev_deleted' => $bits ),
- array(
- 'rev_id' => $this->revision->getId(),
+ array(
+ 'rev_id' => $this->revision->getId(),
'rev_page' => $this->revision->getPage(),
'rev_deleted' => $this->getBits()
),
}
// Update recentchanges table
$dbw->update( 'recentchanges',
- array(
+ array(
'rc_deleted' => $bits,
'rc_patrolled' => 1
),
}
public function isHideCurrentOp( $newBits ) {
- return ( $newBits & Revision::DELETED_TEXT )
+ return ( $newBits & Revision::DELETED_TEXT )
&& $this->list->getCurrent() == $this->getId();
}
}
return $this->special->skin->link(
$this->list->title,
- $date,
+ $date,
array(),
array(
'oldid' => $this->revision->getId(),
if ( $this->isDeleted() && !$this->canViewContent() ) {
return wfMsgHtml('diff');
} else {
- return
- $this->special->skin->link(
- $this->list->title,
+ return
+ $this->special->skin->link(
+ $this->list->title,
wfMsgHtml('diff'),
array(),
array(
# Convert DB timestamp to MW timestamp
return $this->revision->getTimestamp();
}
-
+
public function setBits( $bits ) {
$dbw = wfGetDB( DB_MASTER );
$dbw->update( 'archive',
if ( $this->isDeleted() && !$this->canViewContent() ) {
return wfMsgHtml( 'diff' );
}
- $undelete = SpecialPage::getTitleFor( 'Undelete' );
- return $this->special->skin->link( $undelete, wfMsgHtml('diff'), array(),
+ $undelete = SpecialPage::getTitleFor( 'Undelete' );
+ return $this->special->skin->link( $undelete, wfMsgHtml('diff'), array(),
array(
'target' => $this->list->title->getPrefixedText(),
'diff' => 'prev',
public function canView() {
return $this->file->userCan( File::DELETED_RESTRICTED );
}
-
+
public function canViewContent() {
return $this->file->userCan( File::DELETED_FILE );
}
$dstRel = $this->file->repo->getDeletedHashPath( $key ) . $key;
$this->list->deleteBatch[] = array( $this->file->getRel(), $dstRel );
}
-
+
# Do the database operations
$dbw = wfGetDB( DB_MASTER );
$dbw->update( 'oldimage',
array( 'oi_deleted' => $bits ),
- array(
+ array(
'oi_name' => $this->row->oi_name,
'oi_timestamp' => $this->row->oi_timestamp,
'oi_deleted' => $this->getBits()
}
/**
- * Get the link to the file.
+ * Get the link to the file.
* Overridden by RevDel_ArchivedFileItem.
*/
protected function getLink() {
global $wgLang, $wgUser;
- $date = $wgLang->timeanddate( $this->file->getTimestamp(), true );
+ $date = $wgLang->timeanddate( $this->file->getTimestamp(), true );
if ( $this->isDeleted() ) {
# Hidden files...
if ( !$this->canViewContent() ) {
$link = $date;
} else {
- $link = $this->special->skin->link(
- $this->special->getTitle(),
- $date, array(),
+ $link = $this->special->skin->link(
+ $this->special->getTitle(),
+ $date, array(),
array(
'target' => $this->list->title->getPrefixedText(),
'file' => $this->file->getArchiveName(),
public function getHTML() {
global $wgLang;
- $data =
+ $data =
wfMsg(
- 'widthheight',
+ 'widthheight',
$wgLang->formatNum( $this->file->getWidth() ),
- $wgLang->formatNum( $this->file->getHeight() )
+ $wgLang->formatNum( $this->file->getHeight() )
) .
- ' (' .
- wfMsgExt( 'nbytes', 'parsemag', $wgLang->formatNum( $this->file->getSize() ) ) .
+ ' (' .
+ wfMsgExt( 'nbytes', 'parsemag', $wgLang->formatNum( $this->file->getSize() ) ) .
')';
return '<li>' . $this->getLink() . ' ' . $this->getUserTools() . ' ' .
public function canView() {
return LogEventsList::userCan( $this->row, Revision::DELETED_RESTRICTED );
}
-
+
public function canViewContent() {
return true; // none
}
public function setBits( $bits ) {
$dbw = wfGetDB( DB_MASTER );
$dbw->update( 'recentchanges',
- array(
- 'rc_deleted' => $bits,
- 'rc_patrolled' => 1
+ array(
+ 'rc_deleted' => $bits,
+ 'rc_patrolled' => 1
),
array(
'rc_logid' => $this->row->log_id,
return $this->authorNameField;
}
/**
- * Set the visibility for the revisions in this list. Logging and
+ * Set the visibility for the revisions in this list. Logging and
* transactions are done here.
*
* @param $params Associative array of parameters. Members are:
$status->warning( 'revdelete-only-restricted', $item->formatDate(), $item->formatTime() );
$status->failCount++;
continue;
- }
+ }
// Update the revision
$ok = $item->setBits( $newBits );
return $status;
}
- // Save success count
+ // Save success count
$successCount = $status->successCount;
// Move files, if there are any
// Log it
$this->updateLog( array(
- 'title' => $this->title,
- 'count' => $successCount,
- 'newBits' => $newBits,
+ 'title' => $this->title,
+ 'count' => $successCount,
+ 'newBits' => $newBits,
'oldBits' => $oldBits,
'comment' => $comment,
'ids' => $idsForLog,
* Record a log entry on the action
* @param $params Associative array of parameters:
* newBits: The new value of the *_deleted bitfield
- * oldBits: The old value of the *_deleted bitfield.
+ * oldBits: The old value of the *_deleted bitfield.
* title: The target title
* ids: The ID list
* comment: The log comment
}
/**
- * Start iteration. This must be called before current() or next().
+ * Start iteration. This must be called before current() or next().
* @return First list item
*/
public function reset() {
$this->initCurrent();
return $this->current;
}
-
+
/**
* Get the number of items in the list.
*/
public function clearFileOps() {
}
- /**
+ /**
* A hook for setVisibility(): do batch updates pre-commit.
* STUB
* @return Status
}
/**
- * A hook for setVisibility(): do any necessary updates post-commit.
+ * A hook for setVisibility(): do any necessary updates post-commit.
* STUB
- * @return Status
+ * @return Status
*/
public function doPostCommitUpdates() {
return Status::newGood();
/** The DB result row */
var $row;
- /**
+ /**
* @param $list RevDel_List
* @param $row DB result row
*/
$field = $this->list->getTimestampField();
return wfTimestamp( TS_MW, $this->row->$field );
}
-
+
/**
* Get the author user ID
- */
+ */
public function getAuthorId() {
$field = $this->list->getAuthorIdField();
return intval( $this->row->$field );
/**
* Get the author user name
- */
+ */
public function getAuthorName() {
$field = $this->list->getAuthorNameField();
return strval( $this->row->$field );
}
- /**
+ /**
* Returns true if the item is "current", and the operation to set the given
* bits can't be executed for that reason
* STUB
* Returns true if the current user can view the item
*/
abstract public function canView();
-
+
/**
* Returns true if the current user can view the item text/file
*/
* Set the visibility of the item. This should do any necessary DB queries.
*
* The DB update query should have a condition which forces it to only update
- * if the value in the DB matches the value fetched earlier with the SELECT.
- * If the update fails because it did not match, the function should return
+ * if the value in the DB matches the value fetched earlier with the SELECT.
+ * If the update fails because it did not match, the function should return
* false. This prevents concurrency problems.
*
* @return boolean success
static $recursionLevel = 0;
// Protect against path traversal below
- if ( !Language::isValidCode( $code )
- || strcspn( $code, ":/\\\000" ) !== strlen( $code ) )
+ if ( !Language::isValidCode( $code )
+ || strcspn( $code, ":/\\\000" ) !== strlen( $code ) )
{
throw new MWException( "Invalid language code \"$code\"" );
}
if ( !Language::isValidBuiltInCode( $code ) ) {
- // It's not possible to customise this code with class files, so
+ // It's not possible to customise this code with class files, so
// just return a Language object. This is to support uselang= hacks.
$lang = new Language;
$lang->setCode( $code );
}
/**
- * Returns true if a language code string is of a valid form, whether or
- * not it exists. This includes codes which are used solely for
+ * Returns true if a language code string is of a valid form, whether or
+ * not it exists. This includes codes which are used solely for
* customisation via the MediaWiki namespace.
*/
public static function isValidCode( $code ) {
- return
+ return
strcspn( $code, ":/\\\000" ) === strlen( $code )
&& !preg_match( Title::getTitleInvalidRegex(), $code );
}
/**
- * Returns true if a language code is of a valid form for the purposes of
+ * Returns true if a language code is of a valid form for the purposes of
* internal customisation of MediaWiki, via Messages*.php.
*/
public static function isValidBuiltInCode( $code ) {
function getMonthName( $key ) {
return $this->getMessageFromDB( self::$mMonthMsgs[$key - 1] );
}
-
+
function getMonthNamesArray() {
$monthNames = array( '' );
- for ( $i=1; $i < 13; $i++ ) {
+ for ( $i=1; $i < 13; $i++ ) {
$monthNames[] = $this->getMonthName( $i );
}
return $monthNames;
}
-
+
function getMonthNameGen( $key ) {
return $this->getMessageFromDB( self::$mMonthGenMsgs[$key - 1] );
}
function getMonthAbbreviation( $key ) {
return $this->getMessageFromDB( self::$mMonthAbbrevMsgs[$key - 1] );
}
-
+
function getMonthAbbreviationsArray() {
$monthNames = array('');
- for ( $i=1; $i < 13; $i++ ) {
+ for ( $i=1; $i < 13; $i++ ) {
$monthNames[] = $this->getMonthAbbreviation( $i );
}
return $monthNames;
}
-
+
function getWeekdayName( $key ) {
return $this->getMessageFromDB( self::$mWeekdayMsgs[$key - 1] );
}
}
# Do not truncate if the ellipsis makes the string longer/equal (bug 22181).
# This check is *not* redundant if $adjustLength, due to the single case where
- # LEN($ellipsis) > ABS($limit arg); $stringOriginal could be shorter than $string.
+ # LEN($ellipsis) > ABS($limit arg); $stringOriginal could be shorter than $string.
if ( strlen( $string ) < strlen( $stringOriginal ) ) {
return $string;
} else {
*/
static function getFileName( $prefix = 'Language', $code, $suffix = '.php' ) {
// Protect against path traversal
- if ( !Language::isValidCode( $code )
- || strcspn( $code, ":/\\\000" ) !== strlen( $code ) )
+ if ( !Language::isValidCode( $code )
+ || strcspn( $code, ":/\\\000" ) !== strlen( $code ) )
{
throw new MWException( "Invalid language code \"$code\"" );
}
-
+
return $prefix . str_replace( '-', '_', ucfirst( $code ) ) . $suffix;
}
Es werden dir solange keine weiteren Benachrichtigungs-E-Mails gesendet, bis du die Seite wieder besucht hast. Auf deiner Beobachtungsliste kannst du alle Benachrichtigungsmarkierungen zusammen zurücksetzen.
- Dein freundliches {{SITENAME}}-Benachrichtigungssystem
+ Dein freundliches {{SITENAME}}-Benachrichtigungssystem
--
Um die Einstellungen der E-Mail-Benachrichtigung anzupassen, besuche {{fullurl:{{#special:Preferences}}}}
#p-personal ul,
#p-cactions li a,
#preftoc a {
- text-transform: none;
+ text-transform: none;
}',
'vector.css' => '/* Das folgende CSS wird für Benutzer der Vector-Benutzeroberfläche geladen. Für allgemeingültige Benutzeroberflächen-Anpassungen bitte [[MediaWiki:Common.css]] bearbeiten. */',
'print.css' => '/* Das folgende CSS wird in der Druckausgabe geladen. */',
You can search via Google in the meantime.
Note that their indexes of {{SITENAME}} content may be out of date.',
'googlesearch' => '<form method="get" action="http://www.google.com/search" id="googlesearch">
- <input type="hidden" name="domains" value="{{SERVER}}" />
- <input type="hidden" name="num" value="50" />
- <input type="hidden" name="ie" value="$2" />
- <input type="hidden" name="oe" value="$2" />
+ <input type="hidden" name="domains" value="{{SERVER}}" />
+ <input type="hidden" name="num" value="50" />
+ <input type="hidden" name="ie" value="$2" />
+ <input type="hidden" name="oe" value="$2" />
- <input type="text" name="q" size="31" maxlength="255" value="$1" />
- <input type="submit" name="btnG" value="$3" />
+ <input type="text" name="q" size="31" maxlength="255" value="$1" />
+ <input type="submit" name="btnG" value="$3" />
<div>
- <input type="radio" name="sitesearch" id="gwiki" value="{{SERVER}}" checked="checked" /><label for="gwiki">{{SITENAME}}</label>
- <input type="radio" name="sitesearch" id="gWWW" value="" /><label for="gWWW">WWW</label>
+ <input type="radio" name="sitesearch" id="gwiki" value="{{SERVER}}" checked="checked" /><label for="gwiki">{{SITENAME}}</label>
+ <input type="radio" name="sitesearch" id="gWWW" value="" /><label for="gWWW">WWW</label>
</div>
</form>', # do not translate or duplicate this message to other languages
There will be no other notifications in case of further changes unless you visit this page.
You could also reset the notification flags for all your watched pages on your watchlist.
- Your friendly {{SITENAME}} notification system
+ Your friendly {{SITENAME}} notification system
--
To change your email notification settings, visit