On Sun, 04 Dec 2011 20:03:38 -0800, Eric K <ek79...@yahoo.com> wrote:
> There's two issues I'm having after upgrading from 1.16.5 to 1.18.0: > > > 1. Some people (including me) had included "DatabaseFunctions.php" in > their extensions, for example by doing: > include_once './extensions/DatabaseFunctions.php'; > > > 1.17 took that file out (file: History): > === Configuration changes in 1.17 === > * DatabaseFunctions.php that was needed for compatibility with pre-1.3 > extensions has been removed. > > I was using the database functions for example: > $my_query = wfQuery($this_query, DB_WRITE); Grab the master database for writes with $dbw = wfGetDB( DB_MASTER ); You 'can' do a query on that using $dbw->query( $this_query ); However I DO NOT recommend you just start throwing raw sql. Continuing that pattern is a bad one that won't match the standards that other extensions live up to. Introducing sql injection vulnerabilities will be easier, and I recommend you change your code to make use of the abstract ->select, ->update, ->insert, etc... methods. > I can fix that temporarily by copying that file and using it but I want > to work with whatever is "new" now so I dont use any old methods. > > > 2. I'm also getting this in a few extensions: > Fatal error: Call to a member function addMessage() on a non-object in > [...]/extensions/MetaDescriptionTag.php on line 72 > > That function is being used like this: $wgMessageCache->addMessage > > Anyone know any workarounds? I'm going to work on it in any case in the > next few days and will report back if I'm successful. Move your i18n messages to an .i18n.php file and add it to $wgExtensionMessagesFiles. -- ~Daniel Friesen (Dantman, Nadir-Seen-Fire) [http://daniel.friesen.name] _______________________________________________ MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l