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:
043c6d2
)
Commit the transaction after an upload is recorded and logged, to avoid losing images...
author
Tim Starling
<tstarling@users.mediawiki.org>
Sat, 17 Jun 2006 04:32:41 +0000
(
04:32
+0000)
committer
Tim Starling
<tstarling@users.mediawiki.org>
Sat, 17 Jun 2006 04:32:41 +0000
(
04:32
+0000)
includes/Image.php
patch
|
blob
|
history
diff --git
a/includes/Image.php
b/includes/Image.php
index
0b1d8d6
..
dd40c0f
100644
(file)
--- a/
includes/Image.php
+++ b/
includes/Image.php
@@
-1594,6
+1594,14
@@
class Image
$article->insertNewArticle( $textdesc, $desc, $minor, $watch, $suppressRC );
}
$article->insertNewArticle( $textdesc, $desc, $minor, $watch, $suppressRC );
}
+ # Add the log entry
+ $log = new LogPage( 'upload' );
+ $log->addEntry( 'upload', $descTitle, $desc );
+
+ # Commit the transaction now, in case something goes wrong later
+ # The most important thing is that images don't get lost, especially archives
+ $dbw->immediateCommit();
+
# Invalidate cache for all pages using this image
$linksTo = $this->getLinksTo();
# Invalidate cache for all pages using this image
$linksTo = $this->getLinksTo();
@@
-1603,9
+1611,6
@@
class Image
}
Title::touchArray( $linksTo );
}
Title::touchArray( $linksTo );
- $log = new LogPage( 'upload' );
- $log->addEntry( 'upload', $descTitle, $desc );
-
return true;
}
return true;
}