Index: trunk/extensions/CategoryWatch/CategoryWatch.php |
— | — | @@ -44,7 +44,7 @@ |
45 | 45 | */ |
46 | 46 | function onArticleSave(&$article, &$user, &$text) { |
47 | 47 | $this->before = array(); |
48 | | - $dbr = &wfGetDB(DB_SLAVE); |
| 48 | + $dbr = wfGetDB(DB_SLAVE); |
49 | 49 | $cl = $dbr->tableName('categorylinks'); |
50 | 50 | $id = $article->getID(); |
51 | 51 | $res = $dbr->select($cl, 'cl_to', "cl_from = $id", __METHOD__, array('ORDER BY' => 'cl_sortkey')); |
— | — | @@ -60,7 +60,7 @@ |
61 | 61 | |
62 | 62 | # Get cats after update |
63 | 63 | $this->after = array(); |
64 | | - $dbr = &wfGetDB(DB_SLAVE); |
| 64 | + $dbr = wfGetDB(DB_SLAVE); |
65 | 65 | $cl = $dbr->tableName('categorylinks'); |
66 | 66 | $id = $article->getID(); |
67 | 67 | $res = $dbr->select($cl, 'cl_to', "cl_from = $id", __METHOD__, array('ORDER BY' => 'cl_sortkey')); |
Index: trunk/extensions/RecordAdmin/RecordAdmin_body.php |
— | — | @@ -58,7 +58,7 @@ |
59 | 59 | |
60 | 60 | # Get titles in 'recordadmin-category' (default: Category:Records) and build option list |
61 | 61 | $options = ''; |
62 | | - $dbr = &wfGetDB( DB_SLAVE ); |
| 62 | + $dbr = wfGetDB( DB_SLAVE ); |
63 | 63 | $cl = $dbr->tableName( 'categorylinks' ); |
64 | 64 | $cat = $dbr->addQuotes( wfMsgForContent( 'recordadmin-category' ) ); |
65 | 65 | $res = $dbr->select( $cl, 'cl_from', "cl_to = $cat", __METHOD__, array( 'ORDER BY' => 'cl_sortkey' ) ); |
— | — | @@ -187,7 +187,7 @@ |
188 | 188 | */ |
189 | 189 | function getRecords($type, $posted, $wpTitle = '', $invert = false, $orderby = 'created desc') { |
190 | 190 | $records = array(); |
191 | | - $dbr = &wfGetDB( DB_SLAVE ); |
| 191 | + $dbr = wfGetDB( DB_SLAVE ); |
192 | 192 | $tbl = $dbr->tableName( 'templatelinks' ); |
193 | 193 | $ty = $dbr->addQuotes( $type ); |
194 | 194 | $res = $dbr->select( $tbl, 'tl_from', "tl_namespace = 10 AND tl_title = $ty", __METHOD__ ); |
Index: trunk/extensions/PdfBook/PdfBook.php |
— | — | @@ -83,7 +83,7 @@ |
84 | 84 | else { |
85 | 85 | $articles = array(); |
86 | 86 | if ($title->getNamespace() == NS_CATEGORY) { |
87 | | - $db = &wfGetDB(DB_SLAVE); |
| 87 | + $db = wfGetDB(DB_SLAVE); |
88 | 88 | $cat = $db->addQuotes($title->getDBkey()); |
89 | 89 | $result = $db->select( |
90 | 90 | 'categorylinks', |
Index: trunk/extensions/Wikidata/php-tools/UMLSMainImport.php |
— | — | @@ -19,7 +19,7 @@ |
20 | 20 | $beginTime, $wgCommandLineMode, $wgUser, $numberOfBytes, $wdDefaultViewDataSet; |
21 | 21 | |
22 | 22 | function getUserId($real_name){ |
23 | | - $dbr = &wfGetDB(DB_SLAVE); |
| 23 | + $dbr = wfGetDB(DB_SLAVE); |
24 | 24 | $queryResult = $dbr->query( "SELECT user_id FROM user where user_real_name = '$real_name'" ); |
25 | 25 | if ( $row = $dbr->fetchObject( $queryResult ) ){ |
26 | 26 | return( $row->user_id ); |
Index: trunk/extensions/Wikidata/php-tools/DataImport.php |
— | — | @@ -21,7 +21,7 @@ |
22 | 22 | $beginTime, $wgCommandLineMode, $wgUser, $numberOfBytes, $wdDefaultViewDataSet; |
23 | 23 | |
24 | 24 | function getUserId($real_name){ |
25 | | - $dbr = &wfGetDB(DB_SLAVE); |
| 25 | + $dbr = wfGetDB(DB_SLAVE); |
26 | 26 | $queryResult = $dbr->query( "SELECT user_id FROM user where user_real_name = '$real_name'" ); |
27 | 27 | if ( $row = $dbr->fetchObject( $queryResult ) ){ |
28 | 28 | return( $row->user_id ); |
Index: trunk/extensions/Wikidata/php-tools/UMLSImport.php |
— | — | @@ -107,7 +107,7 @@ |
108 | 108 | } |
109 | 109 | |
110 | 110 | function loadIsoLanguages(){ |
111 | | - $dbr = &wfGetDB(DB_SLAVE); |
| 111 | + $dbr = wfGetDB(DB_SLAVE); |
112 | 112 | $sql = "select language_id, iso639_2 from language"; |
113 | 113 | |
114 | 114 | $languages = array(); |
Index: trunk/extensions/Wikidata/SpecialLanguages.php |
— | — | @@ -46,7 +46,7 @@ |
47 | 47 | if(!$action) { |
48 | 48 | $wgOut->addWikiText(wfMsg('langman_header')); |
49 | 49 | } else { |
50 | | - $dbr=&wfGetDB(DB_MASTER); |
| 50 | + $dbr=wfGetDB(DB_MASTER); |
51 | 51 | $langname=$wgRequest->getText('langname'); |
52 | 52 | $langiso6393=$wgRequest->getText('langiso6393'); |
53 | 53 | $langiso6392=$wgRequest->getText('langiso6392'); |
Index: trunk/extensions/Wikidata/Database scripts/Incremental/23 - Bootstrap class attribute meanings.php |
— | — | @@ -25,7 +25,7 @@ |
26 | 26 | $annotationMeaningName; |
27 | 27 | |
28 | 28 | function getUserId( $userName ){ |
29 | | - $dbr = &wfGetDB(DB_SLAVE); |
| 29 | + $dbr = wfGetDB(DB_SLAVE); |
30 | 30 | $result = $dbr->query( "select user_id from user where user_name = '$userName'" ); |
31 | 31 | if ( $row = $dbr->fetchObject( $result ) ){ |
32 | 32 | return $row->user_id; |
Index: trunk/extensions/Wikidata/Database scripts/Incremental/ReadPatch.php |
— | — | @@ -77,7 +77,7 @@ |
78 | 78 | } |
79 | 79 | |
80 | 80 | function getUserId( $userName ){ |
81 | | - $dbr = &wfGetDB(DB_SLAVE); |
| 81 | + $dbr = wfGetDB(DB_SLAVE); |
82 | 82 | $result = $dbr->query( "select user_id from user where user_name = '$userName'" ); |
83 | 83 | if ( $row = $dbr->fetchObject( $result ) ){ |
84 | 84 | return $row->user_id; |
— | — | @@ -174,4 +174,4 @@ |
175 | 175 | $wdDatabase->close(); |
176 | 176 | |
177 | 177 | |
178 | | -?> |
\ No newline at end of file |
| 178 | +?> |
Index: trunk/extensions/Wikidata/Database scripts/Convenience/RecreateIndexes.php |
— | — | @@ -34,7 +34,7 @@ |
35 | 35 | */ |
36 | 36 | function retrieve_datasets(){ |
37 | 37 | $prefixes = array(); |
38 | | - $dbr = &wfGetDB(DB_SLAVE); |
| 38 | + $dbr = wfGetDB(DB_SLAVE); |
39 | 39 | $queryResult = $dbr->query("select set_prefix from wikidata_sets"); |
40 | 40 | while ($datasetRecord = $dbr->fetchObject($queryResult) ) { |
41 | 41 | array_push( $prefixes, $datasetRecord->set_prefix ); |
Index: trunk/extensions/Wikidata/Database scripts/Convenience/Create wikidata.php |
— | — | @@ -75,7 +75,7 @@ |
76 | 76 | } |
77 | 77 | |
78 | 78 | function getUserId( $userName ){ |
79 | | - $dbr = &wfGetDB(DB_SLAVE); |
| 79 | + $dbr = wfGetDB(DB_SLAVE); |
80 | 80 | $result = $dbr->query( "select user_id from user where user_name = '$userName'" ); |
81 | 81 | if ( $row = $dbr->fetchObject( $result ) ){ |
82 | 82 | return $row->user_id; |
Index: trunk/extensions/Wikidata/Database scripts/Convenience/addcollection.php |
— | — | @@ -7,7 +7,7 @@ |
8 | 8 | |
9 | 9 | function getDatasets(){ |
10 | 10 | $datasets = array(); |
11 | | - $dbr = &wfGetDB(DB_SLAVE); |
| 11 | + $dbr = wfGetDB(DB_SLAVE); |
12 | 12 | $result = $dbr->query( "select set_prefix from wikidata_sets" ); |
13 | 13 | while ($record = $dbr->fetchObject($result)) { |
14 | 14 | array_push( $datasets, $record->set_prefix ); |
— | — | @@ -32,7 +32,7 @@ |
33 | 33 | } |
34 | 34 | |
35 | 35 | function getUserId( $userName ){ |
36 | | - $dbr = &wfGetDB(DB_SLAVE); |
| 36 | + $dbr = wfGetDB(DB_SLAVE); |
37 | 37 | $result = $dbr->query( "select user_id from user where user_name = '$userName'" ); |
38 | 38 | if ( $row = $dbr->fetchObject( $result ) ){ |
39 | 39 | return $row->user_id; |
— | — | @@ -51,7 +51,7 @@ |
52 | 52 | setUser( $userId ); |
53 | 53 | $datasets = getDatasets(); |
54 | 54 | |
55 | | -$dbr = &wfGetDB(DB_SLAVE); |
| 55 | +$dbr = wfGetDB(DB_SLAVE); |
56 | 56 | foreach( $datasets as $dataset ){ |
57 | 57 | foreach( $datasets as $otherdataset ){ |
58 | 58 | if ( $dataset != $otherdataset ){ |
— | — | @@ -62,4 +62,4 @@ |
63 | 63 | } |
64 | 64 | } |
65 | 65 | } |
66 | | -?> |
\ No newline at end of file |
| 66 | +?> |
Index: trunk/extensions/Wikidata/OmegaWiki/SpecialDatasearch.php |
— | — | @@ -172,7 +172,7 @@ |
173 | 173 | } |
174 | 174 | |
175 | 175 | function getSpellingRestriction($spelling, $tableColumn) { |
176 | | - $dbr = &wfGetDB(DB_SLAVE); |
| 176 | + $dbr = wfGetDB(DB_SLAVE); |
177 | 177 | |
178 | 178 | if (trim($spelling) != '') |
179 | 179 | return " AND " . $tableColumn . " LIKE " . $dbr->addQuotes("%$spelling%"); |
— | — | @@ -188,7 +188,7 @@ |
189 | 189 | } |
190 | 190 | |
191 | 191 | function getPositionSelectColumn($spelling, $tableColumn) { |
192 | | - $dbr = &wfGetDB(DB_SLAVE); |
| 192 | + $dbr = wfGetDB(DB_SLAVE); |
193 | 193 | |
194 | 194 | if (trim($spelling) != '') |
195 | 195 | return "INSTR(LCASE(" . $tableColumn . "), LCASE(". $dbr->addQuotes("$spelling") .")) as position, "; |
— | — | @@ -198,7 +198,7 @@ |
199 | 199 | |
200 | 200 | function searchWords($text, $collectionId, $languageId) { |
201 | 201 | $dc=wdGetDataSetContext(); |
202 | | - $dbr = &wfGetDB(DB_SLAVE); |
| 202 | + $dbr = wfGetDB(DB_SLAVE); |
203 | 203 | |
204 | 204 | $sql = |
205 | 205 | "SELECT ". $this->getPositionSelectColumn($text, "{$dc}_expression.spelling") ." {$dc}_syntrans.defined_meaning_id AS defined_meaning_id, {$dc}_expression.spelling AS spelling, {$dc}_expression.language_id AS language_id ". |
— | — | @@ -274,7 +274,7 @@ |
275 | 275 | |
276 | 276 | function searchExternalIdentifiers($text, $collectionId) { |
277 | 277 | $dc=wdGetDataSetContext(); |
278 | | - $dbr = &wfGetDB(DB_SLAVE); |
| 278 | + $dbr = wfGetDB(DB_SLAVE); |
279 | 279 | |
280 | 280 | $sql = |
281 | 281 | "SELECT ". $this->getPositionSelectColumn($text, "{$dc}_collection_contents.internal_member_id") ." {$dc}_collection_contents.member_mid AS member_mid, {$dc}_collection_contents.internal_member_id AS external_identifier, {$dc}_collection.collection_mid AS collection_mid ". |
Index: trunk/extensions/Wikidata/OmegaWiki/SpecialImportLangNames.php |
— | — | @@ -30,7 +30,7 @@ |
31 | 31 | return false; |
32 | 32 | } |
33 | 33 | |
34 | | - $dbr = &wfGetDB(DB_MASTER); |
| 34 | + $dbr = wfGetDB(DB_MASTER); |
35 | 35 | |
36 | 36 | /* Get collection ID for "ISO 639-3 codes" collection. */ |
37 | 37 | $sql = "SELECT collection_id FROM {$dc}_collection" . |
— | — | @@ -115,7 +115,7 @@ |
116 | 116 | |
117 | 117 | /* XXX: This is probably NOT the proper way to do this. It should be refactored. */ |
118 | 118 | function addDMsListToPage($content,$page) { |
119 | | - $dbr = &wfGetDB(DB_MASTER); |
| 119 | + $dbr = wfGetDB(DB_MASTER); |
120 | 120 | |
121 | 121 | /* Get ID of the page we want to put the list on. */ |
122 | 122 | $sql = 'SELECT page_id FROM page' . |
Index: trunk/extensions/Wikidata/OmegaWiki/SpecialAddCollection.php |
— | — | @@ -29,7 +29,7 @@ |
30 | 30 | return false; |
31 | 31 | } |
32 | 32 | |
33 | | - $dbr = &wfGetDB(DB_MASTER); |
| 33 | + $dbr = wfGetDB(DB_MASTER); |
34 | 34 | |
35 | 35 | if ($wgRequest->getText('collection')) { |
36 | 36 | require_once('WikiDataAPI.php'); |
Index: trunk/extensions/Wikidata/OmegaWiki/SpecialNeedsTranslation.php |
— | — | @@ -55,7 +55,7 @@ |
56 | 56 | require_once("Editor.php"); |
57 | 57 | require_once("WikiDataAPI.php"); |
58 | 58 | |
59 | | - $dbr = &wfGetDB(DB_SLAVE); |
| 59 | + $dbr = wfGetDB(DB_SLAVE); |
60 | 60 | |
61 | 61 | $sql = 'SELECT source_expression.expression_id AS source_expression_id, source_expression.language_id AS source_language_id, source_expression.spelling AS source_spelling, source_syntrans.defined_meaning_id AS source_defined_meaning_id' . |
62 | 62 | " FROM ({$dc}_syntrans source_syntrans, {$dc}_expression source_expression)"; |
Index: trunk/extensions/Wikidata/OmegaWiki/NeedsTranslationTo.php |
— | — | @@ -53,7 +53,7 @@ |
54 | 54 | $dc=wdGetDataSetContext(); |
55 | 55 | $o=OmegaWikiAttributes::getInstance(); |
56 | 56 | |
57 | | - $dbr = &wfGetDB(DB_SLAVE); |
| 57 | + $dbr = wfGetDB(DB_SLAVE); |
58 | 58 | $queryResult = $dbr->query("SELECT source_expression.expression_id AS source_expression_id, source_expression.language_id AS source_language_id, source_expression.spelling AS source_spelling, source_syntrans.defined_meaning_id AS source_defined_meaning_id" . |
59 | 59 | " FROM {$dc}_syntrans source_syntrans, {$dc}_expression source_expression" . |
60 | 60 | " WHERE source_syntrans.expression_id=source_expression.expression_id AND source_expression.language_id=$sourceLanguageId" . |
Index: trunk/extensions/Wikidata/OmegaWiki/SpecialTransaction.php |
— | — | @@ -445,7 +445,7 @@ |
446 | 446 | $recordSet = new ArrayRecordSet($o->translatedContentHistoryStructure, $o->translatedContentHistoryKeyStructure); |
447 | 447 | |
448 | 448 | if ($isLatest) { |
449 | | - $dbr = &wfGetDB(DB_SLAVE); |
| 449 | + $dbr = wfGetDB(DB_SLAVE); |
450 | 450 | $queryResult = $dbr->query( |
451 | 451 | "SELECT text_text, add_transaction_id, remove_transaction_id " . |
452 | 452 | " FROM {$dc}_translated_content, {$dc}_text" . |
— | — | @@ -488,7 +488,7 @@ |
489 | 489 | |
490 | 490 | $dc=wdGetDataSetContext(); |
491 | 491 | |
492 | | - $dbr = &wfGetDB(DB_SLAVE); |
| 492 | + $dbr = wfGetDB(DB_SLAVE); |
493 | 493 | $queryResult = $dbr->query( |
494 | 494 | "SELECT defined_meaning_id, translated_content_id, language_id, text_text, " . |
495 | 495 | getOperationSelectColumn("{$dc}_translated_content", $transactionId) . ', ' . |
— | — | @@ -523,7 +523,7 @@ |
524 | 524 | $o=OmegaWikiAttributes::getInstance(); |
525 | 525 | |
526 | 526 | $dc=wdGetDataSetContext(); |
527 | | - $dbr = &wfGetDB(DB_SLAVE); |
| 527 | + $dbr = wfGetDB(DB_SLAVE); |
528 | 528 | $queryResult = $dbr->query( |
529 | 529 | "SELECT meaning_mid, meaning_text_tcid, source_id, " . |
530 | 530 | getOperationSelectColumn("{$dc}_alt_meaningtexts", $transactionId) . ', ' . |
— | — | @@ -561,7 +561,7 @@ |
562 | 562 | $o=OmegaWikiAttributes::getInstance(); |
563 | 563 | |
564 | 564 | $dc=wdGetDataSetContext(); |
565 | | - $dbr = &wfGetDB(DB_SLAVE); |
| 565 | + $dbr = wfGetDB(DB_SLAVE); |
566 | 566 | $queryResult = $dbr->query( |
567 | 567 | "SELECT meaning_mid, translated_content_id, source_id, language_id, text_text, " . |
568 | 568 | getOperationSelectColumn("{$dc}_translated_content", $transactionId) . ', ' . |
— | — | @@ -599,7 +599,7 @@ |
600 | 600 | $o=OmegaWikiAttributes::getInstance(); |
601 | 601 | $dc=wdGetDataSetContext($dc); |
602 | 602 | |
603 | | - $dbr = &wfGetDB(DB_SLAVE); |
| 603 | + $dbr = wfGetDB(DB_SLAVE); |
604 | 604 | $queryResult = $dbr->query( |
605 | 605 | "SELECT syntrans_sid, defined_meaning_id, {$dc}_syntrans.expression_id, language_id, spelling, identical_meaning, " . |
606 | 606 | getOperationSelectColumn("{$dc}_syntrans", $transactionId) . ', ' . |
— | — | @@ -659,7 +659,7 @@ |
660 | 660 | |
661 | 661 | $dc=wdGetDataSetContext(); |
662 | 662 | |
663 | | - $dbr = &wfGetDB(DB_SLAVE); |
| 663 | + $dbr = wfGetDB(DB_SLAVE); |
664 | 664 | $queryResult = $dbr->query( |
665 | 665 | "SELECT relation_id, meaning1_mid, meaning2_mid, relationtype_mid, " . |
666 | 666 | getOperationSelectColumn("{$dc}_meaning_relations", $transactionId) . ', ' . |
— | — | @@ -692,7 +692,7 @@ |
693 | 693 | |
694 | 694 | $dc=wdGetDataSetContext(); |
695 | 695 | |
696 | | - $dbr = &wfGetDB(DB_SLAVE); |
| 696 | + $dbr = wfGetDB(DB_SLAVE); |
697 | 697 | $queryResult = $dbr->query( |
698 | 698 | "SELECT class_membership_id, class_mid, class_member_mid, " . |
699 | 699 | getOperationSelectColumn("{$dc}_class_membership", $transactionId) . ', ' . |
— | — | @@ -723,7 +723,7 @@ |
724 | 724 | $o=OmegaWikiAttributes::getInstance(); |
725 | 725 | |
726 | 726 | $dc=wdGetDataSetContext(); |
727 | | - $dbr = &wfGetDB(DB_SLAVE); |
| 727 | + $dbr = wfGetDB(DB_SLAVE); |
728 | 728 | $queryResult = $dbr->query( |
729 | 729 | "SELECT {$dc}_collection_contents.collection_id, collection_mid, member_mid, internal_member_id, " . |
730 | 730 | getOperationSelectColumn("{$dc}_collection_contents", $transactionId) . ', ' . |
— | — | @@ -758,7 +758,7 @@ |
759 | 759 | $o=OmegaWikiAttributes::getInstance(); |
760 | 760 | |
761 | 761 | $dc=wdGetDataSetContext(); |
762 | | - $dbr = &wfGetDB(DB_SLAVE); |
| 762 | + $dbr = wfGetDB(DB_SLAVE); |
763 | 763 | $queryResult = $dbr->query( |
764 | 764 | "SELECT object_id, class_mid, level_mid, attribute_mid, attribute_type, " . |
765 | 765 | getOperationSelectColumn("{$dc}_class_attributes", $transactionId) . ', ' . |
— | — | @@ -802,7 +802,7 @@ |
803 | 803 | $o=OmegaWikiAttributes::getInstance(); |
804 | 804 | |
805 | 805 | $dc=wdGetDataSetContext(); |
806 | | - $dbr = &wfGetDB(DB_SLAVE); |
| 806 | + $dbr = wfGetDB(DB_SLAVE); |
807 | 807 | $queryResult = $dbr->query( |
808 | 808 | "SELECT value_id, object_id, attribute_mid, url, label, " . |
809 | 809 | getOperationSelectColumn("{$dc}_url_attribute_values", $transactionId) . ', ' . |
— | — | @@ -834,7 +834,7 @@ |
835 | 835 | $o=OmegaWikiAttributes::getInstance(); |
836 | 836 | |
837 | 837 | $dc=wdGetDataSetContext(); |
838 | | - $dbr = &wfGetDB(DB_SLAVE); |
| 838 | + $dbr = wfGetDB(DB_SLAVE); |
839 | 839 | $queryResult = $dbr->query( |
840 | 840 | "SELECT value_id, object_id, attribute_mid, text, " . |
841 | 841 | getOperationSelectColumn("{$dc}_text_attribute_values", $transactionId) . ', ' . |
— | — | @@ -866,7 +866,7 @@ |
867 | 867 | $o=OmegaWikiAttributes::getInstance(); |
868 | 868 | |
869 | 869 | $dc=wdGetDataSetContext(); |
870 | | - $dbr = &wfGetDB(DB_SLAVE); |
| 870 | + $dbr = wfGetDB(DB_SLAVE); |
871 | 871 | $queryResult = $dbr->query( |
872 | 872 | "SELECT value_id, object_id, attribute_mid, value_tcid, " . |
873 | 873 | getOperationSelectColumn("{$dc}_translated_content_attribute_values", $transactionId) . ', ' . |
— | — | @@ -902,7 +902,7 @@ |
903 | 903 | $o=OmegaWikiAttributes::getInstance(); |
904 | 904 | |
905 | 905 | $dc=wdGetDataSetContext(); |
906 | | - $dbr = &wfGetDB(DB_SLAVE); |
| 906 | + $dbr = wfGetDB(DB_SLAVE); |
907 | 907 | $queryResult = $dbr->query( |
908 | 908 | "SELECT value_id, object_id, attribute_mid, translated_content_id, language_id, text_text, " . |
909 | 909 | getOperationSelectColumn("{$dc}_translated_content", $transactionId) . ', ' . |
— | — | @@ -1377,7 +1377,7 @@ |
1378 | 1378 | function getTranslatedContentFromHistory($translatedContentId, $languageId, $addTransactionId) { |
1379 | 1379 | |
1380 | 1380 | $dc=wdGetDataSetContext(); |
1381 | | - $dbr = &wfGetDB(DB_SLAVE); |
| 1381 | + $dbr = wfGetDB(DB_SLAVE); |
1382 | 1382 | $queryResult = $dbr->query( |
1383 | 1383 | "SELECT text_text " . |
1384 | 1384 | " FROM {$dc}_translated_content, {$dc}_text " . |
Index: trunk/extensions/Wikidata/OmegaWiki/WikiDataAPI.php |
— | — | @@ -79,7 +79,7 @@ |
80 | 80 | function newObjectId($table) { |
81 | 81 | $dc=wdGetDataSetContext(); |
82 | 82 | |
83 | | - $dbr = &wfGetDB(DB_MASTER); |
| 83 | + $dbr = wfGetDB(DB_MASTER); |
84 | 84 | $dbr->query("INSERT INTO {$dc}_objects (`table`, `UUID`) VALUES (". $dbr->addQuotes($table) . ", UUID())"); |
85 | 85 | |
86 | 86 | return $dbr->insertId(); |
— | — | @@ -88,7 +88,7 @@ |
89 | 89 | function getTableNameWithObjectId($objectId) { |
90 | 90 | $dc=wdGetDataSetContext(); |
91 | 91 | |
92 | | - $dbr = &wfGetDB(DB_SLAVE); |
| 92 | + $dbr = wfGetDB(DB_SLAVE); |
93 | 93 | $queryResult = $dbr->query( |
94 | 94 | "SELECT `table`" . |
95 | 95 | " FROM {$dc}_objects" . |
— | — | @@ -105,7 +105,7 @@ |
106 | 106 | |
107 | 107 | $dc=wdGetDataSetContext(); |
108 | 108 | |
109 | | - $dbr = &wfGetDB(DB_SLAVE); |
| 109 | + $dbr = wfGetDB(DB_SLAVE); |
110 | 110 | $sql = "SELECT expression_id FROM {$dc}_expression " . |
111 | 111 | 'WHERE spelling=binary '. $dbr->addQuotes($spelling) . ' AND language_id=' . $languageId . |
112 | 112 | ' AND '. getLatestTransactionRestriction("{$dc}_expression"); |
— | — | @@ -120,7 +120,7 @@ |
121 | 121 | |
122 | 122 | $expressionId = newObjectId("{$dc}_expression"); |
123 | 123 | |
124 | | - $dbr = &wfGetDB(DB_MASTER); |
| 124 | + $dbr = wfGetDB(DB_MASTER); |
125 | 125 | $spelling = $dbr->addQuotes($spelling); |
126 | 126 | |
127 | 127 | $dbr->query("INSERT INTO {$dc}_expression(expression_id, spelling, language_id, add_transaction_id) values($expressionId, $spelling, $languageId, ". getUpdateTransactionId() .")"); |
— | — | @@ -134,7 +134,7 @@ |
135 | 135 | |
136 | 136 | |
137 | 137 | function createPage($namespace, $title) { |
138 | | - $dbr = &wfGetDB(DB_MASTER); |
| 138 | + $dbr = wfGetDB(DB_MASTER); |
139 | 139 | $title = $dbr->addQuotes($title); |
140 | 140 | $timestamp = $dbr->timestamp(); |
141 | 141 | $sql = "select page_id from page where page_namespace = $namespace and page_title = $title"; |
— | — | @@ -152,7 +152,7 @@ |
153 | 153 | } |
154 | 154 | |
155 | 155 | function setPageLatestRevision($pageId, $latestRevision) { |
156 | | - $dbr = &wfGetDB(DB_MASTER); |
| 156 | + $dbr = wfGetDB(DB_MASTER); |
157 | 157 | $sql = "update page set page_latest=$latestRevision where page_id=$pageId"; |
158 | 158 | $dbr->query($sql); |
159 | 159 | } |
— | — | @@ -160,7 +160,7 @@ |
161 | 161 | global |
162 | 162 | $wgUser; |
163 | 163 | |
164 | | - $dbr = &wfGetDB(DB_MASTER); |
| 164 | + $dbr = wfGetDB(DB_MASTER); |
165 | 165 | $userId = $wgUser->getID(); |
166 | 166 | $userName = $dbr->addQuotes($wgUser->getName()); |
167 | 167 | $comment = $dbr->addQuotes($comment); |
— | — | @@ -221,7 +221,7 @@ |
222 | 222 | if ($synonymId == 0) |
223 | 223 | $synonymId = newObjectId("{$dc}_syntrans"); |
224 | 224 | |
225 | | - $dbr = &wfGetDB(DB_MASTER); |
| 225 | + $dbr = wfGetDB(DB_MASTER); |
226 | 226 | $identicalMeaningInteger = (int) $identicalMeaning; |
227 | 227 | $sql = "insert into {$dc}_syntrans(syntrans_sid, defined_meaning_id, expression_id, identical_meaning, add_transaction_id) ". |
228 | 228 | "values($synonymId, $definedMeaningId, $expressionId, $identicalMeaningInteger, ". getUpdateTransactionId() .")"; |
— | — | @@ -233,7 +233,7 @@ |
234 | 234 | $dataSet; |
235 | 235 | |
236 | 236 | $dc=wdGetDataSetContext(); |
237 | | - $dbr = &wfGetDB(DB_SLAVE); |
| 237 | + $dbr = wfGetDB(DB_SLAVE); |
238 | 238 | |
239 | 239 | $queryResult = $dbr->query( |
240 | 240 | selectLatest( |
— | — | @@ -255,7 +255,7 @@ |
256 | 256 | } |
257 | 257 | |
258 | 258 | function getMaximum($field, $table) { |
259 | | - $dbr = &wfGetDB(DB_SLAVE); |
| 259 | + $dbr = wfGetDB(DB_SLAVE); |
260 | 260 | $sql = "select max($field) as maximum from $table"; |
261 | 261 | $queryResult = $dbr->query($sql); |
262 | 262 | |
— | — | @@ -551,7 +551,7 @@ |
552 | 552 | |
553 | 553 | function createText($text) { |
554 | 554 | $dc=wdGetDataSetContext(); |
555 | | - $dbr = &wfGetDB(DB_MASTER); |
| 555 | + $dbr = wfGetDB(DB_MASTER); |
556 | 556 | $text = $dbr->addQuotes($text); |
557 | 557 | $sql = "insert into {$dc}_text(text_text) values($text)"; |
558 | 558 | $dbr->query($sql); |
— | — | @@ -562,7 +562,7 @@ |
563 | 563 | function createTranslatedContent($translatedContentId, $languageId, $textId) { |
564 | 564 | $dc=wdGetDataSetContext(); |
565 | 565 | |
566 | | - $dbr = &wfGetDB(DB_MASTER); |
| 566 | + $dbr = wfGetDB(DB_MASTER); |
567 | 567 | $sql = "insert into {$dc}_translated_content(translated_content_id,language_id,text_id,add_transaction_id) values($translatedContentId, $languageId, $textId, ". getUpdateTransactionId() .")"; |
568 | 568 | $dbr->query($sql); |
569 | 569 | |
— | — | @@ -577,7 +577,7 @@ |
578 | 578 | if (is_null($languageId)) |
579 | 579 | throw new Exception("languageId is null"); |
580 | 580 | |
581 | | - $dbr = &wfGetDB(DB_SLAVE); |
| 581 | + $dbr = wfGetDB(DB_SLAVE); |
582 | 582 | $queryResult = $dbr->query( |
583 | 583 | "SELECT translated_content_id" . |
584 | 584 | " FROM {$dc}_translated_content" . |
— | — | @@ -601,7 +601,7 @@ |
602 | 602 | |
603 | 603 | function getDefinedMeaningDefinitionId($definedMeaningId) { |
604 | 604 | $dc=wdGetDataSetContext(); |
605 | | - $dbr = &wfGetDB(DB_SLAVE); |
| 605 | + $dbr = wfGetDB(DB_SLAVE); |
606 | 606 | $queryResult = $dbr->query("SELECT meaning_text_tcid FROM {$dc}_defined_meaning WHERE defined_meaning_id=$definedMeaningId " . |
607 | 607 | " AND " . getLatestTransactionRestriction("{$dc}_defined_meaning")); |
608 | 608 | |
— | — | @@ -609,7 +609,7 @@ |
610 | 610 | } |
611 | 611 | |
612 | 612 | function updateDefinedMeaningDefinitionId($definedMeaningId, $definitionId) { |
613 | | - $dbr = &wfGetDB(DB_MASTER); |
| 613 | + $dbr = wfGetDB(DB_MASTER); |
614 | 614 | $dc=wdGetDataSetContext(); |
615 | 615 | $dbr->query("UPDATE {$dc}_defined_meaning SET meaning_text_tcid=$definitionId WHERE defined_meaning_id=$definedMeaningId" . |
616 | 616 | " AND " . getLatestTransactionRestriction("{$dc}_defined_meaning")); |
— | — | @@ -637,7 +637,7 @@ |
638 | 638 | |
639 | 639 | function createDefinedMeaningAlternativeDefinition($definedMeaningId, $translatedContentId, $sourceMeaningId) { |
640 | 640 | $dc=wdGetDataSetContext(); |
641 | | - $dbr = &wfGetDB(DB_MASTER); |
| 641 | + $dbr = wfGetDB(DB_MASTER); |
642 | 642 | $dbr->query("INSERT INTO {$dc}_alt_meaningtexts (meaning_mid, meaning_text_tcid, source_id, add_transaction_id) " . |
643 | 643 | "VALUES ($definedMeaningId, $translatedContentId, $sourceMeaningId, " . getUpdateTransactionId() . ")"); |
644 | 644 | } |
— | — | @@ -651,14 +651,14 @@ |
652 | 652 | |
653 | 653 | function removeTranslatedText($translatedContentId, $languageId) { |
654 | 654 | $dc=wdGetDataSetContext(); |
655 | | - $dbr = &wfGetDB(DB_MASTER); |
| 655 | + $dbr = wfGetDB(DB_MASTER); |
656 | 656 | $dbr->query("UPDATE {$dc}_translated_content SET remove_transaction_id=". getUpdateTransactionId() . |
657 | 657 | " WHERE translated_content_id=$translatedContentId AND language_id=$languageId AND remove_transaction_id IS NULL"); |
658 | 658 | } |
659 | 659 | |
660 | 660 | function removeTranslatedTexts($translatedContentId) { |
661 | 661 | $dc=wdGetDataSetContext(); |
662 | | - $dbr = &wfGetDB(DB_MASTER); |
| 662 | + $dbr = wfGetDB(DB_MASTER); |
663 | 663 | $dbr->query("UPDATE {$dc}_translated_content SET remove_transaction_id=". getUpdateTransactionId() . |
664 | 664 | " WHERE translated_content_id=$translatedContentId AND remove_transaction_id IS NULL"); |
665 | 665 | } |
— | — | @@ -672,7 +672,7 @@ |
673 | 673 | // removeTranslatedTexts($definitionId); |
674 | 674 | |
675 | 675 | $dc=wdGetDataSetContext(); |
676 | | - $dbr = &wfGetDB(DB_MASTER); |
| 676 | + $dbr = wfGetDB(DB_MASTER); |
677 | 677 | $dbr->query("UPDATE {$dc}_alt_meaningtexts SET remove_transaction_id=" . getUpdateTransactionId() . |
678 | 678 | " WHERE meaning_text_tcid=$definitionId AND meaning_mid=$definedMeaningId" . |
679 | 679 | " AND remove_transaction_id IS NULL"); |
— | — | @@ -687,7 +687,7 @@ |
688 | 688 | |
689 | 689 | function definedMeaningInCollection($definedMeaningId, $collectionId) { |
690 | 690 | $dc=wdGetDataSetContext(); |
691 | | - $dbr = &wfGetDB(DB_SLAVE); |
| 691 | + $dbr = wfGetDB(DB_SLAVE); |
692 | 692 | $queryResult = $dbr->query("SELECT collection_id FROM {$dc}_collection_contents WHERE collection_id=$collectionId AND member_mid=$definedMeaningId " . |
693 | 693 | "AND ". getLatestTransactionRestriction("{$dc}_collection_contents")); |
694 | 694 | |
— | — | @@ -696,7 +696,7 @@ |
697 | 697 | |
698 | 698 | function addDefinedMeaningToCollection($definedMeaningId, $collectionId, $internalId) { |
699 | 699 | $dc=wdGetDataSetContext(); |
700 | | - $dbr = &wfGetDB(DB_MASTER); |
| 700 | + $dbr = wfGetDB(DB_MASTER); |
701 | 701 | $dbr->query("INSERT INTO {$dc}_collection_contents(collection_id, member_mid, internal_member_id, add_transaction_id) " . |
702 | 702 | "VALUES ($collectionId, $definedMeaningId, ". $dbr->addQuotes($internalId) .", ". getUpdateTransactionId() .")"); |
703 | 703 | } |
— | — | @@ -708,7 +708,7 @@ |
709 | 709 | |
710 | 710 | function getDefinedMeaningFromCollection($collectionId, $internalMemberId) { |
711 | 711 | $dc=wdGetDataSetContext(); |
712 | | - $dbr = &wfGetDB(DB_SLAVE); |
| 712 | + $dbr = wfGetDB(DB_SLAVE); |
713 | 713 | $query = "SELECT member_mid FROM {$dc}_collection_contents WHERE collection_id=$collectionId AND internal_member_id=". $dbr->addQuotes($internalMemberId) . " AND " .getLatestTransactionRestriction("{$dc}_collection_contents"); |
714 | 714 | $queryResult = $dbr->query( $query ); |
715 | 715 | |
— | — | @@ -720,7 +720,7 @@ |
721 | 721 | |
722 | 722 | function removeDefinedMeaningFromCollection($definedMeaningId, $collectionId) { |
723 | 723 | $dc=wdGetDataSetContext(); |
724 | | - $dbr = &wfGetDB(DB_MASTER); |
| 724 | + $dbr = wfGetDB(DB_MASTER); |
725 | 725 | $dbr->query("UPDATE {$dc}_collection_contents SET remove_transaction_id=" . getUpdateTransactionId() . |
726 | 726 | " WHERE collection_id=$collectionId AND member_mid=$definedMeaningId AND remove_transaction_id IS NULL"); |
727 | 727 | } |
— | — | @@ -760,7 +760,7 @@ |
761 | 761 | $dc=wdGetDataSetContext(); |
762 | 762 | $collectionId = newObjectId("{$dc}_collection"); |
763 | 763 | |
764 | | - $dbr = &wfGetDB(DB_MASTER); |
| 764 | + $dbr = wfGetDB(DB_MASTER); |
765 | 765 | $dbr->query("INSERT INTO {$dc}_collection(collection_id, collection_mid, collection_type, add_transaction_id)" . |
766 | 766 | " VALUES($collectionId, $definedMeaningId, '$collectionType', ". getUpdateTransactionId() .")"); |
767 | 767 | |
— | — | @@ -774,7 +774,7 @@ |
775 | 775 | $definedMeaningId = newObjectId("{$dc}_defined_meaning"); |
776 | 776 | |
777 | 777 | //wfDebug( "addDefinedMeaning(): $definedMeaningId has to be inserted to the database $dc" ); |
778 | | - $dbr = &wfGetDB(DB_MASTER); |
| 778 | + $dbr = wfGetDB(DB_MASTER); |
779 | 779 | $dbr->query("INSERT INTO {$dc}_defined_meaning(defined_meaning_id, expression_id, add_transaction_id) values($definedMeaningId, $definingExpressionId, ". getUpdateTransactionId() .")"); |
780 | 780 | |
781 | 781 | //wfDebug( "addDefinedMeaning(): after $definedMeaningId has been inserted in the database" ); |
— | — | @@ -804,7 +804,7 @@ |
805 | 805 | |
806 | 806 | function createTextAttributeValue($textValueAttributeId, $objectId, $textAttributeId, $text) { |
807 | 807 | $dc=wdGetDataSetContext(); |
808 | | - $dbr = &wfGetDB(DB_MASTER); |
| 808 | + $dbr = wfGetDB(DB_MASTER); |
809 | 809 | $dbr->query( |
810 | 810 | "INSERT INTO {$dc}_text_attribute_values (value_id, object_id, attribute_mid, text, add_transaction_id) " . |
811 | 811 | "VALUES ($textValueAttributeId, $objectId, $textAttributeId, " . $dbr->addQuotes($text) . ", ". getUpdateTransactionId() .")" |
— | — | @@ -813,7 +813,7 @@ |
814 | 814 | |
815 | 815 | function removeTextAttributeValue($textValueAttributeId) { |
816 | 816 | $dc=wdGetDataSetContext(); |
817 | | - $dbr = &wfGetDB(DB_MASTER); |
| 817 | + $dbr = wfGetDB(DB_MASTER); |
818 | 818 | $dbr->query("UPDATE {$dc}_text_attribute_values SET remove_transaction_id=". getUpdateTransactionId() . |
819 | 819 | " WHERE value_id=$textValueAttributeId" . |
820 | 820 | " AND remove_transaction_id IS NULL"); |
— | — | @@ -827,7 +827,7 @@ |
828 | 828 | |
829 | 829 | function getTextValueAttribute($textValueAttributeId) { |
830 | 830 | $dc=wdGetDataSetContext(); |
831 | | - $dbr = &wfGetDB(DB_SLAVE); |
| 831 | + $dbr = wfGetDB(DB_SLAVE); |
832 | 832 | $queryResult = $dbr->query( |
833 | 833 | "SELECT object_id, attribute_mid, text" . |
834 | 834 | " FROM {$dc}_text_attribute_values" . |
— | — | @@ -846,7 +846,7 @@ |
847 | 847 | |
848 | 848 | function createLinkAttributeValue($linkValueAttributeId, $objectId, $linkAttributeId, $url, $label = "") { |
849 | 849 | $dc=wdGetDataSetContext(); |
850 | | - $dbr = &wfGetDB(DB_MASTER); |
| 850 | + $dbr = wfGetDB(DB_MASTER); |
851 | 851 | $dbr->query( |
852 | 852 | "INSERT INTO {$dc}_url_attribute_values (value_id, object_id, attribute_mid, url, label, add_transaction_id) " . |
853 | 853 | "VALUES ($linkValueAttributeId, $objectId, $linkAttributeId, " . $dbr->addQuotes($url) . ", " . $dbr->addQuotes($label) . ", ". getUpdateTransactionId() .")" |
— | — | @@ -855,7 +855,7 @@ |
856 | 856 | |
857 | 857 | function removeLinkAttributeValue($linkValueAttributeId) { |
858 | 858 | $dc=wdGetDataSetContext(); |
859 | | - $dbr = &wfGetDB(DB_MASTER); |
| 859 | + $dbr = wfGetDB(DB_MASTER); |
860 | 860 | $dbr->query( |
861 | 861 | "UPDATE {$dc}_url_attribute_values SET remove_transaction_id=". getUpdateTransactionId() . |
862 | 862 | " WHERE value_id=$linkValueAttributeId" . |
— | — | @@ -871,7 +871,7 @@ |
872 | 872 | |
873 | 873 | function getLinkValueAttribute($linkValueAttributeId) { |
874 | 874 | $dc=wdGetDataSetContext(); |
875 | | - $dbr = &wfGetDB(DB_SLAVE); |
| 875 | + $dbr = wfGetDB(DB_SLAVE); |
876 | 876 | $queryResult = $dbr->query( |
877 | 877 | "SELECT object_id, attribute_mid, url" . |
878 | 878 | " FROM {$dc}_url_attribute_values WHERE value_id=$linkValueAttributeId " . |
— | — | @@ -883,7 +883,7 @@ |
884 | 884 | |
885 | 885 | function createTranslatedTextAttributeValue($valueId, $objectId, $attributeId, $translatedContentId) { |
886 | 886 | $dc=wdGetDataSetContext(); |
887 | | - $dbr = &wfGetDB(DB_MASTER); |
| 887 | + $dbr = wfGetDB(DB_MASTER); |
888 | 888 | $dbr->query("INSERT INTO {$dc}_translated_content_attribute_values (value_id, object_id, attribute_mid, value_tcid, add_transaction_id) " . |
889 | 889 | "VALUES ($valueId, $objectId, $attributeId, $translatedContentId, ". getUpdateTransactionId() .")"); |
890 | 890 | } |
— | — | @@ -899,7 +899,7 @@ |
900 | 900 | |
901 | 901 | function getTranslatedTextAttribute($valueId) { |
902 | 902 | $dc=wdGetDataSetContext(); |
903 | | - $dbr = &wfGetDB(DB_SLAVE); |
| 903 | + $dbr = wfGetDB(DB_SLAVE); |
904 | 904 | $queryResult = $dbr->query("SELECT value_id, object_id, attribute_mid, value_tcid FROM {$dc}_translated_content_attribute_values WHERE value_id=$valueId " . |
905 | 905 | " AND " . getLatestTransactionRestriction("{$dc}_translated_content_attribute_values")); |
906 | 906 | |
— | — | @@ -917,7 +917,7 @@ |
918 | 918 | // back easier. |
919 | 919 | // removeTranslatedTexts($translatedTextAttribute->value_tcid); |
920 | 920 | |
921 | | - $dbr = &wfGetDB(DB_MASTER); |
| 921 | + $dbr = wfGetDB(DB_MASTER); |
922 | 922 | $dbr->query( |
923 | 923 | "UPDATE {$dc}_translated_content_attribute_values" . |
924 | 924 | " SET remove_transaction_id=". getUpdateTransactionId() . |
— | — | @@ -1284,7 +1284,7 @@ |
1285 | 1285 | } |
1286 | 1286 | |
1287 | 1287 | function getMapping( $dc, $collid, $dm_id ){ |
1288 | | - $dbr = &wfGetDB(DB_SLAVE); |
| 1288 | + $dbr = wfGetDB(DB_SLAVE); |
1289 | 1289 | $queryResult = $dbr->query( "select internal_member_id from {$dc}_collection_contents where collection_id = $collid AND member_mid = $dm_id" ); |
1290 | 1290 | if ( $record = $dbr->fetchObject($queryResult) ){ |
1291 | 1291 | return $record->internal_member_id; |
Index: trunk/extensions/Wikidata/OmegaWiki/Search.php |
— | — | @@ -25,7 +25,7 @@ |
26 | 26 | |
27 | 27 | function searchText($text) { |
28 | 28 | $dc=wdGetDataSetContext(); |
29 | | - $dbr = &wfGetDB(DB_SLAVE); |
| 29 | + $dbr = wfGetDB(DB_SLAVE); |
30 | 30 | |
31 | 31 | $sql = "SELECT INSTR(LCASE({$dc}_expression.spelling), LCASE(". $dbr->addQuotes("$text") .")) as position, {$dc}_syntrans.defined_meaning_id AS defined_meaning_id, {$dc}_expression.spelling AS spelling, {$dc}_expression.language_id AS language_id ". |
32 | 32 | "FROM {$dc}_expression, {$dc}_syntrans ". |
Index: trunk/extensions/Wikidata/OmegaWiki/languages.php |
— | — | @@ -18,7 +18,7 @@ |
19 | 19 | indicated by $code, with fallbacks in English where the language names |
20 | 20 | aren't present in that language. */ |
21 | 21 | function getLangNames($code) { |
22 | | - $dbr = &wfGetDB(DB_SLAVE); |
| 22 | + $dbr = wfGetDB(DB_SLAVE); |
23 | 23 | $names = array(); |
24 | 24 | $sql = getSQLForLanguageNames($code); |
25 | 25 | $lang_res = $dbr->query($sql); |
— | — | @@ -104,7 +104,7 @@ |
105 | 105 | } |
106 | 106 | |
107 | 107 | function getLanguageIdForName($name) { |
108 | | - $dbr = &wfGetDB(DB_SLAVE); |
| 108 | + $dbr = wfGetDB(DB_SLAVE); |
109 | 109 | $queryResult = $dbr->query("SELECT language_id FROM language_names WHERE language_name=".$dbr->addQuotes($name)); |
110 | 110 | |
111 | 111 | if ($languageId = $dbr->fetchObject($queryResult)) |
Index: trunk/extensions/Wikidata/OmegaWiki/Alert.php |
— | — | @@ -16,7 +16,7 @@ |
17 | 17 | |
18 | 18 | function getDefinedMeaning( $dc, $textId ){ |
19 | 19 | // translate the text id to a translated text id |
20 | | - $dbr = &wfGetDB(DB_SLAVE); |
| 20 | + $dbr = wfGetDB(DB_SLAVE); |
21 | 21 | $queryResult = $dbr->query( "select translated_content_id from {$dc}_translated_content where text_id = $textId and remove_transaction_id is NULL" ); |
22 | 22 | if ( $row = $dbr->fetchObject( $queryResult ) ){ |
23 | 23 | $tcid = $row->translated_content_id; |
— | — | @@ -52,7 +52,7 @@ |
53 | 53 | function getInternalIdentifier( $dc, $definedMeaningId, $languageId ){ |
54 | 54 | $collectionName = "uw"; |
55 | 55 | |
56 | | - $dbr = &wfGetDB(DB_SLAVE); |
| 56 | + $dbr = wfGetDB(DB_SLAVE); |
57 | 57 | $query = "SELECT collection_id, internal_member_id FROM {$dc}_collection_contents where member_mid = $definedMeaningId"; |
58 | 58 | $queryResult = $dbr->query( "SELECT collection_id, internal_member_id FROM {$dc}_collection_contents where member_mid = $definedMeaningId" ); |
59 | 59 | if ( $row = $dbr->fetchObject( $queryResult ) ){ |
— | — | @@ -81,7 +81,7 @@ |
82 | 82 | } |
83 | 83 | |
84 | 84 | function getTextForId( $dc, $text_id ){ |
85 | | - $dbr = &wfGetDB(DB_SLAVE); |
| 85 | + $dbr = wfGetDB(DB_SLAVE); |
86 | 86 | $textResult = $dbr->query( "select text_text from {$dc}_text where text_id = $text_id" ); |
87 | 87 | if ( $textRecord = $dbr->fetchObject($textResult) ){ |
88 | 88 | return $textRecord->text_text; |
— | — | @@ -92,7 +92,7 @@ |
93 | 93 | } |
94 | 94 | |
95 | 95 | function getDefinedMeaningTitle( $dc, $definedMeaningId ){ |
96 | | - $dbr = &wfGetDB(DB_SLAVE); |
| 96 | + $dbr = wfGetDB(DB_SLAVE); |
97 | 97 | $result = $dbr->query( "SELECT meaning_text_tcid FROM {$dc}_defined_meaning where defined_meaning_id = $definedMeaningId" ); |
98 | 98 | if ( $record = $dbr->fetchObject($result) ){ |
99 | 99 | $result = $dbr->query( "SELECT text_id FROM {$dc}_translated_content where translated_content_id = $record->meaning_text_tcid and remove_transaction_id IS NULL" ); |
— | — | @@ -104,7 +104,7 @@ |
105 | 105 | } |
106 | 106 | |
107 | 107 | function getUser( $user_id ){ |
108 | | - $dbr = &wfGetDB(DB_SLAVE); |
| 108 | + $dbr = wfGetDB(DB_SLAVE); |
109 | 109 | $queryResult = $dbr->query( "SELECT user_name FROM `user` u where user_id = $user_id" ); |
110 | 110 | if ( $row = $dbr->fetchObject( $queryResult ) ){ |
111 | 111 | return $row->user_name; |
— | — | @@ -150,7 +150,7 @@ |
151 | 151 | $endClause = ""; |
152 | 152 | } |
153 | 153 | |
154 | | -$dbr = &wfGetDB(DB_SLAVE); |
| 154 | +$dbr = wfGetDB(DB_SLAVE); |
155 | 155 | |
156 | 156 | $queryResult = $dbr->query( "select language_id from language where wikimedia_key='en'" ); |
157 | 157 | $languageId = $dbr->fetchObject($queryResult)->language_id; |
— | — | @@ -191,4 +191,4 @@ |
192 | 192 | } |
193 | 193 | |
194 | 194 | |
195 | | -?> |
\ No newline at end of file |
| 195 | +?> |
Index: trunk/extensions/Wikidata/OmegaWiki/Editor.php |
— | — | @@ -2262,7 +2262,7 @@ |
2263 | 2263 | |
2264 | 2264 | protected function resolveRelation($objectId) { |
2265 | 2265 | $dc=wdGetDataSetContext(); |
2266 | | - $dbr = &wfGetDB(DB_SLAVE); |
| 2266 | + $dbr = wfGetDB(DB_SLAVE); |
2267 | 2267 | $queryResult = $dbr->query( |
2268 | 2268 | "SELECT meaning1_mid, relationtype_mid, meaning2_mid" . |
2269 | 2269 | " FROM {$dc}_meaning_relations" . |
— | — | @@ -2279,7 +2279,7 @@ |
2280 | 2280 | } |
2281 | 2281 | |
2282 | 2282 | protected function resolveAttribute($objectId, $tableName) { |
2283 | | - $dbr = &wfGetDB(DB_SLAVE); |
| 2283 | + $dbr = wfGetDB(DB_SLAVE); |
2284 | 2284 | $queryResult = $dbr->query( |
2285 | 2285 | "SELECT object_id, attribute_mid" . |
2286 | 2286 | " FROM " . $tableName . |
— | — | @@ -2296,7 +2296,7 @@ |
2297 | 2297 | |
2298 | 2298 | protected function resolveTranslatedContent($objectId) { |
2299 | 2299 | $dc=wdGetDataSetContext(); |
2300 | | - $dbr = &wfGetDB(DB_SLAVE); |
| 2300 | + $dbr = wfGetDB(DB_SLAVE); |
2301 | 2301 | $queryResult = $dbr->query( |
2302 | 2302 | "SELECT defined_meaning_id" . |
2303 | 2303 | " FROM {$dc}_defined_meaning" . |
— | — | @@ -2312,7 +2312,7 @@ |
2313 | 2313 | |
2314 | 2314 | protected function resolveSyntrans($objectId) { |
2315 | 2315 | $dc=wdGetDataSetContext(); |
2316 | | - $dbr = &wfGetDB(DB_SLAVE); |
| 2316 | + $dbr = wfGetDB(DB_SLAVE); |
2317 | 2317 | $queryResult = $dbr->query( |
2318 | 2318 | "SELECT spelling, defined_meaning_id" . |
2319 | 2319 | " FROM {$dc}_syntrans, {$dc}_expression" . |
Index: trunk/extensions/SimpleSecurity/SimpleSecurity.php |
— | — | @@ -346,7 +346,7 @@ |
347 | 347 | |
348 | 348 | # If processing first category rule, build a list of cats this article belongs to |
349 | 349 | if (count($cats) == 0) { |
350 | | - $dbr = &wfGetDB(DB_SLAVE); |
| 350 | + $dbr = wfGetDB(DB_SLAVE); |
351 | 351 | $cl = $dbr->tableName('categorylinks'); |
352 | 352 | $id = $title->getArticleID(); |
353 | 353 | $res = $dbr->select($cl, 'cl_to', "cl_from = '$id'", __METHOD__, array('ORDER BY' => 'cl_sortkey')); |
Index: trunk/extensions/EmailPage/EmailPage_body.php |
— | — | @@ -165,7 +165,7 @@ |
166 | 166 | return false; |
167 | 167 | } |
168 | 168 | |
169 | | - $db = &wfGetDB(DB_SLAVE); |
| 169 | + $db = wfGetDB(DB_SLAVE); |
170 | 170 | $title = Title::newFromText($this->title); |
171 | 171 | $opt = new ParserOptions; |
172 | 172 | |