Difference between revisions of "Talk:WikiDB/Files/WikiDB.php"
From TestWiki
< Talk:WikiDB | Files
(→$wgArticle - non-object on special pages) |
m (make meta into link) |
||
Line 33: | Line 33: | ||
:: Works like a charm! I'm up and starting to play around. Thanks. :) Is there a decent reference for these MW functions? I was trying to use $wgTitle->getTitle(); which apparently is incorrect. [[User:Blckdmnd99|Blckdmnd99]] 21:46, 1 October 2006 (BST) | :: Works like a charm! I'm up and starting to play around. Thanks. :) Is there a decent reference for these MW functions? I was trying to use $wgTitle->getTitle(); which apparently is incorrect. [[User:Blckdmnd99|Blckdmnd99]] 21:46, 1 October 2006 (BST) | ||
− | ::: I've not found one yet - I just dip into the MW source, or ask on IRC. Check meta though, there's some good stuff there, even if it's not always easy to find... --[[User:HappyDog|HappyDog]] 22:52, 1 October 2006 (BST) | + | ::: I've not found one yet - I just dip into the MW source, or ask on IRC. Check [http://meta.wikimedia.org/ meta] though, there's some good stuff there, even if it's not always easy to find... --[[User:HappyDog|HappyDog]] 22:52, 1 October 2006 (BST) |
Revision as of 21:52, 1 October 2006
$wgArticle - non-object on special pages
FYI: I currently get the following error whenever trying to access Special: or MediaWiki: pages:
Fatal error: Call to a member function on a non-object in /hsphere/local/home/dduran/innoviki.com/extensions/WikiDB.php on line 63
59. function wfWikiDB_AddActionTabs(&$ContentActions) { 60. global $wgArticle, $action; 61. global $wgWikiDBNamespaces; 62. 63. $Title = $wgArticle->getTitle(); 64. if ($Title->isTalkPage()) 65. $Title = $Title->getSubjectPage();
There's some discussion here about the merits of $wgArticle vs. $wgTitle between MW1.5 and MW1.6. Not sure I understand but wanted to point it out.
I'm running: MW:1.6.5 PHP:4.3.11 (apache) MySQL:4.0.26-standard-log
- Hi - Thanks for the heads up - I think I've fixed this now:
59. function wfWikiDB_AddActionTabs(&$ContentActions) { 60. global $wgTitle, $action; 61. global $wgWikiDBNamespaces; 62. 63. $Title =& $wgTitle; 64. if ($Title->isTalkPage()) 65. $Title = $Title->getSubjectPage();
- Let me know if this works on 1.6.5 (it seems to work fine here on 1.5.6). --HappyDog 19:58, 1 October 2006 (BST)
- Works like a charm! I'm up and starting to play around. Thanks. :) Is there a decent reference for these MW functions? I was trying to use $wgTitle->getTitle(); which apparently is incorrect. Blckdmnd99 21:46, 1 October 2006 (BST)