Completed
Branch master (ca5378)
by James
06:48
created
code/NewsArticle.php 2 patches
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
                 $image->setRightTitle("Displayed to the right of the content in the main article, where it can be clicked to enlarge. <br />A thumbnail also appears next to the article summary on the main News page.");
55 55
                 $fields->addFieldToTab('Root.Main', $image, "Content");
56 56
 
57
-             });
57
+                });
58 58
 
59 59
             $fields = parent::getCMSFields();
60 60
             
@@ -98,13 +98,13 @@  discard block
 block discarded – undo
98 98
             parent::init();
99 99
         }
100 100
        
101
-       // Provides a resized image with the max width provided
102
-       public function ArticleImageSized($maxwidth = 250)
103
-       {
104
-           if ($this->AttachedImage()->getWidth() < $maxwidth) {
105
-               return $this->AttachedImage();
106
-           } else {
107
-               return $this->AttachedImage()->setWidth($maxwidth);
108
-           }
109
-       }
101
+        // Provides a resized image with the max width provided
102
+        public function ArticleImageSized($maxwidth = 250)
103
+        {
104
+            if ($this->AttachedImage()->getWidth() < $maxwidth) {
105
+                return $this->AttachedImage();
106
+            } else {
107
+                return $this->AttachedImage()->setWidth($maxwidth);
108
+            }
109
+        }
110 110
     }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
                     
38 38
         public function getCMSFields()
39 39
         {
40
-            $this->beforeUpdateCMSFields(function ($fields) {
40
+            $this->beforeUpdateCMSFields(function($fields) {
41 41
 
42 42
                 $datefield = new DateField('Date', 'Date (DD/MM/YYYY)');
43 43
                 $datefield->setConfig('showcalendar', true);
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
         {
69 69
             
70 70
             // Change MenuTitle, so date appears in CMS SiteTree
71
-            $this->MenuTitle = $this->Date.": ".$this->Title;
71
+            $this->MenuTitle = $this->Date . ": " . $this->Title;
72 72
             
73 73
             // Move to News holder if created under something else
74 74
             if ($this->Parent()->ClassName != "NewsHolder") {
Please login to merge, or discard this patch.
code/NewsHolder.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
9 9
 
10 10
         $this->beforeUpdateCMSFields(function ($fields) {
11 11
             $fields->renameField("Content", "Intro Content");
12
-      $fields->insertBefore(new Tab($this->getLumberjackTitle()), 'Main');
12
+        $fields->insertBefore(new Tab($this->getLumberjackTitle()), 'Main');
13 13
         });
14 14
 
15 15
         $fields = parent::getCMSFields();
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
     {
8 8
         $intro = null;
9 9
 
10
-        $this->beforeUpdateCMSFields(function ($fields) {
10
+        $this->beforeUpdateCMSFields(function($fields) {
11 11
             $fields->renameField("Content", "Intro Content");
12 12
       $fields->insertBefore(new Tab($this->getLumberjackTitle()), 'Main');
13 13
         });
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
         $fields = parent::getCMSFields();
16 16
 
17 17
         if ($intro) {
18
-            $intro->setRightTitle("Appears at the top of the main ".$this->Title." page, above the list of articles.");
18
+            $intro->setRightTitle("Appears at the top of the main " . $this->Title . " page, above the list of articles.");
19 19
         }
20 20
 
21 21
         return $fields;
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
             $list = NewsArticle::get(), // an SS_List containing your feed items
72 72
             $link = $this->Link("rss"), // a HTTP link to this feed
73 73
             $title = $config->Title . " News", // title for this feed, displayed in RSS readers
74
-            $description = "All the latest news from ". $config->Title . "." // description
74
+            $description = "All the latest news from " . $config->Title . "." // description
75 75
         );
76 76
         // Outputs the RSS feed to the user.
77 77
         return $rss->outputToBrowser();
Please login to merge, or discard this patch.