Completed
Push — master ( 98e36f...5766a1 )
by Gordon
04:04
created
code/Advert.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
         $mainTab->setTitle(_t('SiteTree.TABMAIN', 'Main'));
70 70
 
71 71
         // human readable title
72
-        $fields->addFieldToTab('Root.Main',  new TextField('Title',
72
+        $fields->addFieldToTab('Root.Main', new TextField('Title',
73 73
                                     'Human readable title for the advert'));
74 74
 
75 75
         // a Javascript toggle on this field displays either the adbroker text field, or an image with URL
@@ -89,10 +89,10 @@  discard block
 block discarded – undo
89 89
         }
90 90
 
91 91
         // quick tags, faster than the grid editor - these are processed prior to save to create/assign tags
92
-        $fields->addFieldToTab('Root.Main',  new TextField('WebsiteLink',
92
+        $fields->addFieldToTab('Root.Main', new TextField('WebsiteLink',
93 93
                                     'The URL that will be shown when the advert image is clicked'));
94 94
 
95
-        $fields->addFieldToTab('Root.Main',  new TextareaField('AdbrokerJavascript',
95
+        $fields->addFieldToTab('Root.Main', new TextareaField('AdbrokerJavascript',
96 96
                                 'JavaScript provided by the adbroker'));
97 97
 
98 98
         $fields->addFieldToTab('Root.Main', $sdf = new DateField('StartDate', 'The date the advert becomes active'));
@@ -128,8 +128,8 @@  discard block
 block discarded – undo
128 128
     - last edited
129 129
     Otherwise the clickthrough will fail
130 130
     */
131
-    $data = $this->ID.'_'.$this->AdvertCategory()->Title.'_'.$this->AdvertLayoutType()->Title.'_'.$this->AdbrokerJavascript;
132
-    $data .= '_'.$this->StartDate.'_'.$this->FinishDate.'_'.$this->ClickThroughs.'_advert';
131
+    $data = $this->ID . '_' . $this->AdvertCategory()->Title . '_' . $this->AdvertLayoutType()->Title . '_' . $this->AdbrokerJavascript;
132
+    $data .= '_' . $this->StartDate . '_' . $this->FinishDate . '_' . $this->ClickThroughs . '_advert';
133 133
     $hashed = hash('sha512', $data);
134 134
     //error_log("HASH CREATED:".$hashed);
135 135
     return $hashed;
Please login to merge, or discard this patch.