dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added $wgMaxBacklinksInvalidate to avoid massive html cache invalidation.
[lhc/web/wiklou.git]
/
includes
/
ChangesList.php
diff --git
a/includes/ChangesList.php
b/includes/ChangesList.php
index
f8dbf3b
..
a2fff57
100644
(file)
--- a/
includes/ChangesList.php
+++ b/
includes/ChangesList.php
@@
-286,6
+286,10
@@
class ChangesList extends ContextSource {
}
}
}
}
+ /**
+ * @param $s string HTML to update
+ * @param $rc_timestamp mixed
+ */
public function insertDateHeader( &$s, $rc_timestamp ) {
# Make date header if necessary
$date = $this->getLanguage()->userDate( $rc_timestamp, $this->getUser() );
public function insertDateHeader( &$s, $rc_timestamp ) {
# Make date header if necessary
$date = $this->getLanguage()->userDate( $rc_timestamp, $this->getUser() );
@@
-299,6
+303,11
@@
class ChangesList extends ContextSource {
}
}
}
}
+ /**
+ * @param $s string HTML to update
+ * @param $title Title
+ * @param $logtype string
+ */
public function insertLog( &$s, $title, $logtype ) {
$page = new LogPage( $logtype );
$logname = $page->getName()->escaped();
public function insertLog( &$s, $title, $logtype ) {
$page = new LogPage( $logtype );
$logname = $page->getName()->escaped();
@@
-306,7
+315,7
@@
class ChangesList extends ContextSource {
}
/**
}
/**
- * @param $s
+ * @param $s
string HTML to update
* @param $rc RecentChange
* @param $unpatrolled
*/
* @param $rc RecentChange
* @param $unpatrolled
*/
@@
-349,7
+358,7
@@
class ChangesList extends ContextSource {
}
/**
}
/**
- * @param $s
+ * @param $s
string HTML to update
* @param $rc RecentChange
* @param $unpatrolled
* @param $watched
* @param $rc RecentChange
* @param $unpatrolled
* @param $watched
@@
-384,14
+393,27
@@
class ChangesList extends ContextSource {
}
/**
}
/**
- * @param $s
+ * Get the timestamp from $rc formatted with current user's settings
+ * and a separator
+ *
* @param $rc RecentChange
* @param $rc RecentChange
+ * @return string HTML fragment
*/
*/
- public function
insertTimestamp( &$s,
$rc ) {
-
$s .=
$this->message['semicolon-separator'] . '<span class="mw-changeslist-date">' .
+ public function
getTimestamp(
$rc ) {
+
return
$this->message['semicolon-separator'] . '<span class="mw-changeslist-date">' .
$this->getLanguage()->userTime( $rc->mAttribs['rc_timestamp'], $this->getUser() ) . '</span> <span class="mw-changeslist-separator">. .</span> ';
}
$this->getLanguage()->userTime( $rc->mAttribs['rc_timestamp'], $this->getUser() ) . '</span> <span class="mw-changeslist-separator">. .</span> ';
}
+ /**
+ * Insert time timestamp string from $rc into $s
+ *
+ * @param $s string HTML to update
+ * @param $rc RecentChange
+ */
+ public function insertTimestamp( &$s, $rc ) {
+ $s .= $this->getTimestamp( $rc );
+ }
+
/**
* Insert links to user page, user talk page and eventually a blocking link
*
/**
* Insert links to user page, user talk page and eventually a blocking link
*
@@
-568,7
+590,8
@@
class OldChangesList extends ChangesList {
* @param $rc RecentChange, passed by reference
* @param $watched Bool (default false)
* @param $linenumber Int (default null)
* @param $rc RecentChange, passed by reference
* @param $watched Bool (default false)
* @param $linenumber Int (default null)
- * @return string
+ *
+ * @return string|bool
*/
public function recentChangesLine( &$rc, $watched = false, $linenumber = null ) {
global $wgRCShowChangedSize;
*/
public function recentChangesLine( &$rc, $watched = false, $linenumber = null ) {
global $wgRCShowChangedSize;
@@
-659,7
+682,10
@@
class OldChangesList extends ChangesList {
$classes[] = Sanitizer::escapeClass( 'watchlist-'.$rc->mAttribs['rc_namespace'].'-'.$rc->mAttribs['rc_title'] );
}
$classes[] = Sanitizer::escapeClass( 'watchlist-'.$rc->mAttribs['rc_namespace'].'-'.$rc->mAttribs['rc_title'] );
}
- wfRunHooks( 'OldChangesListRecentChangesLine', array(&$this, &$s, $rc) );
+ if ( !wfRunHooks( 'OldChangesListRecentChangesLine', array( &$this, &$s, $rc ) ) ) {
+ wfProfileOut( __METHOD__ );
+ return false;
+ }
wfProfileOut( __METHOD__ );
return "$dateheader<li class=\"".implode( ' ', $classes )."\">".$s."</li>\n";
wfProfileOut( __METHOD__ );
return "$dateheader<li class=\"".implode( ' ', $classes )."\">".$s."</li>\n";
@@
-926,7
+952,7
@@
class EnhancedChangesList extends ChangesList {
implode( $this->message['semicolon-separator'], $users )
)->escaped() . '</span>';
implode( $this->message['semicolon-separator'], $users )
)->escaped() . '</span>';
- $tl = '<span class="mw-collapsible-toggle mw-enhancedchanges-arrow"></span>';
+ $tl = '<span class="mw-collapsible-toggle mw-enhancedchanges-arrow
mw-enhancedchanges-arrow-space
"></span>';
$r .= "<td>$tl</td>";
# Main line
$r .= "<td>$tl</td>";
# Main line
@@
-1180,7
+1206,7
@@
class EnhancedChangesList extends ChangesList {
$r = Html::openElement( 'table', array( 'class' => $classes ) ) .
Html::openElement( 'tr' );
$r = Html::openElement( 'table', array( 'class' => $classes ) ) .
Html::openElement( 'tr' );
- $r .= '<td class="mw-enhanced-rc"><span class="mw-enhancedchanges-arrow
mw-enhancedchanges-arrow
-space"></span>';
+ $r .= '<td class="mw-enhanced-rc"><span class="mw-enhancedchanges-arrow-space"></span>';
# Flag and Timestamp
if( $type == RC_MOVE || $type == RC_MOVE_OVER_REDIRECT ) {
$r .= '    '; // 4 flags -> 4 spaces
# Flag and Timestamp
if( $type == RC_MOVE || $type == RC_MOVE_OVER_REDIRECT ) {
$r .= '    '; // 4 flags -> 4 spaces