@@ -196,24 +196,24 @@ discard block |
||
| 196 | 196 | |
| 197 | 197 | // request states |
| 198 | 198 | $availableRequestStates = array( |
| 199 | - 'Open' => array( |
|
| 200 | - 'defertolog' => 'users', // don't change or you'll break old logs |
|
| 201 | - 'deferto' => 'users', |
|
| 202 | - 'header' => 'Open requests', |
|
| 203 | - 'api' => "open", |
|
| 204 | - ), |
|
| 205 | - 'Flagged users' => array( |
|
| 206 | - 'defertolog' => 'flagged users', // don't change or you'll break old logs |
|
| 207 | - 'deferto' => 'flagged users', |
|
| 208 | - 'header' => 'Flagged user needed', |
|
| 209 | - 'api' => "admin", |
|
| 210 | - ), |
|
| 211 | - 'Checkuser' => array( |
|
| 212 | - 'defertolog' => 'checkusers', // don't change or you'll break old logs |
|
| 213 | - 'deferto' => 'checkusers', |
|
| 214 | - 'header' => 'Checkuser needed', |
|
| 215 | - 'api' => "checkuser", |
|
| 216 | - ), |
|
| 199 | + 'Open' => array( |
|
| 200 | + 'defertolog' => 'users', // don't change or you'll break old logs |
|
| 201 | + 'deferto' => 'users', |
|
| 202 | + 'header' => 'Open requests', |
|
| 203 | + 'api' => "open", |
|
| 204 | + ), |
|
| 205 | + 'Flagged users' => array( |
|
| 206 | + 'defertolog' => 'flagged users', // don't change or you'll break old logs |
|
| 207 | + 'deferto' => 'flagged users', |
|
| 208 | + 'header' => 'Flagged user needed', |
|
| 209 | + 'api' => "admin", |
|
| 210 | + ), |
|
| 211 | + 'Checkuser' => array( |
|
| 212 | + 'defertolog' => 'checkusers', // don't change or you'll break old logs |
|
| 213 | + 'deferto' => 'checkusers', |
|
| 214 | + 'header' => 'Checkuser needed', |
|
| 215 | + 'api' => "checkuser", |
|
| 216 | + ), |
|
| 217 | 217 | ); |
| 218 | 218 | |
| 219 | 219 | $defaultRequestStateKey = 'Open'; |
@@ -252,21 +252,21 @@ discard block |
||
| 252 | 252 | require_once('config.local.inc.php'); |
| 253 | 253 | |
| 254 | 254 | $cDatabaseConfig = array( |
| 255 | - "acc" => array( |
|
| 256 | - "dsrcname" => "mysql:host=" . $toolserver_host . ";dbname=" . $toolserver_database, |
|
| 257 | - "username" => $toolserver_username, |
|
| 258 | - "password" => $toolserver_password, |
|
| 259 | - ), |
|
| 260 | - "wikipedia" => array( |
|
| 261 | - "dsrcname" => "mysql:host=" . $antispoof_host . ";dbname=" . $antispoof_db, |
|
| 262 | - "username" => $toolserver_username, |
|
| 263 | - "password" => $toolserver_password, |
|
| 264 | - ), |
|
| 265 | - "notifications" => array( |
|
| 266 | - "dsrcname" => "mysql:host=" . $toolserver_notification_dbhost . ";dbname=" . $toolserver_notification_database, |
|
| 267 | - "username" => $notifications_username, |
|
| 268 | - "password" => $notifications_password, |
|
| 269 | - ), |
|
| 255 | + "acc" => array( |
|
| 256 | + "dsrcname" => "mysql:host=" . $toolserver_host . ";dbname=" . $toolserver_database, |
|
| 257 | + "username" => $toolserver_username, |
|
| 258 | + "password" => $toolserver_password, |
|
| 259 | + ), |
|
| 260 | + "wikipedia" => array( |
|
| 261 | + "dsrcname" => "mysql:host=" . $antispoof_host . ";dbname=" . $antispoof_db, |
|
| 262 | + "username" => $toolserver_username, |
|
| 263 | + "password" => $toolserver_password, |
|
| 264 | + ), |
|
| 265 | + "notifications" => array( |
|
| 266 | + "dsrcname" => "mysql:host=" . $toolserver_notification_dbhost . ";dbname=" . $toolserver_notification_database, |
|
| 267 | + "username" => $notifications_username, |
|
| 268 | + "password" => $notifications_password, |
|
| 269 | + ), |
|
| 270 | 270 | ); |
| 271 | 271 | |
| 272 | 272 | // //Keep the included files from being executed. |
@@ -274,30 +274,30 @@ discard block |
||
| 274 | 274 | |
| 275 | 275 | // Sets the values of the cookie configuration options if not already set. |
| 276 | 276 | if (!ini_get('session.cookie_path')) { |
| 277 | - ini_set('session.cookie_path', $cookiepath); |
|
| 277 | + ini_set('session.cookie_path', $cookiepath); |
|
| 278 | 278 | } |
| 279 | 279 | |
| 280 | 280 | if (!ini_get('session.name')) { |
| 281 | - ini_set('session.name', $sessionname); |
|
| 281 | + ini_set('session.name', $sessionname); |
|
| 282 | 282 | } |
| 283 | 283 | |
| 284 | 284 | if (!ini_get('user_agent')) { |
| 285 | - ini_set('user_agent', $toolUserAgent); |
|
| 285 | + ini_set('user_agent', $toolUserAgent); |
|
| 286 | 286 | } |
| 287 | 287 | |
| 288 | 288 | foreach (array( |
| 289 | - "mbstring", // unicode and stuff |
|
| 290 | - "pdo", |
|
| 291 | - "pdo_mysql", // new database module |
|
| 292 | - "session", |
|
| 293 | - "date", |
|
| 294 | - "pcre", // core stuff |
|
| 295 | - "curl", // mediawiki api access etc |
|
| 296 | - "openssl", // token generation |
|
| 289 | + "mbstring", // unicode and stuff |
|
| 290 | + "pdo", |
|
| 291 | + "pdo_mysql", // new database module |
|
| 292 | + "session", |
|
| 293 | + "date", |
|
| 294 | + "pcre", // core stuff |
|
| 295 | + "curl", // mediawiki api access etc |
|
| 296 | + "openssl", // token generation |
|
| 297 | 297 | ) as $x) { |
| 298 | - if (!extension_loaded($x)) { |
|
| 299 | - die("extension $x is required."); |
|
| 300 | - } |
|
| 298 | + if (!extension_loaded($x)) { |
|
| 299 | + die("extension $x is required."); |
|
| 300 | + } |
|
| 301 | 301 | } |
| 302 | 302 | |
| 303 | 303 | // Set up the AutoLoader |
@@ -324,32 +324,32 @@ discard block |
||
| 324 | 324 | $siteConfiguration = new \Waca\SiteConfiguration(); |
| 325 | 325 | |
| 326 | 326 | $siteConfiguration->setBaseUrl($baseurl) |
| 327 | - ->setFilePath(__DIR__) |
|
| 328 | - ->setDebuggingTraceEnabled($enableErrorTrace) |
|
| 329 | - ->setForceIdentification($forceIdentification) |
|
| 330 | - ->setIdentificationCacheExpiry($identificationCacheExpiry) |
|
| 331 | - ->setMediawikiScriptPath($mediawikiScriptPath) |
|
| 332 | - ->setMediawikiWebServiceEndpoint($mediawikiWebServiceEndpoint) |
|
| 333 | - ->setMetaWikimediaWebServiceEndpoint($metaWikimediaWebServiceEndpoint) |
|
| 334 | - ->setEnforceOAuth($enforceOAuth) |
|
| 335 | - ->setEmailConfirmationEnabled($enableEmailConfirm == 1) |
|
| 336 | - ->setEmailConfirmationExpiryDays($emailConfirmationExpiryDays) |
|
| 337 | - ->setMiserModeLimit($requestLimitShowOnly) |
|
| 338 | - ->setRequestStates($availableRequestStates) |
|
| 339 | - ->setSquidList($squidIpList) |
|
| 340 | - ->setDefaultCreatedTemplateId($createdid) |
|
| 341 | - ->setDefaultRequestStateKey($defaultRequestStateKey) |
|
| 342 | - ->setUseStrictTransportSecurity($strictTransportSecurityExpiry) |
|
| 343 | - ->setUserAgent($toolUserAgent) |
|
| 344 | - ->setCurlDisableVerifyPeer($curlDisableSSLVerifyPeer) |
|
| 345 | - ->setUseOAuthSignup($useOauthSignup) |
|
| 346 | - ->setOAuthBaseUrl($oauthBaseUrl) |
|
| 347 | - ->setOAuthConsumerToken($oauthConsumerToken) |
|
| 348 | - ->setOAuthConsumerSecret($oauthSecretToken) |
|
| 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'))); |
|
| 327 | + ->setFilePath(__DIR__) |
|
| 328 | + ->setDebuggingTraceEnabled($enableErrorTrace) |
|
| 329 | + ->setForceIdentification($forceIdentification) |
|
| 330 | + ->setIdentificationCacheExpiry($identificationCacheExpiry) |
|
| 331 | + ->setMediawikiScriptPath($mediawikiScriptPath) |
|
| 332 | + ->setMediawikiWebServiceEndpoint($mediawikiWebServiceEndpoint) |
|
| 333 | + ->setMetaWikimediaWebServiceEndpoint($metaWikimediaWebServiceEndpoint) |
|
| 334 | + ->setEnforceOAuth($enforceOAuth) |
|
| 335 | + ->setEmailConfirmationEnabled($enableEmailConfirm == 1) |
|
| 336 | + ->setEmailConfirmationExpiryDays($emailConfirmationExpiryDays) |
|
| 337 | + ->setMiserModeLimit($requestLimitShowOnly) |
|
| 338 | + ->setRequestStates($availableRequestStates) |
|
| 339 | + ->setSquidList($squidIpList) |
|
| 340 | + ->setDefaultCreatedTemplateId($createdid) |
|
| 341 | + ->setDefaultRequestStateKey($defaultRequestStateKey) |
|
| 342 | + ->setUseStrictTransportSecurity($strictTransportSecurityExpiry) |
|
| 343 | + ->setUserAgent($toolUserAgent) |
|
| 344 | + ->setCurlDisableVerifyPeer($curlDisableSSLVerifyPeer) |
|
| 345 | + ->setUseOAuthSignup($useOauthSignup) |
|
| 346 | + ->setOAuthBaseUrl($oauthBaseUrl) |
|
| 347 | + ->setOAuthConsumerToken($oauthConsumerToken) |
|
| 348 | + ->setOAuthConsumerSecret($oauthSecretToken) |
|
| 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'))); |
|