r23989 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r23988‎ | r23989 | r23990 >
Date:07:55, 11 July 2007
Author:nickj
Status:old
Tags:
Comment:
Native EOL style.
Modified paths:
  • /trunk/phase3/Makefile (modified) (history)
  • /trunk/phase3/api.php5 (modified) (history)
  • /trunk/phase3/config/index.php5 (modified) (history)
  • /trunk/phase3/img_auth.php5 (modified) (history)
  • /trunk/phase3/includes/filerepo/ICRepo.php (modified) (history)
  • /trunk/phase3/includes/filerepo/README (modified) (history)
  • /trunk/phase3/index.php5 (modified) (history)
  • /trunk/phase3/maintenance/archives/patch-archive-user-index.sql (modified) (history)
  • /trunk/phase3/maintenance/archives/patch-image-user-index.sql (modified) (history)
  • /trunk/phase3/maintenance/archives/patch-oldimage-user-index.sql (modified) (history)
  • /trunk/phase3/redirect.php5 (modified) (history)
  • /trunk/phase3/thumb.php5 (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/archives/patch-oldimage-user-index.sql
@@ -1,8 +1,8 @@
2 -
3 -ALTER TABLE /*$wgDBprefix*/oldimage
4 - ADD INDEX oi_usertext_timestamp (oi_user_text,oi_timestamp);
 2+--
 3+-- oldimage-user-index.sql
 4+--
 5+-- Add user/timestamp index to old image versions
 6+--
 7+
 8+ALTER TABLE /*$wgDBprefix*/oldimage
 9+ ADD INDEX oi_usertext_timestamp (oi_user_text,oi_timestamp);
Property changes on: trunk/phase3/maintenance/archives/patch-oldimage-user-index.sql
___________________________________________________________________
Name: svn:eol-style
510 + native
Index: trunk/phase3/maintenance/archives/patch-image-user-index.sql
@@ -1,8 +1,8 @@
2 -
3 -ALTER TABLE /*$wgDBprefix*/image
4 - ADD INDEX img_usertext_timestamp (img_user_text,img_timestamp);
 2+--
 3+-- image-user-index.sql
 4+--
 5+-- Add user/timestamp index to current image versions
 6+--
 7+
 8+ALTER TABLE /*$wgDBprefix*/image
 9+ ADD INDEX img_usertext_timestamp (img_user_text,img_timestamp);
Property changes on: trunk/phase3/maintenance/archives/patch-image-user-index.sql
___________________________________________________________________
Name: svn:eol-style
510 + native
Index: trunk/phase3/maintenance/archives/patch-archive-user-index.sql
@@ -1,4 +1,4 @@
2 -ALTER TABLE /*$wgDBprefix*/archive
3 - ADD INDEX usertext_timestamp ( ar_user_text , ar_timestamp );
 2+-- Adds a user,timestamp index to the archive table
 3+-- Used for browsing deleted contributions and renames
 4+ALTER TABLE /*$wgDBprefix*/archive
 5+ ADD INDEX usertext_timestamp ( ar_user_text , ar_timestamp );
Property changes on: trunk/phase3/maintenance/archives/patch-archive-user-index.sql
___________________________________________________________________
Name: svn:eol-style
46 + native
Property changes on: trunk/phase3/includes/filerepo/ICRepo.php
___________________________________________________________________
Name: svn:eol-style
57 + native
Index: trunk/phase3/includes/filerepo/README
@@ -1,41 +1,41 @@
2 -Some quick notes on the file/repository architecture.
3 -
4 -Functionality is, as always, driven by data model.
5 -
6 -* The repository object stores configuration information about a file storage
7 - method.
8 -
9 -* The file object is a process-local cache of information about a particular
10 - file.
11 -
12 -Thus the file object is the primary public entry point for obtaining information
13 -about files, since access via the file object can be cached, whereas access via
14 -the repository should not be cached.
15 -
16 -Functions which can act on any file specified in their parameters typically find
17 -their place either in the repository object, where reference to
18 -repository-specific configuration is needed, or in static members of File or
19 -FileRepo, where no such configuration is needed.
20 -
21 -File objects are generated by a factory function from the repository. The
22 -repository thus has full control over the behaviour of its subsidiary file
23 -class, since it can subclass the file class and override functionality at its
24 -whim. Thus there is no need for the File subclass to query its parent repository
25 -for information about repository-class-dependent behaviour -- the file subclass
26 -is generally fully aware of the static preferences of its repository. Limited
27 -exceptions can be made to this rule to permit sharing of functions, or perhaps
28 -even entire classes, between repositories.
29 -
30 -These rules alone still do lead to some ambiguity -- it may not be clear whether
31 -to implement some functionality in a repository function with a filename
32 -parameter, or in the file object itself.
33 -
34 -So we introduce the following rule: the file subclass is smarter than the
35 -repository subclass. The repository should in general provide a minimal API
36 -needed to access the storage backend efficiently.
37 -
38 -In particular, note that I have not implemented any database access in
39 -LocalRepo.php. LocalRepo provides only file access, and LocalFile provides
40 -database access and higher-level functions such as cache management.
41 -
42 -Tim Starling, June 2007
 2+Some quick notes on the file/repository architecture.
 3+
 4+Functionality is, as always, driven by data model.
 5+
 6+* The repository object stores configuration information about a file storage
 7+ method.
 8+
 9+* The file object is a process-local cache of information about a particular
 10+ file.
 11+
 12+Thus the file object is the primary public entry point for obtaining information
 13+about files, since access via the file object can be cached, whereas access via
 14+the repository should not be cached.
 15+
 16+Functions which can act on any file specified in their parameters typically find
 17+their place either in the repository object, where reference to
 18+repository-specific configuration is needed, or in static members of File or
 19+FileRepo, where no such configuration is needed.
 20+
 21+File objects are generated by a factory function from the repository. The
 22+repository thus has full control over the behaviour of its subsidiary file
 23+class, since it can subclass the file class and override functionality at its
 24+whim. Thus there is no need for the File subclass to query its parent repository
 25+for information about repository-class-dependent behaviour -- the file subclass
 26+is generally fully aware of the static preferences of its repository. Limited
 27+exceptions can be made to this rule to permit sharing of functions, or perhaps
 28+even entire classes, between repositories.
 29+
 30+These rules alone still do lead to some ambiguity -- it may not be clear whether
 31+to implement some functionality in a repository function with a filename
 32+parameter, or in the file object itself.
 33+
 34+So we introduce the following rule: the file subclass is smarter than the
 35+repository subclass. The repository should in general provide a minimal API
 36+needed to access the storage backend efficiently.
 37+
 38+In particular, note that I have not implemented any database access in
 39+LocalRepo.php. LocalRepo provides only file access, and LocalFile provides
 40+database access and higher-level functions such as cache management.
 41+
 42+Tim Starling, June 2007
Property changes on: trunk/phase3/includes/filerepo/README
___________________________________________________________________
Name: svn:eol-style
4343 + native
Property changes on: trunk/phase3/img_auth.php5
___________________________________________________________________
Name: svn:eol-style
4444 + native
Property changes on: trunk/phase3/redirect.php5
___________________________________________________________________
Name: svn:eol-style
4545 + native
Property changes on: trunk/phase3/Makefile
___________________________________________________________________
Name: svn:eol-style
4646 + native
Property changes on: trunk/phase3/index.php5
___________________________________________________________________
Name: svn:eol-style
4747 + native
Property changes on: trunk/phase3/api.php5
___________________________________________________________________
Name: svn:eol-style
4848 + native
Property changes on: trunk/phase3/thumb.php5
___________________________________________________________________
Name: svn:eol-style
4949 + native
Property changes on: trunk/phase3/config/index.php5
___________________________________________________________________
Name: svn:eol-style
5050 + native

Follow-up revisions

RevisionCommit summaryAuthorDate
r24096Merged revisions 23910-24094 via svnmerge from...david22:38, 14 July 2007

Status & tagging log