From: Aaron Schulz Date: Sun, 18 Dec 2011 16:35:45 +0000 (+0000) Subject: FU r106514: use base 16 SHA-1 to be consistent with image info X-Git-Tag: 1.31.0-rc.0~25906 X-Git-Url: http://git.cyclocoop.org/fichier?a=commitdiff_plain;h=3a0a647efb2b8d3eb93fc336b4698c192a92d7de;p=lhc%2Fweb%2Fwiklou.git FU r106514: use base 16 SHA-1 to be consistent with image info --- diff --git a/includes/api/ApiQueryDeletedrevs.php b/includes/api/ApiQueryDeletedrevs.php index 8f286ceee4..0422eba33e 100644 --- a/includes/api/ApiQueryDeletedrevs.php +++ b/includes/api/ApiQueryDeletedrevs.php @@ -236,7 +236,7 @@ class ApiQueryDeletedrevs extends ApiQueryBase { $rev['len'] = $row->ar_len; } if ( $fld_sha1 ) { - $rev['sha1'] = $row->ar_sha1; + $rev['sha1'] = wfBaseConvert( $row->ar_sha1, 36, 16, 40 ); } if ( $fld_content ) { ApiResult::setContent( $rev, Revision::getRevisionText( $row ) ); @@ -347,7 +347,7 @@ class ApiQueryDeletedrevs extends ApiQueryBase { ' parsedcomment - Adds the parsed comment of the revision', ' minor - Tags if the revision is minor', ' len - Adds the length (bytes) of the revision', - ' sha1 - Adds the SHA-1 (base 36) of the revision', + ' sha1 - Adds the SHA-1 (base 16) of the revision', ' content - Adds the content of the revision', ' token - Gives the edit token', ), diff --git a/includes/api/ApiQueryRevisions.php b/includes/api/ApiQueryRevisions.php index 6d1fe3fe8e..7fac077506 100644 --- a/includes/api/ApiQueryRevisions.php +++ b/includes/api/ApiQueryRevisions.php @@ -414,7 +414,7 @@ class ApiQueryRevisions extends ApiQueryBase { } if ( $this->fld_sha1 ) { - $vals['sha1'] = $revision->getSha1(); + $vals['sha1'] = wfBaseConvert( $revision->getSha1(), 36, 16, 40 ); } if ( $this->fld_comment || $this->fld_parsedcomment ) { @@ -606,7 +606,7 @@ class ApiQueryRevisions extends ApiQueryBase { ' user - User that made the revision', ' userid - User id of revision creator', ' size - Length (bytes) of the revision', - ' sha1 - SHA-1 (base 36) the revision', + ' sha1 - SHA-1 (base 16) the revision', ' comment - Comment by the user for revision', ' parsedcomment - Parsed comment by the user for the revision', ' content - Text of the revision',