Completed
Push — master ( 5dcbd9...ad771e )
by Leo
03:21
created
code/ExtendedBlocks/DualColumnBlock.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 class DualColumnBlock extends Block {
4
-	protected static $db = array (
4
+	protected static $db = array(
5 5
 		'LeftColumn'		=>	'HTMLText',
6 6
 		'RightColumn'	=>	'HTMLText'
7 7
 	);
Please login to merge, or discard this patch.
code/ExtendedBlocks/SingleColumnBlock.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 class SingleColumnBlock extends Block {
4
-	protected static $db = array (
4
+	protected static $db = array(
5 5
 		'Content'	=>	'HTMLText'
6 6
 	);
7 7
 }
8 8
\ No newline at end of file
Please login to merge, or discard this patch.
code/ExtendedBlocks/TriColumnBlock.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 class DualColumnBlock extends Block {
4
-	protected static $db = array (
4
+	protected static $db = array(
5 5
 		'LeftColumn'		=>	'HTMLText',
6 6
 		'RightColumn'	=>	'HTMLText'
7 7
 	);
Please login to merge, or discard this patch.
code/Extensions/BlockinPage.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,14 +1,14 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 class BlockinPage extends Extension {
3
-	protected static $belongs_many_many = array (
3
+	protected static $belongs_many_many = array(
4 4
 		'Blocks'			=>	'Block'
5 5
 	);
6 6
 	
7
-	public function updateCMSFields( FieldList $fields ) {
7
+	public function updateCMSFields(FieldList $fields) {
8 8
 		$ancestry = ClassInfo::ancestry($this->owner->ClassName);
9 9
 		if (!in_array('RedirectorPage', $ancestry) && !in_array('VirtualPage', $ancestry)) {
10 10
 			$blocks = $this->owner->Blocks();
11
-			$blocks_grid = $this->gridBuilder('Blocks', $blocks, '', true,'GridFieldConfig_RelationEditor');
11
+			$blocks_grid = $this->gridBuilder('Blocks', $blocks, '', true, 'GridFieldConfig_RelationEditor');
12 12
 			$docked_grid = $this->gridBuilder('DockedBlocks', $this->dockedBlocks(), '');
13 13
 			
14 14
 			$fields->addFieldToTab('Root.MyBlocks', $blocks_grid);
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 		$grid = new GridField($name, $label, $source);
28 28
 		$config = $gridHeaderType::create();
29 29
 		$config->removeComponentsByType('GridFieldAddNewButton');
30
-		if ( $canAdd ) {
30
+		if ($canAdd) {
31 31
 			$config->addComponents(
32 32
 				$multiClass = new GridFieldAddNewMultiClass(),
33 33
 				$sortable = new GridFieldOrderableRows('SortOrder')
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 				$IDs[] = $BlockID;
52 52
 			}
53 53
 		}
54
-		$blocks = Block::get()->filter('ID', $IDs)->sort('SortOrder','ASC');
54
+		$blocks = Block::get()->filter('ID', $IDs)->sort('SortOrder', 'ASC');
55 55
 		return $blocks;
56 56
 	}
57 57
 }
58 58
\ No newline at end of file
Please login to merge, or discard this patch.
code/Extensions/CustomBlockPermissions.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -2,11 +2,11 @@  discard block
 block discarded – undo
2 2
 
3 3
 class CustomBlockPermission extends DataExtension implements PermissionProvider {
4 4
 	public function canConfigPageAndType($member = false) {
5
-		return Permission::check(get_class($this->owner) . '_config_page_and_type');
5
+		return Permission::check(get_class($this->owner).'_config_page_and_type');
6 6
 	}
7 7
 	
8 8
 	public function canConfigMemberVisibility($member = false) {
9
-		return Permission::check(get_class($this->owner) . '_config_member_visibility');
9
+		return Permission::check(get_class($this->owner).'_config_member_visibility');
10 10
 	}
11 11
 	
12 12
 	public function providePermissions() {
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
 				'config_page_and_type',
17 17
 				'config_member_visibility'
18 18
 			) as $name) {
19
-				$permissions[$class . '_' . $name] = $class . '_' . $name;
19
+				$permissions[$class.'_'.$name] = $class.'_'.$name;
20 20
 			}
21 21
 		}
22 22
 		return $permissions;
Please login to merge, or discard this patch.
code/MultiClassSelector.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
 	public function getHTMLFragments($grid) {
21 21
 		$classes = $this->getClasses($grid);
22 22
 
23
-		if(!count($classes)) {
23
+		if (!count($classes)) {
24 24
 			return array();
25 25
 		}
26 26
 
Please login to merge, or discard this patch.
code/BlocksAdmin.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,8 +38,8 @@
 block discarded – undo
38 38
 		$subBlocks = ClassInfo::subclassesFor('Block');
39 39
 		if (is_null($subBlocks)) {
40 40
 			$subBlocks = array('Block');
41
-		}else{
42
-			$disabledTypes = Config::inst()->get('Block','DisabledBlocks');
41
+		} else {
42
+			$disabledTypes = Config::inst()->get('Block', 'DisabledBlocks');
43 43
 			Debugger::inspect($disabledTypes);
44 44
 			if (!empty($disabledTypes)) {
45 45
 				foreach ($disabledTypes as $disabledType) {
Please login to merge, or discard this patch.
_config.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-define('BLOCK_DIR',basename(dirname(__FILE__)));
3
+define('BLOCK_DIR', basename(dirname(__FILE__)));
4 4
 Requirements::block('rightsidebar/js/cms.js');
5
-LeftAndMain::require_javascript( BLOCK_DIR. '/js/silverstripe-block.script.js' );
5
+LeftAndMain::require_javascript(BLOCK_DIR.'/js/silverstripe-block.script.js');
6 6
 Requirements::css(BLOCK_DIR.'/css/blocks.css');
7 7
\ No newline at end of file
Please login to merge, or discard this patch.
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 &amp; Publish'));
23
+			$actions->insertBefore('action_doDelete', $btnPublish = FormAction::create('doPublish', 'Save &amp; 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.