| Index: trunk/extensions/SemanticForms/includes/SF_FormEditTab.php |
| — | — | @@ -12,17 +12,22 @@ |
| 13 | 13 | * a form |
| 14 | 14 | */ |
| 15 | 15 | static function displayTab( $obj, &$content_actions ) { |
| | 16 | + if ( method_exists ( $obj, 'getTitle' ) ) { |
| | 17 | + $title = $obj->getTitle(); |
| | 18 | + } else { |
| | 19 | + $title = $obj->mTitle; |
| | 20 | + } |
| 16 | 21 | // Make sure that this is not a special page, and |
| 17 | 22 | // that the user is allowed to edit it |
| 18 | 23 | // - this function is almost never called on special pages, |
| 19 | 24 | // but before SMW is fully initialized, it's called on |
| 20 | 25 | // Special:SMWAdmin for some reason, which is why the |
| 21 | 26 | // special-page check is there. |
| 22 | | - if ( !isset( $obj->mTitle ) || |
| 23 | | - ( $obj->mTitle->getNamespace() == NS_SPECIAL ) ) { |
| | 27 | + if ( !isset( $title ) || |
| | 28 | + ( $title->getNamespace() == NS_SPECIAL ) ) { |
| 24 | 29 | return true; |
| 25 | 30 | } |
| 26 | | - $title = $obj->mTitle; |
| | 31 | + |
| 27 | 32 | $form_names = SFFormLinker::getDefaultFormsForPage( $title ); |
| 28 | 33 | if ( count( $form_names ) == 0 ) { |
| 29 | 34 | return true; |