r51485 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r51484‎ | r51485 | r51486 >
Date:00:59, 5 June 2009
Author:yaron
Status:deferred
Tags:
Comment:
Removed disabling and 'anonymous user' warning message if it's a query
Modified paths:
  • /trunk/extensions/SemanticForms/includes/SF_FormPrinter.inc (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/includes/SF_FormPrinter.inc
@@ -174,12 +174,13 @@
175175 // show previous set of deletions for this page, if it's been deleted before
176176 if (! $form_submitted && ! $this->mPageTitle->exists())
177177 $this->showDeletionLog($wgOut);
178 - if ($wgUser->isAllowed('edit') && $this->mPageTitle->userCan('edit')) {
 178+ if (($wgUser->isAllowed('edit') && $this->mPageTitle->userCan('edit')) || $is_query) {
179179 $form_is_disabled = false;
180180 $form_text = "";
181181 // show "Your IP address will be recorded" warning if user is
182 - // anonymous - wikitext for bolding has to be replaced with HTML
183 - if ($wgUser->isAnon()) {
 182+ // anonymous, and it's not a query -
 183+ // wikitext for bolding has to be replaced with HTML
 184+ if ($wgUser->isAnon() && ! $is_query) {
184185 $anon_edit_warning = preg_replace("/'''(.*)'''/", "<strong>$1</strong>", wfMsg('anoneditwarning'));
185186 $form_text .= "<p>$anon_edit_warning</p>\n";
186187 }

Status & tagging log