dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4fff963
)
(bug 12608) Unifying the spelling of getDBkey() in the code.
author
Huji
<huji@users.mediawiki.org>
Mon, 14 Jan 2008 09:13:04 +0000
(09:13 +0000)
committer
Huji
<huji@users.mediawiki.org>
Mon, 14 Jan 2008 09:13:04 +0000
(09:13 +0000)
RELEASE-NOTES
patch
|
blob
|
history
includes/AjaxFunctions.php
patch
|
blob
|
history
includes/CategoryPage.php
patch
|
blob
|
history
includes/Revision.php
patch
|
blob
|
history
includes/SearchEngine.php
patch
|
blob
|
history
includes/Skin.php
patch
|
blob
|
history
includes/SkinTemplate.php
patch
|
blob
|
history
includes/SpecialExport.php
patch
|
blob
|
history
includes/SpecialRecentchangeslinked.php
patch
|
blob
|
history
includes/SpecialUndelete.php
patch
|
blob
|
history
includes/Title.php
patch
|
blob
|
history
diff --git
a/RELEASE-NOTES
b/RELEASE-NOTES
index
0e6a9e4
..
ddfb576
100644
(file)
--- a/
RELEASE-NOTES
+++ b/
RELEASE-NOTES
@@
-307,6
+307,7
@@
it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
* Use only default options when generating RSS and Atom syndication links.
This should help prevent infinite link loops that some software may follow,
and will generally keep feed behavior cleaner.
* Use only default options when generating RSS and Atom syndication links.
This should help prevent infinite link loops that some software may follow,
and will generally keep feed behavior cleaner.
+* (bug 12608) Unifying the spelling of getDBkey() in the code.
== Parser changes in 1.12 ==
== Parser changes in 1.12 ==
diff --git
a/includes/AjaxFunctions.php
b/includes/AjaxFunctions.php
index
013771b
..
b004cfc
100644
(file)
--- a/
includes/AjaxFunctions.php
+++ b/
includes/AjaxFunctions.php
@@
-90,7
+90,7
@@
function wfSajaxSearch( $term ) {
$db = wfGetDB( DB_SLAVE );
$res = $db->select( 'page', array( 'page_title', 'page_namespace' ),
array( 'page_namespace' => $term_title->getNamespace(),
$db = wfGetDB( DB_SLAVE );
$res = $db->select( 'page', array( 'page_title', 'page_namespace' ),
array( 'page_namespace' => $term_title->getNamespace(),
- "page_title LIKE '". $db->strencode( $term_title->getDB
K
ey() ) ."%'" ),
+ "page_title LIKE '". $db->strencode( $term_title->getDB
k
ey() ) ."%'" ),
"wfSajaxSearch",
array( 'LIMIT' => $limit+1 )
);
"wfSajaxSearch",
array( 'LIMIT' => $limit+1 )
);
diff --git
a/includes/CategoryPage.php
b/includes/CategoryPage.php
index
656d316
..
6fbcd3c
100644
(file)
--- a/
includes/CategoryPage.php
+++ b/
includes/CategoryPage.php
@@
-215,7
+215,7
@@
class CategoryViewer {
array( 'page_title', 'page_namespace', 'page_len', 'page_is_redirect', 'cl_sortkey' ),
array( $pageCondition,
'cl_from = page_id',
array( 'page_title', 'page_namespace', 'page_len', 'page_is_redirect', 'cl_sortkey' ),
array( $pageCondition,
'cl_from = page_id',
- 'cl_to' => $this->title->getDB
K
ey()),
+ 'cl_to' => $this->title->getDB
k
ey()),
#'page_is_redirect' => 0),
#+ $pageCondition,
__METHOD__,
#'page_is_redirect' => 0),
#+ $pageCondition,
__METHOD__,
diff --git
a/includes/Revision.php
b/includes/Revision.php
index
80fc03c
..
05a4a68
100644
(file)
--- a/
includes/Revision.php
+++ b/
includes/Revision.php
@@
-47,7
+47,7
@@
class Revision {
array( "rev_id=$matchId",
'page_id=rev_page',
'page_namespace' => $title->getNamespace(),
array( "rev_id=$matchId",
'page_id=rev_page',
'page_namespace' => $title->getNamespace(),
- 'page_title' => $title->getD
b
key() ) );
+ 'page_title' => $title->getD
B
key() ) );
}
/**
}
/**
@@
-110,7
+110,7
@@
class Revision {
array( "rev_id=$matchId",
'page_id=rev_page',
'page_namespace' => $title->getNamespace(),
array( "rev_id=$matchId",
'page_id=rev_page',
'page_namespace' => $title->getNamespace(),
- 'page_title' => $title->getD
b
key() ) );
+ 'page_title' => $title->getD
B
key() ) );
}
/**
}
/**
@@
-131,7
+131,7
@@
class Revision {
array( 'rev_timestamp' => $db->timestamp( $timestamp ),
'page_id=rev_page',
'page_namespace' => $title->getNamespace(),
array( 'rev_timestamp' => $db->timestamp( $timestamp ),
'page_id=rev_page',
'page_namespace' => $title->getNamespace(),
- 'page_title' => $title->getD
b
key() ) );
+ 'page_title' => $title->getD
B
key() ) );
}
/**
}
/**
@@
-190,7
+190,7
@@
class Revision {
return Revision::fetchFromConds(
wfGetDB( DB_SLAVE ),
array( 'page_namespace' => $title->getNamespace(),
return Revision::fetchFromConds(
wfGetDB( DB_SLAVE ),
array( 'page_namespace' => $title->getNamespace(),
- 'page_title' => $title->getD
b
key(),
+ 'page_title' => $title->getD
B
key(),
'page_id=rev_page' ) );
}
'page_id=rev_page' ) );
}
@@
-209,7
+209,7
@@
class Revision {
wfGetDB( DB_SLAVE ),
array( 'rev_id=page_latest',
'page_namespace' => $title->getNamespace(),
wfGetDB( DB_SLAVE ),
array( 'rev_id=page_latest',
'page_namespace' => $title->getNamespace(),
- 'page_title' => $title->getD
b
key(),
+ 'page_title' => $title->getD
B
key(),
'page_id=rev_page' ) );
}
'page_id=rev_page' ) );
}
diff --git
a/includes/SearchEngine.php
b/includes/SearchEngine.php
index
11fc3de
..
9120da5
100644
(file)
--- a/
includes/SearchEngine.php
+++ b/
includes/SearchEngine.php
@@
-109,7
+109,7
@@
class SearchEngine {
# Entering an IP address goes to the contributions page
if ( ( $title->getNamespace() == NS_USER && User::isIP($title->getText() ) )
|| User::isIP( trim( $searchterm ) ) ) {
# Entering an IP address goes to the contributions page
if ( ( $title->getNamespace() == NS_USER && User::isIP($title->getText() ) )
|| User::isIP( trim( $searchterm ) ) ) {
- return SpecialPage::getTitleFor( 'Contributions', $title->getD
b
key() );
+ return SpecialPage::getTitleFor( 'Contributions', $title->getD
B
key() );
}
}
diff --git
a/includes/Skin.php
b/includes/Skin.php
index
9d00e1d
..
64d8b3e
100644
(file)
--- a/
includes/Skin.php
+++ b/
includes/Skin.php
@@
-310,7
+310,7
@@
class Skin extends Linker {
'wgScript' => $wgScript,
'wgServer' => $wgServer,
'wgCanonicalNamespace' => $nsname,
'wgScript' => $wgScript,
'wgServer' => $wgServer,
'wgCanonicalNamespace' => $nsname,
- 'wgCanonicalSpecialPageName' => SpecialPage::resolveAlias( $wgTitle->getDB
K
ey() ),
+ 'wgCanonicalSpecialPageName' => SpecialPage::resolveAlias( $wgTitle->getDB
k
ey() ),
'wgNamespaceNumber' => $wgTitle->getNamespace(),
'wgPageName' => $wgTitle->getPrefixedDBKey(),
'wgTitle' => $wgTitle->getText(),
'wgNamespaceNumber' => $wgTitle->getNamespace(),
'wgPageName' => $wgTitle->getPrefixedDBKey(),
'wgTitle' => $wgTitle->getText(),
@@
-1069,7
+1069,7
@@
END;
$dbr = wfGetDB( DB_SLAVE );
$watchlist = $dbr->tableName( 'watchlist' );
$sql = "SELECT COUNT(*) AS n FROM $watchlist
$dbr = wfGetDB( DB_SLAVE );
$watchlist = $dbr->tableName( 'watchlist' );
$sql = "SELECT COUNT(*) AS n FROM $watchlist
- WHERE wl_title='" . $dbr->strencode($wgTitle->getDB
K
ey()) .
+ WHERE wl_title='" . $dbr->strencode($wgTitle->getDB
k
ey()) .
"' AND wl_namespace=" . $wgTitle->getNamespace() ;
$res = $dbr->query( $sql, 'Skin::pageStats');
$x = $dbr->fetchObject( $res );
"' AND wl_namespace=" . $wgTitle->getNamespace() ;
$res = $dbr->query( $sql, 'Skin::pageStats');
$x = $dbr->fetchObject( $res );
diff --git
a/includes/SkinTemplate.php
b/includes/SkinTemplate.php
index
d013119
..
0178b86
100644
(file)
--- a/
includes/SkinTemplate.php
+++ b/
includes/SkinTemplate.php
@@
-344,7
+344,7
@@
class SkinTemplate extends Skin {
$dbr = wfGetDB( DB_SLAVE );
$watchlist = $dbr->tableName( 'watchlist' );
$sql = "SELECT COUNT(*) AS n FROM $watchlist
$dbr = wfGetDB( DB_SLAVE );
$watchlist = $dbr->tableName( 'watchlist' );
$sql = "SELECT COUNT(*) AS n FROM $watchlist
- WHERE wl_title='" . $dbr->strencode($this->mTitle->getDB
K
ey()) .
+ WHERE wl_title='" . $dbr->strencode($this->mTitle->getDB
k
ey()) .
"' AND wl_namespace=" . $this->mTitle->getNamespace() ;
$res = $dbr->query( $sql, 'SkinTemplate::outputPage');
$x = $dbr->fetchObject( $res );
"' AND wl_namespace=" . $this->mTitle->getNamespace() ;
$res = $dbr->query( $sql, 'SkinTemplate::outputPage');
$x = $dbr->fetchObject( $res );
diff --git
a/includes/SpecialExport.php
b/includes/SpecialExport.php
index
12bd4d5
..
71eb122
100644
(file)
--- a/
includes/SpecialExport.php
+++ b/
includes/SpecialExport.php
@@
-24,7
+24,7
@@
function wfExportGetPagesFromCategory( $title ) {
global $wgContLang;
function wfExportGetPagesFromCategory( $title ) {
global $wgContLang;
- $name = $title->getDB
K
ey();
+ $name = $title->getDB
k
ey();
$dbr = wfGetDB( DB_SLAVE );
$dbr = wfGetDB( DB_SLAVE );
diff --git
a/includes/SpecialRecentchangeslinked.php
b/includes/SpecialRecentchangeslinked.php
index
ffb0a4d
..
9bf957f
100644
(file)
--- a/
includes/SpecialRecentchangeslinked.php
+++ b/
includes/SpecialRecentchangeslinked.php
@@
-76,7
+76,7
@@
function wfSpecialRecentchangeslinked( $par = NULL ) {
// If target is a Category, use categorylinks and invert from and to
if( $nt->getNamespace() == NS_CATEGORY ) {
// If target is a Category, use categorylinks and invert from and to
if( $nt->getNamespace() == NS_CATEGORY ) {
- $catkey = $dbr->addQuotes( $nt->getDB
K
ey() );
+ $catkey = $dbr->addQuotes( $nt->getDB
k
ey() );
$sql = "SELECT /* wfSpecialRecentchangeslinked */
rc_id,
rc_cur_id,
$sql = "SELECT /* wfSpecialRecentchangeslinked */
rc_id,
rc_cur_id,
diff --git
a/includes/SpecialUndelete.php
b/includes/SpecialUndelete.php
index
1fe11c1
..
a64cfc2
100644
(file)
--- a/
includes/SpecialUndelete.php
+++ b/
includes/SpecialUndelete.php
@@
-57,7
+57,7
@@
class PageArchive {
$title = Title::newFromText( $prefix );
if( $title ) {
$ns = $title->getNamespace();
$title = Title::newFromText( $prefix );
if( $title ) {
$ns = $title->getNamespace();
- $encPrefix = $dbr->escapeLike( $title->getD
bK
ey() );
+ $encPrefix = $dbr->escapeLike( $title->getD
Bk
ey() );
} else {
// Prolly won't work too good
// @todo handle bare namespace names cleanly?
} else {
// Prolly won't work too good
// @todo handle bare namespace names cleanly?
@@
-132,7
+132,7
@@
class PageArchive {
'fa_user',
'fa_user_text',
'fa_timestamp' ),
'fa_user',
'fa_user_text',
'fa_timestamp' ),
- array( 'fa_name' => $this->title->getD
bK
ey() ),
+ array( 'fa_name' => $this->title->getD
Bk
ey() ),
__METHOD__,
array( 'ORDER BY' => 'fa_timestamp DESC' ) );
$ret = $dbr->resultObject( $res );
__METHOD__,
array( 'ORDER BY' => 'fa_timestamp DESC' ) );
$ret = $dbr->resultObject( $res );
@@
-174,7
+174,7
@@
class PageArchive {
'ar_text_id',
'ar_len' ),
array( 'ar_namespace' => $this->title->getNamespace(),
'ar_text_id',
'ar_len' ),
array( 'ar_namespace' => $this->title->getNamespace(),
- 'ar_title' => $this->title->getD
b
key(),
+ 'ar_title' => $this->title->getD
B
key(),
'ar_timestamp' => $dbr->timestamp( $timestamp ) ),
__METHOD__ );
if( $row ) {
'ar_timestamp' => $dbr->timestamp( $timestamp ) ),
__METHOD__ );
if( $row ) {
@@
-212,7
+212,7
@@
class PageArchive {
$row = $dbr->selectRow( 'archive',
'ar_timestamp',
array( 'ar_namespace' => $this->title->getNamespace(),
$row = $dbr->selectRow( 'archive',
'ar_timestamp',
array( 'ar_namespace' => $this->title->getNamespace(),
- 'ar_title' => $this->title->getD
b
key(),
+ 'ar_title' => $this->title->getD
B
key(),
'ar_timestamp < ' .
$dbr->addQuotes( $dbr->timestamp( $timestamp ) ) ),
__METHOD__,
'ar_timestamp < ' .
$dbr->addQuotes( $dbr->timestamp( $timestamp ) ) ),
__METHOD__,
@@
-225,7
+225,7
@@
class PageArchive {
array( 'rev_id', 'rev_timestamp' ),
array(
'page_namespace' => $this->title->getNamespace(),
array( 'rev_id', 'rev_timestamp' ),
array(
'page_namespace' => $this->title->getNamespace(),
- 'page_title' => $this->title->getD
b
key(),
+ 'page_title' => $this->title->getD
B
key(),
'page_id = rev_page',
'rev_timestamp < ' .
$dbr->addQuotes( $dbr->timestamp( $timestamp ) ) ),
'page_id = rev_page',
'rev_timestamp < ' .
$dbr->addQuotes( $dbr->timestamp( $timestamp ) ) ),
diff --git
a/includes/Title.php
b/includes/Title.php
index
18e87ce
..
32f6575
100644
(file)
--- a/
includes/Title.php
+++ b/
includes/Title.php
@@
-1263,7
+1263,7
@@
class Title {
$dbr = wfGetDB( DB_SLAVE );
$res = $dbr->select( 'protected_titles', '*',
$dbr = wfGetDB( DB_SLAVE );
$res = $dbr->select( 'protected_titles', '*',
- array ('pt_namespace' => $this->getNamespace(), 'pt_title' => $this->getDB
K
ey()) );
+ array ('pt_namespace' => $this->getNamespace(), 'pt_title' => $this->getDB
k
ey()) );
if ($row = $dbr->fetchRow( $res )) {
return $row;
if ($row = $dbr->fetchRow( $res )) {
return $row;
@@
-1281,7
+1281,7
@@
class Title {
return true;
}
return true;
}
- list ($namespace, $title) = array( $this->getNamespace(), $this->getDB
K
ey() );
+ list ($namespace, $title) = array( $this->getNamespace(), $this->getDB
k
ey() );
$dbw = wfGetDB( DB_MASTER );
$dbw = wfGetDB( DB_MASTER );
@@
-1323,7
+1323,7
@@
class Title {
$dbw = wfGetDB( DB_MASTER );
$dbw->delete( 'protected_titles',
$dbw = wfGetDB( DB_MASTER );
$dbw->delete( 'protected_titles',
- array ('pt_namespace' => $this->getNamespace(), 'pt_title' => $this->getDB
K
ey()), __METHOD__ );
+ array ('pt_namespace' => $this->getNamespace(), 'pt_title' => $this->getDB
k
ey()), __METHOD__ );
}
/**
}
/**
@@
-1419,7
+1419,7
@@
class Title {
* and check again
*/
if( $this->getNamespace() == NS_SPECIAL ) {
* and check again
*/
if( $this->getNamespace() == NS_SPECIAL ) {
- $name = $this->getDB
K
ey();
+ $name = $this->getDB
k
ey();
list( $name, /* $subpage */) = SpecialPage::resolveAliasWithSubpage( $name );
if ( $name === false ) {
# Invalid special page, but we show standard login required message
list( $name, /* $subpage */) = SpecialPage::resolveAliasWithSubpage( $name );
if ( $name === false ) {
# Invalid special page, but we show standard login required message
@@
-2766,7
+2766,7
@@
class Title {
// Note: === is necessary for proper matching of number-like titles.
return $this->getInterwiki() === $title->getInterwiki()
&& $this->getNamespace() == $title->getNamespace()
// Note: === is necessary for proper matching of number-like titles.
return $this->getInterwiki() === $title->getInterwiki()
&& $this->getNamespace() == $title->getNamespace()
- && $this->getD
bkey() === $title->getDb
key();
+ && $this->getD
Bkey() === $title->getDB
key();
}
/**
}
/**