Completed
Push — master ( 9da255...e06f1c )
by Leo
03:13
created
code/Admin/VersionedForm.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
 		if ($form instanceof Form) {
21 21
 			$actions = $form->Actions();
22 22
 			$record = $this->record;
23
-			$actions->insertBefore('action_doDelete', $btnPublish = FormAction::create('doPublish','Save & Publish'));
23
+			$actions->insertBefore('action_doDelete', $btnPublish = FormAction::create('doPublish', 'Save & Publish'));
24 24
 			$btnPublish->addExtraClass('ss-ui-action-constructive');
25 25
 			if (!empty($record->ID)) {
26 26
 				if ($record->isPublished()) {
Please login to merge, or discard this patch.
code/Block.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@  discard block
 block discarded – undo
3 3
 use SaltedHerring\Debugger as Debugger;
4 4
 
5 5
 class Block extends DataObject {
6
-	protected static $db = array (
6
+	protected static $db = array(
7 7
 		'SortOrder'			=>	'Int',
8 8
 		'Title'				=>	'Varchar(64)',
9 9
 		'TitleWrapper'		=>	'Enum("h2,h3,h4,h5,h6")',
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
 		'addMarginBottom'	=>	'Boolean'
17 17
 	);
18 18
 	
19
-	protected static $many_many = array (
19
+	protected static $many_many = array(
20 20
 		'Pages'				=>	'Page'
21 21
 	);
22 22
 	
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 		'MySQLDatabase'		=> 'ENGINE=MyISAM'
30 30
     );
31 31
 	
32
-	protected static $extensions = array (
32
+	protected static $extensions = array(
33 33
 		'StandardPermissions'
34 34
 	);
35 35
 	
@@ -50,12 +50,12 @@  discard block
 block discarded – undo
50 50
 	
51 51
 	public function VisibleTo() {
52 52
 		if (strlen(trim($this->MemberVisibility)) > 0) {
53
-			$lists = 'Group: ' . str_replace(',','<br />Group: ', $this->MemberVisibility);
54
-		}else{
53
+			$lists = 'Group: '.str_replace(',', '<br />Group: ', $this->MemberVisibility);
54
+		} else {
55 55
 			$lists = '<em>&lt;All&gt;</em>';
56 56
 		}
57 57
 		
58
-		return new LiteralField('VisibleTo',$lists);
58
+		return new LiteralField('VisibleTo', $lists);
59 59
 	}
60 60
 	
61 61
 	public function BlockType() {
@@ -65,18 +65,18 @@  discard block
 block discarded – undo
65 65
 	public function shownOn() {
66 66
 		if ($this->showBlockbyClass) {
67 67
 			if (strlen(trim($this->shownInClass)) > 0) {
68
-				$lists = 'Type: ' . str_replace(',','<br />Type: ', $this->shownInClass);
69
-			}else{
68
+				$lists = 'Type: '.str_replace(',', '<br />Type: ', $this->shownInClass);
69
+			} else {
70 70
 				$lists = '<em>&lt;not assigned&gt;</em>';
71 71
 			}
72
-		}else{
72
+		} else {
73 73
 			if ($this->Pages()->count() > 0) {
74
-				$lists = 'Page: ' . implode('<br />Page: ', $this->Pages()->column('Title'));
75
-			}else{
74
+				$lists = 'Page: '.implode('<br />Page: ', $this->Pages()->column('Title'));
75
+			} else {
76 76
 				$lists = '<em>&lt;not assigned&gt;</em>';
77 77
 			}
78 78
 		}
79
-		return new LiteralField('shownOn',$lists);
79
+		return new LiteralField('shownOn', $lists);
80 80
 	}
81 81
 	
82 82
 	public function getCMSFields() {
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 			'MemberVisibility'
90 90
 		));
91 91
 		
92
-		$fields->addFieldToTab('Root.Main', LiteralField::create('Status', 'Status: ' . $this->Published()), 'Title');
92
+		$fields->addFieldToTab('Root.Main', LiteralField::create('Status', 'Status: '.$this->Published()), 'Title');
93 93
 		
94 94
 		$memberGroups = Group::get();
95 95
 		$sourcemap = $memberGroups->map('Code', 'Title');
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
 		$pageSelector = new CheckboxSetField(
133 133
 			$name = "Pages",
134 134
 			$title = "Show on Page(s)",
135
-			$availablePages->map('ID','Title')
135
+			$availablePages->map('ID', 'Title')
136 136
 		);
137 137
 		
138 138
 		
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
 	public function onAfterWrite() {
176 176
 		parent::onAfterWrite();
177 177
 		if (isset($this->readmode)) {
178
-			Versioned::set_reading_mode('Stage.' . $this->readmode);
178
+			Versioned::set_reading_mode('Stage.'.$this->readmode);
179 179
 		}
180 180
 	}
181 181
 	
Please login to merge, or discard this patch.