https://bugzilla.wikimedia.org/show_bug.cgi?id=20408
Summary: Updaters Inc. is missing "global $wgDatabase;" in
do_backlinking_indices_update() and
do_categorylinks_indices_update()
Product: MediaWiki
Version: 1.16-svn
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: Normal
Component: Installation
AssignedTo: [email protected]
ReportedBy: [email protected]
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.
--
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l