mirror of
				https://github.com/diocloid/LinkTitles.git
				synced 2025-10-22 05:42:32 +02:00 
			
		
		
		
	@@ -24,6 +24,8 @@
 | 
				
			|||||||
 */
 | 
					 */
 | 
				
			||||||
namespace LinkTitles;
 | 
					namespace LinkTitles;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					use MediaWiki\MediaWikiServices;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * Fetches potential target page titles from the database.
 | 
					 * Fetches potential target page titles from the database.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
@@ -135,7 +137,7 @@ class Targets {
 | 
				
			|||||||
		// shortest to longest. Only titles from 'normal' pages (namespace uid
 | 
							// shortest to longest. Only titles from 'normal' pages (namespace uid
 | 
				
			||||||
		// = 0) are returned. Since the db may be sqlite, we need a try..catch
 | 
							// = 0) are returned. Since the db may be sqlite, we need a try..catch
 | 
				
			||||||
		// structure because sqlite does not support the CHAR_LENGTH function.
 | 
							// structure because sqlite does not support the CHAR_LENGTH function.
 | 
				
			||||||
		$dbr = wfGetDB( DB_REPLICA );
 | 
							$dbr = MediaWikiServices::getInstance()->getDBLoadBalancer()->getConnection( DB_REPLICA );
 | 
				
			||||||
		$this->queryResult = $dbr->select(
 | 
							$this->queryResult = $dbr->select(
 | 
				
			||||||
			'page',
 | 
								'page',
 | 
				
			||||||
			array( 'page_title', 'page_namespace' , "weight" => $weightSelect),
 | 
								array( 'page_title', 'page_namespace' , "weight" => $weightSelect),
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user