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
Merge "filebackend: improve internal use of FileBackend constants"
[lhc/web/wiklou.git]
/
includes
/
filerepo
/
LocalRepo.php
diff --git
a/includes/filerepo/LocalRepo.php
b/includes/filerepo/LocalRepo.php
index
5ed937f
..
8e3355c
100644
(file)
--- a/
includes/filerepo/LocalRepo.php
+++ b/
includes/filerepo/LocalRepo.php
@@
-180,7
+180,11
@@
class LocalRepo extends FileRepo {
* @return string
*/
public static function getHashFromKey( $key ) {
* @return string
*/
public static function getHashFromKey( $key ) {
- return strtok( $key, '.' );
+ $sha1 = strtok( $key, '.' );
+ if ( is_string( $sha1 ) && strlen( $sha1 ) === 32 && $sha1[0] === '0' ) {
+ $sha1 = substr( $sha1, 1 );
+ }
+ return $sha1;
}
/**
}
/**