Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F1753
SpecialMakesysop.diff
Public
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Authored By
•
bzimport
Nov 21 2014, 8:07 PM
2014-11-21 20:07:18 (UTC+0)
Size
1 KB
Referenced Files
None
Subscribers
None
SpecialMakesysop.diff
View Options
--- includes/SpecialMakesysop.php~ 2004-12-13 23:07:56.000000000 -0800
+++ includes/SpecialMakesysop.php 2004-12-23 12:25:35.000000000 -0800
@@ -169,20 +169,24 @@
$sql = "SELECT ur_user,ur_rights FROM $user_rights WHERE ur_user=$id FOR UPDATE";
} else {
$encName = $dbw->strencode( $username );
- $sql = "SELECT ur_user, ur_rights FROM $usertable LEFT JOIN $user_rights ON user_id=ur_user WHERE user_name = '{$username}' FOR UPDATE";
+ $sql = "SELECT user_id FROM $usertable WHERE user_name=\"$encName\" FOR UPDATE";
+ $res = $dbw->query($sql);
+ $row = $dbw->fetchObject( $res );
+ $id = intval( $row->user_id );
+ $sql = "SELECT ur_user,ur_rights FROM $user_rights WHERE ur_user=$id FOR UPDATE";
}
$prev = $dbw->ignoreErrors( TRUE );
$res = $dbw->query( $sql );
$dbw->ignoreErrors( $prev );
- if( $dbw->lastErrno() || ! $username || $dbw->numRows( $res ) == 0 ){
- $this->showFail();
+ if( $dbw->lastErrno() || ! $username ){
+ $this->showFail();
return;
}
$row = $dbw->fetchObject( $res );
- $id = intval( $row->ur_user );
+# $id = intval( $row->ur_user );
$rightsNotation = array();
if ( $wgUser->isDeveloper() ) {
File Metadata
Details
Attached
Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1333
Default Alt Text
SpecialMakesysop.diff (1 KB)
Attached To
Mode
T3180: old users not sysopable
Attached
Detach File
Event Timeline
Log In to Comment