Index: trunk/extensions/SemanticForms/includes/SF_FormEditTab.php |
— | — | @@ -31,7 +31,6 @@ |
32 | 32 | */ |
33 | 33 | function sffFormEditTab($obj, $content_actions) { |
34 | 34 | $fname = 'SFFormEditTab'; |
35 | | - $db = wfGetDB( DB_SLAVE ); |
36 | 35 | // make sure that this is not itself a category page, and that the user |
37 | 36 | // is allowed to edit it |
38 | 37 | if (($obj->mTitle != null) && ($obj->mTitle->getNamespace() != NS_CATEGORY)) { |
— | — | @@ -39,12 +38,12 @@ |
40 | 39 | $categories = getCategoriesForArticle($obj); |
41 | 40 | $default_form_relation = str_replace(' ', '_', wfMsgForContent('sf_form_relation')); |
42 | 41 | foreach ($categories as $category) { |
43 | | - if ($form_name = sffGetDefaultForm($db, $category, NS_CATEGORY)) { |
| 42 | + if ($form_name = sffGetDefaultForm($category, NS_CATEGORY)) { |
44 | 43 | break; |
45 | 44 | } |
46 | 45 | } |
47 | 46 | if (! $form_name) { |
48 | | - $form_name = sffGetDefaultForm($db, $obj->mTitle->getNsText(), NS_PROJECT); |
| 47 | + $form_name = sffGetDefaultForm($obj->mTitle->getNsText(), NS_PROJECT); |
49 | 48 | } |
50 | 49 | if ($form_name) { |
51 | 50 | // if this tab is appearing here due to the namespace, there's a |