$botgroups = $autopatrolgroups = array();
foreach( $wgGroupPermissions as $group => $rights ) {
if( isset( $rights['bot'] ) && $rights['bot'] == true ) {
- $botgroups[] = "'" . $dbw->strencode( $group ) . "'";
+ $botgroups[] = $dbw->addQuotes( $group );
}
if( $wgUseRCPatrol && isset( $rights['autopatrol'] ) && $rights['autopatrol'] == true ) {
- $autopatrolgroups[] = "'" . $dbw->strencode( $group ) . "'";
+ $autopatrolgroups[] = $dbw->addQuotes( $group );
}
}
# Flag our recent bot edits
$res = $dbw->query( $sql, DB_MASTER );
while( $obj = $dbw->fetchObject( $res ) ) {
- $botusers[] = $dbw->strencode( $obj->user_name );
+ $botusers[] = $dbw->addQuotes( $obj->user_name );
}
# Fill in the rc_bot field
if( !empty($botusers) ) {
$res = $dbw->query( $sql, DB_MASTER );
while( $obj = $dbw->fetchObject( $res ) ) {
- $patrolusers[] = $dbw->strencode( $obj->user_name );
+ $patrolusers[] = $dbw->addQuotes( $obj->user_name );
}
# Fill in the rc_patrolled field