@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | { |
| 85 | 85 | //if base url YML is defined in YML, use that |
| 86 | 86 | if (Config::inst()->get(BasePage::class, 'pdf_base_url')) { |
| 87 | - $pdfBaseUrl = Config::inst()->get(BasePage::class, 'pdf_base_url').'/'; |
|
| 87 | + $pdfBaseUrl = Config::inst()->get(BasePage::class, 'pdf_base_url') . '/'; |
|
| 88 | 88 | //otherwise, if we are CWP use the secure domain |
| 89 | 89 | } elseif (Environment::getEnv('CWP_SECURE_DOMAIN')) { |
| 90 | 90 | $pdfBaseUrl = Environment::getEnv('CWP_SECURE_DOMAIN') . '/'; |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | */ |
| 102 | 102 | public function getPDFProxy($pdfBaseUrl) |
| 103 | 103 | { |
| 104 | - if (!defined('CWP_SECURE_DOMAIN') || $pdfBaseUrl == CWP_SECURE_DOMAIN.'/') { |
|
| 104 | + if (!defined('CWP_SECURE_DOMAIN') || $pdfBaseUrl == CWP_SECURE_DOMAIN . '/') { |
|
| 105 | 105 | $proxy = ''; |
| 106 | 106 | } else { |
| 107 | 107 | $proxy = ' --proxy ' . SS_OUTBOUND_PROXY . ':' . SS_OUTBOUND_PROXY_PORT; |
@@ -154,7 +154,7 @@ discard block |
||
| 154 | 154 | Config::inst()->update(Director::class, 'alternate_protocol', 'http'); |
| 155 | 155 | //only set alternate protocol if CWP_SECURE_DOMAIN is defined OR pdf_base_url is |
| 156 | 156 | if ($pdfBaseUrl) { |
| 157 | - Config::inst()->update(Director::class, 'alternate_base_url', 'http://'.$pdfBaseUrl); |
|
| 157 | + Config::inst()->update(Director::class, 'alternate_base_url', 'http://' . $pdfBaseUrl); |
|
| 158 | 158 | } |
| 159 | 159 | } |
| 160 | 160 | |
@@ -272,7 +272,7 @@ discard block |
||
| 272 | 272 | if ($results) { |
| 273 | 273 | $response = $response |
| 274 | 274 | ->customise($results) |
| 275 | - ->customise(array( 'Results' => $results->getResults() )); |
|
| 275 | + ->customise(array('Results' => $results->getResults())); |
|
| 276 | 276 | } |
| 277 | 277 | |
| 278 | 278 | // Render |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | |
| 32 | 32 | private static $table_name = 'NewsPage'; |
| 33 | 33 | |
| 34 | - public $pageIcon = 'images/icons/sitetree_images/news.png'; |
|
| 34 | + public $pageIcon = 'images/icons/sitetree_images/news.png'; |
|
| 35 | 35 | |
| 36 | 36 | public function fieldLabels($includerelations = true) |
| 37 | 37 | { |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | |
| 45 | 45 | public function getCMSFields() |
| 46 | 46 | { |
| 47 | - $this->beforeUpdateCMSFields(function (FieldList $fields) { |
|
| 47 | + $this->beforeUpdateCMSFields(function(FieldList $fields) { |
|
| 48 | 48 | $fields->addFieldToTab( |
| 49 | 49 | 'Root.Main', |
| 50 | 50 | TextField::create('Author', $this->fieldLabel('Author')), |
@@ -29,7 +29,7 @@ |
||
| 29 | 29 | |
| 30 | 30 | public function getCMSFields() |
| 31 | 31 | { |
| 32 | - $this->beforeUpdateCMSFields(function (FieldList $fields) { |
|
| 32 | + $this->beforeUpdateCMSFields(function(FieldList $fields) { |
|
| 33 | 33 | $fields->removeByName('RedirectorDescHeader'); |
| 34 | 34 | $fields->removeByName('RedirectionType'); |
| 35 | 35 | $fields->removeByName('LinkToID'); |
@@ -144,7 +144,7 @@ discard block |
||
| 144 | 144 | } |
| 145 | 145 | |
| 146 | 146 | if (isset($tag)) { |
| 147 | - $tag = (int)$tag; |
|
| 147 | + $tag = (int) $tag; |
|
| 148 | 148 | } |
| 149 | 149 | if (isset($from)) { |
| 150 | 150 | $from = urldecode($from); |
@@ -159,10 +159,10 @@ discard block |
||
| 159 | 159 | $to = $parser->Format('y-MM-dd'); |
| 160 | 160 | } |
| 161 | 161 | if (isset($year)) { |
| 162 | - $year = (int)$year; |
|
| 162 | + $year = (int) $year; |
|
| 163 | 163 | } |
| 164 | 164 | if (isset($month)) { |
| 165 | - $month = (int)$month; |
|
| 165 | + $month = (int) $month; |
|
| 166 | 166 | } |
| 167 | 167 | |
| 168 | 168 | // If only "To" has been provided filter by single date. Normalise by swapping with "From". |
@@ -171,7 +171,7 @@ discard block |
||
| 171 | 171 | } |
| 172 | 172 | |
| 173 | 173 | // Flip the dates if the order is wrong. |
| 174 | - if (isset($to) && isset($from) && strtotime($from)>strtotime($to)) { |
|
| 174 | + if (isset($to) && isset($from) && strtotime($from) > strtotime($to)) { |
|
| 175 | 175 | list($to, $from) = array($from, $to); |
| 176 | 176 | |
| 177 | 177 | if ($produceErrorMessages) { |
@@ -249,7 +249,7 @@ discard block |
||
| 249 | 249 | $tagID = $this->request->getVar('tag'); |
| 250 | 250 | |
| 251 | 251 | if (isset($tagID)) { |
| 252 | - return TaxonomyTerm::get_by_id(TaxonomyTerm::class, (int)$tagID); |
|
| 252 | + return TaxonomyTerm::get_by_id(TaxonomyTerm::class, (int) $tagID); |
|
| 253 | 253 | } |
| 254 | 254 | } |
| 255 | 255 | |
@@ -21,7 +21,7 @@ |
||
| 21 | 21 | |
| 22 | 22 | private static $icon = 'cwp/images/icons/sitetree_images/news_listing.png'; |
| 23 | 23 | |
| 24 | - public $pageIcon = 'images/icons/sitetree_images/news_listing.png'; |
|
| 24 | + public $pageIcon = 'images/icons/sitetree_images/news_listing.png'; |
|
| 25 | 25 | |
| 26 | 26 | private static $singular_name = 'News Holder'; |
| 27 | 27 | |
@@ -66,7 +66,7 @@ |
||
| 66 | 66 | |
| 67 | 67 | public function getCMSFields() |
| 68 | 68 | { |
| 69 | - $this->beforeUpdateCMSFields(function (FieldList $fields) { |
|
| 69 | + $this->beforeUpdateCMSFields(function(FieldList $fields) { |
|
| 70 | 70 | // Main Content tab |
| 71 | 71 | $fields->addFieldToTab( |
| 72 | 72 | 'Root.Main', |
@@ -55,7 +55,7 @@ |
||
| 55 | 55 | |
| 56 | 56 | public function getCMSFields() |
| 57 | 57 | { |
| 58 | - $this->beforeUpdateCMSFields(function (FieldList $fields) { |
|
| 58 | + $this->beforeUpdateCMSFields(function(FieldList $fields) { |
|
| 59 | 59 | $fields->addFieldToTab( |
| 60 | 60 | 'Root.Main', |
| 61 | 61 | $dateTimeField = DatetimeField::create('Date', $this->fieldLabel('Date')), |
@@ -184,7 +184,7 @@ discard block |
||
| 184 | 184 | |
| 185 | 185 | public function getCMSFields() |
| 186 | 186 | { |
| 187 | - $this->beforeUpdateCMSFields(function (FieldList $fields) { |
|
| 187 | + $this->beforeUpdateCMSFields(function(FieldList $fields) { |
|
| 188 | 188 | // Related Pages |
| 189 | 189 | $components = GridFieldConfig_RelationEditor::create(); |
| 190 | 190 | $components->removeComponentsByType(GridFieldAddNewButton::class); |
@@ -292,11 +292,11 @@ discard block |
||
| 292 | 292 | 'Locale' => i18n::convert_rfc1766($loc), |
| 293 | 293 | 'LangName' => $nativeLangName, |
| 294 | 294 | 'Link' => $link, |
| 295 | - 'Current' => (Translatable::get_current_locale()==$loc) |
|
| 295 | + 'Current' => (Translatable::get_current_locale() == $loc) |
|
| 296 | 296 | ))); |
| 297 | 297 | } |
| 298 | 298 | |
| 299 | - if ($translations->count()>1) { |
|
| 299 | + if ($translations->count() > 1) { |
|
| 300 | 300 | return $translations; |
| 301 | 301 | } else { |
| 302 | 302 | return null; |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | |
| 21 | 21 | private static $icon = 'cwp/images/icons/sitetree_images/event_page.png'; |
| 22 | 22 | |
| 23 | - public $pageIcon = 'images/icons/sitetree_images/event_page.png'; |
|
| 23 | + public $pageIcon = 'images/icons/sitetree_images/event_page.png'; |
|
| 24 | 24 | |
| 25 | 25 | private static $singular_name = 'Event Page'; |
| 26 | 26 | |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | |
| 67 | 67 | public function getCMSFields() |
| 68 | 68 | { |
| 69 | - $this->beforeUpdateCMSFields(function (FieldList $fields) { |
|
| 69 | + $this->beforeUpdateCMSFields(function(FieldList $fields) { |
|
| 70 | 70 | $fields->removeByName('Date'); |
| 71 | 71 | |
| 72 | 72 | $dateTimeFields = array(); |