From: Max Semenik Date: Tue, 29 Oct 2013 23:43:53 +0000 (+0400) Subject: DifferenceEngine minor fixes X-Git-Tag: 1.31.0-rc.0~18216^2 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/ajouter.php?a=commitdiff_plain;h=651c43140fe78594a387a970b406159bcefd20cd;p=lhc%2Fweb%2Fwiklou.git DifferenceEngine minor fixes * Function docs * Remove useless variable assignment Change-Id: I292e1391e0c24399b2c203b9f7fe7c58df089ad0 --- diff --git a/includes/diff/DifferenceEngine.php b/includes/diff/DifferenceEngine.php index 39f8a47fa8..cf78ce0305 100644 --- a/includes/diff/DifferenceEngine.php +++ b/includes/diff/DifferenceEngine.php @@ -83,7 +83,7 @@ class DifferenceEngine extends ContextSource { * Constructor * @param $context IContextSource context to use, anything else will be ignored * @param $old Integer old ID we want to show and diff with. - * @param $new String|int either 'prev' or 'next'. Default: 0. + * @param $new String|int either revision ID or 'prev' or 'next'. Default: 0. * @param $rcid Integer Deprecated, no longer used! * @param $refreshCache boolean If set, refreshes the diff cache * @param $unhide boolean If set, allow viewing deleted revs @@ -230,7 +230,6 @@ class DifferenceEngine extends ContextSource { } $rollback = ''; - $undoLink = ''; $query = array(); # Carry over 'diffonly' param via navigation links @@ -599,7 +598,8 @@ class DifferenceEngine extends ContextSource { * * @param string|bool $otitle Header for old text or false * @param string|bool $ntitle Header for new text or false - * @param string $notice + * @param string $notice HTML between diff header and body + * * @return bool */ function showDiff( $otitle, $ntitle, $notice = '' ) { @@ -867,6 +867,9 @@ class DifferenceEngine extends ContextSource { /** * Generate a debug comment indicating diff generating time, * server node, and generator backend. + * + * @param String $generator: What diff engine was used + * * @return string */ protected function debug( $generator = "internal" ) { @@ -879,16 +882,20 @@ class DifferenceEngine extends ContextSource { $data[] = wfHostname(); } $data[] = wfTimestamp( TS_DB ); - return "\n"; + $data ) + ) + . " -->\n"; } /** * Replace line numbers with the text in the user's language + * + * @param String $text + * * @return mixed */ function localiseLineNumbers( $text ) { @@ -1008,6 +1015,12 @@ class DifferenceEngine extends ContextSource { /** * Add the header to a diff body * + * @param String $diff: Diff body + * @param String $otitle: Old revision header + * @param String $ntitle: New revision header + * @param String $multi: Notice telling user that there are intermediate revisions between the ones being compared + * @param String $notice: Other notices, e.g. that user is viewing deleted content + * * @return string */ function addHeader( $diff, $otitle, $ntitle, $multi = '', $notice = '' ) {