Commit graph

14 commits

Author SHA1 Message Date
Timo Tijhof
beb1c4a0ec phpcs: More require/include is not a function
Follows-up I1343872de7, Ia533aedf63 and I2df2f80b81.

Also updated usage in text in documentation and the
installer LocalSettingsGenerator.

Most of them were handled by this regex:
- find: (require|include|require_once|include_once)\s*\(\s*(.+?)\s*\)\s*;$
- replace: $1 $2;

Change-Id: I6b38aad9a5149c9c43ce18bd8edbab14b8ce43fa
2013-05-21 23:26:28 +02:00
Timo Tijhof
50e7985d4d phpcs: Fix WhiteSpace.LanguageConstructSpacing warnings
Squiz.WhiteSpace.LanguageConstructSpacing:
   Language constructs must be followed by a single space;
   expected "require_once expression" but found
   "require_once(expression)"

It is a keyword (e.g. like `new`, `return` and `print`). As
such the parentheses don't make sense.

Per our code conventions, we use a space after keywords like
these. We appeared to have an unwritten exception for `require`
that doesn't make sense. About 60% of require/include usage
was missing the space and/or had superfluous parentheses.

It is as silly as print("foo") or return("foo"), it works
because keywords have no significance for whitespace between
it and the expression that follows, and since experessions can
be wrapped in parentheses for clarity (e.g. when doing string
concatenation or mathematical operations) the parenthesis
before and after basiclaly just ignored.

Change-Id: I2df2f80b8123714bea7e0771bf94b51ad5bb4b87
2013-05-09 05:56:26 +02:00
Aaron Schulz
75e51f6ac4 Added a --backoff option for syncFileBackend.php
* This is useful for avoiding in-progress operations if locking
  is not enabled (the journal is updated before file changes).

Change-Id: Ieab3b157a6858f68cc9259214cac1743b7525da0
2013-04-30 18:53:01 -07:00
Aaron Schulz
db5903f36e Made backend sync script update the pos file periorically.
Change-Id: I5b4028c8d69a6bf78b372f0d1cdb258207465f30
2013-03-09 22:44:17 -08:00
Aaron Schulz
d0401306b6 Made syncFileBackend.php clearer with handling --postime.
Change-Id: I9462fb2aeef0597c3a7a0d1b0b4856ffea2460f6
2013-03-06 15:19:28 -08:00
Aaron Schulz
d4e9dd90f4 Added --postime option syncFileBackend.
* Useful when starting positions are made after copying started.

Change-Id: I34d996594753f7bc4449dac96a4822242c1897ee
2013-03-03 04:45:15 -08:00
Aaron Schulz
22ac627fd3 Added "posdump" option to syncFileBackend to dump the current position.
Change-Id: Iabb027788796e98e06e3c6e97d14f74819cc6c95
2012-10-04 11:43:59 -07:00
Aaron
5f04f28e6a Made backend sync script handle random errors better.
Change-Id: I3ad5d9d0768480d8be4bb480fe653238d203a95c
2012-09-10 22:38:49 +00:00
Alexandre Emsenhuber
a75b6d53cd Improve documentation of maintenance scripts.
Also contains a fix for Ia5a38311 (fae0550).

Change-Id: I630c83b48b66c5d8c97411082cabd731f316f42d
2012-09-02 20:33:22 +02:00
jeroendedauw
38c7f444e1 Use __DIR__ instead of dirname( __FILE__ )
We can now do this since we finally switched to PHP 5.3 for MW 1.20 and get rid of the silly dirname(__FILE__) stuff :)

Change-Id: Id9b2c9cd2e678197aa81c78adced5d1d31ff57b1
2012-08-27 21:45:00 +02:00
Aaron Schulz
10aa3a3774 [FileBackend] Made copy script use error() for status dump.
Change-Id: I68a359e9ac1490683fb650d4c43f9b643e321701
2012-07-25 18:45:07 -07:00
Aaron Schulz
6455336013 [FileBackend] Added "bypassReadOnly" flag.
* Added flag to bypass read-only checks to the 6 write functions.
* Made backend copy and sync scripts pass in this new flag.
* Also made sync script use doQuickOperations() since its faster.

Change-Id: Iee47f79ed7ab002cfc2d0adb5321c3a8520f971d
2012-07-17 20:55:49 -07:00
Aaron
082cde1f9d [FileBackend] Improved copy/sync script output.
Change-Id: I5f76fdb579cf17959093e7a8659839e8b8829b1c
2012-07-10 11:33:24 -07:00
Aaron Schulz
cc3938316c [FileBackend] Syncing from journal support.
* Added FileJournal::getChangeEntries() and FileBackend::getJournal().
* Added a script to sync one file backend from another, using the journal of the later.
* Removed some overzealous exception catching in FileJournal.

Change-Id: I6cc8d4fa2479dcf88878dc0b351b3cc92f4a5ad5
2012-05-06 17:04:53 -07:00