Last modified: 2009-08-29 13:02:16 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 20408 - Updaters Inc. is missing "global $wgDatabase;" in do_backlinking_indices_update() and do_categorylinks_indices_update()
Updaters Inc. is missing "global $wgDatabase;" in do_backlinking_indices_upda...
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Installer (Other open bugs)
1.16.x
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
: 20434 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-08-26 18:08 UTC by Carl Austin Bennett
Modified: 2009-08-29 13:02 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Carl Austin Bennett 2009-08-26 18:08:57 UTC
To: Updaters Inc.
    1.16a MediaWiki Way, Wikiville 55123

The latest version of script ../maintenance/updaters.inc as supplied by your organisation appears to be incomplete; the command "global $wgDatabase;" is missing from the first line of these two routines:

function do_backlinking_indices_update() {
    wfOut( "Checking for backlinking indices...\n" );
    if (!index_has_field('pagelinks', 'pl_namespace', 'pl_from') ||
        !index_has_field('templatelinks', 'tl_namespace', 'tl_from') ||
        !index_has_field('imagelinks', 'il_to', 'il_from'))
    {    
        $wgDatabase->sourceFile( archive( 'patch-backlinkindexes.sql' ) );
        wfOut( "...backlinking indices updated\n" );
    }
}

function do_categorylinks_indices_update() {
    wfOut( "Checking for categorylinks indices...\n" );
    if (!index_has_field('categorylinks', 'cl_sortkey', 'cl_from'))
    {    
        $wgDatabase->sourceFile( archive( 'patch-categorylinksindex.sql' ) );
        wfOut( "...categorylinks indices updated\n" );
    }
}

The result, if either of these routines happen to be called during upgrade, looks something like:

PHP Notice:  Undefined variable: wgDatabase in ...mw116a/maintenance/updaters.inc on line 1012
PHP Fatal error:  Call to a member function sourceFile() on a non-object in ...mw116a/maintenance/updaters.inc on line 1012


The rest of the routines in this otherwise-fine Updaters Inc. product all appear to provide the "global $wgDatabase;" feature before accessing the database. Could you please add this to the two affected items?

Thank you.
Comment 1 Chad H. 2009-08-26 18:19:17 UTC
Done in r55609
Comment 2 Chad H. 2009-08-29 13:02:16 UTC
*** Bug 20434 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links