diff --git a/docs/en/howto/grouping-dataobjectsets.md b/docs/en/howto/grouping-dataobjectsets.md index 5a37101ae..87dbcf0e5 100644 --- a/docs/en/howto/grouping-dataobjectsets.md +++ b/docs/en/howto/grouping-dataobjectsets.md @@ -117,7 +117,7 @@ sorted by month name from January to December. This can be accomplshed by sortin class Page extends SiteTree { // ... - + /** * Returns all news items, sorted by the month they were posted * @return GroupedList diff --git a/docs/en/reference/execution-pipeline.md b/docs/en/reference/execution-pipeline.md index a196cd9b9..7a71f94cd 100644 --- a/docs/en/reference/execution-pipeline.md +++ b/docs/en/reference/execution-pipeline.md @@ -30,7 +30,6 @@ The basic .htaccess file after installing SilverStripe look like this: RewriteRule .* framework/main.php?url=%1&%{QUERY_STRING} [L] ### SILVERSTRIPE END ### - The `` section denies direct access to the template files from anywhere but the server itself. diff --git a/docs/en/reference/injector.md b/docs/en/reference/injector.md index aca41aba9..98ce9c4b2 100644 --- a/docs/en/reference/injector.md +++ b/docs/en/reference/injector.md @@ -61,7 +61,7 @@ The subsequent call returns the SAME object as the first call. // set by the injector on object creation public $permissions; public $textProperty; - + static $dependencies = array( 'textProperty' => 'a string value', 'permissions' => '%$PermissionService', @@ -123,11 +123,11 @@ Assuming a class structure such as $this->database = $d; } } - + class MySQLDatabase { private $username; private $password; - + public function __construct($username, $password) { $this->username = $username; $this->password = $password; diff --git a/docs/en/reference/member.md b/docs/en/reference/member.md index a3a25447b..1dfd05707 100644 --- a/docs/en/reference/member.md +++ b/docs/en/reference/member.md @@ -34,7 +34,6 @@ Returns the full *Member* Object for the current user, returns *null* if user is } - ## Subclassing
diff --git a/docs/en/reference/restfulservice.md b/docs/en/reference/restfulservice.md index 5d98a4f02..7bd175b1f 100644 --- a/docs/en/reference/restfulservice.md +++ b/docs/en/reference/restfulservice.md @@ -49,7 +49,7 @@ RestfulService (see [flickrservice](http://silverstripe.org/flickr-module/) and $peopleXML = $service->connect('/people'); $people = $service->getValues($peopleXML, 'user'); - ... + // ... $taskXML = $service->connect('/tasks'); $tasks = $service->getValues($taskXML, 'task'); @@ -117,16 +117,13 @@ If the web service returned an error (for example, API key not available or inad could delgate the error handling to it's descendant class. To handle the errors define a function called errorCatch :::php - /* - This will raise Youtube API specific error messages (if any). - - */ + // This will raise Youtube API specific error messages (if any). public function errorCatch($response){ $err_msg = $response; - if(strpos($err_msg, '<') === false) - //user_error("YouTube Service Error : $err_msg", E_USER_ERROR); - user_error("YouTube Service Error : $err_msg", E_USER_ERROR); - else + if(strpos($err_msg, '<') === false) { + user_error("YouTube Service Error : $err_msg", E_USER_ERROR); + } + return $response; } diff --git a/docs/en/reference/site-reports.md b/docs/en/reference/site-reports.md index dd59e1686..5d424789f 100644 --- a/docs/en/reference/site-reports.md +++ b/docs/en/reference/site-reports.md @@ -31,13 +31,13 @@ CustomSideReport.php @@ -52,23 +52,22 @@ CustomSideReport.php :::php sort("Title"); } public function fieldsToShow() { - // fields you want to display. This will display a list of titles which link to the page in the cms. Handy! + // fields you want to display. This will display a list of titles which link to the page in the cms. Handy! return array( "Title" => array("NestedTitle", array("2")), ); diff --git a/docs/en/reference/templates.md b/docs/en/reference/templates.md index 8b237c7a9..710cffae3 100644 --- a/docs/en/reference/templates.md +++ b/docs/en/reference/templates.md @@ -21,7 +21,7 @@ Here is a very simple template:

Bob's Chicken Shack

- + <% with $CurrentMember %>

Welcome $FirstName $Surname.

<% end_with %> diff --git a/docs/en/topics/datamodel.md b/docs/en/topics/datamodel.md index ac415d84b..df919042f 100755 --- a/docs/en/topics/datamodel.md +++ b/docs/en/topics/datamodel.md @@ -276,7 +276,6 @@ For example: :::php // Without an alias $members = Member::get()->leftJoin("Group_Members", "\"Group_Members\".\"MemberID\" = \"Member\".\"ID\""); - $members = Member::get()->innerJoin("Group_Members", "\"Rel\".\"MemberID\" = \"Member\".\"ID\"", "REl"); Passing a *$join* statement to DataObject::get will filter results further by the JOINs performed against the foreign diff --git a/docs/en/tutorials/2-extending-a-basic-site.md b/docs/en/tutorials/2-extending-a-basic-site.md index 03ecbda85..04103e108 100644 --- a/docs/en/tutorials/2-extending-a-basic-site.md +++ b/docs/en/tutorials/2-extending-a-basic-site.md @@ -193,7 +193,6 @@ the date field will have the date format defined by your locale. :::php First(); return ($holder) ? ArticlePage::get()->filter('ParentID', $holder->ID)->sort('Date DESC')->limit($num) : false; } - ... This function simply runs a database query that gets the latest news articles from the database. By default, this is five, but you can change it by passing a number to the function. See the [Data Model](../topics/datamodel) documentation for details. We can reference this function as a page control in our *HomePage* template: @@ -369,13 +367,12 @@ This function simply runs a database query that gets the latest news articles fr **themes/simple/templates/Layout/Homepage.ss** :::ss - ... -
$Content
+ +
$Content
<% loop LatestNews %> <% include ArticleTeaser %> <% end_loop %> - ... When SilverStripe comes across a variable or page control it doesn't recognize, it first passes control to the controller. If the controller doesn't have a function for the variable or page control, it then passes control to the data object. If it has no matching functions, it then searches its database fields. Failing that it will return nothing. @@ -444,7 +441,6 @@ Nothing here should be new. The *StaffPage* page type is more interesting though :::php