diff --git a/core/Constants.php b/core/Constants.php
index 92d6b207f..94a67f0e4 100644
--- a/core/Constants.php
+++ b/core/Constants.php
@@ -111,7 +111,7 @@ if(!defined('TRUSTED_PROXY')) {
*/
if(!isset($_SERVER['HTTP_HOST'])) {
// HTTP_HOST, REQUEST_PORT, SCRIPT_NAME, and PHP_SELF
- global $_FILE_TO_URL_MAPPING;
+ global $_FILE_TO_URL_MAPPING;
if(isset($_FILE_TO_URL_MAPPING)) {
$fullPath = $testPath = realpath($_SERVER['SCRIPT_FILENAME']);
while($testPath && $testPath != '/' && !preg_match('/^[A-Z]:\\\\$/', $testPath)) {
@@ -159,7 +159,7 @@ if(!isset($_SERVER['HTTP_HOST'])) {
$trustedProxyHeader = (defined('SS_TRUSTED_PROXY_HOST_HEADER'))
? SS_TRUSTED_PROXY_HOST_HEADER
: 'HTTP_X_FORWARDED_HOST';
-
+
if (TRUSTED_PROXY && !empty($_SERVER[$trustedProxyHeader])) {
// Get the first host, in case there's multiple separated through commas
$_SERVER['HTTP_HOST'] = strtok($_SERVER[$trustedProxyHeader], ',');
diff --git a/core/manifest/ConfigManifest.php b/core/manifest/ConfigManifest.php
index 40a4f540d..ad15bc43b 100644
--- a/core/manifest/ConfigManifest.php
+++ b/core/manifest/ConfigManifest.php
@@ -250,7 +250,7 @@ class SS_ConfigManifest {
// Keep track of all the modules we've seen
$this->addModule(dirname(dirname($pathname)));
-
+
$parser = new Parser();
// The base header
diff --git a/dev/DevelopmentAdmin.php b/dev/DevelopmentAdmin.php
index 55584cb20..d3553e824 100644
--- a/dev/DevelopmentAdmin.php
+++ b/dev/DevelopmentAdmin.php
@@ -2,7 +2,7 @@
/**
* Base class for development tools.
- *
+ *
* Configured in framework/_config/dev.yml, with the config key registeredControllers being
* used to generate the list of links for /dev.
*
@@ -21,9 +21,9 @@ class DevelopmentAdmin extends Controller {
'generatesecuretoken' => 'generatesecuretoken',
'$Action' => 'runRegisteredController',
);
-
- private static $allowed_actions = array(
- 'index',
+
+ private static $allowed_actions = array(
+ 'index',
'buildDefaults',
'runRegisteredController',
'generatesecuretoken',
@@ -110,17 +110,17 @@ class DevelopmentAdmin extends Controller {
public function runRegisteredController(SS_HTTPRequest $request){
$controllerClass = null;
-
+
$baseUrlPart = $request->param('Action');
$reg = Config::inst()->get(__CLASS__, 'registered_controllers');
if(isset($reg[$baseUrlPart])){
$controllerClass = $reg[$baseUrlPart]['controller'];
}
-
+
if($controllerClass && class_exists($controllerClass)){
return $controllerClass::create();
}
-
+
$msg = 'Error: no controller registered in '.__CLASS__.' for: '.$request->param('Action');
if(Director::is_cli()){
// in CLI we cant use httpError because of a bug with stuff being in the output already, see DevAdminControllerTest
@@ -130,9 +130,9 @@ class DevelopmentAdmin extends Controller {
}
}
-
-
-
+
+
+
/*
* Internal methods
*/
@@ -142,7 +142,7 @@ class DevelopmentAdmin extends Controller {
*/
protected static function get_links(){
$links = array();
-
+
$reg = Config::inst()->get(__CLASS__, 'registered_controllers');
foreach($reg as $registeredController){
foreach($registeredController['links'] as $url => $desc){
@@ -154,18 +154,18 @@ class DevelopmentAdmin extends Controller {
protected function getRegisteredController($baseUrlPart){
$reg = Config::inst()->get(__CLASS__, 'registered_controllers');
-
+
if(isset($reg[$baseUrlPart])){
$controllerClass = $reg[$baseUrlPart]['controller'];
return $controllerClass;
}
-
+
return null;
}
-
-
-
-
+
+
+
+
/*
* Unregistered (hidden) actions
*/
diff --git a/dev/YamlFixture.php b/dev/YamlFixture.php
index 48fdda8a7..b3377d103 100644
--- a/dev/YamlFixture.php
+++ b/dev/YamlFixture.php
@@ -4,42 +4,42 @@ use Symfony\Component\Yaml\Parser;
/**
* Uses Symfony's YAML component to parse a YAML document (see http://yaml.org).
- * YAML is a simple markup languages that uses tabs and colons instead of the more verbose XML tags,
+ * YAML is a simple markup languages that uses tabs and colons instead of the more verbose XML tags,
* and because of this much better for developers creating files by hand.
- *
+ *
* The contents of the YAML file are broken into three levels:
- * - Top level: class names - Page and ErrorPage. This is the name of the dataobject class that should be created.
- * The fact that ErrorPage is actually a subclass is irrelevant to the system populating the database.
- * Each identifier you specify delimits a new database record.
+ * - Top level: class names - Page and ErrorPage. This is the name of the dataobject class that should be created.
+ * The fact that ErrorPage is actually a subclass is irrelevant to the system populating the database.
+ * Each identifier you specify delimits a new database record.
* This means that every record needs to have an identifier, whether you use it or not.
- * - Third level: fields - each field for the record is listed as a 3rd level entry.
- * In most cases, the field's raw content is provided.
+ * - Third level: fields - each field for the record is listed as a 3rd level entry.
+ * In most cases, the field's raw content is provided.
* However, if you want to define a relationship, you can do so using "=>"
- *
+ *
* There are a couple of lines like this:
*
* Parent: =>Page.about
*
* This will tell the system to set the ParentID database field to the ID of the Page object with the identifier
- * 'about'. This can be used on any has-one or many-many relationship.
+ * 'about'. This can be used on any has-one or many-many relationship.
* Note that we use the name of the relationship (Parent), and not the name of the database field (ParentID)
*
* On many-many relationships, you should specify a comma separated list of values.
*
* MyRelation: =>Class.inst1,=>Class.inst2,=>Class.inst3
*
- *
- * An crucial thing to note is that the YAML file specifies DataObjects, not database records.
- * The database is populated by instantiating DataObject objects, setting the fields listed, and calling write().
- * This means that any onBeforeWrite() or default value logic will be executed as part of the test.
+ *
+ * An crucial thing to note is that the YAML file specifies DataObjects, not database records.
+ * The database is populated by instantiating DataObject objects, setting the fields listed, and calling write().
+ * This means that any onBeforeWrite() or default value logic will be executed as part of the test.
* This forms the basis of our testURLGeneration() test above.
- *
- * For example, the URLSegment value of Page.staffduplicate is the same as the URLSegment value of Page.staff.
+ *
+ * For example, the URLSegment value of Page.staffduplicate is the same as the URLSegment value of Page.staff.
* When the fixture is set up, the URLSegment value of Page.staffduplicate will actually be my-staff-2.
- *
- * Finally, be aware that requireDefaultRecords() is not called by the database populator -
+ *
+ * Finally, be aware that requireDefaultRecords() is not called by the database populator -
* so you will need to specify standard pages such as 404 and home in your YAML file.
- *
+ *
*
* Page:
* home:
@@ -61,7 +61,7 @@ use Symfony\Component\Yaml\Parser;
* Title: Page not Found
* ErrorCode: 404
*
- *
+ *
* @package framework
* @subpackage core
*/
@@ -97,10 +97,10 @@ class YamlFixture extends Object {
$this->fixtureFile = $fixture;
}
-
+
parent::__construct();
}
-
+
/**
* @return String Absolute file path
*/
@@ -119,7 +119,7 @@ class YamlFixture extends Object {
* Persists the YAML data in a FixtureFactory,
* which in turn saves them into the database.
* Please use the passed in factory to access the fixtures afterwards.
- *
+ *
* @param FixtureFactory $factory
*/
public function writeInto(FixtureFactory $factory) {
diff --git a/email/Mailer.php b/email/Mailer.php
index 0e44df151..42b25afeb 100644
--- a/email/Mailer.php
+++ b/email/Mailer.php
@@ -3,7 +3,7 @@
/**
* Mailer objects are responsible for actually sending emails.
* The default Mailer class will use PHP's mail() function.
- *
+ *
* @package framework
* @subpackage email
*/
@@ -130,7 +130,7 @@ class Mailer extends Object {
/**
* Send a plain-text email.
- *
+ *
* @param string $to Email recipient
* @param string $from Email from
* @param string $subject Subject text
@@ -179,7 +179,7 @@ class Mailer extends Object {
/**
* Send an email of an arbitrary format
- *
+ *
* @param string $to To
* @param string $from From
* @param string $subject Subject
@@ -199,7 +199,7 @@ class Mailer extends Object {
if($attachedFiles) {
list($fullBody, $headers) = $this->encodeAttachments($attachedFiles, $headers, $fullBody);
}
-
+
// Get bounce email
$bounceAddress = $this->getBounceEmail() ?: $from;
if(preg_match('/^([^<>]*)<([^<>]+)> *$/', $bounceAddress, $parts)) $bounceAddress = $parts[2];
@@ -214,7 +214,7 @@ class Mailer extends Object {
/**
* Send the actual email
- *
+ *
* @param string $to
* @param string $subjectEncoded
* @param string $fullBody
@@ -228,11 +228,11 @@ class Mailer extends Object {
if(!$result) {
$result = mail($to, $subjectEncoded, $fullBody, $headersEncoded);
}
-
+
if($result) {
return array($to, $subjectEncoded, $fullBody, $headersEncoded, $bounceAddress);
}
-
+
return false;
}
@@ -271,7 +271,7 @@ class Mailer extends Object {
*/
protected function preparePlainSubmessage($plainContent, $htmlContent) {
$plainEncoding = $this->getMessageEncoding();
-
+
// Generate plain text version if not explicitly given
if(!$plainContent) $plainContent = Convert::xml2raw($htmlContent);
@@ -304,7 +304,7 @@ class Mailer extends Object {
"\n