@@ -189,27 +189,27 @@ discard block |
||
189 | 189 | |
190 | 190 | // request states |
191 | 191 | $availableRequestStates = array( |
192 | - 'Open' => array( |
|
193 | - 'defertolog' => 'users', // don't change or you'll break old logs |
|
194 | - 'deferto' => 'users', |
|
195 | - 'header' => 'Open requests', |
|
196 | - 'api' => "open", |
|
197 | - 'queuehelp' => null |
|
198 | - ), |
|
199 | - 'Flagged users' => array( |
|
200 | - 'defertolog' => 'flagged users', // don't change or you'll break old logs |
|
201 | - 'deferto' => 'flagged users', |
|
202 | - 'header' => 'Flagged user needed', |
|
203 | - 'api' => "admin", |
|
204 | - 'queuehelp' => 'This queue lists the requests which require a user with the <code>accountcreator</code> flag to create.<br />If creation is determined to be the correct course of action, requests here will require the overriding the AntiSpoof checks or the title blacklist in order to create. It is recommended to try to create the account <em>without</em> checking the flags to validate the results of the AntiSpoof and/or title blacklist hits.' |
|
205 | - ), |
|
206 | - 'Checkuser' => array( |
|
207 | - 'defertolog' => 'checkusers', // don't change or you'll break old logs |
|
208 | - 'deferto' => 'checkusers', |
|
209 | - 'header' => 'Checkuser needed', |
|
210 | - 'api' => "checkuser", |
|
211 | - 'queuehelp' => null |
|
212 | - ), |
|
192 | + 'Open' => array( |
|
193 | + 'defertolog' => 'users', // don't change or you'll break old logs |
|
194 | + 'deferto' => 'users', |
|
195 | + 'header' => 'Open requests', |
|
196 | + 'api' => "open", |
|
197 | + 'queuehelp' => null |
|
198 | + ), |
|
199 | + 'Flagged users' => array( |
|
200 | + 'defertolog' => 'flagged users', // don't change or you'll break old logs |
|
201 | + 'deferto' => 'flagged users', |
|
202 | + 'header' => 'Flagged user needed', |
|
203 | + 'api' => "admin", |
|
204 | + 'queuehelp' => 'This queue lists the requests which require a user with the <code>accountcreator</code> flag to create.<br />If creation is determined to be the correct course of action, requests here will require the overriding the AntiSpoof checks or the title blacklist in order to create. It is recommended to try to create the account <em>without</em> checking the flags to validate the results of the AntiSpoof and/or title blacklist hits.' |
|
205 | + ), |
|
206 | + 'Checkuser' => array( |
|
207 | + 'defertolog' => 'checkusers', // don't change or you'll break old logs |
|
208 | + 'deferto' => 'checkusers', |
|
209 | + 'header' => 'Checkuser needed', |
|
210 | + 'api' => "checkuser", |
|
211 | + 'queuehelp' => null |
|
212 | + ), |
|
213 | 213 | ); |
214 | 214 | |
215 | 215 | $defaultRequestStateKey = 'Open'; |
@@ -259,24 +259,24 @@ discard block |
||
259 | 259 | require_once('config.local.inc.php'); |
260 | 260 | |
261 | 261 | $cDatabaseConfig = array( |
262 | - "acc" => array( |
|
263 | - "dsrcname" => "mysql:host=" . $toolserver_host . ";dbname=" . $toolserver_database, |
|
264 | - "username" => $toolserver_username, |
|
265 | - "password" => $toolserver_password, |
|
262 | + "acc" => array( |
|
263 | + "dsrcname" => "mysql:host=" . $toolserver_host . ";dbname=" . $toolserver_database, |
|
264 | + "username" => $toolserver_username, |
|
265 | + "password" => $toolserver_password, |
|
266 | 266 | "options" => array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8mb4'), |
267 | - ), |
|
268 | - "wikipedia" => array( |
|
269 | - "dsrcname" => "mysql:host=" . $antispoof_host . ";dbname=" . $antispoof_db, |
|
270 | - "username" => $toolserver_username, |
|
271 | - "password" => $toolserver_password, |
|
272 | - "options" => array(), |
|
273 | - ), |
|
274 | - "notifications" => array( |
|
275 | - "dsrcname" => "mysql:host=" . $toolserver_notification_dbhost . ";dbname=" . $toolserver_notification_database, |
|
276 | - "username" => $notifications_username, |
|
277 | - "password" => $notifications_password, |
|
278 | - "options" => array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8mb4'), |
|
279 | - ), |
|
267 | + ), |
|
268 | + "wikipedia" => array( |
|
269 | + "dsrcname" => "mysql:host=" . $antispoof_host . ";dbname=" . $antispoof_db, |
|
270 | + "username" => $toolserver_username, |
|
271 | + "password" => $toolserver_password, |
|
272 | + "options" => array(), |
|
273 | + ), |
|
274 | + "notifications" => array( |
|
275 | + "dsrcname" => "mysql:host=" . $toolserver_notification_dbhost . ";dbname=" . $toolserver_notification_database, |
|
276 | + "username" => $notifications_username, |
|
277 | + "password" => $notifications_password, |
|
278 | + "options" => array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8mb4'), |
|
279 | + ), |
|
280 | 280 | ); |
281 | 281 | |
282 | 282 | // //Keep the included files from being executed. |
@@ -288,18 +288,18 @@ discard block |
||
288 | 288 | ini_set('user_agent', $toolUserAgent); |
289 | 289 | |
290 | 290 | foreach (array( |
291 | - "mbstring", // unicode and stuff |
|
292 | - "pdo", |
|
293 | - "pdo_mysql", // new database module |
|
294 | - "session", |
|
295 | - "date", |
|
296 | - "pcre", // core stuff |
|
297 | - "curl", // mediawiki api access etc |
|
298 | - "openssl", // token generation |
|
291 | + "mbstring", // unicode and stuff |
|
292 | + "pdo", |
|
293 | + "pdo_mysql", // new database module |
|
294 | + "session", |
|
295 | + "date", |
|
296 | + "pcre", // core stuff |
|
297 | + "curl", // mediawiki api access etc |
|
298 | + "openssl", // token generation |
|
299 | 299 | ) as $x) { |
300 | - if (!extension_loaded($x)) { |
|
301 | - die("extension $x is required."); |
|
302 | - } |
|
300 | + if (!extension_loaded($x)) { |
|
301 | + die("extension $x is required."); |
|
302 | + } |
|
303 | 303 | } |
304 | 304 | |
305 | 305 | // Set up the AutoLoader |
@@ -323,41 +323,41 @@ discard block |
||
323 | 323 | $siteConfiguration = new \Waca\SiteConfiguration(); |
324 | 324 | |
325 | 325 | $siteConfiguration->setBaseUrl($baseurl) |
326 | - ->setFilePath(__DIR__) |
|
327 | - ->setDebuggingTraceEnabled($enableErrorTrace) |
|
328 | - ->setForceIdentification($forceIdentification) |
|
329 | - ->setIdentificationCacheExpiry($identificationCacheExpiry) |
|
330 | - ->setMediawikiScriptPath($mediawikiScriptPath) |
|
331 | - ->setMediawikiWebServiceEndpoint($mediawikiWebServiceEndpoint) |
|
332 | - ->setMetaWikimediaWebServiceEndpoint($metaWikimediaWebServiceEndpoint) |
|
333 | - ->setEnforceOAuth($enforceOAuth) |
|
334 | - ->setEmailConfirmationEnabled($enableEmailConfirm == 1) |
|
335 | - ->setEmailConfirmationExpiryDays($emailConfirmationExpiryDays) |
|
336 | - ->setMiserModeLimit($requestLimitShowOnly) |
|
337 | - ->setRequestStates($availableRequestStates) |
|
338 | - ->setSquidList($squidIpList) |
|
339 | - ->setDefaultCreatedTemplateId($createdid) |
|
340 | - ->setDefaultRequestStateKey($defaultRequestStateKey) |
|
341 | - ->setUseStrictTransportSecurity($strictTransportSecurityExpiry) |
|
342 | - ->setUserAgent($toolUserAgent) |
|
343 | - ->setCurlDisableVerifyPeer($curlDisableSSLVerifyPeer) |
|
344 | - ->setUseOAuthSignup($useOauthSignup) |
|
345 | - ->setOAuthBaseUrl($oauthBaseUrl) |
|
346 | - ->setOAuthConsumerToken($oauthConsumerToken) |
|
347 | - ->setOAuthConsumerSecret($oauthSecretToken) |
|
348 | - ->setOauthMediaWikiCanonicalServer($oauthMediaWikiCanonicalServer) |
|
349 | - ->setDataClearInterval($dataclear_interval) |
|
350 | - ->setXffTrustedHostsFile($xff_trusted_hosts_file) |
|
351 | - ->setIrcNotificationsEnabled($ircBotNotificationsEnabled == 1) |
|
352 | - ->setIrcNotificationType($ircBotNotificationType) |
|
353 | - ->setIrcNotificationsInstance($whichami) |
|
354 | - ->setTitleBlacklistEnabled($enableTitleblacklist == 1) |
|
355 | - ->setTorExitPaths(array_merge(gethostbynamel('en.wikipedia.org'), gethostbynamel('accounts.wmflabs.org'))) |
|
356 | - ->setCreationBotUsername($creationBotUsername) |
|
357 | - ->setCreationBotPassword($creationBotPassword) |
|
358 | - ->setCurlCookieJar($curlCookieJar) |
|
359 | - ->setYubicoApiId($yubicoApiId) |
|
360 | - ->setYubicoApiKey($yubicoApiKey) |
|
361 | - ->setTotpEncryptionKey($totpEncryptionKey) |
|
362 | - ->setRegistrationAllowed($allowRegistration) |
|
363 | - ->setCspReportUri($cspReportUri); |
|
326 | + ->setFilePath(__DIR__) |
|
327 | + ->setDebuggingTraceEnabled($enableErrorTrace) |
|
328 | + ->setForceIdentification($forceIdentification) |
|
329 | + ->setIdentificationCacheExpiry($identificationCacheExpiry) |
|
330 | + ->setMediawikiScriptPath($mediawikiScriptPath) |
|
331 | + ->setMediawikiWebServiceEndpoint($mediawikiWebServiceEndpoint) |
|
332 | + ->setMetaWikimediaWebServiceEndpoint($metaWikimediaWebServiceEndpoint) |
|
333 | + ->setEnforceOAuth($enforceOAuth) |
|
334 | + ->setEmailConfirmationEnabled($enableEmailConfirm == 1) |
|
335 | + ->setEmailConfirmationExpiryDays($emailConfirmationExpiryDays) |
|
336 | + ->setMiserModeLimit($requestLimitShowOnly) |
|
337 | + ->setRequestStates($availableRequestStates) |
|
338 | + ->setSquidList($squidIpList) |
|
339 | + ->setDefaultCreatedTemplateId($createdid) |
|
340 | + ->setDefaultRequestStateKey($defaultRequestStateKey) |
|
341 | + ->setUseStrictTransportSecurity($strictTransportSecurityExpiry) |
|
342 | + ->setUserAgent($toolUserAgent) |
|
343 | + ->setCurlDisableVerifyPeer($curlDisableSSLVerifyPeer) |
|
344 | + ->setUseOAuthSignup($useOauthSignup) |
|
345 | + ->setOAuthBaseUrl($oauthBaseUrl) |
|
346 | + ->setOAuthConsumerToken($oauthConsumerToken) |
|
347 | + ->setOAuthConsumerSecret($oauthSecretToken) |
|
348 | + ->setOauthMediaWikiCanonicalServer($oauthMediaWikiCanonicalServer) |
|
349 | + ->setDataClearInterval($dataclear_interval) |
|
350 | + ->setXffTrustedHostsFile($xff_trusted_hosts_file) |
|
351 | + ->setIrcNotificationsEnabled($ircBotNotificationsEnabled == 1) |
|
352 | + ->setIrcNotificationType($ircBotNotificationType) |
|
353 | + ->setIrcNotificationsInstance($whichami) |
|
354 | + ->setTitleBlacklistEnabled($enableTitleblacklist == 1) |
|
355 | + ->setTorExitPaths(array_merge(gethostbynamel('en.wikipedia.org'), gethostbynamel('accounts.wmflabs.org'))) |
|
356 | + ->setCreationBotUsername($creationBotUsername) |
|
357 | + ->setCreationBotPassword($creationBotPassword) |
|
358 | + ->setCurlCookieJar($curlCookieJar) |
|
359 | + ->setYubicoApiId($yubicoApiId) |
|
360 | + ->setYubicoApiKey($yubicoApiKey) |
|
361 | + ->setTotpEncryptionKey($totpEncryptionKey) |
|
362 | + ->setRegistrationAllowed($allowRegistration) |
|
363 | + ->setCspReportUri($cspReportUri); |