mirror of
https://github.com/silverstripe/silverstripe-installer
synced 2024-10-22 15:05:33 +00:00
Merge pull request #177 from nfauchelle/psr-2-adjustments
Update the PHP files to PSR-2 spec
This commit is contained in:
commit
d9f28b2017
@ -26,14 +26,18 @@ $isIIS = (strpos($_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS') !== false);
|
|||||||
if ($isIIS) {
|
if ($isIIS) {
|
||||||
if ($_SERVER['REQUEST_URI'] == $_SERVER['SCRIPT_NAME']) {
|
if ($_SERVER['REQUEST_URI'] == $_SERVER['SCRIPT_NAME']) {
|
||||||
$url = "";
|
$url = "";
|
||||||
} else if($ruLen > $snLen && substr($_SERVER['REQUEST_URI'],0,$snLen+1) == ($_SERVER['SCRIPT_NAME'] . '/')) {
|
} else {
|
||||||
|
if ($ruLen > $snLen && substr($_SERVER['REQUEST_URI'], 0, $snLen + 1) == ($_SERVER['SCRIPT_NAME'] . '/')) {
|
||||||
$url = substr($_SERVER['REQUEST_URI'], $snLen + 1);
|
$url = substr($_SERVER['REQUEST_URI'], $snLen + 1);
|
||||||
$url = strtok($url, '?');
|
$url = strtok($url, '?');
|
||||||
} else {
|
} else {
|
||||||
$url = $_SERVER['REQUEST_URI'];
|
$url = $_SERVER['REQUEST_URI'];
|
||||||
if($url[0] == '/') $url = substr($url,1);
|
if ($url[0] == '/') {
|
||||||
|
$url = substr($url, 1);
|
||||||
|
}
|
||||||
$url = strtok($url, '?');
|
$url = strtok($url, '?');
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Apache will populate the server variables this way
|
// Apache will populate the server variables this way
|
||||||
} else {
|
} else {
|
||||||
|
@ -5,8 +5,10 @@ use SilverStripe\CMS\Model\SiteTree;
|
|||||||
class Page extends SiteTree
|
class Page extends SiteTree
|
||||||
{
|
{
|
||||||
private static $db = array(
|
private static $db = array(
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
private static $has_one = array(
|
private static $has_one = array(
|
||||||
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -20,6 +20,7 @@ class PageController extends ContentController
|
|||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
private static $allowed_actions = array(
|
private static $allowed_actions = array(
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
protected function init()
|
protected function init()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user