global $wgUseSharedUploads, $wgSharedUploadDBname, $wgSharedUploadDBprefix, $wgContLang;
wfProfileIn( __METHOD__ );
- $dbr =& wfGetDB( DB_SLAVE );
+ $dbr = wfGetDB( DB_SLAVE );
$this->checkDBSchema($dbr);
$row = $dbr->selectRow( 'image',
# capitalize the first letter of the filename before
# looking it up in the shared repository.
$name = $wgContLang->ucfirst($this->name);
- $dbc =& wfGetDB( DB_SLAVE, 'commons' );
+ $dbc = wfGetDB( DB_SLAVE, 'commons' );
$row = $dbc->selectRow( "`$wgSharedUploadDBname`.{$wgSharedUploadDBprefix}image",
array(
// Write to the other DB using selectDB, not database selectors
// This avoids breaking replication in MySQL
- $dbw =& wfGetDB( DB_MASTER, 'commons' );
+ $dbw = wfGetDB( DB_MASTER, 'commons' );
$dbw->selectDB( $wgSharedUploadDBname );
} else {
- $dbw =& wfGetDB( DB_MASTER );
+ $dbw = wfGetDB( DB_MASTER );
}
$this->checkDBSchema($dbw);
* @public
*/
function nextHistoryLine() {
- $dbr =& wfGetDB( DB_SLAVE );
+ $dbr = wfGetDB( DB_SLAVE );
$this->checkDBSchema($dbr);
function recordUpload( $oldver, $desc, $license = '', $copyStatus = '', $source = '', $watch = false ) {
global $wgUser, $wgUseCopyrightUpload;
- $dbw =& wfGetDB( DB_MASTER );
+ $dbw = wfGetDB( DB_MASTER );
$this->checkDBSchema($dbw);
wfProfileIn( __METHOD__ );
if ( $options ) {
- $db =& wfGetDB( DB_MASTER );
+ $db = wfGetDB( DB_MASTER );
} else {
- $db =& wfGetDB( DB_SLAVE );
+ $db = wfGetDB( DB_SLAVE );
}
$linkCache =& LinkCache::singleton();
}
# Update EXIF data in database
- $dbw =& wfGetDB( DB_MASTER );
+ $dbw = wfGetDB( DB_MASTER );
$this->checkDBSchema($dbw);
$this->purgeMetadataCache();
# Update metadata in the database
- $dbw =& wfGetDB( DB_MASTER );
+ $dbw = wfGetDB( DB_MASTER );
$dbw->update( 'image',
array( 'img_metadata' => $this->metadata ),
array( 'img_name' => $this->name ),