Page MenuHomePhabricator

getTitleProtection MSSQL Error MSSQL Error
Closed, ResolvedPublic

Description

SELECT pt_user AS user,pt_reason AS reason,pt_expiry AS expiry,pt_create_perm AS permission FROM [mediawiki].[PREFIX_protected_titles] WHERE pt_namespace = '2' AND pt_title = 'Admin'

Query alias 'user' needs to be escaped using brackets.

Working Fix:
includes/title.php line ~2560

array(
	'[user]' => 'pt_user',
	'reason' => 'pt_reason',
	'expiry' => 'pt_expiry',
	'permission' => 'pt_create_perm'
),

Event Timeline

EndlessCTE raised the priority of this task from to Normal.
EndlessCTE updated the task description. (Show Details)
EndlessCTE added a subscriber: EndlessCTE.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptNov 18 2015, 5:27 PM
EndlessCTE renamed this task from getTitleProtection MSSQL Error to loadRestrictions MSSQL Error.Nov 18 2015, 5:28 PM
EndlessCTE set Security to None.
EndlessCTE renamed this task from loadRestrictions MSSQL Error to getTitleProtection MSSQL Error MSSQL Error.Nov 18 2015, 5:34 PM
EndlessCTE updated the task description. (Show Details)
EndlessCTE updated the task description. (Show Details)

Thanks for taking a look at the code!

You are very welcome to use developer access to submit this as a Git branch directly into Gerrit which makes it easier to review it quickly.
If you don't want to set up Git/Gerrit, you can also use the Gerrit Patch Uploader. Thanks again!

Change 286489 had a related patch set uploaded (by Legoktm):
Quote column name aliases

https://gerrit.wikimedia.org/r/286489

Change 286489 merged by jenkins-bot:
Quote column name aliases

https://gerrit.wikimedia.org/r/286489

Skizzerz closed this task as Resolved.May 2 2016, 9:39 PM
Skizzerz claimed this task.