Use Database::addQuotes instead of hard coded apostrophs
[lhc/web/wiklou.git] / includes / actions / HistoryAction.php
index e8aec1c..b381edc 100644 (file)
@@ -146,6 +146,9 @@ class HistoryAction extends FormlessAction {
                                $out->setStatusCode( 404 );
                        }
                        $out->addWikiMsg( 'nohistory' );
+
+                       $dbr = wfGetDB( DB_REPLICA );
+
                        # show deletion/move log if there is an entry
                        LogEventsList::showLogExtract(
                                $out,
@@ -153,7 +156,7 @@ class HistoryAction extends FormlessAction {
                                $this->getTitle(),
                                '',
                                [ 'lim' => 10,
-                                       'conds' => [ "log_action != 'revision'" ],
+                                       'conds' => [ 'log_action != ' . $dbr->addQuotes( 'revision' ) ],
                                        'showIfEmpty' => false,
                                        'msgKey' => [ 'moveddeleted-notice' ]
                                ]