r26341 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r26340‎ | r26341 | r26342 >
Date:01:06, 3 October 2007
Author:yaron
Status:old
Tags:
Comment:
sffGetDefaultForm() takes in one less argument (part of bug 11506)
Modified paths:
  • /trunk/extensions/SemanticForms/includes/SF_FormEditTab.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/includes/SF_FormEditTab.php
@@ -31,7 +31,6 @@
3232 */
3333 function sffFormEditTab($obj, $content_actions) {
3434 $fname = 'SFFormEditTab';
35 - $db = wfGetDB( DB_SLAVE );
3635 // make sure that this is not itself a category page, and that the user
3736 // is allowed to edit it
3837 if (($obj->mTitle != null) && ($obj->mTitle->getNamespace() != NS_CATEGORY)) {
@@ -39,12 +38,12 @@
4039 $categories = getCategoriesForArticle($obj);
4140 $default_form_relation = str_replace(' ', '_', wfMsgForContent('sf_form_relation'));
4241 foreach ($categories as $category) {
43 - if ($form_name = sffGetDefaultForm($db, $category, NS_CATEGORY)) {
 42+ if ($form_name = sffGetDefaultForm($category, NS_CATEGORY)) {
4443 break;
4544 }
4645 }
4746 if (! $form_name) {
48 - $form_name = sffGetDefaultForm($db, $obj->mTitle->getNsText(), NS_PROJECT);
 47+ $form_name = sffGetDefaultForm($obj->mTitle->getNsText(), NS_PROJECT);
4948 }
5049 if ($form_name) {
5150 // if this tab is appearing here due to the namespace, there's a

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r26340Split functions into SMW 0.7 and SMW 1.0 versions, thanks to code from...yaron01:04, 3 October 2007

Status & tagging log