From a1d705e541e0d10baa6bb03935ffd38d9478d0e6 Mon Sep 17 00:00:00 2001 From: wiki Date: Sun, 1 May 2016 22:11:47 +0100 Subject: remove old plugins --- extensions/InterWiki.php | 68 - extensions/InterWiki.txt | 7 - extensions/bannedips.php | 219419 -------------------------------------------- 3 files changed, 219494 deletions(-) delete mode 100644 extensions/InterWiki.php delete mode 100644 extensions/InterWiki.txt delete mode 100644 extensions/bannedips.php diff --git a/extensions/InterWiki.php b/extensions/InterWiki.php deleted file mode 100644 index 567bf9a5..00000000 --- a/extensions/InterWiki.php +++ /dev/null @@ -1,68 +0,0 @@ - 'InterWiki', - 'author' => '[http://www.organicdesign.co.nz/nad User:Nad]', - 'description' => 'Manage the InterWiki list from a file', - 'url' => 'http://www.mediawiki.org/wiki/Extension:InterWiki', - 'version' => INTERWIKI_VERSION -); - -function wfInterWikiSetup() { - global $wgServer, $wgInterWikiFile, $wgInterWikiAddOnly; - - # Read the current InterWiki list from the DB into an array of (prefix,url,local,trans) - $db =& wfGetDB( DB_MASTER ); - $tbl = $db->tableName( 'interwiki' ); - $iw = array(); - $result = $db->query( "SELECT iw_prefix,iw_url,iw_local,iw_trans FROM $tbl" ); - if ( $result instanceof ResultWrapper ) $result = $result->result; - while ( $row = $db->fetchRow( $result ) ) $iw[strtolower( $row[0] )] = array( $row[1], $row[2], $row[3] ); - $db->freeResult( $result ); - - - # Read InterWiki file into an array of (prefix,url,local,trans) - # - local is set automatically if $wgServer matches the URL - $iwf = array() ; - foreach ( file( $wgInterWikiFile ) as $line ) { - if ( preg_match( "/^\\s*(.+?)\\s*\\|\\s*(http.+?)\\s*(\\|\\s*(.+?)\\s*)?$/", $line, $matches ) ) { - list( , $wikis, $url ) = $matches; - $flags = isset( $matches[4] ) ? $matches[4] : ''; - $wikis = preg_split( "/\\s*,\\s*/", strtolower( $wikis ) ); - $flags = preg_split( "/\\s*,\\s*/", strtolower( $flags ) ); - $local = ( in_array( 'local', $flags ) || ( stripos( $url, $wgServer ) !== false ) ) ? 1 : 0; - $trans = in_array( 'trans', $flags ) ? 1 : 0; - foreach ( $wikis as $w ) $iwf[$w] = array( $url, $local, $trans ); - } - } - - # Determine the required database inserts, updates and deletes - $del = array(); - $ins = array(); - $upd = array(); - foreach ( $iwf as $w => $i ) { - if ( isset($iw[$w] ) ) { - if ( $iw[$w][0] != $i[0] || $iw[$w][1] != $i[1] || $iw[$w][2] != $i[2] ) $upd[$w] = $i; - } else $ins[$w] = $i; - } - if ( !$wgInterWikiAddOnly ) foreach ( $iw as $w => $i ) if ( !isset( $iwf[$w] ) ) $del[] = $w; - - # Update the database - foreach ( $ins as $w => $i ) $db->query( "INSERT INTO $tbl (iw_prefix,iw_url,iw_local,iw_trans) VALUES('$w','$i[0]',$i[1],$i[2])" ); - foreach ( $upd as $w => $i ) $db->query( "UPDATE $tbl SET iw_url='$i[0]',iw_local=$i[1],iw_trans=$i[2] WHERE iw_prefix='$w'" ); - foreach ( $del as $w ) $db->query( "DELETE FROM $tbl WHERE iw_prefix = '$w'" ); -} diff --git a/extensions/InterWiki.txt b/extensions/InterWiki.txt deleted file mode 100644 index be635cd3..00000000 --- a/extensions/InterWiki.txt +++ /dev/null @@ -1,7 +0,0 @@ -# Wikipedia projects -WikiPedia,W | http://en.wikipedia.org/wiki/$1 -Meta,M | http://meta.wikipedia.org/wiki/$1 -MediaWiki,MW | http://www.mediawiki.org/wiki/$1 - -#Arch -Arch,A | http://wiki.archlinux.org/index.php/$1 diff --git a/extensions/bannedips.php b/extensions/bannedips.php deleted file mode 100644 index 8aeb6f90..00000000 --- a/extensions/bannedips.php +++ /dev/null @@ -1,219419 +0,0 @@ -