dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9662e23
)
bugfix: check for existence of PRIMARY key in addition to UNIQUE key, as
author
Erik Moeller
<erik@users.mediawiki.org>
Mon, 11 Oct 2004 04:10:41 +0000
(
04:10
+0000)
committer
Erik Moeller
<erik@users.mediawiki.org>
Mon, 11 Oct 2004 04:10:41 +0000
(
04:10
+0000)
MySQL returns "PRIMARY" as key_name. This caused uploads to fail with a
"patch required" message in HEAD even if the schema was up to date.
includes/Image.php
patch
|
blob
|
history
diff --git
a/includes/Image.php
b/includes/Image.php
index
438b2e9
..
025c13f
100644
(file)
--- a/
includes/Image.php
+++ b/
includes/Image.php
@@
-578,7
+578,7
@@
function wfRecordUpload( $name, $oldver, $size, $desc, $copyStatus = "", $source
$dbw =& wfGetDB( DB_MASTER );
# img_name must be unique
- if ( !$dbw->indexUnique( 'image', 'img_name' ) ) {
+ if ( !$dbw->indexUnique( 'image', 'img_name' )
&& !$dbw->indexExists('image','PRIMARY')
) {
wfDebugDieBacktrace( 'Database schema not up to date, please run maintenance/archives/patch-image_name_unique.sql' );
}