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
build: Upgrade mediawiki-codesniffer from 26.0.0 to 28.0.0
[lhc/web/wiklou.git]
/
includes
/
filerepo
/
LocalRepo.php
diff --git
a/includes/filerepo/LocalRepo.php
b/includes/filerepo/LocalRepo.php
index
5ed937f
..
84c0a61
100644
(file)
--- a/
includes/filerepo/LocalRepo.php
+++ b/
includes/filerepo/LocalRepo.php
@@
-32,6
+32,7
@@
use Wikimedia\Rdbms\IDatabase;
* in the wiki's own database. This is the most commonly used repository class.
*
* @ingroup FileRepo
* in the wiki's own database. This is the most commonly used repository class.
*
* @ingroup FileRepo
+ * @method LocalFile|null newFile( $title, $time = false )
*/
class LocalRepo extends FileRepo {
/** @var callable */
*/
class LocalRepo extends FileRepo {
/** @var callable */
@@
-180,7
+181,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;
}
/**
}
/**