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:
ecd99cb
)
Followup r96369: update child classes and a few callers
author
Chad Horohoe
<demon@users.mediawiki.org>
Tue, 6 Sep 2011 20:51:10 +0000
(20:51 +0000)
committer
Chad Horohoe
<demon@users.mediawiki.org>
Tue, 6 Sep 2011 20:51:10 +0000
(20:51 +0000)
includes/db/CloneDatabase.php
patch
|
blob
|
history
includes/db/DatabaseIbm_db2.php
patch
|
blob
|
history
includes/db/DatabaseOracle.php
patch
|
blob
|
history
includes/db/DatabasePostgres.php
patch
|
blob
|
history
includes/db/DatabaseSqlite.php
patch
|
blob
|
history
includes/search/SearchOracle.php
patch
|
blob
|
history
diff --git
a/includes/db/CloneDatabase.php
b/includes/db/CloneDatabase.php
index
3357268
..
f29e0b2
100644
(file)
--- a/
includes/db/CloneDatabase.php
+++ b/
includes/db/CloneDatabase.php
@@
-93,10
+93,10
@@
class CloneDatabase {
# fix back and forth so tableName() works right.
self::changePrefix( $this->oldTablePrefix );
# fix back and forth so tableName() works right.
self::changePrefix( $this->oldTablePrefix );
- $oldTableName = $this->db->tableName( $tbl,
false
);
+ $oldTableName = $this->db->tableName( $tbl,
'raw'
);
self::changePrefix( $this->newTablePrefix );
self::changePrefix( $this->newTablePrefix );
- $newTableName = $this->db->tableName( $tbl,
false
);
+ $newTableName = $this->db->tableName( $tbl,
'raw'
);
if( $this->dropCurrentTables && !in_array( $this->db->getType(), array( 'postgres' ) ) ) {
$this->db->dropTable( $tbl, __METHOD__ );
if( $this->dropCurrentTables && !in_array( $this->db->getType(), array( 'postgres' ) ) ) {
$this->db->dropTable( $tbl, __METHOD__ );
diff --git
a/includes/db/DatabaseIbm_db2.php
b/includes/db/DatabaseIbm_db2.php
index
147b9d5
..
056ad9b
100644
(file)
--- a/
includes/db/DatabaseIbm_db2.php
+++ b/
includes/db/DatabaseIbm_db2.php
@@
-748,7
+748,7
@@
class DatabaseIbm_db2 extends DatabaseBase {
* @param $name Boolean
* @return String
*/
* @param $name Boolean
* @return String
*/
- public function tableName( $name, $
quoted = true
) {
+ public function tableName( $name, $
format = 'quoted'
) {
// we want maximum compatibility with MySQL schema
return $name;
}
// we want maximum compatibility with MySQL schema
return $name;
}
diff --git
a/includes/db/DatabaseOracle.php
b/includes/db/DatabaseOracle.php
index
cdc25f7
..
fa7a86f
100644
(file)
--- a/
includes/db/DatabaseOracle.php
+++ b/
includes/db/DatabaseOracle.php
@@
-654,7
+654,7
@@
class DatabaseOracle extends DatabaseBase {
return $retval;
}
return $retval;
}
- function tableName( $name, $
quoted = true
) {
+ function tableName( $name, $
format = 'quoted'
) {
/*
Replace reserved words with better ones
Using uppercase because that's the only way Oracle can handle
/*
Replace reserved words with better ones
Using uppercase because that's the only way Oracle can handle
@@
-669,7
+669,7
@@
class DatabaseOracle extends DatabaseBase {
break;
}
break;
}
- return parent::tableName( strtoupper( $name ), $
quoted
);
+ return parent::tableName( strtoupper( $name ), $
format
);
}
function tableNameInternal( $name ) {
}
function tableNameInternal( $name ) {
diff --git
a/includes/db/DatabasePostgres.php
b/includes/db/DatabasePostgres.php
index
742a8b5
..
f0655b5
100644
(file)
--- a/
includes/db/DatabasePostgres.php
+++ b/
includes/db/DatabasePostgres.php
@@
-39,7
+39,7
@@
AND relname=%s
AND attname=%s;
SQL;
AND attname=%s;
SQL;
- $table = $db->tableName( $table,
false
);
+ $table = $db->tableName( $table,
'raw'
);
$res = $db->query(
sprintf( $q,
$db->addQuotes( $wgDBmwschema ),
$res = $db->query(
sprintf( $q,
$db->addQuotes( $wgDBmwschema ),
@@
-622,7
+622,7
@@
class DatabasePostgres extends DatabaseBase {
return $res;
}
return $res;
}
- function tableName( $name, $
quoted = true
) {
+ function tableName( $name, $
format = 'quoted'
) {
# Replace reserved words with better ones
switch( $name ) {
case 'user':
# Replace reserved words with better ones
switch( $name ) {
case 'user':
@@
-630,7
+630,7
@@
class DatabasePostgres extends DatabaseBase {
case 'text':
return 'pagecontent';
default:
case 'text':
return 'pagecontent';
default:
- return parent::tableName( $name, $
quoted
);
+ return parent::tableName( $name, $
format
);
}
}
}
}
@@
-737,7
+737,7
@@
class DatabasePostgres extends DatabaseBase {
if ( !$schema ) {
$schema = $wgDBmwschema;
}
if ( !$schema ) {
$schema = $wgDBmwschema;
}
- $table = $this->tableName( $table,
false
);
+ $table = $this->tableName( $table,
'raw'
);
$etable = $this->addQuotes( $table );
$eschema = $this->addQuotes( $schema );
$SQL = "SELECT 1 FROM pg_catalog.pg_class c, pg_catalog.pg_namespace n "
$etable = $this->addQuotes( $table );
$eschema = $this->addQuotes( $schema );
$SQL = "SELECT 1 FROM pg_catalog.pg_class c, pg_catalog.pg_namespace n "
diff --git
a/includes/db/DatabaseSqlite.php
b/includes/db/DatabaseSqlite.php
index
924fc87
..
b2eb1c6
100644
(file)
--- a/
includes/db/DatabaseSqlite.php
+++ b/
includes/db/DatabaseSqlite.php
@@
-319,15
+319,15
@@
class DatabaseSqlite extends DatabaseBase {
* Use MySQL's naming (accounts for prefix etc) but remove surrounding backticks
*
* @param $name
* Use MySQL's naming (accounts for prefix etc) but remove surrounding backticks
*
* @param $name
- * @param
bool $quoted
+ * @param
$format String
* @return string
*/
* @return string
*/
- function tableName( $name, $
quoted = true
) {
+ function tableName( $name, $
format = 'quoted'
) {
// table names starting with sqlite_ are reserved
if ( strpos( $name, 'sqlite_' ) === 0 ) {
return $name;
}
// table names starting with sqlite_ are reserved
if ( strpos( $name, 'sqlite_' ) === 0 ) {
return $name;
}
- return str_replace( '"', '', parent::tableName( $name, $
quoted
) );
+ return str_replace( '"', '', parent::tableName( $name, $
format
) );
}
/**
}
/**
diff --git
a/includes/search/SearchOracle.php
b/includes/search/SearchOracle.php
index
85337ca
..
2d6fc3e
100644
(file)
--- a/
includes/search/SearchOracle.php
+++ b/
includes/search/SearchOracle.php
@@
-257,9
+257,9
@@
class SearchOracle extends SearchEngine {
// ALTER SESSION SET CURRENT_SCHEMA = ...
// was used.
$dbw->query( "CALL ctx_ddl.sync_index(" .
// ALTER SESSION SET CURRENT_SCHEMA = ...
// was used.
$dbw->query( "CALL ctx_ddl.sync_index(" .
- $dbw->addQuotes( $dbw->getDBname() . '.' . $dbw->tableName( 'si_text_idx',
false
) ) . ")" );
+ $dbw->addQuotes( $dbw->getDBname() . '.' . $dbw->tableName( 'si_text_idx',
'raw'
) ) . ")" );
$dbw->query( "CALL ctx_ddl.sync_index(" .
$dbw->query( "CALL ctx_ddl.sync_index(" .
- $dbw->addQuotes( $dbw->getDBname() . '.' . $dbw->tableName( 'si_title_idx',
false
) ) . ")" );
+ $dbw->addQuotes( $dbw->getDBname() . '.' . $dbw->tableName( 'si_title_idx',
'raw'
) ) . ")" );
}
/**
}
/**