r111182 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r111181‎ | r111182 | r111183 >
Date:19:20, 10 February 2012
Author:werdna
Status:resolved
Tags:
Comment:
(bug 26684) Deleting a reply and then replying again merges history, restoring causes database error.
Patch by Nikola Kovacs, includes some performance tweaks by me.
Modified paths:
  • /trunk/extensions/LiquidThreads/classes/Threads.php (modified) (history)

Diff [purge]

Index: trunk/extensions/LiquidThreads/classes/Threads.php
@@ -278,8 +278,11 @@
279279 $basename = Threads::makeTitleValid( $basename );
280280
281281 $t = Title::makeTitleSafe( $namespace, $basename );
282 - while ( !$t || $t->exists() ||
283 - in_array( $t->getPrefixedDBkey(), self::$occupied_titles ) ) {
 282+ while ( !$t ||
 283+ in_array( $t->getPrefixedDBkey(), self::$occupied_titles ||
 284+ $t->exists() ||
 285+ $t->isDeletedQuick()
 286+ ) {
284287
285288 if ( !$t ) {
286289 throw new MWException( "Error in creating title for basename $basename" );

Follow-up revisions

RevisionCommit summaryAuthorDate
r111183Fix syntax error (my own fault) in r111182werdna19:21, 10 February 2012

Status & tagging log