r27668 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r27667‎ | r27668 | r27669 >
Date:10:58, 20 November 2007
Author:tstarling
Status:old
Tags:
Comment:
A file repository without files. Gets rid of useless DB queries during parser testing.
Modified paths:
  • /trunk/phase3/includes/filerepo/NullRepo.php (added) (history)

Diff [purge]

Index: trunk/phase3/includes/filerepo/NullRepo.php
@@ -0,0 +1,34 @@
 2+<?php
 3+
 4+/**
 5+ * File repository with no files, for performance testing
 6+ */
 7+
 8+class NullRepo extends FileRepo {
 9+ function __construct( $info ) {}
 10+
 11+ function storeBatch( $triplets, $flags = 0 ) {
 12+ return false;
 13+ }
 14+
 15+ function storeTemp( $originalName, $srcPath ) {
 16+ return false;
 17+ }
 18+ function publishBatch( $triplets, $flags = 0 ) {
 19+ return false;
 20+ }
 21+ function deleteBatch( $sourceDestPairs ) {
 22+ return false;
 23+ }
 24+ function getFileProps( $virtualUrl ) {
 25+ return false;
 26+ }
 27+ function newFile( $title, $time = false ) {
 28+ return false;
 29+ }
 30+ function findFile( $title, $time = false ) {
 31+ return false;
 32+ }
 33+}
 34+
 35+?>
Property changes on: trunk/phase3/includes/filerepo/NullRepo.php
___________________________________________________________________
Added: svn:eol-style
136 + native

Status & tagging log