This commit is contained in:
Aaron Carlino 2019-03-20 14:33:34 +13:00
parent 388baa01b4
commit f6a7bddd8d
2 changed files with 5 additions and 5 deletions

View File

@ -88,7 +88,7 @@ class GridFieldLevelup implements GridField_HTMLProvider
$template = SSViewer::get_templates_by_class($this, '', __CLASS__); $template = SSViewer::get_templates_by_class($this, '', __CLASS__);
return array( return array(
'before' => $forTemplate->renderWith($template), 'before' => $forTemplate->renderWith($template),
); );
} }
public function setAttributes($attrs) public function setAttributes($attrs)

View File

@ -139,11 +139,11 @@ if (!defined('BASE_URL')) {
) { ) {
$requestURI = $_SERVER['REQUEST_URI']; $requestURI = $_SERVER['REQUEST_URI'];
// Check if /base/public or /base are in the request // Check if /base/public or /base are in the request
foreach ([$baseURL, dirname($baseURL)] as $candidate) { foreach ([$baseURL, dirname($baseURL)] as $candidate) {
if (stripos($requestURI, $candidate) === 0) { if (stripos($requestURI, $candidate) === 0) {
return $candidate; return $candidate;
}
} }
}
// Ambiguous // Ambiguous
return ''; return '';
} }