mirror of
https://github.com/silverstripe/silverstripe-installer
synced 2024-10-22 17:05:33 +02:00
Merge branch '3'
This commit is contained in:
commit
69441aba44
20
index.php
20
index.php
@ -4,7 +4,7 @@
|
||||
************************************************************************************
|
||||
** **
|
||||
** If you can read this text in your browser then you don't have PHP installed. **
|
||||
** Please install PHP 5.5.0 or higher. **
|
||||
** Please install PHP 5.6.0 or higher. **
|
||||
** **
|
||||
************************************************************************************
|
||||
************************************************************************************/
|
||||
@ -26,17 +26,15 @@ $isIIS = (strpos($_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS') !== false);
|
||||
if ($isIIS) {
|
||||
if ($_SERVER['REQUEST_URI'] == $_SERVER['SCRIPT_NAME']) {
|
||||
$url = "";
|
||||
} elseif ($ruLen > $snLen && substr($_SERVER['REQUEST_URI'], 0, $snLen + 1) == ($_SERVER['SCRIPT_NAME'] . '/')) {
|
||||
$url = substr($_SERVER['REQUEST_URI'], $snLen + 1);
|
||||
$url = strtok($url, '?');
|
||||
} else {
|
||||
if ($ruLen > $snLen && substr($_SERVER['REQUEST_URI'], 0, $snLen + 1) == ($_SERVER['SCRIPT_NAME'] . '/')) {
|
||||
$url = substr($_SERVER['REQUEST_URI'], $snLen + 1);
|
||||
$url = strtok($url, '?');
|
||||
} else {
|
||||
$url = $_SERVER['REQUEST_URI'];
|
||||
if ($url[0] == '/') {
|
||||
$url = substr($url, 1);
|
||||
}
|
||||
$url = strtok($url, '?');
|
||||
$url = $_SERVER['REQUEST_URI'];
|
||||
if ($url[0] == '/') {
|
||||
$url = substr($url, 1);
|
||||
}
|
||||
$url = strtok($url, '?');
|
||||
}
|
||||
|
||||
// Apache will populate the server variables this way
|
||||
@ -67,4 +65,4 @@ if ($url && file_exists($fileName)) {
|
||||
die();
|
||||
}
|
||||
|
||||
require_once('framework/main.php');
|
||||
require_once 'framework/main.php';
|
||||
|
@ -4,13 +4,13 @@
|
||||
************************************************************************************
|
||||
** **
|
||||
** If you can read this text in your browser then you don't have PHP installed. **
|
||||
** Please install PHP 5.5.0 or higher. **
|
||||
** Please install PHP 5.6.0 or higher. **
|
||||
** **
|
||||
************************************************************************************
|
||||
************************************************************************************/
|
||||
|
||||
if (!file_exists('framework') || !file_exists('framework/_config.php')) {
|
||||
include "install-frameworkmissing.html";
|
||||
include 'install-frameworkmissing.html';
|
||||
} else {
|
||||
include('./framework/src/Dev/Install/install.php');
|
||||
include './framework/src/Dev/Install/install.php';
|
||||
}
|
||||
|
@ -5,10 +5,8 @@ use SilverStripe\CMS\Model\SiteTree;
|
||||
class Page extends SiteTree
|
||||
{
|
||||
private static $db = array(
|
||||
|
||||
);
|
||||
|
||||
private static $has_one = array(
|
||||
|
||||
);
|
||||
}
|
||||
|
29
mysite/code/Page_Controller.php
Normal file
29
mysite/code/Page_Controller.php
Normal file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
class Page_Controller extends ContentController
|
||||
{
|
||||
/**
|
||||
* An array of actions that can be accessed via a request. Each array element should be an action name, and the
|
||||
* permissions or conditions required to allow the user to access it.
|
||||
*
|
||||
* <code>
|
||||
* array (
|
||||
* 'action', // anyone can access this action
|
||||
* 'action' => true, // same as above
|
||||
* 'action' => 'ADMIN', // you must have ADMIN permissions to access this action
|
||||
* 'action' => '->checkAction' // you can only access this action if $this->checkAction() returns true
|
||||
* );
|
||||
* </code>
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
private static $allowed_actions = array(
|
||||
);
|
||||
|
||||
public function init()
|
||||
{
|
||||
parent::init();
|
||||
// You can include any CSS or JS required by your project here.
|
||||
// See: http://doc.silverstripe.org/framework/en/reference/requirements
|
||||
}
|
||||
}
|
24
phpcs.xml.dist
Normal file
24
phpcs.xml.dist
Normal file
@ -0,0 +1,24 @@
|
||||
<?xml version="1.0"?>
|
||||
<ruleset name="SS3">
|
||||
<description>Coding standard for SilverStripe 3.x</description>
|
||||
|
||||
<!-- Don't sniff third party libraries -->
|
||||
<exclude-pattern>*/vendor/*</exclude-pattern>
|
||||
<exclude-pattern>*/thirdparty/*</exclude-pattern>
|
||||
|
||||
<!-- Show progress and output sniff names on violation, and add colours -->
|
||||
<arg value="sp"/>
|
||||
<arg name="colors"/>
|
||||
|
||||
<!-- Use PSR-2 as a base standard -->
|
||||
<rule ref="PSR2">
|
||||
<!-- Allow classes to not declare a namespace -->
|
||||
<exclude name="PSR1.Classes.ClassDeclaration.MissingNamespace"/>
|
||||
|
||||
<!-- Allow underscores in class names -->
|
||||
<exclude name="Squiz.Classes.ValidClassName.NotCamelCaps"/>
|
||||
|
||||
<!-- Allow non camel cased method names -->
|
||||
<exclude name="PSR1.Methods.CamelCapsMethodName.NotCamelCaps"/>
|
||||
</rule>
|
||||
</ruleset>
|
Loading…
Reference in New Issue
Block a user