Skip to content

Instantly share code, notes, and snippets.

View -
#!/bin/sh
#
# Nasqueron Tools deployment script
#
#Config
GIT=/usr/local/bin/git
WWW=/var/wwwroot/nasqueron.org/tools
REPO=/home/dereckson/dev/nasqueron/tools/repo
REPOUSER=dereckson
@dereckson
dereckson / ReplicationDatabaseFactory.php
Last active Aug 29, 2015
Provides access to MySQL improved instances connected to Wikimedia Tool Labs replication databases
View ReplicationDatabaseFactory.php
<?php
/**
* Provides access to MySQL improved instances connected to Wikimedia Tool Labs replication databases
*/
class ReplicationDatabaseFactory {
/**
* Hashtable of stored resources
*
* @var Array each item is a mysqli instance
@dereckson
dereckson / SystematicElementName.php
Last active Aug 29, 2015
Determine a systematic element name
View SystematicElementName.php
<?php
/**
* Represents a systematic element name
*/
class SystematicElementName {
/**
* Gets the root matching the digit
*
* @param int $digit The digit
View QuestionMark.js
/* -------------------------------------------------------------
Keyboard shorcuts help
Based on QuestionMark.js by Louis Lazaris
http://impressivewebs.github.io/QuestionMark.js/
CC-BY 2.0 license with additional waiver 'no credit required'
Port to Dojo 1.9 by Dereckson
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
@dereckson
dereckson / FingerClient.php
Created Sep 18, 2013
Finger client in PHP.
View FingerClient.php
<?php
/**
* Finger client
*/
class FingerClient {
/**
* The finger remote server
* @var string
*/
@dereckson
dereckson / ForcePurgeAction
Created Jan 2, 2013
Allows MediaWiki to force purge for anonymous requests, with ?action=purge&forcepurge=1. This is intended to be used when generating links webcrawlers shouldn't get.
View ForcePurgeAction
diff --git a/includes/actions/PurgeAction.php b/includes/actions/PurgeAction.php
index cd58889..5a8cc6f 100644
--- a/includes/actions/PurgeAction.php
+++ b/includes/actions/PurgeAction.php
@@ -61,7 +61,8 @@ class PurgeAction extends FormAction {
// This will throw exceptions if there's a problem
$this->checkCanExecute( $this->getUser() );
- if ( $this->getUser()->isAllowed( 'purge' ) ) {
+ $forcePurge = isset( $_GET['forcepurge'] ) && ( $_GET['forcepurge'] == 1 );